Urban Flood Prediction Model Based on Explainable Deep Learning and Attention Mechanism

Shanlun Xu , Huiliang Wang , Hongshi Xu , Zening Wu , Xiangyang Zhang , Yihong Zhou , Wanjie Xue

International Journal of Disaster Risk Science ›› : 1 -21.

PDF
International Journal of Disaster Risk Science ›› :1 -21. DOI: 10.1007/s13753-026-00691-4
Article
research-article

Urban Flood Prediction Model Based on Explainable Deep Learning and Attention Mechanism

Author information +
History +
PDF

Abstract

Deep learning models are widely used for urban flood prediction, but current research lacks a clear explanation of how indicator weight changes affect model accuracy. This study incorporated the attention mechanism between the convolutional and fully connected layers of the convolutional neural network (CNN) to enable the model to focus on critical flood-inducing factors, and employed the particle swarm optimization (PSO) to optimize the key hyperparameters (for example, the number of filters and learning rate). Furthermore, we employed Shapley additive explanation (SHAP) to analyze how flood-inducing indicator weight changes affect prediction accuracy. The model was tested on Haidian Island, China. The Nash-Sutcliffe efficiency (NSE) coefficient of the CNN model is 0.9287. After incorporating the attention mechanism into the CNN and optimizing the hyperparameters using PSO, the NSE is improved to 0.9503. The model demonstrates higher accuracy in predicting larger inundations, with the NSE for the 100-year return-period flood reaching 0.9535, compared to 0.8341 for the 5-year return period. Interpretability analysis shows that elevation is the most important flood-inducing factor, accounting for 44% of the total importance, followed by tidal levels, which account for 33%. The attention mechanism increases the weights of important flood-inducing factors (for example, elevation, tide level); after hyperparameter optimization, the model achieves more comprehensive learning, increasing the weights of the rainfall indicators that are neglected by the unoptimized model, and these weight changes improve the accuracy of the model. The research revealed the impacts of different flood-inducing factors on flooding and the influence of indicator weight changes on model accuracy.

Keywords

Attention mechanism / Change in indicator weights / Explainable deep learning / Particle swarm optimization / Urban flood

Cite this article

Download citation ▾
Shanlun Xu, Huiliang Wang, Hongshi Xu, Zening Wu, Xiangyang Zhang, Yihong Zhou, Wanjie Xue. Urban Flood Prediction Model Based on Explainable Deep Learning and Attention Mechanism. International Journal of Disaster Risk Science 1-21 DOI:10.1007/s13753-026-00691-4

登录浏览全文

4963

注册一个新账户 忘记密码

References

[1]

Ali, Y.A., E.M. Awwad, M. Al-Razgan, and A. Maarouf. 2023. Hyperparameter search for machine learning algorithms for optimizing the computational complexity. Processes 11(2): Article 349.

[2]

Alizadeh, B., A. Ghaderi Bafti, H. Kamangir, Y. Zhang, D.B. Wright, and K.J. Franz. 2021. A novel attention-based LSTM cell post-processor coupled with Bayesian optimization for streamflow prediction. Journal of Hydrology 601: Article 126526.

[3]

Ayana, G., K. Dese, and S.-W. Choe. 2021. Transfer learning in breast cancer diagnoses via ultrasound imaging. Cancers 13(4): Article 738.

[4]

Bass B, Bedient P. Surrogate modeling of joint flood risk across coastal watersheds. Journal of Hydrology, 2018, 558: 159-173

[5]

Bouktif, S., A. Fiaz, A. Ouni, and M.A. Serhani. 2018. Optimal deep learning LSTM model for electric load forecasting using feature selection and genetic algorithm: Comparison with machine learning approaches. Energies 11(7): Article 1636.

[6]

Brauwers G, Frasincar F. A general survey on attention mechanisms in deep learning. IEEE Transactions on Knowledge and Data Engineering, 2023, 35(4): 3279-3298

[7]

Britz, D., A. Goldie, M.-T. Luong, and Q. Le. 2017. Massive exploration of neural machine translation architectures. Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, 7–11 September 2017, Copenhagen, Denmark, 1442–1451.

[8]

Cheng, L., Z. Wang, R. Pei, and J. Wu. 2025. Sustainable urban management and flood resilience in China’s Yangtze River Economic Belt: Drivers, patterns, and policy synergies. Sustainable Cities and Society 131: Article 106737.

[9]

Gao, W., Y. Liao, Y. Chen, C. Lai, S. He, and Z. Wang. 2024. Enhancing transparency in data-driven urban pluvial flood prediction using an explainable CNN model. Journal of Hydrology 645(Part A): Article 132228.

[10]

Guo, M.-H., Z.-N. Liu, T.-J. Mu, and S.-M. Hu. 2023. Beyond self-attention: External attention using two linear layers for visual tasks. IEEE Transactions on Pattern Analysis and Machine Intelligence 45(5): Article 5436.

