Climate change is exacerbating rainstorms, increasing the risk of flooding and threatening urban sustainability, which could undermine climate action. Here, we propose a machine learning-based framework to assess heterogeneous risks and identify critical mitigation measures for rainstorms across 268 Chinese cities. Nighttime light serves as a proxy for urban functionality, and meteorological, socio-economic, and infrastructural factors are incorporated to uncover underlying impact mechanisms. The Causal Forest (CF) model identifies 150 and 250 mm monthly rainstorm totals as critical thresholds, with significant negative impacts in the risk hotspots of eastern and north-central China. Additionally, Random Forest and SHAP (RF-SHAP) analysis highlight effective mitigation strategies, including well-developed drainage and bridges, expanded road networks, and sufficient dams. The Fixed Effects (FE) model reveals that the greatest negative impacts of rainstorms occur in spring, particularly in April, followed by autumn and winter for both the 50 and 150 mm thresholds. Our results demonstrate that the three models complement and validate each other, enhancing the reliability of the estimates. This novel framework leverages machine learning model to inform evidence-based mitigation, contributing to the achievement of Sustainable Development Goals 11 and 13─building resilient cities and combating climate change.
Keywords: SHAP; causal forest; mitigation strategies; random forest; urban rainstorm risks.