Spatial Clustering and Nonlinear Drivers of Urban Ecological Quality Improvement in Chinese Cities: Evidence from Urban Ecological Quality Index and Explainable Machine Learning
Yuan Liu, Haoyuan Wu, Jiayuan Mao, Shuhui Lai, Zechen Wang, Shiliang LiuUnderstanding how urban ecological quality changes across space and why cities follow different trajectories is important for differentiated land and environmental governance. We assessed 288 Chinese prefecture-level and above cities from 2015 to 2024. The Urban Ecological Quality Index (UEQI) was constructed solely from four ecological components: built-up green coverage, forest coverage, PM2.5 concentration, and carbon-dioxide emission intensity. A separate set of 15 variables describing demographic, economic, urban-form, resource-use, governance, innovation, and digital-connectivity conditions was linked to the completed UEQI as an explanatory predictor matrix. Pearson correlation characterized bivariate associations, whereas XGBoost with SHAP quantified the multivariable nonlinear contributions of these variables to UEQI variation; none of them entered the index calculation. The analytical framework followed ecological change over the decade, diagnosed spatial clustering, examined nonlinear driver relationships, and tested whether those relationships transferred to later years and previously unseen cities. Mean UEQI increased from 55.40 in 2015 to 68.78 in 2024, while its cross-city standard deviation declined from 15.10 to 12.54. All 288 cities had positive long-term slopes, with a median increase of 1.52 UEQI points per year, and 268 retained statistically significant improving trends after false-discovery-rate correction. Strong spatial clustering persisted throughout the decade (Moran’s I = 0.692–0.728), and improvement rates were also spatially clustered (I = 0.372). Predictive accuracy was high under mixed city–year sampling (R2 = 0.868) but declined for later years (R2 = 0.775) and previously unseen cities (R2 = 0.456). Population density and electricity intensity emerged as the two most influential external predictors, and both showed nonlinear relationships with UEQI. Because neither variable was used to construct the index, these results describe conditional associations with the four-component UEQI; they do not mean that either variable is part of the index or that it causally changes ecological quality. Overall, urban ecological quality improved widely but unevenly, and national diagnostic relationships require local validation before being translated into city-specific policy.