• A comparative machine learning framework was developed to predict ammonia removal efficiency in MBBR systems using data-driven modeling. • Three biocarrier types (K3, K5, and M) were investigated under similar operational conditions. • Surrogate-based optimization using PSO and BO was applied to identify operating conditions leading to maximum ammonia removal efficiency. • The BO achieved the highest predicted removals for the surrogate models: 89. 982% for K3, 77. 908% for K5, and 58. 221% for M. • SHAP analysis identified NH3, SARR, temperature, and NO3–, as the critical features influencing removal efficiency across all the biocarriers. Moving bed biofilm reactors (MBBRs) are widely used for ammonia removal due to their high efficiency, low sludge production, compact footprint, and ability to treat large wastewater volumes. This study aims to predict ammonia removal efficiency in MBBRs using three biocarriers, AnoxKaldness M, K 3, and K 5, based on an original experimental dataset of 125 samples per biocarrier. After removing samples with missing data, a final dataset of 110 samples per biocarrier was retained for modeling. Three machine learning (ML) models were applied: random forest (RF), extreme gradient boosting (XGBoost), and artificial neural networks (ANNs). A two-step feature selection process was used: (i) correlation analysis to eliminate redundant variables and reduce multicollinearity, and (ii) RF feature importance to identify key features, including temperature, dissolved oxygen (DO), nitrate concentration (NO 3), influent ammonia concentration (NH 3 ᵢn), organic loading rate (OLR), surface area ammonia removal rate (SARR), surface ammonia loading rate (SALR), phosphate concentration (PO 4), and nitrogen loading rate (NLR). Furthermore, surrogate-based optimization using particle swarm optimization (PSO) and Bayesian optimization (BO) was conducted to propose hypothesis-generating optimal operating conditions for maximum ammonia removal efficiency. BO achieved the highest predicted removals across the biocarriers, 89. 982% (K 3), 77. 908% (K 5), and 58. 221% (M), while PSO offered faster computation with comparable performance. Model performance showed that XGBoost performed best across all biocarriers: for K 3 (R 2 = 0. 992, RMSE = 1. 230), K 5 (R 2 = 0. 992, RMSE = 1. 285), and M (R 2 = 0. 997, RMSE = 0. 987). Additionally, SHapley Additive exPlanations (SHAP) analysis identified NH 3 ᵢn, SARR, and NO 3 as the most influential features across all carriers. Overall, the findings from this work suggest that ML-driven surrogate modeling, combined with explainable AI and optimization, provides computational insights into potential operational influences in MBBRs and generates hypotheses about important predictors, but requires larger, diverse datasets, and experimental validation (in order to establish practical applicability) before these results can be translated into actionable decision support for wastewater treatment plant operation.
Tawalbeh et al. (Wed,) studied this question.