Abstract
The water environment plays an essential role in the mangrove wetland ecosystem. Predicting water quality will help us better protect water resources from pollution, allowing the mangrove ecosystem to perform its normal ecological role. New approaches to solve such nonlinear problems need further research since the complexity of water quality data and they are easily affected by the noise. In this paper, we propose a water quality prediction model named CNN-LSTM with Attention (CLA) to predict the water quality variables. We conduct a case study on the water quality dataset of Beilun Estuary to predict pH and NH3-N. Linear interpolation and wavelet techniques are used for missing data filling and data denoising, respectively. The hybrid model CNN-LSTM is highly capable of resolving nonlinear time series prediction problems, and the attention mechanism captures longer time dependence. The experimental results show that our model outperforms other ones, and can predict with different time lags in a stable manner.
Similar content being viewed by others
Availability of data and materials
The data that support the findings of this study are available from the China National Environmental Monitoring Centre but restrictions apply to the availability of these data, which were used under license for the current study, and so are not publicly available. Data are however available from the authors upon reasonable request and with permission of the China National Environmental Monitoring Centre.
References
Ahmad S, Khan IH, Parida BP (2001) Performance of stochastic approaches for forecasting river water quality. Water Res 35(18):4261– 4266. https://doi.org/10.1016/S0043-1354(01)00167-1
Ahmed AN, Othman FB, Afan HA, Ibrahim RK, Fai CM, Hossain MS, Ehteram M, Elshafie A (2019) Machine learning methods for better water quality prediction. J Hydrol 578:124084. https://doi.org/10.1016/j.jhydrol.2019.124084
Barzegar R, Aalami MT, Adamowski J (2020) Short-term water quality variable prediction using a hybrid cnn-lstm deep learning model. Stoch Env Res Risk A 34(8):1–19. https://doi.org/10.1007/s00477-020-01776-2
Chai T, Draxler RR (2014) Root mean square error (rmse) or mean absolute error (mae)?–arguments against avoiding rmse in the literature. Geosci Model Dev 7(3):1247–1250. https://doi.org/10.5194/gmd-7-1247-2014
Chang F-J, Kao L-, Kuo Y-M, Liu C-W (2010) Artificial neural networks for estimating regional arsenic concentrations in a blackfoot disease area in taiwan. J Hydrol 388(1-2):65–76. https://doi.org/10.1016/j.jhydrol.2010.04.029
Chang F-J, Tsai Y-H, Chen P-A, Coynel A, Vachaud G (2015) Modeling water quality in an urban river using hydrological factors–data driven approaches. J Environ Manag 151:87–96. https://doi.org/10.1016/j.jenvman.2014.12.014
Cheng L-C, Huang Y-H, Wu M-E (2018) Applied attention-based lstm neural networks in stock prediction. In: 2018 IEEE International Conference on Big Data (Big Data). IEEE, pp 4716–4718
Chorowski J, Bahdanau D, Serdyuk D, Cho K, Bengio Y (2015) Attention-based models for speech recognition. In: Proceedings of the 28th International Conference on Neural Information Processing Systems, vol 1, pp 577–585
Daubechies I (1992) Ten lectures on wavelets. SIAM
Gazzaz NM, Yusoff MK, Aris AZ, Juahir H, Ramli MF (2012) Artificial neural network modeling of the water quality index for kinta river (malaysia) using water quality variables as predictors. Marine Pollut Bullet 64(11):2409–2420. https://doi.org/10.1016/j.marpolbul.2012.08.005
Giri C, Ochieng E, Tieszen LL, Zhu Z, Singh A, Loveland T, Masek J, Duke N (2011) Status and distribution of mangrove forests of the world using earth observation satellite data. Glob Ecol Biogeogr 20(1):154–159. https://doi.org/10.1111/j.1466-8238.2010.00584.x
Gulli A, Pal S (2017) Deep learning with keras. Packt Publishing Ltd
Hochreiter S, Schmidhuber J (1997) Long short-term memory. Neural Comput 9(8):1735–1780. https://doi.org/10.1162/neco.1997.9.8.1735
Hu Z, Zhang Y, Zhao Y, Xie M, Zhong J, Tu Z, Liu J (2019) A water quality prediction method based on the deep lstm network considering correlation in smart mariculture. Sensors 19(6):1420. https://doi.org/10.3390/s19061420
Huang M, Zhang T, Ruan J, Chen X (2017) A new efficient hybrid intelligent model for biodegradation process of dmp with fuzzy wavelet neural networks. Sci Rep 7:41239. https://doi.org/10.1038/srep41239
Ishtiaque A, Myint SW, Wang C (2016) Examining the ecosystem health and sustainability of the world’s largest mangrove forest using multi-temporal modis products. Sci Total Environ 569-570:1241–1254. https://doi.org/10.1016/j.scitotenv.2016.06.200, https://www.sciencedirect.com/science/article/pii/S0048969716313870
Ji X, Shang X, Dahlgren RA, Zhang M (2017) Prediction of dissolved oxygen concentration in hypoxic river systems using support vector machine: a case study of wen-rui tang river, china. Environ Sci Pollut Res 24(19):16062–16076. https://doi.org/10.1007/s11356-017-9243-7
Jia M, Wang Z, Zhang Y, Mao D, Wang C (2018) Monitoring loss and recovery of mangrove forests during 42 years: The achievements of mangrove conservation in china. Int J Appl Earth Observ Geoinform 73:535–545
Krizhevsky A, Sutskever I, Hinton GE (2017) Imagenet classification with deep convolutional neural networks. Commun ACM 60(6):84–90. https://doi.org/10.1145/3065386
Lai G, Chang W-C, Yang Y, Liu H (2018) Modeling long-and short-term temporal patterns with deep neural networks. In: The 41st International ACM SIGIR Conference on Research & Development in Information Retrieval, pp 95–104
Lawrence S, Giles CL, Tsoi AC, Back AD (1997) Face recognition: A convolutional neural-network approach. IEEE Trans Neural Netw 8(1):98–113. https://doi.org/10.1109/72.554195
LeCun Y, Bengio Y, Hinton G (2015) Deep learning. Nature 521(7553):436–444. https://doi.org/10.1038/nature14539
Li S, Xie G, Ren J, Guo L, Yang Y, Xu X (2020) Urban pm2. 5 concentration prediction via attention-based cnn–lstm. Appl Sci 10(6):1953. https://doi.org/10.3390/app10061953
Liang Y, Ke S, Zhang J, Yi X, Zheng Y (2018) Geoman: Multi-level attention networks for geo-sensory time series prediction. In: Proceedings of the twenty-seventh international joint conference on artificial intelligence, IJCAI-18. International Joint Conferences on Artificial Intelligence Organization, pp 3428–3434
Liu Y, Zhang Q, Song L, Chen Y (2019) Attention-based recurrent neural networks for accurate short-term and long-term dissolved oxygen prediction. Comput Electron Agric 165:104964. https://doi.org/10.1016/j.compag.2019.104964
Livieris IE, Pintelas E, Pintelas P (2020) A cnn–lstm model for gold price time-series forecasting. Neural Comput Appl:1–10. https://doi.org/10.1007/s00521-020-04867-x
Luong M-T, Pham H, Manning CD (2015) Effective approaches to attention-based neural machine translation. In: Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, pp 1412–1421
O’Shea K, Nash R (2015) An introduction to convolutional neural networks. CoRR, arXiv:1511.08458
Partal T, Kişi O (2007) Wavelet and neuro-fuzzy conjunction model for precipitation forecasting. J Hydrol 342(1-2):199–212. https://doi.org/10.1016/j.jhydrol.2007.05.026
Pedregosa F, Varoquaux G, Gramfort A, Michel V, Thirion B, Grisel O, Blondel M, Prettenhofer P, Weiss R, Dubourg V et al (2011) Scikit-learn: Machine learning in python. J Mach Learn Res 12:2825–2830. https://doi.org/10.5555/1953048.2078195
Pulver A, Lyu S (2017) Lstm with working memory. In: 2017 International Joint Conference on Neural Networks (IJCNN). IEEE, pp 845–851
Qi Y, Li Q, Karimian H, Liu D (2019) A hybrid model for spatiotemporal forecasting of pm2. 5 based on graph convolutional neural network and long short-term memory. Sci Total Environ 664:1–10. https://doi.org/10.1016/j.scitotenv.2019.01.333
Ran X, Shan Z, Fang Y, Lin C (2019) An lstm-based method with attention mechanism for travel time prediction. Sensors 19(4):861
Solanki A, Agrawal H, Khare K (2015) Predictive analysis of water quality parameters using deep learning. Int J Comput Appl 125(9):0975–8887. https://doi.org/10.5120/ijca2015905874
Thai-Nghe N, Thanh-Hai N, Chi Ngon N (2020) Deep learning approach for forecasting water quality in iot systems. Int J Adv Comput Sci Appl 11(8):686–693. https://archimer.ifremer.fr/doc/00646/75836/
Tota-Maharaj K, Scholz M (2012) Artificial neural network simulation of combined permeable pavement and earth energy systems treating storm water. J Environ Eng 138(4):499–509. https://doi.org/10.1061/(ASCE)EE.1943-7870.0000497
Tung TM, Yaseen ZM, et al. (2020) A survey on river water quality modelling using artificial intelligence models: 2000–2020. J Hydrol 585:124670. https://doi.org/10.1016/j.jhydrol.2020.124670
Willmott CJ, Matsuura K (2005) Advantages of the mean absolute error (mae) over the root mean square error (rmse) in assessing average model performance. Clim Res 30(1):79–82. https://doi.org/10.3354/cr030079
Wu W, Dandy GC, Maier HR (2014) Protocol for developing ann models and its application to the assessment of the quality of the ann model development process in drinking water quality modelling. Environ Modell Softw 54:108–127. https://doi.org/10.1016/j.envsoft.2013.12.016
Yousefi P, Naser G, Mohammadi H (2018) Surface water quality model: Impacts of influential variables. J Water Resour Plan Manag 144(5):04018015. https://doi.org/10.1061/(ASCE)WR.1943-5452.0000900
Zhang L, Zou Z, Shan W (2017) Development of a method for comprehensive water quality forecasting and its application in miyun reservoir of beijing, china. J Environ Sci 56:240–246. https://doi.org/10.1016/j.jes.2016.07.017
Zhao Y, Nan J, Cui F-, Guo L (2007) Water quality forecast through application of bp neural network at yuqiao reservoir. J Zhejiang Univ-Sci A 8(9):1482–1487. https://doi.org/10.1631/jzus.2007.A1482
Zhao B, Lu H, Chen S, Liu J, Wu D (2017) Convolutional neural networks for time series classification. J Syst Eng Electron 28(1):162–169. https://doi.org/10.21629/JSEE.2017.01.18
Zou Q, Xiong Q, Li Q, Yi H, Yu Y, Wu C (2020) A water quality prediction method based on the multi-time scale bidirectional long short-term memory network. Environ Sci Pollut Res:1–12. https://doi.org/10.1007/s11356-020-08087-7
Zou X, Zhao J, Zhao D, Sun B, He Y, Fuentes S (2021) Air quality prediction based on a spatiotemporal attention mechanism. Mob Inf Syst:2021
Acknowledgements
The authors thank the water quality data provided by the China National Environmental Monitoring Centre and the meteorological data provided by the National Oceanic and Atmospheric Administration. The authors thank ZiKai Liao for his valuable suggestions on the revision and proofreading of the paper.
Funding
This work was supported by the Major Science & Technology Program of Guangxi (Grant No. GKAA17129002), the Major Special Program of Chongqing Science & Technology Commission (No. CSTC 2019jscx-zdztzxX0031), Graduate Scientific Research and Innovation Foundation of Chongqing (No. CYB20067).
Author information
Authors and Affiliations
Contributions
: QZ collected the data. YY1 and CW implemented the methods mentioned in this paper. YY1 was a major contributor and wrote the manuscript under the guidance of QX. YY1 is mainly responsible for proofreading the manuscript. All authors read and approved the final manuscript.
Corresponding author
Ethics declarations
Ethics approval and consent to participate
Not applicable
Consent for publication
Not applicable
Competing interests
The authors declare no competing interests.
Additional information
Responsible Editor: Marcus Schulz
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
About this article
Cite this article
Yang, Y., Xiong, Q., Wu, C. et al. A study on water quality prediction by a hybrid CNN-LSTM model with attention mechanism. Environ Sci Pollut Res 28, 55129–55139 (2021). https://doi.org/10.1007/s11356-021-14687-8
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11356-021-14687-8