Research on Anomaly Detection in Wastewater Treatment Systems Based on a VAE-LSTM Fusion Model
Xin Liu, Zhengxuan Gong, Xi Zhang
Abstract
This study addresses the problem of anomaly detection in water treatment systems by proposing a hybrid VAE–LSTM model with a combined loss function that integrates reconstruction and prediction errors. Following the signal flow of wastewater treatment systems, data acquisition, transmission, and cyberattack scenarios were simulated, and a dual-dimensional learning framework of “feature space—temporal space” was designed: the VAE learns latent data distributions and computes reconstruction errors, while the LSTM models temporal dependencies and computes prediction errors. Anomaly decisions are made through feature extraction and weighted scoring. Experimental comparisons show that the proposed fusion model achieves an accuracy of approximately 0.99 and an F1-Score of about 0.75, significantly outperforming single models such as Isolation Forest and One-Class SVM. It can accurately identify attack anomalies in devices such as the LIT101 sensor and MV101 actuator, e.g., water tank overflow and state transitions, with reconstruction errors primarily beneath 0.08 ensuring detection reliability. In terms of time efficiency, Isolation Forest is suitable for real-time preliminary screening, while VAE-LSTM adapts to high-precision detection scenarios with an “offline training (423 s) + online detection (1.39 s)” mode. This model provides a practical solution for intelligent monitoring of industrial water treatment systems. Future research will focus on model lightweighting, enhanced data generalization, and integration with edge computing to improve system applicability and robustness. The proposed approach breaks through the limitations of traditional single models, demonstrating superior performance in detection accuracy and scenario adaptability. It offers technical support for improving the operational efficiency and security of water treatment systems and serves as a paradigm reference for anomaly detection in similar industrial systems.