Machine Learning-Driven Optimization for Predicting Biochar Adsorption Performance Toward Pb(II) and Cd(II)
Abstract
1. Introduction
2. Materials and Methods
2.1. Data Acquisition and Pre-Processing
2.1.1. Data Collection and Feature Engineering
2.1.2. Missing Value Imputation and Leakage Prevention
2.2. Data Visualization and Pre-Processing
2.3. Selection and Building of ML Models
2.4. Model Training and Evaluation
2.5. Ablation Study for Data Synergy Verification
2.6. Uncertainty Quantification via Locally Adaptive Conformal Prediction
2.7. Feature Importance Analysis of ML Model
3. Results
3.1. Data-Descriptive Analysis and Physicochemical Isomorphism
3.2. Predictive Performance and Optimal Model Selection
3.3. Quantifying Data Synergy and Reliability via Ablation Study and Conformal Prediction
3.3.1. Ablation Study on Cross-Ion Predictive Performance
3.3.2. Uncertainty Quantification via Conformal Prediction
3.4. Mechanistic Interpretation and Feature Attribution
3.4.1. Feature Importance and Directional Impacts
3.4.2. Influence of the Important Features on the Target
3.4.3. Interactions Between the Important Features
4. Discussion
5. Conclusions
Supplementary Materials
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Saravanan, P.; Saravanan, V.; Rajeshkannan, R.; Arnica, G.; Rajasimman, M.; Baskar, G.; Pugazhendhi, A. Comprehensive review on toxic heavy metals in the aquatic system: Sources, identification, treatment strategies, and health risk assessment. Environ. Res. 2024, 258, 119440. [Google Scholar] [CrossRef]
- Monroy-Licht, A.; Martinez-Burgos, W.J.; de Carvalho, J.C.; Cavali, M.; Woiciechowski, A.L.; Karp, S.G.; Soccol, C.R.; De la Parra-Guerra, A.C.; Pozzan, R.; Acevedo-Barrios, R. Biological approaches to mitigate heavy metal pollution from battery production effluents: Advances, challenges, and perspectives. Environ. Sci. Pollut. Res. 2025, 32, 20844–20878. [Google Scholar] [CrossRef]
- Ali, H.; Khan, E.; Ilahi, I. Environmental chemistry and ecotoxicology of hazardous heavy metals: Environmental persistence, toxicity, and bioaccumulation. J. Chem. 2019, 2019, 6730305. [Google Scholar] [CrossRef]
- Balali-Mood, M.; Naseri, K.; Tahergorabi, Z.; Khazdair, M.R.; Sadeghi, M. Toxic Mechanisms of Five Heavy Metals: Mercury, Lead, Chromium, Cadmium, and Arsenic. Front. Pharmacol. 2021, 12, 643972. [Google Scholar] [CrossRef]
- Ghangale, S.S.; Saler, R.S.; Khandelwal, S.R.; Handore, D.V.; Handore, A.V. Harnessing heavy metal-tolerant bacteria and phytotoxicity assessment for ecofriendly treatment of industrial effluents. Eqa-Int. J. Environ. Qual. 2024, 61, 16–23. [Google Scholar] [CrossRef]
- Ajiboye, T.O.; Oyewo, O.A.; Onwudiwe, D.C. Simultaneous removal of organics and heavy metals from industrial wastewater: A review. Chemosphere 2021, 262, 128379. [Google Scholar] [CrossRef] [PubMed]
- Mei, Y.; Zhuang, S.; Wang, J. Adsorption of heavy metals by biochar in aqueous solution: A review. Sci. Total Environ. 2025, 968, 178898. [Google Scholar] [CrossRef]
- Wang, W.; Chang, J.S.; Lee, D.J. Machine learning applications for biochar studies: A mini-review. Bioresour. Technol. 2024, 394, 130291. [Google Scholar] [CrossRef]
- Duan, Q.N.; Yan, P.W.; Feng, Y.C.; Wan, Q.R.; Zhu, X.L. Machine learning assisted adsorption performance evaluation of biochar on heavy metal. Front. Environ. Sci. Eng. 2024, 18, 55. [Google Scholar] [CrossRef]
- Liu, B.Y.; Xi, F.Y.; Zhang, H.J.; Peng, J.T.; Sun, L.P.; Zhu, X.Z. Coupling machine learning and theoretical models to compare key properties of biochar in adsorption kinetics rate and maximum adsorption capacity for emerging contaminants. Bioresour. Technol. 2024, 402, 130776. [Google Scholar] [CrossRef]
- Yang, H.R.; Huang, K.; Zhang, K.; Weng, Q.; Zhang, H.C.; Wang, F.E. Predicting Heavy Metal Adsorption on Soil with Machine Learning and Mapping Global Distribution of Soil Adsorption Capacities. Environ. Sci. Technol. 2021, 55, 14316–14328. [Google Scholar] [CrossRef] [PubMed]
- Wei, X.; Liu, Y.; Shen, L.; Lu, Z.; Ai, Y.; Wang, X. Machine learning insights in predicting heavy metals interaction with biochar. Biochar 2024, 6, 10. [Google Scholar] [CrossRef]
- Yuan, X.Z.; Li, J.; Lim, J.Y.; Zolfaghari, A.; Alessi, D.S.; Wang, Y.; Wang, X.N.; Ok, Y.S. Machine Learning for Heavy Metal Removal from Water: Recent Advances and Challenges. ACS ES T Water 2023, 4, 820–836. [Google Scholar] [CrossRef]
- Zhao, S.Y.; Guo, J.Y.; Tang, Y.; Zhou, Y.B. Applications of machine learning in heavy metal adsorption modeling: A review. Sep. Purif. Technol. 2025, 377, 134168. [Google Scholar] [CrossRef]
- Zhao, C.X.; Yue, W.J.; Jiang, Z.H.; Lu, X.Y.; Xia, Q.; Shen, Z.P.; Chen, A.H. Predictive modeling of heavy metal lead and cadmium adsorption on biochar based on machine learning. Int. J. Phytoremediat. 2025, 28, 748–755. [Google Scholar] [CrossRef]
- Chen, B.T.; Guan, H.B.; Zhang, Y.; Liu, S.X.; Zhao, B.F.; Zhong, C.Q.; Zhang, H.M.; Ding, W.R.; Song, A.A.; Zhu, D.; et al. Performance and mechanism of Pb2+and Cd2+ions’ adsorption via modified antibiotic residue-based hydrochar. Heliyon 2023, 9, e14930. [Google Scholar] [CrossRef]
- Shen, T.; Peng, H.Y.; Yuan, X.Z.; Liang, Y.S.; Liu, S.Q.; Wu, Z.B.; Leng, L.J.; Qin, P.F. Feature engineering for improved machine-learning-aided studying heavy metal adsorption on biochar. J. Hazard. Mater. 2024, 466, 133442. [Google Scholar] [CrossRef] [PubMed]
- Hernández-Guerrero, B.A.; Martínez, L.; Peña-Rodríguez, G.; Trejo, F. Machine Learning-Enhanced Modeling of Heavy Metal Adsorption onto Coal Fly Ash-Derived Zeolite P. Water 2026, 18, 857. [Google Scholar] [CrossRef]
- Varivoda, D.; Dong, R.Z.; Omee, S.S.; Hu, J.J. Materials property prediction with uncertainty quantification: A benchmark study. Appl. Phys. Rev. 2023, 10, 021409. [Google Scholar] [CrossRef]
- Roh, J.; Park, H.; Kwon, H.; Joo, C.; Moon, I.; Cho, H.; Ro, I.; Kim, J. Interpretable machine learning framework for catalyst performance prediction and validation with dry reforming of methane. Appl. Catal. B-Environ. Energy 2024, 343, 123454. [Google Scholar] [CrossRef]
- Sakhiya, A.K.; Kaushal, P.; Vijay, V.K. Potential of rice straw derived activated biochar to remove arsenic and manganese from groundwater: A cleaner approach in the Indo-Gangetic Plain. Appl. Surf. Sci. Adv. 2023, 17, 100443. [Google Scholar] [CrossRef]
- Prokhorenkova, L.; Gusev, G.; Vorobev, A.; Dorogush, A.V.; Gulin, A. CatBoost: Unbiased boosting with categorical features. Adv. Neur. In. 2018, 31, 6639–6649. [Google Scholar] [CrossRef]
- Qiu, S.; Zhao, H.K.; Jiang, N.; Wang, Z.L.; Liu, L.; An, Y.; Zhao, H.Y.; Miao, X.; Liu, R.C.; Fortino, G. Multi-sensor information fusion based on machine learning for real applications in human activity recognition: State-of-the-art and research challenges. Inf. Fusion 2022, 80, 241–265. [Google Scholar] [CrossRef]
- Chen, T.; Guestrin, C. Xgboost: A scalable tree boosting system. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, 13–17 August 2016; pp. 785–794. [Google Scholar]
- Khajavian, M.; Ismail, S.; Esmaeili, J. Structural design of cellulose derivative-modified chitosan adsorbents for arsenic removal: Machine learning modeling, Box-Behnken design, Optuna hyperparameter tuning, and molecular dynamics. Biochem. Eng. J. 2025, 221, 109800. [Google Scholar] [CrossRef]
- Chicco, D.; Warrens, M.J.; Jurman, G. The coefficient of determination R-squared is more informative than SMAPE, MAE, MAPE, MSE and RMSE in regression analysis evaluation. Peerj Comput. Sci. 2021, 7, e623. [Google Scholar] [CrossRef]
- Angelopoulos, A.N.; Bates, S. Conformal Prediction: A Gentle Introduction. Found. Trends Mach. Learn. 2023, 16, 494–591. [Google Scholar] [CrossRef]
- Barber, R.F.; Candès, E.J.; Ramdas, A.; Tibshirani, R.J. Predictive Inference with the Jackknife. Ann. Stat. 2021, 49, 486–507. [Google Scholar] [CrossRef]
- Razavi, S.; Jakeman, A.; Saltelli, A.; Prieur, C.; Iooss, B.; Borgonovo, E.; Plischke, E.; Lo Piano, S.; Iwanaga, T.; Becker, W.; et al. The Future of Sensitivity Analysis: An essential discipline for systems modeling and policy support. Environ. Model. Softw. 2021, 137, 104954. [Google Scholar] [CrossRef]
- Arrieta, A.B.; Díaz-Rodríguez, N.; Del Ser, J.; Bennetot, A.; Tabik, S.; Barbado, A.; García, S.; Gil-López, S.; Molina, D.; Benjamins, R.; et al. Explainable Artificial Intelligence (XAI): Concepts, taxonomies, opportunities and challenges toward responsible AI. Inf. Fusion 2020, 58, 82–115. [Google Scholar] [CrossRef]
- Chen, L.; Hu, J.; Wang, H.; He, Y.Y.; Deng, Q.Y.; Wu, F.F. Predicting Cd(II) adsorption capacity of biochar materials using typical machine learning models for effective remediation of aquatic environments. Sci. Total Environ. 2024, 944, 173955. [Google Scholar] [CrossRef]
- Fayaz, S.A.; Zaman, M.; Kaul, S.; Butt, M.A. Is Deep Learning on Tabular Data Enough? An Assessment. Int. J. Adv. Comput. Sci. Appl. 2022, 13, 466–473. [Google Scholar] [CrossRef]
- Lundberg, S.M.; Erion, G.; Chen, H.; DeGrave, A.; Prutkin, J.M.; Nair, B.; Katz, R.; Himmelfarb, J.; Bansal, N.; Lee, S.I. From local explanations to global understanding with explainable AI for trees. Nat. Mach. Intell. 2020, 2, 56–67. [Google Scholar] [CrossRef]
- Ke, G.L.; Meng, Q.; Finley, T.; Wang, T.F.; Chen, W.; Ma, W.D.; Ye, Q.W.; Liu, T.Y. LightGBM: A Highly Efficient Gradient Boosting Decision Tree. Adv. Neural Inf. Process. Syst. 2017, 30, 3149–3157. [Google Scholar]
- Wang, L.; He, T.J.; Ouyang, B. Impact of Domain Knowledge on the Property Prediction of Specialized Machine Learning Models. Acs Mater. Lett. 2025, 7, 2708–2715. [Google Scholar] [CrossRef]
- Xiao, J.; Mo, G.H.; Zhou, S.K. Mitigating Cd(II) contamination form aqueous solution by phosphate-activated sludge biochar: Role of effect of activation sequence. J. Environ. Chem. Eng. 2024, 12, 114960. [Google Scholar] [CrossRef]
- Thi, H.V. Mechanistically validated selective adsorption of pb(II), cd(II), and hg(II) on thiol-functionalized hierarchical magnetic biochar under competitive conditions. Sep. Purif. Technol. 2026, 388, 136860. [Google Scholar] [CrossRef]
- Wang, Z.W.; Nie, Q.; Lei, Z.F.; Zhang, Z.Y.; Shimizu, K.; Yuan, T. Enhanced Pb(II) removal from wastewater by co-pyrolysis biochar derived from sewage sludge and calcium sulfate: Performance evaluation and quantitative mechanism analysis. Sep. Purif. Technol. 2024, 329, 125124. [Google Scholar] [CrossRef]
- Ahmed, W.; Xu, T.W.; Mahmood, M.; Nunez-Delgado, A.; Ali, S.; Shakoor, A.; Qaswar, M.; Zhao, H.W.; Liu, W.J.; Li, W.D.; et al. Nano-hydroxyapatite modified biochar: Insights into the dynamic adsorption and performance of lead (II) removal from aqueous solution. Environ. Res. 2022, 214, 113827. [Google Scholar] [CrossRef]
- Cai, T.; Du, H.H.; Liu, X.L.; Tie, B.Q.; Zeng, Z.X. Insights into the removal of Cd and Pb from aqueous solutions by NaOH-EtOH-modified biochar. Environ. Technol. Innov. 2021, 24, 102031. [Google Scholar] [CrossRef]
- Chen, Q.Y.; Zhang, T.C.; Ouyang, L.K.; Yuan, S.J. Single-Step Hydrothermal Synthesis of Biochar from HPO-Activated Lettuce Waste for Efficient Adsorption of Cd(II) in Aqueous Solution. Molecules 2022, 27, 269. [Google Scholar] [CrossRef]
- Ge, S.Q.; Zhao, S.; Wang, L.; Zhao, Z.Y.; Wang, S.L.; Tian, C.Y. Exploring adsorption capacity and mechanisms involved in cadmium removal from aqueous solutions by biochar derived from euhalophyte. Sci. Rep. 2024, 14, 450. [Google Scholar] [CrossRef]
- Hou, Y.W.; Lin, S.N.; Fan, J.J.; Zhang, Y.C.; Jing, G.H.; Cai, C. Enhanced Adsorption of Cadmium by a Covalent Organic Framework-Modified Biochar in Aqueous Solution. Toxics 2024, 12, 717. [Google Scholar] [CrossRef]
- Islam, M.S.; Kwak, J.H.; Nzediegwu, C.; Wang, S.Y.; Palansuriya, K.; Kwon, E.E.; Naeth, M.A.; El-Din, M.G.; Ok, Y.S.; Chang, S.X. Biochar heavy metal removal in aqueous solution depends on feedstock type and pyrolysis purging gas. Environ. Pollut. 2021, 281, 117094. [Google Scholar] [CrossRef]
- Wijitkosum, S.; Sriburi, T. Aromaticity, polarity, and longevity of biochar derived from disposable bamboo chopsticks waste for environmental application. Heliyon 2023, 9, e19831. [Google Scholar] [CrossRef]
- Deng, H.; Zhang, J.Y.; Huang, R.; Wang, W.; Meng, M.W.; Hu, L.N.; Gan, W.X. Adsorption of Malachite Green and Pb2+ by KMnO4-Modified Biochar: Insights and Mechanisms. Sustainability 2022, 14, 2040. [Google Scholar] [CrossRef]
- Qiu, M.Q.; Liu, L.J.; Ling, Q.; Cai, Y.W.; Yu, S.J.; Wang, S.Q.; Fu, D.; Hu, B.W.; Wang, X.K. Biochar for the removal of contaminants from soil and water: A review. Biochar 2022, 4, 19. [Google Scholar] [CrossRef]









