Explainable deep learning for rainfall prediction: A CNN-XGBoost hybrid approach in the northern region of Bangladesh
Md Safayet Islam, Md Shafiuzzaman, Golam Mahmud, Nabila Nowshin, Parisa Reza, Jahid Hasan, Md. Faysal Ahamed, Md. Nahiduzzaman, Mohamed Arselene Ayari, Amith Khandakar
Abstract
Abstract Accurate precipitation forecasting is crucial for evaluating various hydrological processes. This research explores the application of deep learning models for rainfall prediction in the northern region of Bangladesh, focusing on the comparative performance of six models: CNN (Convolutional Neural Network), LSTM (Long Short-Term Memory), XGB (Extreme Gradient Boosting), Ensemble Model, Transformer-XGB, and CNN-XGB. Two distinct datasets were utilized to assess the effectiveness of these models. Among them, the CNN-XGB hybrid model consistently demonstrated superior performance across all evaluation metrics, establishing it as the most reliable predictor in this study. Rajshahi district’s satellite dataset showed an RMSE (Root Mean Squared Error) of 0.65 mm/day, MAE (Mean Absolute Error) of 0.28 mm/day, and R 2 of 0.99. In the ground dataset, Rajshahi district beat other models with an RMSE of 16.28 mm/month, MAE of 7.85 mm/month, and R 2 of 0.98. These findings demonstrate the model’s efficacy across several data sources. To enhance the interpretability of the proposed CNN-XGB model, we deployed the SHAP (Shapley Additive exPlanations) explainer, providing insights into the model’s decision-making process. This research highlights the potential of hybrid models in enhancing rainfall prediction accuracy while providing transparency through explainable AI techniques. Beyond hydrology, the predicted rainfall patterns provide essential inputs for urban planners to optimize land-use zoning in flood-prone areas, and guide resilient infrastructure development. Code Available: https://github.com/Shafi3397/Rainfall-Prediction-using-CNN-XGBoost