Authors

Affiliations

1 Thuyloi University, Ha Noi; nlan@tlu.edu.vn; sonnh@tlu.edu.vn

2 Institute for Artificial Intelligence, Ha Noi; tqlong@vnu.edu.vn; huynhtn@vnu.edu.vn

*Corresponding author: nlan@tlu.edu.vn; Tel.: +84–912521421

Abstracts

Flood forecasting is the main task to mitigate the damage caused by flooding in the Red River, Vietnam. Many reservoirs have been operating in the Red River to regulate flood. This research aims at developing a method for rapidly forecasting Hanoi’s water levels under various reservoir operation scenarios and river system conditions that will facilitate the assessment of multiple reservoir operation scenarios to provide effective and reliable real-time operational advice. A deep learning model based on the Transformer architecture was used to forecast the 24-hour lead time at Hanoi station. The dataset was divided into three subsets (Training set from 2015 to 2022, validation set in 2023 and Test set in 2024). The results showed that the Mean Absolute Error (MAE) was within an acceptable range, with MAE values of 24.1 cm, 26.1 cm, and 30.7 cm for the training, validation, and testing phases, respectively. The model demonstrated a significant ability to capture historical patterns and achieve high accuracy on the validation dataset, emphasizing the effectiveness of the Transformer architecture in forecasting water levels under normal conditions. Hydraulic models can be used to simulate additional data to improve the quality of flood forecasts for these extreme cases.

Keywords

Cite this paper

An, N.L.; Long, T.Q.; Huynh, T.N.; Son, N.H. Water level forecasting at Hanoi station using transformer-based AI models. J. Hydro-Meteorol. 2025, 22, 35–44.

References