| Model | Test R2 | Test RMSE |
|---|---|---|
| XGBoost | 0.9158 ± 0.0438 | 11.1662 ± 2.0617 |
| LightGBM | 0.8869 ± 0.0297 | 13.2840 ± 1.3782 |
| CatBoost | 0.9209 ± 0.0359 | 10.9171 ± 1.7662 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Yu, P.; Huang, Z.; Xie, W. Machine Learning-Driven Optimization for Predicting Biochar Adsorption Performance Toward Pb(II) and Cd(II). Water 2026, 18, 1416. https://doi.org/10.3390/w18121416
Yu P, Huang Z, Xie W. Machine Learning-Driven Optimization for Predicting Biochar Adsorption Performance Toward Pb(II) and Cd(II). Water. 2026; 18(12):1416. https://doi.org/10.3390/w18121416
Chicago/Turabian StyleYu, Pengcheng, Zixi Huang, and Wuming Xie. 2026. "Machine Learning-Driven Optimization for Predicting Biochar Adsorption Performance Toward Pb(II) and Cd(II)" Water 18, no. 12: 1416. https://doi.org/10.3390/w18121416
APA StyleYu, P., Huang, Z., & Xie, W. (2026). Machine Learning-Driven Optimization for Predicting Biochar Adsorption Performance Toward Pb(II) and Cd(II). Water, 18(12), 1416. https://doi.org/10.3390/w18121416
