Kejia Fu, Jianping Wu, Yong Huang
Understanding how the built environment relates to urban ecological resilience is essential for resilience-oriented planning in high-density cities. Using Wuhan, China, as a case study, we constructed a 1 km grid-based Ecological Resilience Index (ERI) by integrating ecosystem resistance, adaptability, and recovery, and we confirmed significant spatial autocorrelation in ERI. We then applied a Bayesian-optimized XGBoost model (v2.0.3) with block-based spatial cross-validation to improve robustness under spatial dependence, and used SHAP to interpret nonlinear, threshold-like patterns and interactions among predictors. The results indicate that building coverage ratio (BCR), nighttime light intensity (NTL), elevation (ELE), mean building height (MBH), and precipitation (PRE) were the most influential predictors of ERI. SHAP main effects indicate clear non-monotonic and threshold-like response patterns across key predictors. SHAP interaction analysis further suggests that, under high BCR, the SHAP interaction term tends to be positive when MBH is below approximately 10 m, whereas the interaction between high NTL and low MBV is predominantly negative. This study provides fine-scale empirical evidence to inform the optimization of three-dimensional urban morphology to support urban ecological resilience.