Improving a Prediction Model for Tunnel Water Inflow Estimation Using LSTM and Bayesian Optimization
Abstract
1. Introduction
1.1. Traditional Approach
1.2. Machine Learning
1.3. Purpose of the Work
2. Materials and Methods
2.1. LSTM
2.2. Bayesian Optimization Algorithm
2.3. Setting Up the Database
2.3.1. Database Sources
2.3.2. Data Description
- 1.
- Tunnel depth
- 2.
- Groundwater level
- 3.
- Rock quality designation
- 4.
- Water yield property
2.3.3. Correlation Analysis of the Parameters
2.3.4. K-Fold Cross-Validation
3. Development of the BOA-LSTM Water Inrush Prediction Model
3.1. The Whole Process of the Proposed Model
3.2. Performance Evaluation Indexes
3.3. Data Interpretation and Analysis Based on SHAP
4. Results and Discussion
4.1. Water Inflow Prediction Results
4.2. Comparative Analysis of Prediction Results from Different Models
4.3. SHAP Analysis and Discussion
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Li, S.; Zhang, Q.; Xue, Y.; Ding, W.; Zhong, S.; He, F.; Lin, Y. Forecast of karst-fractured groundwater and defective geological conditions. Chin. J. Rock Mech. Eng. 2007, 26, 217–225. [Google Scholar] [CrossRef]
- Zhang, X. Study on Mechanism of Slurry Diffusion and Sealing at the Process of Underground Engineering Moving Water Grouting and Its Application. Ph.D. Thesis, Shandong University, Ji’nan, China, 2001. [Google Scholar]
- Zhang, W. Mechanism of Grouting Reinforcement of Water-Rich Fault Fractured Zone and Its Application in Tunnel Engineering. Ph.D. Thesis, Shandong University, Ji’nan, China, 2014. [Google Scholar]
- Qian, Q. Challenges faced by underground projects construction safety and countermeasures. Chin. J. Rock Mech. Eng. 2012, 31, 1945–1956. [Google Scholar] [CrossRef]
- Li, S.; Li, X.; Jing, H.; Yang, X.; Rong, X.; Chen, W. Research development of catastrophe mechanism and forecast controlling theory of water inrush and mud gushing in deep long tunnel. China Basic Sci. 2017, 19, 27–43. [Google Scholar] [CrossRef]
- Tian, S.; Wang, W.; Gong, J. Development and prospect of railway tunnels in China (including statistics of railway tunnels in China by the end of 2020). Tunn. Constr. 2021, 41, 308–325. [Google Scholar] [CrossRef]
- Huang, Z.; Gu, Q.; Wu, Y. Effects of confining pressure on acoustic emission and failure characteristics of sandstone. Int. J. Min. Sci. Technol. 2021, 31, 963–974. [Google Scholar] [CrossRef]
- Huang, Z.; Zhao, K.; Li, X. Numerical characterization of groundwater flow and fracture-induced water inrush in tunnels. Tunn. Undergr. Space Technol. 2021, 116, 104119. [Google Scholar] [CrossRef]
- Wang, L.; Zhu, L.; Cao, Z.; Liu, J. Thermo-mechanical degradation and fracture evolution in low-permeability coal subjected to cyclic heating–cryogenic cooling. Phys. Fluids 2025, 37, 086617. [Google Scholar] [CrossRef]
- Teng, T.; Chen, Y.; Wang, Y. In Situ Nuclear Magnetic Resonance Observation of Pore Fractures and Permeability Evolution in Rock and Coal under Triaxial Compression. J. Energy Eng. 2025, 151, 04025036. [Google Scholar] [CrossRef]
- Liu, G. Analysis and Comparison of Water Inflow Prediction Methods for Yanshan Tunnel. Railr. Eng. 2021, 15, 10638. [Google Scholar] [CrossRef]
- Zhou, W. Study on Water Inflow Prediction Technology for Guanshan Tunnel on Tianshui-Pingliang Railway. Mod. Tunn. Technol. 2021, 58, 22–30. [Google Scholar] [CrossRef]
- Wang, Z.; Li, S.; Liang, J.; Qiao, L.; Xue, Y.; Zhou, Y. Prediction and measurement of groundwater flow rate of underground crude oil storage caverns. Chin. J. Geotech. Eng. 2014, 36, 1490–1497. [Google Scholar] [CrossRef]
- Wang, J.; Zhu, H.; Ye, W. Forward and inverse analyses of water flow into tunnels. Chin. J. Rock Mech. Eng. 2004, 23, 1150–1153. [Google Scholar] [CrossRef]
- Jordan, M.I.; Mitchell, T.M. Machine learning: Trends, perspectives, and prospects. Science 2015, 349, 255–260. [Google Scholar] [CrossRef] [PubMed]
- Liu, Y.; Sun, T.; Wu, K.; Zhang, J.; Zhang, H.; Pu, W.; Liao, B. Tungsten prospectivity mapping using multi-source geo-information and deep forest algorithm. Ore Geol. Geol. Reviews 2025, 177, 106452. [Google Scholar] [CrossRef]
- Bishop, C.M. Pattern Recognition and Machine Learning; Springer: New York, NY, USA, 2006; Volume 2, pp. 645–678. [Google Scholar]
- Zhang, G.; Xue, Y.; Bai, C.; Su, M.; Zhang, K.; Tao, Y. Risk assessment of floor water inrush in coal mines based on MFIM-TOPSIS variable weight model. J. Cent. South Univ. 2021, 28, 2360–2374. [Google Scholar] [CrossRef]
- Huang, H.; Li, Q.; Zhang, D. Deep learning based image recognition for crack and leakage defects of metro shield tunnel. Tunn. Undergr. Space Technol. 2018, 77, 166–176. [Google Scholar] [CrossRef]
- Liu, B.; Wang, R.; Zhao, G.; Guo, X.; Wang, Y.; Li, J.; Wang, S. Prediction of rock mass parameters in the TBM tunnel based on BP neural network integrated simulated annealing algorithm. Tunn. Undergr. Space Technol. 2020, 95, 103103. [Google Scholar] [CrossRef]
- Li, S.; He, P.; Li, L.; Shi, S.; Zhang, Q.; Zhang, J.; Hu, J. Gaussian process model of water inflow prediction in tunnel construction and its engineering applications. Tunn. Undergr. Space Technol. 2017, 69, 155–161. [Google Scholar] [CrossRef]
- Zhao, D.; Wu, Q.; Cui, F.; Xu, H.; Zeng, Y.; Cao, Y.; Du, Y. Using random forest for the risk assessment of coal-floor water inrush in Panjiayao Coal Mine, northern China. Hydrogeol. J. 2018, 26, 2327–2340. [Google Scholar] [CrossRef]
- Mahmoodzadeh, A.; Mohammadi, M.; Noori, K.M.G.; Khishe, M.; Ibrahim, H.H.; Ali, H.F.H.; Abdulhamid, S.N. Presenting the best prediction model of water inflow into drill and blast tunnels among several machine learning techniques. Autom. Constr. 2021, 127, 103719. [Google Scholar] [CrossRef]
- He, F.; Zhang, H.; Wan, Q.; Chen, S.; Yang, Y. Medium Term Streamflow Prediction Based on Bayesian Model Averaging Using Multiple Machine Learning Models. Water 2023, 15, 1548. [Google Scholar] [CrossRef]
- Bai, Y.; Jia, W.; Jin, X.; Su, T.; Kong, J.; Shi, Z. Nonstationary Time Series Prediction Based on Deep Echo State Network Tuned by Bayesian Optimization. Mathematics 2023, 11, 1503. [Google Scholar] [CrossRef]
- Williams, R.J.; Zipser, D.A. A learning algorithm for continually running fully recurrent neural networks. Neural Comput. 1989, 1, 270–280. [Google Scholar] [CrossRef]
- Wochreiter, S.; Bengio, Y.; Frasconi, P.; Schmidhuber, J. Gradient Flow in Recurrent Nets: The Difficulty of Learning Long-Term Dependencies; IEEE: New York, NY, USA, 2001; pp. 237–243. [Google Scholar] [CrossRef]
- Hochreiter, S.; Schmidhuber, J. Long short-term memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef] [PubMed]
- Olah, C. Understanding Lstm Networks. 2015. Available online: http://colah.github.io/posts/2015-08-Understanding-LSTMs (accessed on 15 February 2024).
- Alizadeh, B.; Bafti, A.G.; Kamangir, H.; Zhang, Y.; Wright, D.B.; Franz, K.J. A novel attention-based LSTM cell post-processor coupled with bayesian optimization for streamflow prediction. J. Hydrol. 2021, 601, 126526. [Google Scholar] [CrossRef]
- He, F.; Zhou, J.; Feng, Z.; Liu, G.; Yang, Y. A hybrid short-term load forecasting model based on variational mode decomposition and long short-term memory networks considering relevant factors with Bayesian optimization algorithm. Appl. Energy 2019, 237, 103–116. [Google Scholar] [CrossRef]
- Gao, S.; Huang, Y.; Zhang, S.; Han, J.; Wang, G.; Zhang, M.; Lin, Q. Short-term runoff prediction with GRU and LSTM networks without requiring time step optimization during sample generation. J. Hydrol. 2020, 589, 125188. [Google Scholar] [CrossRef]
- Sameen, M.I.; Pradhan, B.; Lee, S. Application of convolutional neural networks featuring Bayesian optimization for landslide susceptibility assessment. Catena 2020, 186, 104249. [Google Scholar] [CrossRef]
- Pelikan, M.; Goldberg, D.E.; Cantú-Paz, E. BOA: The Bayesian optimization algorithm. In Proceedings of the 1st Annual Conference on Genetic and Evolutionary Computation-Volume, San Francisco, CA, USA, 13–17 July 1999; pp. 525–532. [Google Scholar]
- Snoek, J.; Larochelle, H.; Adams, R.P. Practical bayesian optimization of machine learning algorithms. arXiv 2012, arXiv:1206.2944. [Google Scholar] [CrossRef]
- Seeger, M. Gaussian processes for machine learning. Int. J. Neural Syst. 2004, 14, 69–106. [Google Scholar] [CrossRef]
- Brochu, E.; Cora, V.M.; De Freitas, N. A tutorial on Bayesian optimization of expensive cost functions, with application to active user modeling and hierarchical reinforcement learning. arXiv 2010, arXiv:1012.2599. [Google Scholar] [CrossRef]
- Yang, Z. Risk prediction of water inrush of karst tunnels based on bp neural network. In Proceedings of the 2016 4th International Conference on Mechanical Materials and Manufacturing Engineering, Wuhan, China, 15–16 October 2016; Atlantis Press: Dordrecht, The Netherlands, 2016; pp. 327–330. [Google Scholar] [CrossRef]
- Shapley, L.S. A Value for n-Person Games. In Contributions to the Theory of Games; RAND Corporation: Santa Monica, CA, USA, 1953; pp. 307–317. [Google Scholar] [CrossRef]
- Lundberg, S.; Lee, S.I. A unified approach to interpreting model predictions. In Proceedings of the 31st International Conference on Neural Information Processing Systems, Red Hook, NY, USA, 4–9 December 2017; pp. 4768–4777. [Google Scholar]
- Strumbelj, E.; Kononenko, I. An efficient explanation of individual classifications using game theory. J. Mach. Learn. Res. 2010, 11, 1–18. [Google Scholar]