[11]

Hemel, R.I., and S. Sakib. 2024. Flood prediction in Bangladesh using machine learning and explainable AI: A comparative study. In Proceedings of the 27th International Conference on Computer and Information Technology (ICCIT), 20–22 December 2024, Cox’s Bazar, Bangladesh, 616–621.

[12]

Huang, H., Z. Wang, Y. Liao, W. Gao, C. Lai, X. Wu, and Z. Zeng. 2024. Improving the explainability of CNN-LSTM-based flood prediction with integrating SHAP technique. Ecological Informatics 84: Article 102904.

[13]

Kabir, S., S. Patidar, X. Xia, Q. Liang, J. Neal, and G. Pender. 2020. A deep convolutional neural network model for rapid prediction of fluvial flood inundation. Journal of Hydrology 590: Article 125481.

[14]

Kang, N., Z. Wang, A. Zhang, and H. Chen. 2025. Improving the prediction of streamflow in large watersheds based on seasonal trend decomposition and vectorized deep learning models. Ecological Informatics 90: Article 103291.

[15]

LeCun Y, Boser B, Denker JS, Henderson D, Howard RE, Hubbard W. Backpropagation applied to handwritten zip code recognition. Neural Computation, 1989, 1(4): 541-551

[16]

Li, Y., F.B. Osei, S. Dai, T. Hu, and A. Stein. 2025. Identifying landscape patterns at different scales as driving factors for urban flooding. Ecological Indicators 176: Article 113614.

[17]

Liu S, Ma X, Wu H, Li Y. An end to end framework with adaptive spatio-temporal attention module for human action recognition. IEEE Access, 2020, 8: 47220-47231

[18]

Liu, J., T. Song, C. Mei, H. Wang, D. Zhang, and S. Nazli. 2024. Flood risk zoning of cascade reservoir dam break based on a 1D-2D coupled hydrodynamic model: A case study on the Jinsha-Yalong River. Journal of Hydrology 639: Article 131555.

[19]

Lundberg, S.M., and S.-I. Lee. 2017. A unified approach to interpreting model predictions. Proceedings of the 31st International Conference on Neural Information Processing Systems (NIPS’17), 2–6 December 2024, 4768–4777.

[20]

Lv, H., J. Chen, T. Pan, T. Zhang, Y. Feng, and S. Liu. 2022. Attention mechanism in intelligent fault diagnosis of machinery: A review of technique and application. Measurement 199: Article 111594.

[21]

Ma, C., Z. Chen, K. Zhao, H. Xu, and W. Qi. 2022. Improved urban flood risk assessment based on spontaneous-triggered risk assessment conceptual model considering road environment. Journal of Hydrology 608: Article 127693.

[22]

Ma, B., Z. Wu, C. Hu, H. Wang, H. Xu, D. Yan, and S.-e.-h. Soomro. 2022. Process-oriented SWMM real-time correction and urban flood dynamic simulation. Journal of Hydrology 605: Article 127269.

[23]

Manchikatla SK, Umamahesh NV. Simulation of flood hazard, prioritization of critical sub-catchments, and resilience study in an urban setting using PCSWMM: A case study. Water Policy, 2022, 24(8): 1247-1268

[24]

Mei, C., H. Shi, J. Liu, T. Song, J. Wang, X. Gao, H. Wang, and M. Li. 2024. Analyzing urban form influence on pluvial flooding via numerical experiments using random slices of actual city data. Journal of Hydrology 633: Article 130916.

[25]

Nash JE, Sutcliffe JV. River flow forecasting through conceptual models part I – A discussion of principles. Journal of Hydrology, 1970, 10(3): 282-290

[26]

Niu Z, Zhong G, Yu H. A review on the attention mechanism of deep learning. Neurocomputing, 2021, 452: 48-62

[27]

Pan, S., Z. Zheng, Z. Guo, and H. Luo. 2022. An optimized XGBoost method for predicting reservoir porosity using petrophysical logs. Journal of Petroleum Science and Engineering 208(Part C): Article 109520.

[28]

Park, J., W.H. Lee, K.T. Kim, C.Y. Park, S. Lee, and T.-Y. Heo. 2022. Interpretation of ensemble learning to predict water quality using explainable artificial intelligence. Science of the Total Environment 832: Article 155070.

[29]

Pradhan, B., S. Lee, A. Dikshit, and H. Kim. 2023. Spatial flood susceptibility mapping using an explainable artificial intelligence (XAI) model. Geoscience Frontiers 14(6): Article 101625.

[30]

Ribalta Lorenzo, P., J. Nalepa, M. Kawulok, L. Sanchez Ramos, and J.R. Pastor. 2017. Particle swarm optimization for hyper-parameter selection in deep neural networks. Proceedings of the Genetic and Evolutionary Computation Conference GECCO’17, 15–19 July 2017, New York, USA, 481–488.

