MSASFormer: A Multi-Scale Adaptive Selection Transformer for Multi-Target Effluent Quality Forecasting in Wastewater Treatment Plants
Jiaxun Cai, Shengli Du, Junfeng Gao, Junfei QiaoAccurate effluent-quality forecasting is essential for effective process monitoring and operational decision-making in wastewater treatment plants (WWTPs). However, achieving reliable forecasts requires effectively modelling process dynamics at multiple temporal scales. The relative importance of these temporal scales and the upstream information needed for prediction may vary with operating conditions and prediction targets. To address this challenge, we present the Multi-Scale Adaptive Selection Transformer (MSASFormer), a unified framework for simultaneously forecasting multiple effluent-quality indicators. MSASFormeris evaluated using simulation data generated by Benchmark Simulation Model No. 2 (BSM2) for 4-h-ahead forecasting of effluent BOD5, COD and TSS, achieving the best aggregate predictive performance among the three evaluated models. Compared with the two strong hybrid models (CNN–LSTM and TCN–GRU), MSASFormer yielded the lowest SMSE of 0.366±0.007 and the highest mean R2 of 0.653±0.007. Meanwhile, it achieved the lowest MAE for all three indicators and the best overall performance for COD, while remaining competitive with TCN–GRU for BOD5 and TSS. The ablation results demonstrated the contributions of the main architectural components to predictive performance. Finally, analysis of the scale-selection behaviour showed that MSASFormer selected different combinations of temporal scales across input samples, indicating its ability to adapt scale selection to changing process conditions.