| Parameter | Statistics | ||||
|---|---|---|---|---|---|
| Mean | Std | Max | Min | Count | |
| H (m) | 88.84 | 84.33 | 15.00 | 350.00 | 600 |
| h (m) | 50.52 | 56.24 | 0.00 | 320.00 | 600 |
| RQD (%) | 48.19 | 20.31 | 4.00 | 99.00 | 600 |
| W (m3/h m) | 5.73 | 3.97 | 1.00 | 33.60 | 600 |
| WI (m3/h) | 83.03 | 34.09 | 40.50 | 274.60 | 600 |
| Parameter | Value |
|---|---|
| Max Epochs | 1000 |
| Gradient Threshold | 1 |
| Learn Rate Drop Period | 700 |
| Learn Rate Drop Factor | 0.1 |
| Num of Units | 992 |
| Initial Learn Rate | 0.0075091 |
| L2Regularization | 2.5133 × 10−9 |
| Model (Training) | RMSE | MAE | MBE | R2 |
|---|---|---|---|---|
| LSTM | 15.549 | 10.2271 | 0.049282 | 0.80573 |
| LIBSVM | 13.7322 | 8.7144 | −0.81966 | 0.84141 |
| RBFNN | 14.8523 | 10.1807 | −0.0002064 | 0.81448 |
| ELM | 14.6166 | 7.3918 | 2.6172 × 10−7 | 0.91289 |
| RF | 12.5348 | 7.1591 | −0.25327 | 0.86786 |
| BP | 11.6307 | 8.1543 | −0.04015 | 0.88623 |
| BOA-LSTM | 6.0596 | 4.2563 | 0.03001 | 0.96815 |
| Model (Test) | RMSE | MAE | MBE | R2 |
|---|---|---|---|---|
| LSTM | 14.9306 | 10.6653 | 0.19384 | 0.80019 |
| LIBSVM | 14.43 | 8.7201 | −2.1972 | 0.79748 |
| RBFNN | 14.7657 | 9.7694 | −0.34556 | 0.78795 |
| ELM | 10.1773 | 8.3607 | −2.0285 | 0.79221 |
| RF | 18.5749 | 11.243 | −0.78383 | 0.66443 |
| BP | 10.4128 | 7.3067 | −0.6477 | 0.89455 |
| BOA-LSTM | 7.987 | 5.6385 | 0.77025 | 0.94624 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Huang, Z.; Yang, Z.; Wu, Y.; Ma, L.; Sun, T.; Wang, Z.; Zhao, K.; Zhang, X.; Li, H.; Zheng, Y. Improving a Prediction Model for Tunnel Water Inflow Estimation Using LSTM and Bayesian Optimization. Water 2025, 17, 3045. https://doi.org/10.3390/w17213045
Huang Z, Yang Z, Wu Y, Ma L, Sun T, Wang Z, Zhao K, Zhang X, Li H, Zheng Y. Improving a Prediction Model for Tunnel Water Inflow Estimation Using LSTM and Bayesian Optimization. Water. 2025; 17(21):3045. https://doi.org/10.3390/w17213045
Chicago/Turabian StyleHuang, Zhen, Zishuai Yang, Yun Wu, Lijian Ma, Tao Sun, Zhenpeng Wang, Kui Zhao, Xiaojun Zhang, Haigang Li, and Yu Zheng. 2025. "Improving a Prediction Model for Tunnel Water Inflow Estimation Using LSTM and Bayesian Optimization" Water 17, no. 21: 3045. https://doi.org/10.3390/w17213045
APA StyleHuang, Z., Yang, Z., Wu, Y., Ma, L., Sun, T., Wang, Z., Zhao, K., Zhang, X., Li, H., & Zheng, Y. (2025). Improving a Prediction Model for Tunnel Water Inflow Estimation Using LSTM and Bayesian Optimization. Water, 17(21), 3045. https://doi.org/10.3390/w17213045