1. Tinh, D.N. Research on the application of satellite data, numerical precipitation forecast combined with surface data in flood forecasting of the Red River - Thai Binh river system. Ministry of Natural and Environment’s Project report. Hanoi, 2013.
2. Lap, B.D.; Thai, T.H.; Lan, P.T.H. Development of the distributed hydrological model MARINE in flood forecasting problem, pilot application for Nam Mu river basin. J. Hydro-Meteorol. 2021, 723, 47–57.
3. An, N.L.; Hue, V.T.M. Study on flood forecasting for Son La, Hoa Binh and Tuyen Quang reservoirs in the Red River. J. Water Resour. Environ. Eng. 2015, 49, 73–79.
4. Chau, N.L. Study on flood forecasting technology in the Da river for Hoa Binh reservoir operation in flood control. Ministry of Natural and Environment’s Project report. Hanoi, 2005.
5. Prime Minister. Decision No. 740/QD, TTg - Operation regulation for reservoirs system in the Red River basin. 2019.
6. Zhang, A.B.; Govindaraju, R.S. Comparison of ANNs and Empirical Approaches for Predicting Watershed Runoff. J. Water Resour. Plan Manag. 2000, 126(3), 156–166. https://doi.org/10.1061/(ASCE)0733-9496(2000)126:3(156).
7. Liu, C.; Xu, J.; Li, X.; Yu, Z.; Wu, J. Water resource forecasting with machine learning and deep learning: A scientometric analysis. Artif. Intell. Geosci. 2024, 5, 100084. https://doi.org/10.1016/J.AIIG.2024.100084.
8. Zarei, M.; Bozorg-Haddad, O.; Baghban, S.; Delpasand, M.; Goharian, E.; Loáiciga, H.A. Machine-learning algorithms for forecast-informed reservoir operation (FIRO) to reduce flood damages. Sci. Rep. 2021, 11(1), 24295. https://doi.org/10.1038/S41598-021-03699-6.
9. Shpyg, D.V.; Kushnirenko, R. Machine learning to improve numerical weather forecasting. Proceeding of the 2020 IEEE 2nd International Conference on Advanced Trends in Information Theory (ATIT), IEEE, 2020, pp. 353–356. https://doi.org/10.1109/ATIT50783.2020.9349325.
10. Keum, H.J.; Han, K.Y.; Kim, H.I. Real-time flood disaster prediction system by applying machine learning technique. KSCE J. Civil Eng. 2020, 24(9), 2835–2848. https://doi.org/10.1007/s12205-020-1677-7.
11. Cheng, M.; Fang, F.; Kinouchi, T.; Navon, I.M.; Pain, C.C. Long lead-time daily and monthly streamflow forecasting using machine learning methods. J. Hydrol. 2020, 590, 125376. https://doi.org/ 10.1016/j.jhydrol.2020.125376.
12. Cau, L.X.; Chuong, N.V. The possibility of applying artificial neural network (ANN) to flood forecasting of Tra Khuc and Ve rivers. J. Hydro-Meteorol. 2001, 481, 26–35.
13. Quan, N.V.; et al. Study on application of artificial neural network (ANN) to forecast the water flow to the Cua Dat reservoir. J. Water Resour. Sci. Technol. 2017, 39, 1–7.
14. Anh, T.V. Artificial Intelligence Technique in Hydrological Forecasts Supporting for Water Resources Management of a Large River Basin in Vietnam. Open J. Modern Hydrol. 2023, 13(4), 246–258. https://doi.org/ 10.4236/ojmh.2023.134014.
15. Kao, I.F.; Zhou, Y.; Chang, L.C.; Chang, F.J. Exploring a long short-term memory based encoder-decoder framework for multi-step-ahead flood forecasting. J. Hydrol. 2020, 583, 124631.
16. Bai, P.; Liu, X.; Xie, J. Simulating runoff under changing climatic conditions: A comparison of the long short-term memory network with two conceptual hydrologic models. J. Hydrol. 2021, 592, 125779.
17. Vijendra, K.; Sharma, K.V.; Caloiero, T.; Mehta, D.J.; Singh, K. Comprehensive overview of flood modeling approaches: A review of recent advances. Hydrology 2023, 7, 141. https://doi.org/10.3390/hydrology10070141.
18. Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, Ł.; Polosukhin, I. 2017. Attention is all you need. Adv. Neural Inf. Process. Syst. 2017, 30, 5998–6008.
19. Dai, Z.; Yang, Z.; Yang, Y.; Carbonell, J.; Le, Q.V.; Salakhutdinov, R. Transformer-xl: Attentive language models beyond a fixed-length context. arXiv 2019, arXiv:1901.02860.
20. Xu, J.; Fan, H.; Luo, M.; Li, P.; Jeong, T.; Xu, L. Transformer Based Water Level Prediction in Poyang Lake, China. Water 2023, 15(3), 576. https://doi.org/10.3390/w15030576.
21. Demiray, B.Z.; Sit, M.; Mermer, O.; Demir, I. Enhancing hydrological modeling with transformers: a case study for 24-h streamflow prediction. Water Sci. Technol. 2024, 89(9), 2326–2341. https://doi.org/10.2166/wst.2024.110.
22. Quoc, B.B.; Khanh, H.N.; Dac, H.N.; Anh, D.T.; Ta, Q.C. Transformer-Based Methods for Water Level Prediction: A Case Study of the Kien Giang River, Quang Binh Province. Int. J. Innovative Technol. Exploring Eng. 2024, 13(8), 21–28. https://doi.org/10.35940/ijitee.H9936.13080724.
23. Han, K.; Xiao, A.; Wu, E.; Guo, J.; Xu, C.; Wang, Y. Transformer in transformer. Adv. Neural Inf. Process. Syst. 2021, 34, 15908–15919.
24. Chen, P.C.; Tsai, H.; Bhojanapalli, S.; Chung, H.W.; Chang, Y.W.; Ferng, C.S. A simple and effective positional encoding for transformers. ArXiv Preprint 2021, arXiv:2104.08698.
25. Fan, Z.; Gong, Y.; Liu, D.; Wei, Z.; Wang, S.; Jiao, J.; Duan, N.; Zhang, R.; Huang, X. Mask attention networks: Rethinking and strengthen transformer. Arxiv Preprint 2021, arXiv:2103.13597.