Enhanced Spatiotemporal Relationship-Guided Deep Learning for Water Quality Prediction
Abstract
1. Introduction
2. Materials and Methods
2.1. Study Area
2.2. Methods
2.2.1. Principle of Models
- GRU Model
- 2.
- GAT-GRU Model
- (1)
- GAT Layer
- (2)
- GAT-GRU Model Architecture
- 3.
- ESRG-GRU Model
- (1)
- Physically Constrained Spatial Modeling
- (2)
- Extremum-Aware Temporal Optimization
2.2.2. Model Comparative Evaluation Methods
- Model Efficiency Evaluation Methods
- 2.
- Model Accuracy Comparative Evaluation Methods
3. Results and Discussion
3.1. Model Construction and Training
3.1.1. Data Preprocessing
3.1.2. Model Training
3.2. Model Training Efficiency Comparison
3.3. Comparative Analysis of Model Accuracy
3.3.1. Comparative Analysis of Model Accuracy: Spatial Pattern
3.3.2. Comparative Analysis of Model Accuracy: Temporal Pattern
3.3.3. Analysis of Model Accuracy Improvement
4. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Giri, S. Water Quality Prospective in Twenty First Century: Status of Water Quality in Major River Basins, Contemporary Strategies and Impediments: A Review. Environ. Pollut. 2021, 271, 116332. [Google Scholar] [CrossRef] [PubMed]
- van Vliet, M.; Jones, E.; Flörke, M.; Franssen, W.; Hanasaki, N.; Wada, Y.; Yearsley, J. Global Water Scarcity Including Surface Water Quality and Expansions of Clean Water Technologies. Environ. Res. Lett. 2021, 16, 024020. [Google Scholar] [CrossRef]
- Wang, M.; Bodirsky, B.L.; Rijneveld, R.; Beier, F.; Bak, M.P.; Batool, M.; Droppers, B.; Popp, A.; van Vliet, M.T.H.; Strokal, M. A Triple Increase in Global River Basins with Water Scarcity Due to Future Pollution. Nat. Commun. 2024, 15, 880. [Google Scholar] [CrossRef]
- Ma, T.; Sun, S.; Fu, G.; Hall, J.; Ni, Y.; He, L.; Yi, J.; Zhao, N.; Du, Y.; Pei, T.; et al. Pollution Exacerbates China’s Water Scarcity and Its Regional Inequality. Nat. Commun. 2020, 11, 650. [Google Scholar] [CrossRef]
- LeCun, Y.; Bengio, Y.; Hinton, G. Deep Learning. Nature 2015, 521, 436–444. [Google Scholar] [CrossRef]
- Zheng, Y.; Zhang, Q.; Zhang, X.; Zhou, Y.; Zhang, Y.; Zhang, T. A Spatial-Temporal Trend-Aware Neural Network Model for Accurate Water Quality Prediction in River. Water Res. 2025, 287, 124389. [Google Scholar] [CrossRef] [PubMed]
- Zhi, W.; Appling, A.P.; Golden, H.E.; Podgorski, J.; Li, L. Deep Learning for Water Quality. Nat. Water 2024, 2, 228–241. [Google Scholar] [CrossRef]
- Haghiabi, A.H.; Nasrolahi, A.H.; Parsaie, A. Water Quality Prediction Using Machine Learning Methods. Water Qual. Res. J. 2018, 53, 3–13. [Google Scholar] [CrossRef]
- Yang, S.; Zhong, S.; Chen, K. W-WaveNet: A Multi-Site Water Quality Prediction Model Incorporating Adaptive Graph Convolution and CNN-LSTM. PLoS ONE 2024, 19, e0276155. [Google Scholar] [CrossRef]
- Fang, P.; Wang, Y.; Zhao, Y.; Kang, J. Analysis of Prediction Confidence in Water Quality Forecasting Employing LSTM. Water 2025, 17, 1050. [Google Scholar] [CrossRef]
- Li, L.; Jiang, P.; Xu, H.; Lin, G.; Guo, D.; Wu, H. Water Quality Prediction Based on Recurrent Neural Network and Improved Evidence Theory: A Case Study of Qiantang River, China. Environ. Sci. Pollut. Res. 2019, 26, 19879–19896. [Google Scholar] [CrossRef]
- Wang, D.; Zhang, C.; Li, A.; Guo, Y.; Zhang, H.; Tan, C. Spatio-Temporal Analysis and Prediction for Raw Water Quality of Drinking Water Source by Improved RNN Algorithm. J. Water Process Eng. 2025, 71, 107164. [Google Scholar] [CrossRef]
- Li, Q.; Yang, Y.; Yang, L.; Wang, Y. Comparative Analysis of Water Quality Prediction Performance Based on LSTM in the Haihe River Basin, China. Environ. Sci. Pollut. Res. 2023, 30, 7498–7509. [Google Scholar] [CrossRef] [PubMed]
- Pyo, J.; Pachepsky, Y.; Kim, S.; Abbas, A.; Kim, M.; Kwon, Y.S.; Ligaray, M.; Cho, K.H. Long Short-Term Memory Models of Water Quality in Inland Water Environments. Water Res. X 2023, 21, 100207. [Google Scholar] [CrossRef]
- Luo, L.; Zhang, Y.; Dong, W.; Zhang, J.; Zhang, L. Ensemble Empirical Mode Decomposition and a Long Short-Term Memory Neural Network for Surface Water Quality Prediction of the Xiaofu River, China. Water 2023, 15, 1625. [Google Scholar] [CrossRef]
- Lee, J.; Lee, J.; Lee, M.; Lee, M.; Kim, Y.; Hyung, J.; Kim, K.; Cha, Y.; Koo, J. Development of a Short-Term Water Quality Prediction Model for Urban Rivers Using Real-Time Water Quality Data. Water Supply 2022, 22, 4082–4097. [Google Scholar] [CrossRef]
- Li, W.; Wu, H.; Zhu, N.; Jiang, Y.; Tan, J.; Guo, Y. Prediction of Dissolved Oxygen in a Fishery Pond Based on Gated Recurrent Unit (GRU). Inf. Process. Agric. 2021, 8, 185–193. [Google Scholar] [CrossRef]
- Yang, H.; Liu, S. Water Quality Prediction in Sea Cucumber Farming Based on a GRU Neural Network Optimized by an Improved Whale Optimization Algorithm. Peer J. Comput. Sci. 2022, 8, e1000. [Google Scholar] [CrossRef]
- Xu, J.; Wang, K.; Lin, C.; Xiao, L.; Huang, X.; Zhang, Y. FM-GRU: A Time Series Prediction Method for Water Quality Based on Seq2seq Framework. Water 2021, 13, 1031. [Google Scholar] [CrossRef]
- Zhang, Y.; Liu, L.; Zhang, S.; Zou, X.; Liu, J.; Guo, J.; Teng, Y.; Zhang, Y.; Duan, H. Monitoring and Warning for Ammonia Nitrogen Pollution of Urban River Based on Neural Network Algorithms. Anal. Sci. 2024, 40, 1867–1879. [Google Scholar] [CrossRef]
- Zhendong, Z.; Hui, Q.; Liqiang, Y.; Yongqi, L.; Zhiqiang, J.; Zhongkai, F.; Shuo, O.; Shaoqian, P.; Jianzhong, Z. Downstream Water Level Prediction of Reservoir Based on Convolutional Neural Network and Long Short-Term Memory Network. J. Water Resour. Plan. Manag. 2021, 147, 04021060. [Google Scholar] [CrossRef]
- Tian, Q.; Luo, W.; Guo, L. Water Quality Prediction in the Yellow River Source Area Based on the DeepTCN-GRU Model. J. Water Process Eng. 2024, 59, 105052. [Google Scholar] [CrossRef]
- Haq, K.; Harigovindan, V. Water Quality Prediction for Smart Aquaculture Using Hybrid Deep Learning Models. IEEE Access 2022, 10, 60078–60098. [Google Scholar] [CrossRef]
- Mei, P.; Li, M.; Zhang, Q.; Li, G.; Song, L. Prediction Model of Drinking Water Source Quality with Potential Industrial-Agricultural Pollution Based on CNN-GRU-Attention. J. Hydrol. 2022, 610, 127934. [Google Scholar] [CrossRef]
- Chen, H.; Yang, J.; Fu, X.; Zheng, Q.; Song, X.; Fu, Z.; Wang, J.; Liang, Y.; Yin, H.; Liu, Z.; et al. Water Quality Prediction Based on LSTM and Attention Mechanism: A Case Study of the Burnett River, Australia. Sustainability 2022, 14, 13231. [Google Scholar] [CrossRef]
- Yang, Y.; Xiong, Q.; Wu, C.; Zou, Q.; Yu, Y.; Yi, H.; Gao, M. A Study on Water Quality Prediction by a Hybrid CNN-LSTM Model with Attention Mechanism. Environ. Sci. Pollut. Res. 2021, 28, 55129–55139. [Google Scholar] [CrossRef]
- Bi, J.; Chen, Z.; Yuan, H.; Zhang, J. Accurate Water Quality Prediction with Attention-Based Bidirectional LSTM and Encoder-Decoder. Expert Syst. Appl. 2024, 238, 121807. [Google Scholar] [CrossRef]
- Qiao, J.; Lin, Y.; Bi, J.; Yuan, H.; Wang, G.; Zhou, M. Attention-Based Spatiotemporal Graph Fusion Convolution Networks for Water Quality Prediction. IEEE Trans. Autom. Sci. Eng. 2025, 22, 1–10. [Google Scholar] [CrossRef]
- Nie, Q.; Wan, D.; Wang, R. CNN-BiLSTM Water Level Prediction Method with Attention Mechanism. J. Phys. Conf. Ser. 2021, 2078, 012032. [Google Scholar] [CrossRef]
- Wan, H.; Xiang, L.; Cai, Y.; Xie, Y.; Xu, R. Temporal and Spatial Feature Extraction Using Graph Neural Networks for Multi-Point Water Quality Prediction in River Network Areas. Water Res. 2025, 281, 123561. [Google Scholar] [CrossRef]
- Li, Z.; Liu, H.; Zhang, C.; Fu, G. Real-Time Water Quality Prediction in Water Distribution Networks Using Graph Neural Networks with Sparse Monitoring Data. Water Res. 2024, 250, 121018. [Google Scholar] [CrossRef]
- Sheng, Z.; Cai, Z. GAT-GRU Based Model for Water Network Flow Prediction. In Proceedings of the 9th International Conference on Water Resource and Environment; Weng, C.-H., Ed.; Springer Nature: Singapore, 2024; pp. 151–162. [Google Scholar]
- Song, J.; Meng, H.; Kang, Y.; Zhu, M.; Zhu, Y.; Zhang, J. A Method for Predicting Water Quality of River Basin Based on OVMD-GAT-GRU. Stoch. Environ. Res. Risk Assess. 2024, 38, 339–356. [Google Scholar] [CrossRef]
- Sun, C.; Li, C.; Lin, X.; Zheng, T.; Meng, F.; Rui, X.; Wang, Z. Attention-Based Graph Neural Networks: A Survey. Artif. Intell. Rev. 2023, 56, 2263–2310. [Google Scholar] [CrossRef]
- Chen, S.; Gan, Z.; Li, Z.; Li, Y.; Ma, X.; Chen, M.; Qu, B.; Ding, S.; Su, S. Occurrence and Risk Assessment of Anthelmintics in Tuojiang River in Sichuan, China. Ecotoxicol. Environ. Saf. 2021, 220, 112360. [Google Scholar] [CrossRef]
- Xu, J.; Wang, Y.; Chen, Y.; Tong, H.; Wei, Y.; Bai, H. Characteristics on Spatiotemporal Variations of Surface Water Environmental Quality in Tuojiang River in Upper Reaches of Yangtze River Basin. Earth Sci. 2019, 45, 1937. [Google Scholar] [CrossRef]
- Wei, X.; Zhang, L.; Yang, H.-Q.; Zhang, L.; Yao, Y.-P. Machine Learning for Pore-Water Pressure Time-Series Prediction: Application of Recurrent Neural Networks. Geosci. Front. 2021, 12, 453–467. [Google Scholar] [CrossRef]
- Zuo, Y.; Jiang, J.; Yada, K. Application of Hybrid Gate Recurrent Unit for In-Store Trajectory Prediction Based on Indoor Location System. Sci. Rep. 2025, 15, 1055. [Google Scholar] [CrossRef] [PubMed]
- Rahul Gandh, D.; Harigovindan, V.P.; Rasheed Abdul Haq, K.P.; Bhide, A. Attention-Driven LSTM and GRU Deep Learning Techniques for Precise Water Quality Prediction in Smart Aquaculture. Aquacult. Int. 2024, 32, 8455–8478. [Google Scholar] [CrossRef]
- Corradini, F.; Gerosa, F.; Gori, M.; Lucheroni, C.; Piangerelli, M.; Zannotti, M. A Systematic Literature Review of Spatio-Temporal Graph Neural Network Models for Time Series Forecasting and Classification. Neural Netw. 2026, 195, 108269. [Google Scholar] [CrossRef]
- Chen, R.; Lin, K.; Hong, B.; Zhang, S.; Yang, F. Sparse Graphs-Based Dynamic Attention Networks. Heliyon 2024, 10, e35938. [Google Scholar] [CrossRef]
- Wu, Z.; Pan, S.; Chen, F.; Long, G.; Zhang, C.; Yu, P. A Comprehensive Survey on Graph Neural Networks. IEEE Trans. Neural Netw. Learn. Syst. 2021, 32, 4–24. [Google Scholar] [CrossRef]
- Veličković, P.; Cucurull, G.; Casanova, A.; Romero, A.; Lio, P.; Bengio, Y. Graph Attention Networks. arXiv 2017, arXiv:1710.10903. [Google Scholar] [CrossRef]
- Jenson, S.; Domingue, J. Extracting Topographic Structure from Digital Elevation Data for Geographic Information-System Analysis. Photogramm. Eng. Remote Sens. 1988, 54, 1593–1600. [Google Scholar]
- Xu, W.; Chen, K.; Han, T.; Chen, H.; Ouyang, W.; Bai, L. Extremecast: Boosting Extreme Value Prediction for Global Weather Forecast. arXiv 2024, arXiv:2402.01295. [Google Scholar] [CrossRef]
- Richard, H.M.; Zachary, K.; Cutter, A.G. Evaluation of the Nash–Sutcliffe Efficiency Index. J. Hydrol. Eng. 2006, 11, 597–602. [Google Scholar] [CrossRef]
- Hodson, T.O. Root-Mean-Square Error (RMSE) or Mean Absolute Error (MAE): When to Use Them or Not. Geosci. Model Dev. 2022, 15, 5481–5487. [Google Scholar] [CrossRef]
- Moriasi, D.N.; Gitau, M.W.; Pai, N.; Daggupati, P. Hydrologic and Water Quality Models: Performance Measures and Evaluation Criteria. Trans. ASABE 2015, 58, 1763–1785. [Google Scholar] [CrossRef]
- Khan, A.; Cao, X.; Li, S.; Katsikis, V.; Liao, L. BAS-ADAM: An ADAM Based Approach to Improve the Performance of Beetle Antennae Search Optimizer. IEEE/CAA J. Autom. Sin. 2020, 7, 461–471. [Google Scholar] [CrossRef]
- Xie, L.; Zhao, Y.; Fang, P.; Cheng, M.; Chen, Z.; Wang, Y. A Novel Operational Water Quality Mobile Prediction System with LSTM-Seq2Seq Model. Environ. Model. Softw. 2025, 185, 106290. [Google Scholar] [CrossRef]
- Sabzipour, B.; Arsenault, R.; Troin, M.; Martel, J.-L.; Brissette, F.; Brunet, F.; Mai, J. Comparing a Long Short-Term Memory (LSTM) Neural Network with a Physically-Based Hydrological Model for Streamflow Forecasting over a Canadian Catchment. J. Hydrol. 2023, 627, 130380. [Google Scholar] [CrossRef]
- Liu, Y.; Wang, Y. Water Quality Prediction Method Based on a Combined Machine Learning Model: A Case Study of the Daling River Basin. J. Contam. Hydrol. 2026, 276, 104725. [Google Scholar] [CrossRef] [PubMed]
- Wang, Z.; Sun, Z.; Bian, Y.; Mo, H.; Dong, D. Learning Hierarchical Time–Frequency Representation for Long-Term Time Series Forecasting. Inf. Process. Manag. 2026, 63, 104358. [Google Scholar] [CrossRef]
- Lei, Y.; Hu, B.; Huang, H.; Liu, Y. Design of a Variable-Length Sequential Prediction Framework GTV-STP Based on Spatial and Temporal Water Quality Information of Taihu Lake. IEEE Access 2024, 12, 65928–65941. [Google Scholar] [CrossRef]
- Kirchner, J. Characterizing Nonlinear, Nonstationary, and Heterogeneous Hydrologic Behavior Using Ensemble Rainfall-Runoff Analysis (ERRA): Proof of Concept. Hydrol. Earth Syst. Sci. 2024, 28, 4427–4454. [Google Scholar] [CrossRef]
- Liu, L.; Ye, S.; Chen, C.; Pan, H.; Ran, Q. Nonsequential Response in Mountainous Areas of Southwest China. Front. Earth Sci. 2021, 9, 660244. [Google Scholar] [CrossRef]















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. |
© 2026 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.
Share and Cite
Chen, R.; Wang, Y.; Wang, H.; Wang, S.; Yang, J. Enhanced Spatiotemporal Relationship-Guided Deep Learning for Water Quality Prediction. Water 2026, 18, 185. https://doi.org/10.3390/w18020185
Chen R, Wang Y, Wang H, Wang S, Yang J. Enhanced Spatiotemporal Relationship-Guided Deep Learning for Water Quality Prediction. Water. 2026; 18(2):185. https://doi.org/10.3390/w18020185
Chicago/Turabian StyleChen, Ruikai, Yonggui Wang, Hongjun Wang, Shaofei Wang, and Jun Yang. 2026. "Enhanced Spatiotemporal Relationship-Guided Deep Learning for Water Quality Prediction" Water 18, no. 2: 185. https://doi.org/10.3390/w18020185
APA StyleChen, R., Wang, Y., Wang, H., Wang, S., & Yang, J. (2026). Enhanced Spatiotemporal Relationship-Guided Deep Learning for Water Quality Prediction. Water, 18(2), 185. https://doi.org/10.3390/w18020185