[31]

Tang J, Liu G, Pan Q. A review on representative swarm intelligence algorithms for solving optimization problems: Applications and trends. IEEE/CAA Journal of Automatica Sinica, 2021, 8(10): 1627-1643

[32]

Tani, L., D. Rand, C. Veelken, and M. Kadastik. 2021. Evolutionary algorithms for hyperparameter optimization in machine learning for application in high energy physics. The European Physical Journal C 81(2): Article 170.

[33]

Wang, H., S. Xu, H. Xu, Z. Wu, T. Wang, and C. Ma. 2023. Rapid prediction of urban flood based on disaster-breeding environment clustering and Bayesian optimized deep learning model in the coastal city. Sustainable Cities and Society 99: Article 104898.

[34]

Wang, Z., N. Xu, X. Bao, J. Wu, and X. Cui. 2024. Spatio-temporal deep learning model for accurate streamflow prediction with multi-source data fusion. Environmental Modelling & Software 178: Article 106091.

[35]

Wu, J., Z. Wang, J. Dong, Z. Yao, X. Chen, and H. Fan. 2024. Multi-step ahead dissolved oxygen concentration prediction based on knowledge guided ensemble learning and explainable artificial intelligence. Journal of Hydrology 636: Article 131297.

[36]

Wu, Z., W. Xue, H. Xu, D. Yan, H. Wang, and W. Qi. 2022. Urban flood risk assessment in Zhengzhou, China, based on a D-number-improved analytic hierarchy process and a self-organizing map algorithm. Remote Sensing 14(19): Article 4777.

[37]

Xu K, Han Z, Xu H, Bin L. Rapid prediction model for urban floods based on a light gradient boosting machine approach and hydrological-hydraulic model. International Journal of Disaster Risk Science, 2023, 14(1): 79-97

[38]

Xu, Y., C. Hu, Q. Wu, S. Jian, Z. Li, Y. Chen, G. Zhang, Z. Zhang, and S. Wang. 2022. Research on particle swarm optimization in LSTM neural networks for rainfall-runoff simulation. Journal of Hydrology 608: Article 127553.

[39]

Xu H, Ma C, Lian J, Xu K, Chaima E. Urban flooding risk assessment based on an integrated k-means cluster algorithm and improved entropy weight method in the region of Haikou, China. Journal of Hydrology, 2018, 563: 975-986

[40]

Xu, H., C. Ma, K. Xu, J. Lian, and Y. Long. 2020. Staged optimization of urban drainage systems considering climate change and hydrological model uncertainty. Journal of Hydrology 587: Article 124959.

[41]

Xue, W., Z. Wu, H. Xu, H. Wang, C. Ma, and Y. Zhou. 2024. A framework for amplification flood risk assessment and threshold determination of combined rainfall and river level in an inland city. Journal of Hydrology 640: Article 131725.

[42]

Yan X, Xu K, Feng W, Chen J. A rapid prediction model of urban flood inundation in a high-risk area coupling machine learning and numerical simulation approaches. International Journal of Disaster Risk Science, 2021, 12(6): 903-918

[43]

Yang L, Shami A. On hyperparameter optimization of machine learning algorithms: Theory and practice. Neurocomputing, 2020, 415: 295-316

[44]

Yang J, Liu K, Wang M, Zhao G, Wu W, Yue Q. A convolutional neural network-weighted cellular automaton model for the fast prediction of urban pluvial flooding processes. International Journal of Disaster Risk Science, 2024, 15(1): 754-768

[45]

Yao, Z., Z. Wang, D. Wang, J. Wu, and L. Chen. 2023. An ensemble CNN-LSTM and GRU adaptive weighting model based improved sparrow search algorithm for predicting runoff using historical meteorological and runoff data as input. Journal of Hydrology 625(Part A): Article 129977.

[46]

Zhang, Y., C. Li, H. Duan, K. Yan, J. Wang, and W. Wang. 2023. Deep learning based data-driven model for detecting time-delay water quality indicators of wastewater treatment plant influent. Chemical Engineering Journal 467: Article 143483.

[47]

Zhang, X., Z. Wu, H. Wang, C. He, F. Zhang, and Y. Zhou. 2024. Urban meteorological drought comprehensive index based on a composite fuzzy matter element-moment estimation weighting model. iScience 27(9): Article 110798.

[48]

Zhu, X., H. Guo, and J.J. Huang. 2024. Urban flood susceptibility mapping using remote sensing, social sensing and an ensemble machine learning model. Sustainable Cities and Society 108: Article 105508.

RIGHTS & PERMISSIONS

The Author(s)

PDF

39

Accesses

0

Citation

Detail

Sections
Recommended

/