Enhancing the risk identification and early warning capabilities of rural water supply projects is vital in promoting high-quality developments and improving the water supply guarantee rate. Based on data from rural water supply projects in Wuxi County, Chongqing, southwest China, this paper constructs risk identification models for rural water supply projects using XGBoost and Random Forest algorithms for the first time. It also employs the SHAP (SHapley Additive exPlanations) framework to compare and analyze the primary controlling factors influencing risks in rural water supply projects.The results indicate that the risk identification models exhibit high accuracy, with F1 scores of 0.91 and 0.93, respectively. Both models exhibit optimal performance at the medium risk level.XGBoost performs well in identifying low-risk levels, while Random Forest demonstrates higher precision in identifying medium and higher risk levels. According to the SHAP values, rainfall and temperature have significant impacts on the risks associated with rural water supply projects. The interactive influence of prolonged service life of pipelines tends to result in pipe damage and rupture. High temperatures coupled with low rainfall can lead to seasonal water scarcity, depletion of water sources, or reduction in water volume. In contrast, features related to water supply scale, water quality, and water fee collection methods have secondary impacts, while factors such as water source type, purification method, and operational management have relatively minor influences. Therefore, attention should be primarily focused on the impacts of climate change and aging infrastructure on rural water supply reliability. It is recommended to prioritize the promotion of large-scale centralized water supply projects and the standardization of small-scale water supply projects, as well as the establishment of an information management platform, thereby enhancing the resilience of rural water supply systems against risks. |