Abstract
Accurate flood forecasts provide a critical time for authorities and the public to enact flood response measures and initiate evacuations. Long short-term memory (LSTM) is widely used in flood forecasting to ensure sufficient response time. The lag length of rainfall (LR), the number of hidden layers (NL), and the number of neurons (NN) are key parameters of the LSTM model. However, flood forecasting research seldom explores their optimization via the Genetic Algorithm (GA). This study introduces a novel LSTM-GA model, which integrates LSTM with GA to optimize the LR, NL, and NN for flash flood forecasting. The case study pertains to the water level forecasting of the Wu River in Taiwan. To assess the improvement brought by the proposed model, a standard LSTM model was utilized as a benchmark. This model accurately forecasted floods in the next 1 to 6 h, achieving a Nash–Sutcliffe efficiency coefficient (NSE) score ranging from 0.896 to 0.906. It also exhibited strong flood peak forecast performance. The integration of GA enhanced the LSTM’s forecasting accuracy, with NSE scores rising to between 0.917 and 0.931. Notably, a shorter forecast lead time augmented the degree of improvement. In the LSTM model, LR was set as the river’s concentration time, and NL represented the water storage function of the watershed. For short lead time forecasting, surface runoff was the dominant factor, leading to smaller optimized values for LR and NL. Conversely, long lead time forecasting needed to consider the impact of subsurface and groundwater runoff, resulting in larger optimized values for LR and NL. In conclusion, the parameters optimized through GA consider the watershed’s characteristics.
Similar content being viewed by others
Availability of Data and Materials
The raw/processed data required to reproduce these findings cannot be shared at this time as the data also forms part of an ongoing study.
References
Alhagry S, Fahmy AA, El-Khoribi RA (2017) Emotion recognition based on EEG using LSTM recurrent neural network. Emotion 8:355–358. https://doi.org/10.14569/IJACSA.2017.081046
Bouktif S, Fiaz A, Ouni A, Serhani MA (2018) Optimal deep learning lstm model for electric load forecasting using feature selection and genetic algorithm: comparison with machine learning approaches. Energies 11:1636. https://doi.org/10.3390/en11071636
Buslim N, Rahmatullah IL, Setyawan BA, Alamsyah A (2021) Comparing bitcoin's prediction model using GRU, RNN, and LSTM by hyperparameter optimization grid search and random search. Int Conf Cyber IT Serv Manag (CITSM). IEEE, pp 1–6. https://doi.org/10.1109/CITSM52892.2021.9588947
Carbune V et al (2020) Fast multi-language LSTM-based online handwriting recognition. Int J Doc Anal Recognit (IJDAR) 23:89–102. https://doi.org/10.1007/s10032-020-00350-4
Chang LC, Chang FJ, Wang YP (2009) Auto-configuring radial basis function networks for chaotic time series and flood forecasting. Hydrol Process Int J 23:2450–2459. https://doi.org/10.1002/hyp.7352
Chen L, Xu M (2020) Piecewise time series prediction based on stacked long short-term memory and genetic algorithm. Chin Autom Congr (CAC). IEEE, pp 519–525. https://doi.org/10.1109/CAC51589.2020.9327694
Chen N, Xiong C, Du W, Wang C, Lin X, Chen Z (2019a) An improved genetic algorithm coupling a back-propagation neural network model (IGA-BPNN) for water-level predictions. Water 11:1795. https://doi.org/10.3390/w11091795
Chen S, Wu J, Chen X (2019b) Deep reinforcement learning with model-based acceleration for hyperparameter optimization. IEEE Int Conf Tools Artif Intell (ICTAI). IEEE, pp 170–177. https://doi.org/10.1109/ICTAI.2019.00032
Chen S, Zhou C (2020) Stock prediction based on genetic algorithm feature selection and long short-term memory neural network. IEEE Access 9:9066–9072. https://doi.org/10.1109/ACCESS.2020.3047109
Chen Y, Wang M, Zhang Y, Lu Y, Xu B, Yu L (2023) Cascade hydropower system operation considering ecological flow based on different multi-objective genetic algorithms. Water Resour Manag 1–18. https://doi.org/10.1007/s11269-023-03491-3
Cheng C-T, Ou C, Chau K (2002) Combining a fuzzy optimal model with a genetic algorithm to solve multi-objective rainfall–runoff model calibration. J Hydrol 268:72–86. https://doi.org/10.1016/S0022-1694(02)00122-1
Cheng C-T, Wu X-Y, Chau K (2005) Multiple criteria rainfall–runoff model calibration using a parallel genetic algorithm in a cluster of computers/Calage multi-critères en modélisation pluie–débit par un algorithme génétique parallèle mis en œuvre par une grappe d'ordinateurs. Hydrol Sci J 50. https://doi.org/10.1623/hysj.2005.50.6.1069
Cheng C-T, Zhao M-Y, Chau K, Wu X-Y (2006) Using genetic algorithm and TOPSIS for Xinanjiang model calibration with a single procedure. J Hydrol 316:129–140. https://doi.org/10.1016/j.jhydrol.2005.04.022
Chidthong Y, Tanaka H, Supharatid S (2009) Developing a hybrid multi-model for peak flood forecasting. Hydrol Process Int J 23:1725–1738. https://doi.org/10.1002/hyp.7307
Chow V, Maidment D, Mays L (1988) Applied hydrology, 572 pp. Editions McGraw-Hill, New York
Chung H, Shin K-S (2018) Genetic algorithm-optimized long short-term memory network for stock market prediction. Sustainability 10:3765. https://doi.org/10.3390/su10103765
Cui Z, Zhou Y, Guo S, Wang J, Ba H, He S (2021) A novel hybrid XAJ-LSTM model for multi-step-ahead flood forecasting. Hydrol Res 52:1436–1454. https://doi.org/10.2166/nh.2021.016
Cui Z, Zhou Y, Guo S, Wang J, Xu C-Y (2022) Effective improvement of multi-step-ahead flood forecasting accuracy through encoder-decoder with an exogenous input structure. J Hydrol 609:127764. https://doi.org/10.1016/j.jhydrol.2022.127764
Dazzi S, Vacondio R, Mignosa P (2021) Flood stage forecasting using machine-learning methods: a case study on the Parma River (Italy). Water 13:1612. https://doi.org/10.3390/w13121612
Graves A, Jaitly N, Mohamed A-R (2013) Hybrid speech recognition with deep bidirectional LSTM. IEEE Workshop Autom Speech Recognit Understand. IEEE, pp 273–278. https://doi.org/10.1109/ASRU.2013.6707742
Graves A, Schmidhuber J (2005) Framewise phoneme classification with bidirectional LSTM and other neural network architectures. Neural Netw 18:602–610. https://doi.org/10.1016/j.neunet.2005.06.042
Gupta HV, Kling H, Yilmaz KK, Martinez GF (2009) Decomposition of the mean squared error and NSE performance criteria: Implications for improving hydrological modelling. J Hydrol 377:80–91. https://doi.org/10.1016/j.jhydrol.2009.08.003
Haznedar B, Kilinc HC (2022) A hybrid ANFIS-GA approach for estimation of hydrological time series. Water Resour Manag 36:4819–4842. https://doi.org/10.1007/s11269-022-03280-4
Hochreiter S, Schmidhuber J (1997) Long short-term memory. Neural Comput 9:1735–1780. https://doi.org/10.1162/neco.1997.9.8.1735
Hong H et al (2018) Flood susceptibility assessment in Hengfeng area coupling adaptive neuro-fuzzy inference system with genetic algorithm and differential evolution. Sci Total Environ 621:1124–1141. https://doi.org/10.1016/j.scitotenv.2017.10.114
Hu C, Wu Q, Li H, Jian S, Li N, Lou Z (2018a) Deep learning with a long short-term memory networks approach for rainfall-runoff simulation. Water 10:1543. https://doi.org/10.3390/w10111543
Hu P, Zhang Q, Shi P, Chen B, Fang J (2018b) Flood-induced mortality across the globe: Spatiotemporal pattern and influencing factors. Sci Total Environ 643:171–182. https://doi.org/10.1016/j.scitotenv.2018.06.197
Hu Y, Yan L, Hang T, Feng J (2020) Stream-flow forecasting of small rivers based on LSTM. arXiv preprint arXiv:200105681. https://doi.org/10.48550/arXiv.2001.05681
Huang Y, Gao Y, Gan Y, Ye M (2021) A new financial data forecasting model using genetic algorithm and long short-term memory network. Neurocomputing 425:207–218. https://doi.org/10.1016/j.neucom.2020.04.086
Jain SK et al (2018) A brief review of flood forecasting techniques and their applications. Int J River Basin Manag 16:329–344. https://doi.org/10.1080/15715124.2017.1411920
Kao I-F, Zhou Y, Chang L-C, Chang F-J (2020) Exploring a Long Short-Term Memory based Encoder-Decoder framework for multi-step-ahead flood forecasting. J Hydrol 124631. https://doi.org/10.1016/j.jhydrol.2020.124631
Kilinc HC et al (2023) Daily scale river flow forecasting using hybrid gradient boosting model with genetic algorithm optimization. Water Resour Manag 1–16. https://doi.org/10.1007/s11269-023-03522-z
Kratzert F, Klotz D, Brenner C, Schulz K, Herrnegger M (2018) Rainfall–runoff modelling using long short-term memory (LSTM) networks. Hydrol Earth Syst Sci 22:6005–6022. https://doi.org/10.5194/hess-22-6005-2018
Kratzert F, Klotz D, Herrnegger M, Sampson AK, Hochreiter S, Nearing GS (2019a) Toward improved predictions in ungauged basins: Exploiting the power of machine learning. Water Resour Res 55:11344–11354. https://doi.org/10.1029/2019WR026065
Kratzert F, Klotz D, Shalev G, Klambauer G, Hochreiter S, Nearing G (2019b) Towards learning universal, regional, and local hydrological behaviors via machine learning applied to large-sample datasets. Hydrol Earth Syst Sci 23:5089–5110. https://doi.org/10.5194/hess-23-5089-2019
Kumari S, Kumar N, Rana PS (2021) Big data analytics for energy consumption prediction in smart grid using genetic algorithm and long short term memory. Comput Inf 40:29–56. https://doi.org/10.31577/cai_2021_1_29
Le X-H, Ho HV, Lee G, Jung S (2019) Application of long short-term memory (LSTM) neural network for flood forecasting. Water 11:1387. https://doi.org/10.3390/w11071387
Li W, Kiaghadi A, Dawson C (2020) Exploring the best sequence LSTM modeling architecture for flood prediction. Neural Comput Appl 1–10. https://doi.org/10.1007/s00521-020-05334-3
Liu M et al (2020a) The applicability of LSTM-KNN model for real-time flood forecasting in different climate zones in China. Water 12:440. https://doi.org/10.3390/w12020440
Liu W, Liu WD, Gu J (2020b) Forecasting oil production using ensemble empirical model decomposition based Long Short-Term Memory neural network. J Petrol Sci Eng 189:107013. https://doi.org/10.1016/j.petrol.2020.107013
Luo X, Oyedele LO (2021) Forecasting building energy consumption: Adaptive long-short term memory neural networks driven by genetic algorithm. Adv Eng Inform 50:101357. https://doi.org/10.1016/j.aei.2021.101357
McCuen RH, Knight Z, Cutter AG (2006) Evaluation of the nash-sutcliffe efficiency index. J Hydrol Eng 11:597–602. https://doi.org/10.1061/(ASCE)1084-0699(2006)11:6(597)
Mukerji A, Chatterjee C, Raghuwanshi NS (2009) Flood forecasting using ANN, neuro-fuzzy, and neuro-GA models. J Hydrol Eng 14:647–652. https://doi.org/10.1061/(ASCE)HE.1943-5584.0000040
Nguyen MH, Le Nguyen P, Nguyen K, Nguyen T-H, Ji Y (2021) PM2. 5 prediction using genetic algorithm-based feature selection and encoder-decoder model. IEEE Access 9:57338–57350. https://doi.org/10.1109/ACCESS.2021.3072280
Ni L, Wang D, Singh VP, Wu J, Wang Y, Tao Y, Zhang J (2020) Streamflow and rainfall forecasting by two long short-term memory-based models. J Hydrol 583:124296. https://doi.org/10.1016/j.jhydrol.2019.124296
Ouyang H-T (2018) Input optimization of ANFIS typhoon inundation forecast models using a multi-objective genetic algorithm. J Hydro-Environ Res 19:16–27. https://doi.org/10.1016/j.jher.2018.01.002
Palmitessa R, Mikkelsen PS, Borup M, Law AW (2021) Soft sensing of water depth in combined sewers using LSTM neural networks with missing observations. J Hydro-Environ Res. https://doi.org/10.1016/j.jher.2021.01.006
Rahimzad M, Moghaddam Nia A, Zolfonoon H, Soltani J, Danandeh Mehr A, Kwon H-H (2021) Performance comparison of an LSTM-based deep learning model versus conventional machine learning algorithms for streamflow forecasting. Water Resour Manage 35:4167–4187. https://doi.org/10.1007/s11269-021-02937-w
Santra AS, Lin J-L (2019) Integrating long short-term memory and genetic algorithm for short-term load forecasting. Energies 12:2040. https://doi.org/10.3390/en12112040
Song T, Ding W, Wu J, Liu H, Zhou H, Chu J (2020) Flash flood forecasting based on long short-term memory networks. Water 12:109. https://doi.org/10.3390/w12010109
Stajkowski S, Kumar D, Samui P, Bonakdari H, Gharabaghi B (2020) Genetic-algorithm-optimized sequential model for water temperature prediction. Sustainability 12:5374. https://doi.org/10.3390/su12135374
Tang J, Zeng J, Wang Y, Yuan H, Liu F, Huang H (2021) Traffic flow prediction on urban road network based on license plate recognition data: combining attention-LSTM with genetic algorithm. Transp A: Transp Sci 17:1217–1243. https://doi.org/10.1080/23249935.2020.1845250
TAŞABAT SE, Aydin O (2021) Using long-short term memory networks with genetic algorithm to predict engine condition. Gazi Univ J Sci 1–1. https://doi.org/10.35378/gujs.937169
Wang W-C, Cheng C-T, Chau K-W, Xu D-M (2012) Calibration of Xinanjiang model parameters using hybrid genetic algorithm based fuzzy optimal model. J Hydroinf 14:784–799. https://doi.org/10.2166/hydro.2011.027
Wang Y, Wang H, Lei X, Jiang Y, Song X (2011) Flood simulation using parallel genetic algorithm integrated wavelet neural networks. Neurocomputing 74:2734–2744. https://doi.org/10.1016/j.neucom.2011.03.018
Wang Z, Wang L (2021) Optimization of convolutional long short-term memory hybrid neural network model based on genetic algorithm for weather prediction. Int Conf Inf Syst Comput Aided Educ 2488–2494. https://doi.org/10.1145/3482632.3487456
WRA (2011) Integrated services of technologies for hydrological data observation and administrative operation procedures for hydrological analysis. Water Resour Agency, Taipei, Taiwan
Wu C, Chau K (2006) A flood forecasting neural network model with genetic algorithm. Int J Environ Polluti. https://doi.org/10.1504/IJEP.2006.011211
Xiang Z, Yan J, Demir I (2020) A rainfall‐runoff model with LSTM‐based sequence‐to‐sequence learning. Water Resour Res e2019WR025326. https://doi.org/10.1029/2019WR025326
Xu D-m, Wang W-c, Chau K-w, Cheng C-t, Chen S-y (2013) Comparison of three global optimization algorithms for calibration of the Xinanjiang model parameters. J Hydroinform 15:174–193. https://doi.org/10.2166/hydro.2012.053
Yang T-H, Yang S-C, Ho J-Y, Lin G-F, Hwang G-D, Lee C-S (2015) Flash flood warnings using the ensemble precipitation forecasting technique: A case study on forecasting floods in Taiwan caused by typhoons. J Hydrol 520:367–378. https://doi.org/10.1016/j.jhydrol.2014.11.028
Yu W, Mechefske CK, Kim IY (2018) Cutting tool wear estimation using a genetic algorithm based long short-term memory neural network. Int Des Eng Tech Conf Comput Inf Eng Conf. American Society of Mechanical Engineers, p V008T010A037. https://doi.org/10.1115/DETC2018-85253
Yuan X, Chen C, Lei X, Yuan Y, Adnan RM (2018) Monthly runoff forecasting based on LSTM–ALO model. Stoch Environ Res Risk Assess 32:2199–2212. https://doi.org/10.1007/s00477-018-1560-y
Zanchetta AD, Coulibaly P (2020) Recent advances in real-time pluvial flash flood forecasting. Water 12:570. https://doi.org/10.3390/w12020570
Zhang D et al (2018) Modeling and simulating of reservoir operation using the artificial neural network, support vector regression, deep learning algorithm. J Hydrol 565:720–736. https://doi.org/10.1016/j.jhydrol.2018.08.050
Zhao A, Qi L, Dong J, Yu H (2018) Dual channel LSTM based multi-feature extraction in gait for diagnosis of Neurodegenerative diseases. Knowl-Based Syst 145:91–97. https://doi.org/10.1016/j.knosys.2018.01.004
Zhou Y, Guo S, Chang F-J (2019) Explore an evolutionary recurrent ANFIS for modelling multi-step-ahead flood forecasts. J Hydrol 570:343–355. https://doi.org/10.1016/j.jhydrol.2018.12.040
Zhou Y, Wang Y, Wang K, Kang L, Peng F, Wang L, Pang J (2020) Hybrid genetic algorithm method for efficient and robust evaluation of remaining useful life of supercapacitors. Appl Energy 260:114169. https://doi.org/10.1016/j.apenergy.2019.114169
Zhu S, Luo X, Yuan X, Xu Z (2020) An improved long short-term memory network for streamflow forecasting in the upper Yangtze River. Stoch Env Res Risk Assess 34:1313–1329. https://doi.org/10.1007/s00477-020-01766-4
Zuo G, Luo J, Wang N, Lian Y, He X (2020) Decomposition ensemble model based on variational mode decomposition and long short-term memory for streamflow forecasting. J Hydrol 585:124776. https://doi.org/10.1016/j.jhydrol.2020.124776
Acknowledgements
The authors thank the National Science and Technology Council, Taiwan, for financially supporting this study (Grant numbers MOST 109-2625-M-035-007-MY3). They also thank the Water Resources Agency, Taiwan, for providing valuable information. Additionally, the authors would like to acknowledge Mr. George Chih-Yu Chen’s assistance with English editing. The authors thank the editor and the anonymous reviewers for their constructive suggestions, which have greatly improved the manuscript. During the preparation of this work the authors used GPT-4 in order to English editing.
Funding
This research project is funded by the National Science and Technology Council, Taiwan (grant numbers MOST 109–2625-M-035–007-MY3).
Author information
Authors and Affiliations
Contributions
You-Da Jhong: Methodology, Chang-Shian Chen: Conceptualization, Writing—Review & Editing, Bing-Chen Jhong: Writing—Review & Editing; Cheng-Han Tsai: Methodology, Song-Yue Yang: Methodology, Visualization, Writing—Original Draft.
Corresponding author
Ethics declarations
Ethical Approval
The authors will comply with all academic norms by the Journal of Water Resources Management.
Consent to Participate
All authors agreed to join this research.
Consent to Publish
All authors agreed with the content and that all have explicit consent to submit.
Competing Interests
The authors have no relevant financial or non-financial interests to disclose.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Jhong, YD., Chen, CS., Jhong, BC. et al. Optimization of LSTM Parameters for Flash Flood Forecasting Using Genetic Algorithm. Water Resour Manage 38, 1141–1164 (2024). https://doi.org/10.1007/s11269-023-03713-8
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11269-023-03713-8