Interpretable machine learning for groundwater nitrate prediction using hydrochemical and isotopic indicators in China
Groundwater nitrate contamination poses significant environmental and public health concerns, necessitating reliable predictive approaches for effective water quality management. In this study, an explainable machine learning framework was developed to predict groundwater nitrate (NO3−) concentrations using hydrochemical, isotopic, and spatial variables compiled from groundwater studies conducted across diverse hydrogeological regions of China. Key variables, including pH, electrical conductivity (EC), total dissolved solids (TDS), dissolved oxygen (DO), temperature, dissolved organic carbon (DOC), and stable isotopes (δ15N-NO3 and δ18O-NO3), were integrated into Random Forest (RF) and Extreme Gradient Boosting (XGBoost) models. Statistical analysis, correlation assessment, and feature engineering were performed prior to model development. Hyperparameter optimization and 10-fold cross-validation were employed to improve model robustness and generalization. The optimized RF and XGBoost models exhibited moderate predictive performance, achieving R2 values of 0.489 and 0.477, respectively, reflecting the inherent complexity and spatial heterogeneity of groundwater nitrate contamination. Model predictions were interpreted using SHapley Additive exPlanations (SHAP), one and two dimensional Partial Dependence Plots (PDPs), feature importance, and sensitivity analysis, revealing that isotopic signatures, EC, TDS, and DO were the dominant factors influencing groundwater nitrate variability. By integrating hydrochemical and isotopic indicators with multiple complementary interpretability techniques, the framework provides quantitative insights into the individual and nonlinear contributions of key predictors to nitrate variability. The proposed explainable machine learning framework provides a transparent and scientifically interpretable approach for groundwater nitrate prediction and offers valuable insights into the hydrogeochemical factors governing nitrate contamination, thereby supporting groundwater quality assessment and sustainable water resource management.
Authors
- Zhenyu Liu
- Shaokang Wang
- Danfeng Li
Institutions
- Tianjin Tianhe Hospital (CN)
- Tianjin Medical University (CN)
Publication Details
- Journal
- Journal of the Iranian Chemical Society
- Published
- 2026-11-17
- DOI
- https://doi.org/10.1007/s13738-026-03650-4
- Primary Topic
- Water Quality and Pollution Assessment
- Type
- article
- Field-Weighted Citation Impact
- 0.00