Leveraging machine learning and density functional theory for the design of high-performance biochar sensors in agricultural contaminant detection
The contamination of agricultural environments by toxic heavy metals, such as lead (Pb(II)), represents a significant threat to both public health and crop productivity, necessitating the development of efficient and sustainable detection methods. Biochar-based electrochemical sensors have emerged as promising candidates due to their cost-effectiveness, high sensitivity, and sustainability. However, optimizing these sensors for real-world applications remains a challenge, particularly in the design of N/O co-doped biochar electrodes. This study introduces a closed-loop framework combining machine learning (ML) and density functional theory (DFT) to address these challenges. A CatBoost model, optimized on a 19-dimensional feature space, predicts the Pb(II) sensing performance of biochar sensors with a high degree of accuracy (R 2 = 0.98). SHAP analysis is employed to identify key chemical functionalities, pyridinic nitrogen (N-6), carbonyl (C O), and hydroxyl (C-OH), as the main contributors to sensor performance. DFT calculations provide a deeper understanding of the atomic-scale interactions, revealing that the synergy between N-6 and C-OH enhances the Pb(II) adsorption energy, further boosting the sensor's efficiency. The framework's predictions are experimentally validated, showing strong agreement with measured results (error = 2.04%). This study highlights the potential of integrating ML and DFT to accelerate the design of biochar-based sensors, offering a robust methodology for environmental monitoring in agriculture. This work paves the way for future advancements in detecting agricultural contaminants and contributes to the development of sustainable agricultural practices. • Closed-loop ML-DFT accelerates biochar sensor design for agricultural monitoring. • SHAP reveals N‐6&C=O&C‐OH ternary configuration as optimal for Pb(II) detection. • DFT uncovers hydrogen-bond synergy boosting Pb(II) adsorption energy to −1.55 eV. • Experimental validation confirms 2.04% prediction error and broad linear range. • GUI tool enables real-time screening of 19-dimensional design space.
Authors
- Shaoyi Zeng
- Kunquan Li (ORCID: https://orcid.org/0000-0001-9241-3627)
- Jian Ju
- Boyu Li
- Yanjin Wang
- Dong Wang (ORCID: https://orcid.org/0009-0008-7785-0050)
Institutions
- Nanjing Agricultural University (CN)
- China Electric Equipment Group (China) (CN)
- Henan University of Economic and Law (CN)
Publication Details
- Journal
- Industrial Crops and Products
- Published
- 2026-04-16
- DOI
- https://doi.org/10.1016/j.indcrop.2026.123268
- Primary Topic
- Advanced Chemical Sensor Technologies
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- National Natural Science Foundation of China
- Natural Science Foundation of Jiangsu Province
- Jiangsu Provincial Key Research and Development Program
- Fundamental Research Funds for the Central Universities