Abstract
It is necessary to accurately assess the inflow and infiltration conditions in sewer systems if sewer overflows are to be avoided. In this regard, Long Short-Term Memory (LSTM) is widely utilized for hydrological time-series forecasting. However, hydrological time-series have been found to be highly nonlinear and dynamic, such that the original LSTM model cannot simultaneously consider the spatiotemporal correlations of the input sequences for water flow rate forecasting. To address this problem, we propose using an LSTM with spatiotemporal attention (LSTM-STA) model, one based on encoder-decoder architecture, as this will allow accurate forecasting of the water flow rate. The encoder incorporates a spatial attention mechanism module allowing it to adaptively capture the key spatial attributes from all related spatial attributes at each time step. The decoder also incorporates a temporal attention mechanism module for dynamically discovering the key encoder hidden states from all time steps in the window. Using the spatiotemporal attention mechanism, the LSTM-STA model comprehensively considers all the important factors influencing the water flow rate forecasting, in both temporal and spatial dimensions. We performed extensive experiments; applying the LSTM-STA model to real-world hydrological time-series datasets, each one containing 52,704 sampled data points while leveraging state-of-the-art SVR-rbf, MLP, CNN1D, GRU, LSTM, Encoder-Decoder, LSTM-SA, and LSTM-TA as baselines. The experimental results demonstrated that the LSTM-STA model outperforms the state-of-the-art baseline models. Specifically, the LSTM-STA model yields the lowest RMSE, MAE, MAPE, and the highest R2 in the test process, said values being 73.19, 33.37, 1.09, and 0.99858, respectively. We also verified the stability and hyperparameter sensitivity of the LSTM-STA model. Furthermore, we visualized the spatial attention weights and benefitted from spatial interpretability.
Similar content being viewed by others
Data availability
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
Tan P, Zhou Y, Zhang Y, Zhu DZ, Zhang T (2019) Assessment and pathway determination for rainfall-derived inflow and infiltration in sanitary systems: a case study. Urban Water J 16(8):600–607
Lepot M, Makris KF, Clemens FH (2017) Detection and quantification of lateral, illicit connections and infiltration in sewers with infra-red camera: conclusions after a wide experimental plan. Water Res 122:678–691
Kang H, Yang S, Huang J, Oh J (2020) Time series prediction of wastewater flow rate by bidirectional LSTM deep learning. Int J Control Autom Syst 18(12):3023–3030
Zhang M, Liu Y, Cheng X, Zhu DZ, Shi H, Yuan Z (2018) Quantifying rainfall-derived inflow and infiltration in sanitary sewer systems based on conductivity monitoring. J Hydrol 558:174–183
Rosin TR, Romano M, Keedwell E, Kapelan Z (2021) A committee evolutionary neural network for the prediction of combined sewer overflows. Water Resour Manage 35(4):1273–1289
Box GE, Pierce DA (1970) Distribution of residual autocorrelations in autoregressive-integrated moving average time series models. J Am Stat Assoc 65(332):1509–1526
Box GE, Jenkins GM, Reinsel GC, Ljung GM (2015) Time series analysis: forecasting and control. John Wiley & Sons
Valipour M, Banihabib ME, Behbahani SMR (2013) Comparison of the ARMA, ARIMA, and the autoregressive artificial neural network models in forecasting the monthly inflow of Dez dam reservoir. J Hydrol 476:433–441
Valipour M (2015) Long-term runoff study using SARIMA and ARIMA models in the United States. Meteorol Appl 22(3):592–598
Martínez-Acosta L, Medrano-Barboza JP, López-Ramos Á, Remolina López JF, López-Lambraño ÁA (2020) SARIMA approach to generating synthetic monthly rainfall in the Sinú river watershed in Colombia. Atmosphere 11(6):602
Lin GF, Chen GR, Huang PY, Chou YC (2009) Support vector machine-based models for hourly reservoir inflow forecasting during typhoon-warning periods. J Hydrol 372(1–4):17–29
Guo J, Zhou J, Qin H, Zou Q, Li Q (2011) Monthly streamflow forecasting based on improved support vector machine model. Expert Syst Appl 38(10):13073–13081
Dawson CW, Wilby RL (2001) Hydrological modelling using artificial neural networks. Prog Phys Geogr 25(1):80–108
Tokar AS, Johnson PA (1999) Rainfall-runoff modeling using artificial neural networks. J Hydrol Eng 4(3):232–239
Gholami V, Sahour H (2022) Simulation of rainfall-runoff process using an artificial neural network (ANN) and field plots data. Theoret Appl Climatol 147(1):87–98
Kawakami K (2008) Supervised sequence labelling with recurrent neural networks. Ph. D. thesis.
Bengio Y, Simard P, Frasconi P (1994) Learning long-term dependencies with gradient descent is difficult. IEEE Trans Neural Networks 5(2):157–166
Hochreiter S, Schmidhuber J (1997) Long short-term memory. Neural Comput 9(8):1735–1780
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(11):6005–6022
Sahoo BB, Jha R, Singh A, Kumar D (2019) Long short-term memory (LSTM) recurrent neural network for low-flow hydrological time series forecasting. Acta Geophys 67(5):1471–1481
Hu C, Wu Q, Li H, Jian S, Li N, Lou Z (2018) Deep learning with a long short-term memory networks approach for rainfall-runoff simulation. Water 10(11):1543
Farhi N, Kohen E, Mamane H, Shavitt Y (2021) Prediction of wastewater treatment quality using LSTM neural network. Environ Technol Innov 23:101632
Hunt K M, Matthews GR, Pappenberger F, Prudhomme C (2022) Using a long short-term memory (LSTM) neural network to boost river streamflow forecasts over the western United States. Hydrology and Earth System Sciences Discussions, 1–30.
Cho K, Van Merriënboer B, Gulcehre C, Bahdanau D, Bougares F, Schwenk H, Bengio Y (2014) Learning phrase representations using RNN encoder-decoder for statistical machine translation. arXiv preprint arXiv:1406.1078.
Kalchbrenner N, Blunsom P (2013, October) Recurrent continuous translation models. In: Proceedings of the 2013 conference on empirical methods in natural language processing, pp 1700–1709
Sutskever I, Vinyals O, Le QV (2014) Sequence to sequence learning with neural networks. In: Advances in neural information processing systems, pp 3104–3112
Bahdanau D, Cho K, Bengio Y (2014) Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473.
Ding Y, Zhu Y, Feng J, Zhang P, Cheng Z (2020) Interpretable spatio-temporal attention LSTM model for flood forecasting. Neurocomputing 403:348–359
Ran X, Shan Z, Fang Y, Lin C (2019) An LSTM-based method with attention mechanism for travel time prediction. Sensors 19(4):861
Wang S, Wang X, Wang S, Wang D (2019) Bi-directional long short-term memory method based on attention mechanism and rolling update for short-term load forecasting. Int J Electr Power Energy Syst 109:470–479
Cho K, Van Merriënboer B, Bahdanau D, Bengio Y (2014) On the properties of neural machine translation: Encoder-decoder approaches. arXiv preprint arXiv:1409.1259.
Habimana O, Li Y, Li R, Gu X, Yan W (2020) Attentive convolutional gated recurrent network: a contextual model to sentiment analysis. Int J Mach Learn Cybern 11:2637–2651
Ding G, Qin L (2020) Study on the prediction of stock price based on the associated network model of LSTM. Int J Mach Learn Cybern 11(6):1307–1317
Rumelhart DE, Hinton GE, Williams RJ (1986) Learning representations by back-propagating errors. Nature 323(6088):533–536
Kingma DP, Ba J (2014) Adam: a method for stochastic optimization. arXiv preprint arXiv:1412.698.
Bhosale YH, Patnaik KS (2022, May) IoT deployable lightweight deep learning application for COVID-19 detection with lung diseases using RaspberryPi. In: 2022 international conference on IoT and blockchain technology (ICIBT). IEEE, pp 1–6
Acknowledgements
This research was supported by the Chung-Ang University Young Scientist Scholarship in 2021, by the Chung-Ang University Research Scholarship Grants in 2022, and by the National Research Foundation of Korea (NRF) grant funded by the Korea government (MSIT) (No. 2021R1A2C1009735).
Author information
Authors and Affiliations
Corresponding authors
Ethics declarations
Conflict of interest
The authors declare that they have no conflict of interest.
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
Huang, J., Li, J., Oh, J. et al. LSTM with spatiotemporal attention for IoT-based wireless sensor collected hydrological time-series forecasting. Int. J. Mach. Learn. & Cyber. 14, 3337–3352 (2023). https://doi.org/10.1007/s13042-023-01836-3
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s13042-023-01836-3