Spatiotemporal Patterns and Nonlinear Compositional Attribution of Ecological Security in the Hexi Corridor, China: A Health–Risk–Services Assessment with Explainable Machine Learning
Xiangfei Tang, Zhen Zhang, Zongcai Cai, Jing Ding, Xiaodong Ge, Hehe LiuArid inland river basins are ecologically fragile and sensitive to human–land interactions, and their ecological security is central to regional sustainability. Focusing on the Hexi Corridor in northwestern China, this study developed a health–risk–services assessment framework that integrates ecosystem health, ecological risk, and ecosystem services, constructed a comprehensive ecological security index (CESI) for 2010 and 2020, benchmarked it at the pixel scale against a separately derived Remote Sensing Ecological Index (RSEI), and identified the nonlinear explanatory power of natural and anthropogenic factors using an optimal parameter-based geographical detector (OPGD) and explainable machine learning based on XGBoost with Shapley additive explanations (XGBoost-SHAP). The results show that (1) mean CESI rose only slightly, from 0.286 to 0.288, so that spatial differentiation was more pronounced than temporal change; the south-to-north gradient persisted, decreasing from the Qilian Mountains and central oasis corridor toward the northern desert; (2) mean annual precipitation and vegetation cover had the highest explanatory power in 2010 (Q = 0.6168 and 0.6053), whereas by 2020 vegetation cover and mean patch area ranked first and second (Q = 0.6324 and 0.5492); grazing pressure gained explanatory power while temperature contributed negatively to the index, with paired-factor interactions usually exceeding those of single factors; (3) the explanatory power of the variables was not governed by the weights assigned during index construction; and (4) the CESI agreed closely with the RSEI in 2020 (Pearson’s R = 0.782), although this partly reflects their shared vegetation signal. These results show that compositional attribution must be distinguished from external drivers in assessing ecological security in water-limited inland river basins.