Abstract Ecological security exhibits pronounced nonlinear responses and spatial heterogeneity to natural conditions and human activities, yet the spatial differentiation of these nonlinear thresholds across contrasting ecological contexts remains poorly understood. Focusing on Central Yunnan, China, this study developed a data-driven framework integrating the Driver–Pressure–State–Ecosystem services–Response framework with explainable machine learning and multi-source remote sensing data to assess spatiotemporal changes in ecological security from 2000 to 2020 and identify the nonlinear threshold responses of key drivers across ecological zones. The results showed that the regional mean ecological security index (ESI) increased from 0.3533 in 2000 to 0.3798 in 2020, indicating an overall fluctuating upward trend. Areas with improved ecological security accounted for 71.56% of the study area, whereas 28.44% showed decline, with degraded areas mainly concentrated in impervious surfaces their surrounding regions. Ecological security displayed marked spatial differentiation, with relatively high ESI values in Zones 1, 3 and 5, whereas Zone 2 remained persistently low. The magnitude of improvement also varies significantly among different ecological zones, with Zone 1 showing the largest increase (0.0681) and Zone 8 the smallest (0.0138). Among the examined drivers, slope consistently emerged as the most stable and influential factor at the regional scale, followed by precipitation and elevation. SHAP-based analysis further revealed a pronounced nonlinear threshold effect of slope on ecological security, with global thresholds persistently concentrated within 13°–15°, yet showing clear spatial heterogeneity among ecological zones. These findings provide new insight into ecological security formation mechanisms and support differentiated ecological governance.
He et al. (Sun,) studied this question.