Groundwater is the primary source of irrigation in many semi-arid hard-rock aquifer regions. Yet, its suitability assessment is often hindered by the nonlinear hydrochemical dynamics that traditional bivariate tools, such as the U.S. Salinity Laboratory (USSL) diagram, cannot adequately resolve. To overcome this limitation, we developed an explainable artificial intelligence (XAI) framework that predicts irrigation suitability categories directly from hydrochemical variables, without relying on calculated indices. Using 1872 post-monsoon groundwater samples from Telangana, India, we trained three ensemble tree-based classifiers (Random Forest, LightGBM, and XGBoost) on 11 hydrochemical variables (Na+, K+, Ca2+, Mg2+, HCO3−, Cl−, F−, NO3−, SO42−, pH, and total hardness). Class imbalance was addressed using the Synthetic Minority Over-sampling Technique (SMOTE), and model hyperparameters were optimized with Optuna. Among the tested models, LightGBM achieved the best performance (balanced accuracy = 0.938). Model interpretability was enabled using Shapley Additive Explanations (SHAP), supported by Piper and Gibbs diagrams, revealing a critical distinction between sodicity-driven salinity and hardness-driven mineralization, identifying calcium-saturated waters for which gypsum amendment can be chemically futile. To bridge the gap between algorithmic accuracy and operational simplicity, we distilled SHAP explanations into linear heuristics and quantified the trade-off between accuracy and simplicity. Accordingly, we proposed a tiered hydrochemical triage framework in which quantitative heuristics handled approximately 62.5% of the routine samples, while XAI resolved the complex and ambiguous cases. Overall, the proposed framework transforms classic suitability assessment tools into an adaptable, evidence-informed, proactive decision-support system for sustainable agricultural water management under increasing environmental stress.
Yousif et al. (Thu,) studied this question.