To examine the integrated influence of urban spatial form on the urban heat island (UHI) effect, this study selects the area within Beijing’s Fifth Ring Road as a case study. A multiscale grid system is established to quantify fourteen two- and three-dimensional morphological indicators. A Random Forest algorithm is employed to assess the relative importance of each factor. The optimal analytical scale for each key variable is then identified, and its nonlinear relationship with land surface temperature (LST) is analyzed at that scale. The main findings are as follows: (1) The Random Forest model achieves the highest predictive accuracy at a 600 m scale, significantly outperforming traditional linear models by effectively addressing multicollinearity. This suggests that machine learning offers robust technical support for UHI research. (2) Form variables exhibit distinct scale dependencies. Two-dimensional indicators dominate at medium to large scales, while three-dimensional indicators are more influential at smaller scales. Specifically, the mean building height is most significant at the 150 m scale, the standard deviation of building height at 300 m, and the impervious surface fraction at 600–1200 m. (3) Strong nonlinear effects are identified. The bare soil fraction below 0.12 intensifies surface warming; the water body fraction between 0.20 and 0.35 provides the strongest cooling; plant coverage offers maximum cooling between 0.25 and 0.45; building density cools below 0.3 buildings/hm2 but contributes to warming beyond this threshold; building coverage ratio generates the greatest warming between 0.08 and 0.32; height variability provides optimal cooling between 8 m and 40 m; and mean building height shows a positive correlation with LST below 6 m but a negative one above that height.
Understanding how urban morphology regulates Land Surface Temperature (LST) is important in the context of rapid urbanization and increasingly frequent extreme climate events. Although both two-dimensional (2D) and three-dimensional (3D) morphological factors are known to affect urban thermal environments, their relative explanatory roles, factor-specific optimal scales, and nonlinear responses are still insufficiently quantified within a unified multi-scale framework. This study focuses on the area within Beijing’s Fifth Ring Road and applies an interpretable LightGBM-SHAP framework to examine the multi-scale relationships between integrated 2D/3D urban morphology and LST using a Landsat 8 image acquired during a typical summer daytime heatwave event. Five analytical scales (150, 300, 600, 900, and 1200 m) are evaluated to compare factor importance, identify optimal explanatory scales, and characterize threshold-like response patterns. The LightGBM models maintained relatively strong predictive performance across all scales under spatial cross-validation, with the highest mean R2 observed at 600 m, followed closely by 300 m. The results indicate a clear scale-dependent contrast in explanatory dominance: 2D factors show stronger associations with LST at fine-to-medium scales, whereas 3D factors become more influential at coarser scales. From a process perspective, this contrast is consistent with differences in surface-cover-related and vertical-structure-related thermal regulation, although the underlying physical mechanisms are not directly tested in this study. SHAP analysis further identifies factor-specific nonlinear response intervals for several key indicators under the selected extreme-heat condition. For example, a cooling tendency is observed when Mean Building Height (MBH) exceeds 15 m at the 150 m scale. These findings provide scale-explicit and context-specific evidence for interpreting urban morphology–LST relationships and support heat-mitigation strategies that combine micro-scale surface-cover optimization with larger-scale regulation of building height variation and urban roughness. The identified response intervals should be interpreted as empirical references under a typical daytime heatwave condition rather than as universally transferable climatological thresholds.