LSTM with Spatiotemporal Attention for IoT-based Wireless Sensor Collected Hydrological Time-Series Forecasting
Jianying Huang,Jinhui Li,Jeill Oh,Hoon Kang
DOI: https://doi.org/10.1007/s13042-023-01836-3
2023-01-01
International Journal of Machine Learning and Cybernetics
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 R 2 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.