Abstract
Conventional sludge disposal, including incineration and landfilling, is unsustainable and can cause secondary pollution; thus, sludge solidification is emerging as a sustainable alternative. This study aims to combine machine learning (ML) and metaheuristic optimization to maximize the unconfined compressive strength (UCS) of municipal sludge modified with slag, desulfurized gypsum, and fly ash. A total of 190 specimens were tested, and predictive models based on Gradient Boosting Machine (GBM), Random Forest (RF), Support Vector Regression (SVR), LightGBM, XGBoost, CatBoost, K-Nearest Neighbors (KNN), and Histogram Gradient Boosting (HistGBoost) were coupled with the Whale Optimization Algorithm (WOA). In addition, Particle Swarm Optimization (PSO), Genetic Algorithm (GA), Grey Wolf Optimizer (GWO), Gazelle optimization algorithm (GOA), Octopus Optimization Algorithm (OOA), Hiking Optimization Algorithm (HOA), and Young’s double-slit experiment optimizer (YDSE) were applied for comparison. Sensitivity analysis identified optimal WOA–ML parameter settings. The results demonstrated that the WOA–RF model outperformed all metaheuristic and other WOA–ML approaches by achieving the highest predicted UCS (8.29851 MPa). The WOA-ML models yielded an average optimal mix comprising sludge (44.2%), gypsum (19%), slag (18.7%), fly ash (16%), and NaOH (2.1%). Among the metaheuristic algorithms, PSO, GOA, OOA, TJO, DOA, GA, and YDSE demonstrated competitive performance. GWO achieved the highest UCS (8.226109 MPa), while HOA yielded the lowest (5.15366 MPa). The optimal mix averaged 38.9% sludge, 23.7% gypsum, 21.6% fly ash, 13.4% slag, and 2.5% NaOH. Partial dependence analysis confirmed the nonlinear effects of these parameters, while SHAP sensitivity analysis validated the optimization results. RSM validation further confirmed that both WOA–ML and metaheuristic approaches reliably predict the optimal UCS of modified sludge.