Abstract
Accurate forecasting of climate temperature at the regional scale is crucial to agriculture planning, water resource management, and disaster preparedness. Still, due to the nonlinear and complicated temporal patterns in regions such as Iraq, conventional climate models fail to meet this imperative. This paper presents a novel deep learning model that not only predicts monthly average temperature values but also predicts the temperature trend, hence addressing the regional climate prediction problem holistically. The proposed model is designed as a multi-task deep learning framework integrating Convolutional Neural Networks, Long Short-Term Memory networks, and an attention mechanism to process historical monthly temperature data obtained from the Berkeley Earth dataset using a sliding window method. The model is learned a shared representation for both regression and classification, therefore optimized together. Classification accuracy of 94.81%, ROC AUC of 0.9839, and R² score 0.9773 for regression were obtained, thus proving the capability of model to efficiently capture local and long-range temporal dependencies and give importance to influential time steps. As such, the proposed CNN-LSTM-Attention model in multi-task learning configuration presents a promisingly accurate, interpretable, and computationally-effective temperature prediction and trend classification, applicable to regional climate modeling and decision support for climate-sensitive areas.
Recommended Citation
Mohammed, Salim M.; Mustafa, Omar M.; Haji, Lailan M.; and Ahmed, Omar M.
(2026)
"A Multi-Task CNN-LSTM Model with Attention Mechanism for Climate Temperature Forecasting over Iraq,"
Al-Bahir: Vol. 8:
Iss.
2, Article 3.
Available at: https://doi.org/10.55810/2313-0083.1130
References
[1] Azooz AA, Bahraw SZI. Evidence of global warming from Zakho precipitation data. Sci J Univ Zakho 2013;1(1):354—63.
[2] Gong Y, Zhang Y, Wang F, Lee C-H. Deep learning for weather forecasting: a CNN-LSTM hybrid model for predicting historical temperature data. arXiv preprint arXiv: 2410.14963. 2024.
[3] Loganathan P, Zea E, Vinuesa R, Otero E. Regional climate projections using a deep-learning-based model-ranking and downscaling framework: Application to European climate zones. arXiv preprint arXiv:2502.20132. 2025.
[4] Alarcon-Ruiz E, Gonzalez-Barbosa J, Frausto-Solís J, Rangel-Gonzalez JA. Classical methods used for predicting temperature as a relevant variable of climate change. ECORFAN Journal-Ecuador 2024:11—21.
[5] Alam F, Islam M, Deb A, Hossain SS. Comparison of deep learning models for weather forecasting in different climatic zones. J Comput Sci Eng (JCSE) 2024;5(1):12—9.
[6] Hochreiter S, Schmidhuber J. Long short-term memory. Neural Comput 1997;9(8):1735—80.
[7] Hassan MM, Ahmed D. Bayesian deep learning applied to lstm models for predicting COVID-19 confirmed cases in Iraq. Sci J Univ Zakho 2023;11(2):170—8.
[8] Zhang S, Chen R, Cao J, Tan J. A CNN and LSTM-based multi-task learning architecture for short and medium-term electricity load forecasting. Elec Power Syst Res 2023;222: 109507.
[9] Pelizari PA, Geiß C, Groth S, Taubenbock € H. Deep multitask learning with label interdependency distillation for multicriteria street-level image classification. ISPRS J Photogrammetry Remote Sens 2023;204:275—90.
[10] Liu S, Liu K, Wang Z, Liu Y, Bai B, Zhao R. Investigation of a transformer-based hybrid artificial neural networks for AL-BAHIR (JOURNAL FOR ENGINEERING AND PURE SCIENCES) 2026;8:157—168 167 climate data prediction and analysis. Front Environ Sci 2025; 12:1464241.
[11] Yu T, Zhang Y, Zhao S, Yang J, Li W, Guo W. Vessel trajectory prediction based on modified LSTM with attention mechanism. In: 2024 4th international conference on neural networks, information and communication (NNICE). IEEE; 2024. p. 912—8.
[12] Bano-Medina ~ J, et al. Downscaling multi-model climate projection ensembles with deep learning (DeepESD): contribution to CORDEX EUR-44. Geosci Model Dev Discuss (GMDD) 2022;2022:1—14
. [13] Shukla P, Halem M. DUNE: a machine learning deep UNet++ based ensemble approach to monthly, seasonal and annual climate forecasting. 2024. arXiv preprint arXiv: 2408.06262.
[14] Zhang G, Wang W, Wang Y. Towards spatio-temporal sea surface temperature forecasting via dynamic personalized graph network. In: Proceedings of the 2023 ACM conference on information technology for social good; 2023. p. 403—9.
[15] Li S, Wan H, Yu Q, Wang X. Downscaling of ERA5 reanalysis land surface temperature based on attention mechanism and Google Earth Engine. Sci Rep 2025;15(1):675.
[16] Li X, He Z, Huang K, Yang Z, Zhang G. Enhancing shortand long-term sea surface temperature forecasting with a static and dynamic learnable personalized graph convolution network. In: ICASSP 2024-2024 IEEE international conference on acoustics, speech and signal processing (ICASSP). IEEE; 2024. p. 5410—4.
[17] Gomez-Gonzalez CA, et al. Deep learning-based downscaling of seasonal forecasts over the Iberian Peninsula. In: EGU General Assembly Conference abstracts; 2021. EGU21—12253.
[18] Accarino G, Chiarelli M, Immorlano F, Aloisi V, Gatto A, Aloisio G. Msg-gan-sd: a multi-scale gradients gan for statistical downscaling of 2-meter temperature over the eurocordex domain. Ai 2021;2(4):600—20.
[19] Wei X, et al. Deep-learning-based harmonization and super-resolution of near-surface air temperature from CMIP6 models (1850—2100). Int J Climatol 2023;43(3): 1461—79.
[20] Fernandez MA, Barnes EA. Multi-Year-to-Decadal temperature prediction using a machine learning model-analog framework. 2025. arXiv preprint arXiv:2502.17583.
[21] Xu D, Zeng Q, Wang W, Gu M, Wang Y, Li Z. A novel TCNaugmented CNN-LSTM architecture for accurate monthly runoff forecasting. Earth Sci Inform 2025;18(3):467.
[22] Wang W, Gu M, Li Z, Hong Y, Zang H, Xu D. A stacking ensemble machine learning model for improving monthly runoff prediction. Earth Sci Inform 2025;18(1):120.





Indexed in: