A watershed water quality prediction model based on attention mechanism and Bi-LSTM

Environ Sci Pollut Res Int. 2022 Oct;29(50):75664-75680. doi: 10.1007/s11356-022-21115-y. Epub 2022 Jun 3.

Abstract

Accurate prediction of water quality contributes to the intelligent management and control of watershed ecology. Water Quality data has time series characteristics, but the existing models only focus on the forward time series when LSTM is introduced and do not consider the effect of the reverse time series on the model. Also did not take into account the different contributions of water quality sequences to the model at different moments. In order to solve this problem, this paper proposes a watershed water quality prediction model called AT-BILSTM. The model mainly contains a Bi-LSTM layer and a temporal attention layer and introduces an attention mechanism after bidirectional feature extraction of water quality time series data to highlight the data series that have a critical impact on the prediction results. The effectiveness of the method was verified with actual datasets from four monitoring stations in Lanzhou section of the Yellow River basin in China. After comparing with the reference model, the results show that the proposed model combines the bidirectional nonlinear mapping capability of Bi-LSTM and the feature weighting feature of the attention mechanism. Taking Fuhe Bridge as an example, compared with the original LSTM model, the RMSE and MAE of the model are reduced to 0.101 and 0.059, respectively, and the R2 is improved to 0.970, which has the best prediction performance among the four cross-sections and can provide a decision basis for the comprehensive water quality management and pollutant control in the basin.

Keywords: Attention mechanism; Bi-LSTM; Hybrid model; Neural networks; The time series; Water quality prediction.

MeSH terms

  • China
  • Environmental Pollutants*
  • Rivers
  • Water Quality*

Substances

  • Environmental Pollutants