Application of explainable artificial intelligence and machine learning in wastewater treatment plants variable prediction: A comparative study of small and large-scale treatment plants

Abstract

Explainable artificial intelligence (XAI) can play a significant role in the application of machine learning (ML) in wastewater treatment plants (WWTPs). The present research focuses on evaluating the performance and generalizability of widely used ML models for predicting key effluent quality variables at multiple WWTPs. Effluent variables including ammonia nitrogen (NH₃-N), biochemical oxygen demand (BOD), chemical oxygen demand (COD), total phosphorus (TP), and total suspended solids (TSS) were predicted using eXtreme Gradient Boosting (XGBoost) and random forest (RF) models. Several feature selections (FS) and XAI tools were used to understand the influence of input variables on target variables and impact of input variables on model performance. The study demonstrates how XAI can enhance the understanding of model behavior by identifying key input variables, thereby supporting more informed and transparent decision-making at WWTPs. The study finds that XAI methods are effective in capturing influence of variables regardless of the choice of model for variable prediction. XAI tools, SHapley Additive exPlanations (SHAP) and Local Interpretable Model-agnostic Explanations (LIME), are successful in providing deeper understanding of the key factors influencing ML model performance. The findings of this research will facilitate WWTP operation with better decision-making in choosing ML models to optimize treatment performance and improve environmental sustainability.

Transparent peer review

To support increased transparency, we offer authors the option to publish the peer review history alongside their article.

View this article’s peer review history

Article information

Article type
Paper
Submitted
09 Nov 2025
Accepted
27 Feb 2026
First published
03 Mar 2026
This article is Open Access
Creative Commons BY-NC license

Environ. Sci.: Adv., 2026, Accepted Manuscript

Application of explainable artificial intelligence and machine learning in wastewater treatment plants variable prediction: A comparative study of small and large-scale treatment plants

F. B. Nasir and J. Li, Environ. Sci.: Adv., 2026, Accepted Manuscript , DOI: 10.1039/D5VA00408J

This article is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported Licence. You can use material from this article in other publications, without requesting further permission from the RSC, provided that the correct acknowledgement is given and it is not used for commercial purposes.

To request permission to reproduce material from this article in a commercial publication, please go to the Copyright Clearance Center request page.

If you are an author contributing to an RSC publication, you do not need to request permission provided correct acknowledgement is given.

If you are the author of this article, you do not need to request permission to reproduce figures and diagrams provided correct acknowledgement is given. If you want to reproduce the whole article in a third-party commercial publication (excluding your thesis/dissertation for which permission is not required) please go to the Copyright Clearance Center request page.

Read more about how to correctly acknowledge RSC content.

Social activity

Spotlight

Advertisements