Water quality prediction based on LSTM with attention mechanism

Read full text
Authors: Yinshan Yu, Hui Zhang, Jinsong Wei
Cited by: 3
References: 21

Abstract

This paper proposes a novel water quality detection method based on Long Short-Term Memory (LSTM) with attention mechanism. The key innovation lies in the integration of an attention mechanism with convolutional and recurrent architectures, which enables adaptive weight allocation across temporal features extracted by LSTM and enhances the model's ability to capture long-range dependencies in water quality sequences. This structural improvement allows the model to dynamically focus on critical time steps and pollutant-related features, thereby significantly boosting prediction accuracy and interpretability. The CNN-LSTM-Attention model is employed to predict the content of three pesticides in lakes. Experimental results demonstrate that the correlation coefficients (R²) for all three pesticides exceed 0.95, with near-zero mean absolute error (MAE), mean absolute percentage error (MAPE), and root mean square error (RMSE) values, which indicates a minimal discrepancy between predicted and actual values. This confirms the high accuracy of the CNN-LSTM-Attention model in predicting lake pollutant concentrations. The proposed method offers a new approach to lake pollutant prediction and provides a valuable reference for water quality detection methodologies.

Fields of Study & Subjects

Hydrological Forecasting Using AI Water Quality Monitoring Technologies Water Quality and Pollution Assessment

Publication details

Journal / source
Alexandria Engineering Journal
Publisher
Elsevier BV
Volume
141
Pages
194–201
Publication date
11 March 2026
Language
EN