Explainable Artificial Intelligence integrated with Machine learning operations to predict the nitrate concentrations in Groundwater | Research Square window.SnipcartSettings = { analytics: { enabled: false } }; (function() { var accessVector = localStorage.getItem('access_vector') || ''; window.dataLayer = window.dataLayer || []; if (accessVector) { window.dataLayer.push({ user: { profile: { profileInfo: { snid: accessVector } } } }); } })(); (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-K279D39R'); Browse Preprints In Review Journals COVID-19 Preprints AJE Video Bytes Research Tools Research Promotion AJE Professional Editing AJE Rubriq About Preprint Platform In Review Editorial Policies Our Team Advisory Board Help Center Sign In Submit a Preprint Cite Share Download PDF Research Article Explainable Artificial Intelligence integrated with Machine learning operations to predict the nitrate concentrations in Groundwater Jagadish Kumar Mogaraju This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-6310428/v1 This work is licensed under a CC BY 4.0 License Status: Posted Version 1 posted You are reading this latest preprint version Abstract Groundwater is a commodity we depend on for diverse needs, and maintaining its quality must be considered vital. We considered Machine Learning (ML) operations and Explainable Artificial Intelligence (XAI) to predict the nitrate concentration levels in the groundwater of India for the years 2019 and 2023. The variables used in this study are Latitude, Longitude, pH, EC, CO3, HCO3, Cl, SO4, PO4, TH, Ca, Mg, Na, K, F, TDS, SiO2, and NO3 for the 2019 dataset and Longitude, Latitude, pH, EC, CO3, HCO3, Cl, F, SO4, PO4, TH, Ca, Mg, Na, K, Fe, As, U, and NO3 for the 2023 dataset. We prepared GIS surface maps using interpolation supported by the Empirical Bayesian Kriging method. We investigated the model efficiency and feature importance in the presence and absence of location attributes. We considered 19 ML models and filtered Light Gradient Boosting Machine (LightGBM) and Liner Regression (LR) models that exhibited relatively better accuracy. We first trained these models and fed them to XAI via SHAP (SHapley Additive exPlanations), which was dependent on the game theory. We obtained a 28.23% and 24.88% increase in accuracy when comparing the 2019 and 2023 datasets with location attributes, respectively. We also observed a 28.3% increase in accuracy when the 2023 dataset without a location attribute was used. We conclude that ML can be integrated with XAI to improve the accuracy of the prediction of nitrate in groundwater studies. Hydrology Artificial Intelligence and Machine Learning Environmental Chemistry Kriging SHAP Pollution Groundwater Prediction Regression Figures Figure 1 Figure 2 Figure 3 Figure 4 Figure 5 Figure 6 Figure 7 Figure 8 Figure 9 Figure 10 Figure 11 Figure 12 Figure 13 Figure 14 Figure 15 Figure 16 Figure 17 Figure 18 Figure 19 Figure 20 Figure 21 Novelty statement The works cited did not / partially considered the role of XAI integrated with ML in enhancing the prediction capabilities. We made a wider search using Google Scholar and Google search to check if a work like this had also been published. Our search did not yield any results, which points to the fact that this work may be novel, considering the intricacies presented here. We considered machine learning frameworks first to investigate an appropriate model and, in other words, train the model. The saved ML model was used as a starting point in the XAI framework (SHAP). We observed that there was an increase in the accuracy metric when the trained ML model was passed onto XAI. Introduction Nitrate pollution in groundwater has evolved as an important issue due to its impact on global health (Verma et al. 2023 ). Groundwater has been a precious source of drinking water for several populations for centuries, but now it is ruined in terms of quantity and quality by anthropogenic activities (Aju et al. 2024 ; P. Li et al. 2021 ). The World Health Organization (WHO) declared that nitrate concentrations above 50mg/l can induce Blue baby syndrome (Pal et al. 2024 ). Assessment of groundwater vulnerability has been a challenging task, and it was based on several vulnerability indexes that need more data, especially while studying groundwater pollution in urban areas (Asadi et al. 2016 ). Chemical fertilizers, nitrogen in soil, manure, and sewage are considered the major sources of nitrates in the groundwater (Su et al. 2021 ). The non-carcinogenic risk caused by excess nitrate in groundwater was higher in adult females and relatively lower in infants (Z. Li et al. 2023 ). Health risk assessment studies showed that groundwater nitrate contamination affected breastfeeding and pregnant women more than children aged 10–16 and older (Zhang et al. 2021 ). Machine Learning tools were used to study the regional-scale groundwater nitrate contamination, and natural and anthropogenic NO3 demarcation was reported (Sarkar et al. 2022 ). Boosted Regression Trees (BRT), Multivariate Discriminant Analysis (MDA), and Support Vector Machines (SVM) models were used to predict the incidence of groundwater contamination (Awais et al. 2021 ). Geographically weighted regression (GWR) ensembled with support vector regression (SVR), k-nearest neighbor (KNN), and random forest regression (RFR) were used to predict nitrate contamination in groundwater with relatively higher accuracy (Mahboobi et al. 2023 ). Multiple linear regression and deep neural network methods were outperformed by the extreme gradient boosting model in the prediction of groundwater NO 3 contamination (Gholami and Booij 2022 ). Attempts were made to combine the AI frameworks, spatial mapping, experimental methods, and field investigations to monitor and predict nitrate contamination in multi-aquifer-sourced groundwater (Abba et al. 2024 ). Generalized additive model using LOESS (GAMLOESS) and weighted subspace random forest (WSRF) models were produced and compared with KNN and RF in the susceptibility assessment of nitrate contamination in groundwater (Hosseini et al. 2023 ). Game theory (GT) and the Hasse diagram technique (HDT) were integrated to assess the groundwater quality (Ding et al. 2022 ). Monte Carlo simulation, game theory, and machine learning were integrated to study and optimize groundwater quality (Yan et al. 2024 ). The eco-physical health of the watersheds was evaluated using supervised machine learning and algorithmic game theory, with RF outperforming other models (Nasiri Khiavi et al. 2024 ). Multiple machine learning models were integrated with geospatial frameworks to manage nitrate contamination of groundwater quality in urban regions (Anjum et al. 2023 ; Huang et al. 2025 ; Jalali et al. 2024 ; X. Li et al. 2024 ). Machine and deep learning tools integrated with explainable AI (XAI) were used to predict the water quality index, and XG-Boost with SHAP ( SH apley A dditive ex P lanations) was employed to explain the results (Alshehri and Rahman 2023 ). The prediction of the groundwater quality index was studied using SHAP and stacking ensemble models in various studies (Alshehri et al. 2024; Karimi et al. 2024 ; W. Li et al. 2022 ). Different machine-learning models were used to study diverse groundwater variables and water quality indexes using open-source platforms (Mogaraju 2023 ). The research works mentioned partially addressed the demarcation of model effectiveness with and without location attributes (latitude and longitude) in studying the groundwater quality variables. We attempted to fill this research gap by framing a methodology to comprehend the effect of location attributes on model performance and prediction capability using ML and XAI. Methodology The datasets required for this research work were obtained from the Central Pollution Control Board, Ministry of Environment, Forest, and Climate Change, Government of India, through the website https://cpcb.nic.in/nwmp-data/ . The groundwater quality datasets from the years 2019 and 2023 were considered in this study. Initially, the geostatistics were used to produce GIS maps for nitrates. Interpolation methods like Empirical Bayesian Kriging, Simple Kriging, Universal Kriging, Radial Basis Functions, Ordinary Kriging, Empirical Bayesian Kriging, Inverse Distance Weighted, Kernel Interpolation, and Global Polynomial Interpolation were tested to produce surface maps (Bajjali 2023 ). Out of these interpolation methods, Empirical Bayesian Kriging outperformed others and gave a relatively accurate surface map; lower RMSE and ME were considered (Du et al. 2025 ; Helmi et al. 2023 ; Viegas et al. 2024 ; Zowam and Milewski 2024 ). For groundwater data with XY (2019), we compared the Light Gradient Boosting Machine, Ridge Regression, Linear Regression, Bayesian Ridge, Lasso Regression, Lasso Least Angle Regression, Elastic Net, Extreme Gradient Boosting, Least Angle Regression, Extra Trees Regressor, Random Forest Regressor, Gradient Boosting Regressor, K Neighbors Regressor, Huber Regressor, Orthogonal Matching Pursuit, Dummy Regressor, Decision Tree Regressor, AdaBoost Regressor, and Passive Aggressive Regressor models. The training dataset has 12188 (~ 90%) observations, and the test data has 1355 (~ 10%) observations. The variables considered are Latitude, Longitude, pH, EC, CO 3 , HCO 3 , Cl, SO 4 , PO 4 , TH, Ca, Mg, Na, K, F, TDS, SiO 2 , and NO 3 . For groundwater data without XY (2019), we compared the Linear Regression, Ridge Regression, Bayesian Ridge, Least Angle Regression, Lasso Regression, Lasso Least Angle Regression, Elastic Net, Huber Regressor, Light Gradient Boosting Machine, Extra Trees Regressor, K Neighbors Regressor, Extreme Gradient Boosting, Random Forest Regressor, Gradient Boosting Regressor, Orthogonal Matching Pursuit, Dummy Regressor, Passive Aggressive Regressor, Decision Tree Regressor, and AdaBoost Regressor models. The variables considered are pH, EC, CO 3 , HCO 3 , Cl, SO 4 , PO 4 , TH, Ca, Mg, Na, K, F, TDS, SiO 2 , and NO 3 . For groundwater data with XY (2023), we compared the Light Gradient Boosting Machine, Extra Trees Regressor, Random Forest Regressor, Gradient Boosting Regressor, Extreme Gradient Boosting, K Neighbors Regressor, Orthogonal Matching Pursuit, Dummy Regressor, Decision Tree Regressor, Huber Regressor, AdaBoost Regressor, Elastic Net, Lasso Least Angle Regression, Bayesian Ridge, Lasso Regression, Ridge Regression, Linear Regression, Least Angle Regression, and Passive Aggressive Regressor models. The training dataset has 15098 (~ 90%) observations, and the test data has 1678 (~ 10%) observations. The variables considered are Longitude, Latitude, pH, EC, CO 3 , HCO 3 , Cl, F, SO 4 , PO 4 , Total Hardness, Ca, Mg, Na, K, Fe, As, U, and NO 3 . For groundwater data without XY (2023), we compared the Light Gradient Boosting Machine, Random Forest Regressor, Extreme Gradient Boosting, Extra Trees Regressor, Gradient Boosting Regressor, K Neighbors Regressor, Linear Regression, Ridge Regression, Bayesian Ridge, Lasso Least Angle Regression, Lasso Regression, Least Angle Regression, Elastic Net, Huber Regressor, Orthogonal Matching Pursuit, Dummy Regressor, Decision Tree Regressor, Passive Aggressive Regressor, and AdaBoost Regressor models. The variables considered are pH, EC, CO 3 , HCO 3 , Cl, F, SO 4 , PO 4 , Total Hardness, Ca, Mg, Na, K, Fe, As, U, and NO 3 . The evaluation metrics considered to filter the relatively better model are MAE, MSE, RMSE, R 2 , RMSLE, and MAPE. The model that was selected for each case, i.e., groundwater data with XY and without XY for the years 2019 and 2023, is evaluated, and the importance of the factors that affect the model is provided. The training data and test data for each scenario were investigated with SHAP ( SH apley A dditive ex P lanations) using the same model that was selected for each case. The impact on the model for ML with lat-long (2019), ML without lat-long (2019), ML with lat-long (2023), and ML without lat-long (2023) were investigated separately, and reports are presented in the form of plots. GIS maps were also produced and presented here to provide a better idea of the nitrate distribution. The SHAP uses game theory to produce results. In this process, the values obtained are summed as the deviation between the outcome in the presence and absence of players. We used the Python framework for the analysis and generation of plots. ArcGIS Pro software was used to produce surface maps. The detailed methodology for the research work is provided in Fig. 1 . Results The spatial distribution of nitrates is given in Fig. 2 for the year 2019. Some portions of the northwestern part of India exhibited high nitrate concentrations. The increased nitrate levels can be attributed to the intense agriculture in these areas. The use of excess synthetic fertilizers, unregulated irrigation practices, industries, and improper manure and waste management. In the central and southern regions, the nitrate levels are moderate. Northeastern and some southern regions exhibited manageable nitrate levels. The spatial distribution of nitrates is given in Fig. 3 for the year 2023. Compared to 2019, nitrate levels in the northwestern region have increased. The central portion also exhibited a slight increase in nitrate levels. The northeastern regions exhibited a minimal increase in nitrate levels. Overall, the range of NO3 concentrations was lower in 2023 compared to that of 2019. The moderate and high levels were spatially extended. This also reflects that there is an increased trend in nitrate levels in central and southern regions. In 2019 and 2023, northern regions exhibited high nitrate levels except for some small regions. Empirical Bayesian Kriging (EBK) can be considered an advanced interpolation technique. EBK can be used to predict the spatial data, which is comprised of large data with multiple variables. The uncertainties in the semivariogram estimation can be managed by using Bayesian statistics. EBK helps us explain regional variability in detail. The highest level of nitrates recorded is given in Fig. 2 for the year 2019, which was 991 mg/L, and for 2023, the highest level recorded was 477 mg/L. This shows that there is an overall decrease in the higher level of nitrates, but the spatial extent of the nitrate concentrations increased relatively. The features that affect the prediction of nitrates (with XY -2019) are given in Fig. 4 . The Chloride (Cl), Bicarbonate (HCO3), and Sulphate (SO4) are the top three variables, along with Sodium (Na), that have affected the prediction process. The features that affect the prediction of nitrates (without XY -2019) are given in Fig. 5 . The Phosphate (PO4), pH, and Fluoride (F) are the top three variables that have affected the prediction process. The features that affect the prediction of nitrates (with XY -2023) are given in Fig. 6 . The Chloride (Cl), Bicarbonate (HCO3), and Sulphate (SO4) are the top three variables that have affected the prediction process. The features that affect the prediction of nitrates (without XY -2023) are given in Fig. 7 . Chloride (Cl), sodium (Na), and bicarbonate (HCO3) are the top three variables that affect the prediction process. The beeswarm plot for XY Training data – 2019 is provided in Fig. 8 . The higher values in the TDS variable positively affected the model than the lower values. The higher values in the Cl variable negatively affected the model than the lower values. The higher values of the Na variable positively affected the model than the lower values. The beeswarm plot for XY Test data – 2019 is provided in Fig. 9 . The higher values in the TDS variable positively affected the model than the lower values. The higher values in the Cl variable negatively affected the model than the lower values. The higher values of the HCO3 variable negatively affected the model compared to the lower values. The beeswarm plot for Training data without XY – 2019 is provided in Fig. 10 . The higher values in the Cl variable negatively affected the model than the lower values. The higher values in the Na variable positively affected the model than the lower values. The higher values of the TH variable positively affected the model compared to the lower values. The beeswarm plot for Test data without XY – 2019 is provided in Fig. 11 . The higher values in the Cl variable negatively affected the model than the lower values. The higher values in the Na variable positively affected the model than the lower values. The higher values of the TH variable positively affected the model compared to the lower values. The beeswarm plot for Training data with XY – 2023 is provided in Fig. 12 . The higher values in the EC variable positively affected the model than the lower values. The higher values in the Cl variable negatively affected the model than the lower values. Some higher values of the HCO3 variable negatively affected the model compared to the lower values. The beeswarm plot for Test data with XY − 2023 is provided in Fig. 13 . The higher values in the EC variable positively affected the model than the lower values. The higher values in the Cl variable negatively affected the model than the lower values. The higher values of the HCO3 variable negatively affected the model compared to the lower values. The beeswarm plot for Training data without XY – 2023 is provided in Fig. 14 . The higher values in the EC variable positively affected the model than the lower values. The higher values in the Cl variable negatively affected the model than the lower values. The higher values of the HCO3 variable negatively affected the model compared to the lower values. The beeswarm plot for Test data without XY – 2023 is provided in Fig. 15 . The higher values in the EC variable positively affected the model than the lower values. The higher values in the Cl variable negatively affected the model than the lower values. The higher values of the HCO3 variable negatively affected the model compared to the lower values. The model comparison with XY for the year 2019 is presented in Fig. 16 . The Lightgbm model (R2 = 0.44) performed relatively better than other models. The model comparison without XY for the year 2019 is presented in Fig. 17 . The LR (linear regression) (R2 = 0.48) model performed relatively better than other models. The model comparison with XY for the year 2023 is presented in Fig. 18 . The Lightgbm model (R2 = 0.51) performed relatively better than other models. The model comparison without XY for the year 2023 is presented in Fig. 19 . The Lightgbm model (R2 = 0.46) performed relatively better than other models. The comparison between ML and XAI is provided in Fig. 20 , and the demarcation between them is given in Fig. 21 . The ‘SHAP with XY 2019 Training data’ provided a 28.23% increase, i.e., from 44%(ML) to 72% (XAI) increase in R2 value than ML (R2) for 2019 data. The ‘SHAP with XY 2023 Training data’ provided a 24.88% increase, i.e., from 51%(ML) to 75.8% (XAI) increase in R2 value than ML (R2) for 2023 data. The ‘SHAP without XY 2023 Training data’ provided a 28.3% increase, i.e., from 46.1%(ML) to 74.5% (XAI) increase in R2 value than ML (R2) for 2023 data. Discussion The present research work started with the assumption that there may be a categorical increase in prediction accuracy if a machine learning (ML) model was trained with datasets (with and without XY separately) and supplied onto explainable artificial intelligence (XAI). We attempted to investigate if the ML models trained with the datasets can give better accuracy with XAI. We observed that there is an increase in accuracy when XAI is used with pre-trained ML models. The chloride, bicarbonate, and sulfate variables affected the prediction of nitrates when using 2019 data with XY, and phosphate, pH, and Fluoride variables dominated the prediction process when using 2019 data without XY. The chloride, bicarbonate, and sulfate variables affected the prediction process when using 2023 data, and chloride, sodium, and bicarbonate dominated the prediction process when using 2023 data without XY. We observed that the location attribute, i.e., latitude and longitude data, partially affected the variables that determined the prediction process. The works cited in the introduction section lack enough information to advocate that integrated ML and XAI lead to enhanced prediction metrics. We are convinced that these integrated frameworks can contribute to the current AI applications in groundwater science. There are certain challenges that are to be addressed while extending this sort of work further across other regions or on a global scale. Nitrate pollution is a problem for many, and initial challenges come from the data availability domain. The groundwater datasets are limited, and regularly obtaining the data is a hectic and costly task. The options are limited on the researcher’s side, and whatever data is available comes with gaps that demand synthetic data filling techniques, which attract wide-scale criticism. If the datasets are pushed to remove the data gaps, there will be diverse opinions about the sanctity of the observations and insights gathered. If the data gaps are filled with imputation techniques, the synthetic data fillers like SMOTE may give attractive data structure and insights but only partially provide insights based on the synthetic data. The efforts made in this research work handled the possible statistical drain in terms of data completeness and reliable data structure. The main attempt to keep the deviations at bay comes from limited or no use of synthetic data and using the ML and XAI frameworks that have in-built data preprocessors. We believe that this work may significantly outweigh its limitations but provide a reasonably reliant framework considering the standards of the time and state of art. We further our work with a notion to enhance accuracy by finding more datasets from reliable agencies that collect data regularly, hence providing sufficient room to work with the similar frameworks with least data preprocessing. Conclusion During the initial stages of this research work, our premise was to understand the role of location attributes in the prediction process when groundwater data with multiple variables were used. We aimed to leverage the machine learning frameworks in selecting a model that can predict the nitrate variable with reasonable accuracy. Our work has evolved to a point at which XAI usage becomes crucial to us to enhance prediction accuracy. The XAI via SHAP provided us with certain insights that were partially presented using ML operations. Through this work, we would like to contribute knowledge on using pre-trained ML models and their usage in XAI to get better results. This work considered the usage of groundwater quality parameters and can be extended to other environmental parameters if possible. This work is an observational study, and we conclude that XAI, when integrated with machine learning (ML) operations, can enhance our understanding of the interactions between variables and model efficiency. Declarations Acknowledgment The authors are thankful to the Central Pollution Control Board, Ministry of Environment, Forest, and Climate Change, Government of India for providing data for this research work. Funding The authors declare that no funds of any sort were received during the preparation of this manuscript. Competing Interests The authors have no competing interests to disclose. Author Contributions The corresponding author contributed to all sections of the manuscript. Ethics approval Not applicable Consent to participate Not applicable Consent to publish Not applicable Data availability statement The datasets used in this study can be obtained from the Central Pollution Control Board, Ministry of Environment, Forest, and Climate Change, Government of India, through the website https://cpcb.nic.in/nwmp-data/. References Abba SI, Yassin MA, Jibril MM, Tawabini B, Soupios P, Khogali A et al (2024) Nitrate concentrations tracking from multi-aquifer groundwater vulnerability zones: Insight from machine learning and spatial mapping. Process Saf Environ Prot 184:1143–1157. https://doi.org/10.1016/j.psep.2024.02.041 Aju CD, l A, Raicy APMM, Reghunath MC, R., Gopinath G (2024) Emerging nitrate contamination in groundwater: Changing phase in a fast-growing state of India. Chemosphere 357:141964. https://doi.org/10.1016/j.chemosphere.2024.141964 Alshehri F, Rahman A (2023) Coupling Machine and Deep Learning with Explainable Artificial Intelligence for Improving Prediction of Groundwater Quality and Decision-Making in Arid Region, Saudi Arabia. Water 15(12):2298. https://doi.org/10.3390/w15122298 Alshehri F, Shahfahad, Rahman A (2024) Optimizing Machine Learning Models with Bayesian Techniques for Prediction of Groundwater Quality Index in Southwest Saudi Arabia. Earth Syst Environ 8(4):1417–1436. https://doi.org/10.1007/s41748-024-00475-0 Anjum R, Ali SA, Siddiqui MA (2023) Assessing the Impact of Land Cover on Groundwater Quality in a Smart City Using GIS and Machine Learning Algorithms. Water Air Soil Pollut 234(3):182. https://doi.org/10.1007/s11270-023-06198-8 Asadi P, Ataie-Ashtiani B, Beheshti A (2016) Vulnerability assessment of urban groundwater resources to nitrate: the case study of Mashhad, Iran. Environ Earth Sci 76(1):41. https://doi.org/10.1007/s12665-016-6357-z Awais M, Aslam B, Maqsoom A, Khalil U, Ullah F, Azam S, Imran M (2021) Assessing Nitrate Contamination Risks in Groundwater: A Machine Learning Approach. Appl Sci 11(21):10034. https://doi.org/10.3390/app112110034 Bajjali W (2023) Spatial Interpolation. In: Bajjali W (ed) ArcGIS Pro and ArcGIS Online: Applications in Water and Environmental Sciences. Springer International Publishing, Cham, pp 223–242. https://doi.org/10.1007/978-3-031-42227-0_11 Ding F, Chen L, Sun C, Zhang W, Yue H, Na S (2022) An upgraded groundwater quality evaluation based on Hasse diagram technique & game theory. Ecol Ind 140:109024. https://doi.org/10.1016/j.ecolind.2022.109024 Du X, Pan Y, Yang X, Chen L, Liu L, Lin Y (2025) Refined Urban Functional Zones Identification via Empirical Bayesian Kriging: A POI-Weighted Scoring Innovation. IEEE Access 13:22784–22799 Presented at the IEEE Access. https://doi.org/10.1109/ACCESS.2025.3536000 Gholami V, Booij MJ (2022) Use of machine learning and geographical information system to predict nitrate concentration in an unconfined aquifer in Iran. J Clean Prod 360:131847. https://doi.org/10.1016/j.jclepro.2022.131847 Helmi AM, Elgamal M, Farouk MI, Abdelhamed MS, Essawy BT (2023) Evaluation of Geospatial Interpolation Techniques for Enhancing Spatiotemporal Rainfall Distribution and Filling Data Gaps in Asir Region, Saudi Arabia. Sustainability 15(18):14028. https://doi.org/10.3390/su151814028 Hosseini FS, Choubin B, Bagheri-Gavkosh M, Karimi O, Taromideh F, Mako C (2023) Susceptibility Assessment of Groundwater Nitrate Contamination Using an Ensemble Machine Learning Approach. Groundwater 61(4):510–516. https://doi.org/10.1111/gwat.13258 Huang Z, He B, Chu Y, Song Y, Shen Z (2025) Comparison and prediction of shallow groundwater nitrate in Shaying River basin based on urban distribution using multiple machine learning approaches. Water Environ Res 97(2):e70033. https://doi.org/10.1002/wer.70033 Jalali R, Tishehzan P, Hashemi H (2024) A machine learning framework for spatio-temporal vulnerability mapping of groundwaters to nitrate in a data scarce region in Lenjanat Plain, Iran. Environ Sci Pollut Res 31(29):42088–42110. https://doi.org/10.1007/s11356-024-33920-8 Karimi H, Sahour S, Khanbeyki M, Gholami V, Sahour H, Shahabi-Ghahfarokhi S, Mohammadi M (2024) Enhancing groundwater quality prediction through ensemble machine learning techniques. Environ Monit Assess 197(1):21. https://doi.org/10.1007/s10661-024-13506-0 Li P, Karunanidhi D, Subramani T, Srinivasamoorthy K (2021) Sources and Consequences of Groundwater Contamination. Arch Environ Contam Toxicol 80(1):1–10. https://doi.org/10.1007/s00244-020-00805-z Li W, Ye X, Du X (2022) Imputation of Ammonium Nitrogen Concentration in Groundwater Based on a Machine Learning Method. Water 14(10):1595. https://doi.org/10.3390/w14101595 Li X, Liang G, Wang L, Yang Y, Li Y, Li Z et al (2024) Identifying the spatial pattern and driving factors of nitrate in groundwater using a novel framework of interpretable stacking ensemble learning. Environ Geochem Health 46(11):482. https://doi.org/10.1007/s10653-024-02201-1 Li Z, Yang Q, Xie C, Lu X (2023) Source identification and health risks of nitrate contamination in shallow groundwater: a case study in Subei Lake basin. Environ Sci Pollut Res 30(5):13660–13670. https://doi.org/10.1007/s11356-022-23129-y Mahboobi H, Shakiba A, Mirbagheri B (2023) Improving groundwater nitrate concentration prediction using local ensemble of machine learning models. J Environ Manage 345:118782. https://doi.org/10.1016/j.jenvman.2023.118782 Mogaraju JK (2023) Application of machine learning algorithms in the investigation of groundwater quality parameters over YSR district, India. Turkish J Eng 7(1):64–72. https://doi.org/10.31127/tuje.1032314 Nasiri Khiavi A, Tavoosi M, Khodamoradi H, Kuriqi A (2024) Integration of Watershed eco-physical health through Algorithmic game theory and supervised machine learning. Groundw Sustainable Dev 26:101216. https://doi.org/10.1016/j.gsd.2024.101216 Pal SC, Biswas T, Jaydhar AK, Ruidas D, Saha A, Chowdhuri I et al (2024) Source identification and potential health risks from elevated groundwater nitrate contamination in Sundarbans coastal aquifers, India. Sci Rep 14(1):4153. https://doi.org/10.1038/s41598-024-54646-0 Sarkar S, Mukherjee A, Gupta SD, Bhanja SN, Bhattacharya A (2022) Predicting Regional-Scale Elevated Groundwater Nitrate Contamination Risk Using Machine Learning on Natural and Human-Induced Factors. ACS ES&T Eng 2(4):689–702. https://doi.org/10.1021/acsestengg.1c00360 Su H, Kang W, Li Y, Li Z (2021) Fluoride and nitrate contamination of groundwater in the Loess Plateau, China: Sources and related human health risks. Environ Pollut 286:117287. https://doi.org/10.1016/j.envpol.2021.117287 Verma A, Sharma A, Kumar R, Sharma P (2023) Nitrate contamination in groundwater and associated health risk assessment for Indo-Gangetic Plain, India. Groundw Sustainable Dev 23:100978. https://doi.org/10.1016/j.gsd.2023.100978 Viegas J, Gallardo A, Costa AC, Marinaro R (2024) Uncovering soft soils with 3D Empirical Bayesian Kriging A case study on cone penetration test data. Geotechnical Engineering Challenges to Meet Current and Emerging Needs of Society. CRC Yan Y, Zhang Y, Yang S, Wei D, Zhang J, Li Q et al (2024) Optimized groundwater quality evaluation using unsupervised machine learning, game theory and Monte-Carlo simulation. J Environ Manage 371:122902. https://doi.org/10.1016/j.jenvman.2024.122902 Zhang Q, Qian H, Xu P, Li W, Feng W, Liu R (2021) Effect of hydrogeological conditions on groundwater nitrate pollution and human health risk assessment of nitrate in Jiaokou Irrigation District. J Clean Prod 298:126783. https://doi.org/10.1016/j.jclepro.2021.126783 Zowam FJ, Milewski AM (2024) Groundwater Level Prediction Using Machine Learning and Geostatistical Interpolation Models. Water 16(19):2771. https://doi.org/10.3390/w16192771 Additional Declarations The authors declare no competing interests. Cite Share Download PDF Status: Posted Version 1 posted You are reading this latest preprint version Research Square lets you share your work early, gain feedback from the community, and start making changes to your manuscript prior to peer review in a journal. As a division of Research Square Company, we’re committed to making research communication faster, fairer, and more useful. We do this by developing innovative software and high quality services for the global research community. Our growing team is made up of researchers and industry professionals working together to solve the most critical problems facing scientific publishing. Also discoverable on Platform About Our Team In Review Editorial Policies Advisory Board Help Center Resources Author Services Accessibility API Access RSS feed Manage Cookie Preferences © Research Square 2026 | ISSN 2693-5015 (online) Privacy Policy Terms of Service Do Not Sell My Personal Information {"props":{"pageProps":{"initialData":{"identity":"rs-6310428","acceptedTermsAndConditions":true,"allowDirectSubmit":true,"archivedVersions":[],"articleType":"Research Article","associatedPublications":[],"authors":[{"id":434172660,"identity":"d6bb9fef-da5a-45fb-8e9f-ef40d1ee44bd","order_by":0,"name":"Jagadish Kumar Mogaraju","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAABI0lEQVRIiWNgGAWjYBACxgYgwWPAkADlszHwg6iEAlK0SIJEEgwIWMXDANfCwGBwAEziVs3cfvzihzcFdXm67e0XP1fU8CVuPr868cMDAwZ5frED2B3Wk1MsOcfgcLHZmTPFkmeOsSVuu/F2swTQYYYzZydg19KQkyDNY3AAqDInQbKBDaTl7AaQlgSD2zi09L9J/s1jUAfSkvyz4R9b4uYZZzf/wKtlRvoxoC3MQC3pxyQb29gSN/D3bsNvy4w3bJZAvyRuO3OGzbKxj814xg3ebRYJBhI4/WLYn/74xps/QIcdb398s+HbMdn+/rObb/6osJHnl8ahpYEHFgVgxjEGBgmwSgmsykFAnoH9AZQJZtQwMPAfwKl6FIyCUTAKRiYAAPAYbG2u9k4SAAAAAElFTkSuQmCC","orcid":"https://orcid.org/0000-0002-6461-8614","institution":"IUCN-CCC","correspondingAuthor":true,"prefix":"","firstName":"Jagadish","middleName":"Kumar","lastName":"Mogaraju","suffix":""}],"badges":[],"createdAt":"2025-03-26 08:48:44","currentVersionCode":1,"declarations":{"humanSubjects":false,"vertebrateSubjects":false,"conflictsOfInterestStatement":false,"humanSubjectEthicalGuidelines":false,"humanSubjectConsent":false,"humanSubjectClinicalTrial":false,"humanSubjectCaseReport":false,"vertebrateSubjectEthicalGuidelines":false},"doi":"10.21203/rs.3.rs-6310428/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-6310428/v1","draftVersion":[],"editorialEvents":[],"editorialNote":"","failedWorkflow":false,"files":[{"id":79345435,"identity":"385716e8-a145-4fba-896f-30527f5d8309","added_by":"auto","created_at":"2025-03-27 09:29:40","extension":"jpg","order_by":1,"title":"Figure 1","display":"","copyAsset":false,"role":"figure","size":116478,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cstrong\u003eMethodology\u003c/strong\u003e\u003c/p\u003e","description":"","filename":"image1.jpg","url":"https://assets-eu.researchsquare.com/files/rs-6310428/v1/d07322be856facf609a52bea.jpg"},{"id":79344423,"identity":"425597b4-95ea-453c-88ab-0d8f1d75a37c","added_by":"auto","created_at":"2025-03-27 09:21:40","extension":"png","order_by":2,"title":"Figure 2","display":"","copyAsset":false,"role":"figure","size":534904,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cstrong\u003eSpatial distribution of Nitrate (2019)\u003c/strong\u003e\u003c/p\u003e","description":"","filename":"image2.png","url":"https://assets-eu.researchsquare.com/files/rs-6310428/v1/73d189deada6dd1251154997.png"},{"id":79344432,"identity":"a5a1f3cf-cdcb-40a1-8176-1546c8ea7974","added_by":"auto","created_at":"2025-03-27 09:21:40","extension":"png","order_by":3,"title":"Figure 3","display":"","copyAsset":false,"role":"figure","size":558668,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cstrong\u003eSpatial distribution of Nitrate (2023)\u003c/strong\u003e\u003c/p\u003e","description":"","filename":"image3.png","url":"https://assets-eu.researchsquare.com/files/rs-6310428/v1/4872c0f056fc373b19b64b17.png"},{"id":79344429,"identity":"87d92969-a530-4826-8b38-d58e3226f478","added_by":"auto","created_at":"2025-03-27 09:21:40","extension":"png","order_by":4,"title":"Figure 4","display":"","copyAsset":false,"role":"figure","size":30648,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cstrong\u003eFeature importance (with XY) (2019)\u003c/strong\u003e\u003c/p\u003e","description":"","filename":"image4.png","url":"https://assets-eu.researchsquare.com/files/rs-6310428/v1/076d05b64c348ecac1885483.png"},{"id":79345438,"identity":"278e56a8-d579-4466-ad24-2b08cd6f7bd4","added_by":"auto","created_at":"2025-03-27 09:29:40","extension":"png","order_by":5,"title":"Figure 5","display":"","copyAsset":false,"role":"figure","size":25635,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cstrong\u003eFeature importance (without XY) (2019)\u003c/strong\u003e\u003c/p\u003e","description":"","filename":"image5.png","url":"https://assets-eu.researchsquare.com/files/rs-6310428/v1/97ffd4a47171af1240150475.png"},{"id":79345436,"identity":"03ef3b52-75a6-4ed8-a84e-0b0fb76f1dcf","added_by":"auto","created_at":"2025-03-27 09:29:40","extension":"png","order_by":6,"title":"Figure 6","display":"","copyAsset":false,"role":"figure","size":31843,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cstrong\u003eFeature importance (with XY) (2023)\u003c/strong\u003e\u003c/p\u003e","description":"","filename":"image6.png","url":"https://assets-eu.researchsquare.com/files/rs-6310428/v1/789e85a686f8fc2fc04d93f7.png"},{"id":79344427,"identity":"33ffa55c-08ba-4fc3-ba45-070c7604cc9a","added_by":"auto","created_at":"2025-03-27 09:21:40","extension":"png","order_by":7,"title":"Figure 7","display":"","copyAsset":false,"role":"figure","size":29008,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cstrong\u003eFeature importance (without XY) (2023)\u003c/strong\u003e\u003c/p\u003e","description":"","filename":"image7.png","url":"https://assets-eu.researchsquare.com/files/rs-6310428/v1/e8184e5e261cdc7126733eb1.png"},{"id":79345439,"identity":"c5856eb5-d977-4e47-9256-a1b6aae40bc0","added_by":"auto","created_at":"2025-03-27 09:29:40","extension":"png","order_by":8,"title":"Figure 8","display":"","copyAsset":false,"role":"figure","size":56724,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cstrong\u003eSHAP: Impact on the model (with XY Training data) (2019)\u003c/strong\u003e\u003c/p\u003e","description":"","filename":"image8.png","url":"https://assets-eu.researchsquare.com/files/rs-6310428/v1/03f2969e79851f9763fc1621.png"},{"id":79344435,"identity":"1a7d58c4-cb6a-4bdd-aef3-95b2875a41fd","added_by":"auto","created_at":"2025-03-27 09:21:40","extension":"png","order_by":9,"title":"Figure 9","display":"","copyAsset":false,"role":"figure","size":58583,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cstrong\u003eSHAP: Impact on the model (with XY Test data) (2019)\u003c/strong\u003e\u003c/p\u003e","description":"","filename":"image9.png","url":"https://assets-eu.researchsquare.com/files/rs-6310428/v1/6d21bea7d230b80e3846c3d3.png"},{"id":79344431,"identity":"6d60ec93-0d65-421a-bf41-98307d64864f","added_by":"auto","created_at":"2025-03-27 09:21:40","extension":"png","order_by":10,"title":"Figure 10","display":"","copyAsset":false,"role":"figure","size":40253,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cstrong\u003eSHAP: Impact on the model (Training data with no XY) (2019)\u003c/strong\u003e\u003c/p\u003e","description":"","filename":"image10.png","url":"https://assets-eu.researchsquare.com/files/rs-6310428/v1/9a9f0f4ae15209b1ca1d2ac6.png"},{"id":79344447,"identity":"6ef6a56f-38c4-4621-939d-4734e881e610","added_by":"auto","created_at":"2025-03-27 09:21:40","extension":"png","order_by":11,"title":"Figure 11","display":"","copyAsset":false,"role":"figure","size":42037,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cstrong\u003eSHAP: Impact on the model (Test data with no XY) (2019)\u003c/strong\u003e\u003c/p\u003e","description":"","filename":"image11.png","url":"https://assets-eu.researchsquare.com/files/rs-6310428/v1/214da99cfc5838c683913765.png"},{"id":79345440,"identity":"f3b22aeb-451c-4745-af00-8d375e0a8251","added_by":"auto","created_at":"2025-03-27 09:29:40","extension":"png","order_by":12,"title":"Figure 12","display":"","copyAsset":false,"role":"figure","size":53988,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cstrong\u003eSHAP: Impact on the model (with XY Training data) (2023)\u003c/strong\u003e\u003c/p\u003e","description":"","filename":"image12.png","url":"https://assets-eu.researchsquare.com/files/rs-6310428/v1/4a1fb295053977872dfdd19b.png"},{"id":79344465,"identity":"2260782f-5d7c-4e7b-a4da-42bc19ec50a5","added_by":"auto","created_at":"2025-03-27 09:21:41","extension":"png","order_by":13,"title":"Figure 13","display":"","copyAsset":false,"role":"figure","size":56158,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cstrong\u003eSHAP: Impact on the model (with XY Test data) (2023)\u003c/strong\u003e\u003c/p\u003e","description":"","filename":"image13.png","url":"https://assets-eu.researchsquare.com/files/rs-6310428/v1/e0840559dbbebfd5dbf8ee1e.png"},{"id":79345444,"identity":"93cd323d-84e9-4d25-a2a9-c2fecf1e0bcc","added_by":"auto","created_at":"2025-03-27 09:29:40","extension":"png","order_by":14,"title":"Figure 14","display":"","copyAsset":false,"role":"figure","size":53464,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cstrong\u003eSHAP: Impact on the model (Training data with no XY) (2023)\u003c/strong\u003e\u003c/p\u003e","description":"","filename":"image14.png","url":"https://assets-eu.researchsquare.com/files/rs-6310428/v1/62e43e083e1336ce5cb9f041.png"},{"id":79344443,"identity":"08c7870a-b319-48e4-b167-16deabc620f1","added_by":"auto","created_at":"2025-03-27 09:21:40","extension":"png","order_by":15,"title":"Figure 15","display":"","copyAsset":false,"role":"figure","size":54373,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cstrong\u003eSHAP: Impact on the model (Test data with no XY) (2023)\u003c/strong\u003e\u003c/p\u003e","description":"","filename":"image15.png","url":"https://assets-eu.researchsquare.com/files/rs-6310428/v1/7638fa15c8aab68941c9eaf1.png"},{"id":79345446,"identity":"eb5ed6c0-b0ce-4db7-8222-24bf05319484","added_by":"auto","created_at":"2025-03-27 09:29:40","extension":"png","order_by":16,"title":"Figure 16","display":"","copyAsset":false,"role":"figure","size":3497,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cstrong\u003eModel comparison (with XY) (2019)\u003c/strong\u003e\u003c/p\u003e","description":"","filename":"image16.png","url":"https://assets-eu.researchsquare.com/files/rs-6310428/v1/e4d820bc4f6de6783cc4fc3b.png"},{"id":79345451,"identity":"f86a9379-346c-4c94-a917-2e09bd766659","added_by":"auto","created_at":"2025-03-27 09:29:41","extension":"png","order_by":17,"title":"Figure 17","display":"","copyAsset":false,"role":"figure","size":3724,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cstrong\u003eModel comparison (without XY) (2019)\u003c/strong\u003e\u003c/p\u003e","description":"","filename":"image17.png","url":"https://assets-eu.researchsquare.com/files/rs-6310428/v1/7a9d7fb4bf9e72b74148682d.png"},{"id":79345863,"identity":"bfdbecc0-7e34-4b9f-9e21-52af464cec0a","added_by":"auto","created_at":"2025-03-27 09:37:40","extension":"png","order_by":18,"title":"Figure 18","display":"","copyAsset":false,"role":"figure","size":3474,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cstrong\u003eModel comparison (with XY) (2023)\u003c/strong\u003e\u003c/p\u003e","description":"","filename":"image18.png","url":"https://assets-eu.researchsquare.com/files/rs-6310428/v1/3bfba0c4bd748621588afc4a.png"},{"id":79344441,"identity":"3a5bd353-b228-43e4-8095-c61d61c404c2","added_by":"auto","created_at":"2025-03-27 09:21:40","extension":"png","order_by":19,"title":"Figure 19","display":"","copyAsset":false,"role":"figure","size":3459,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cstrong\u003eModel comparison (without XY) (2023)\u003c/strong\u003e\u003c/p\u003e","description":"","filename":"image19.png","url":"https://assets-eu.researchsquare.com/files/rs-6310428/v1/ab9a56296779700a2c10739a.png"},{"id":79345862,"identity":"894445ad-83c1-4dba-9f72-ebb8888fe66a","added_by":"auto","created_at":"2025-03-27 09:37:40","extension":"png","order_by":20,"title":"Figure 20","display":"","copyAsset":false,"role":"figure","size":15682,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cstrong\u003eComparison between ML and XAI\u003c/strong\u003e\u003c/p\u003e","description":"","filename":"image20.png","url":"https://assets-eu.researchsquare.com/files/rs-6310428/v1/7b217643503010557c2c1566.png"},{"id":79344457,"identity":"b29006ce-fa5d-450f-bdb2-6da7f3e5da71","added_by":"auto","created_at":"2025-03-27 09:21:41","extension":"png","order_by":21,"title":"Figure 21","display":"","copyAsset":false,"role":"figure","size":27843,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cstrong\u003eDemarcation of ML and XAI metric\u003c/strong\u003e\u003c/p\u003e","description":"","filename":"image21.png","url":"https://assets-eu.researchsquare.com/files/rs-6310428/v1/5fc758136f79af38419facb5.png"},{"id":79347692,"identity":"164bc49f-e532-4823-8b65-98b0d0256768","added_by":"auto","created_at":"2025-03-27 09:53:41","extension":"pdf","order_by":0,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":2323799,"visible":true,"origin":"","legend":"","description":"","filename":"manuscript.pdf","url":"https://assets-eu.researchsquare.com/files/rs-6310428/v1/cec92219-7f1e-4ef1-b7e9-0865d81bd187.pdf"}],"financialInterests":"The authors declare no competing interests.","formattedTitle":"\u003cp\u003e\u003cstrong\u003eExplainable Artificial Intelligence integrated with Machine learning operations to predict the nitrate concentrations in Groundwater\u003c/strong\u003e\u003c/p\u003e","fulltext":[{"header":"Novelty statement","content":"\u003cp\u003eThe works cited did not / partially considered the role of XAI integrated with ML in enhancing the prediction capabilities. We made a wider search using Google Scholar and Google search to check if a work like this had also been published. Our search did not yield any results, which points to the fact that this work may be novel, considering the intricacies presented here. We considered machine learning frameworks first to investigate an appropriate model and, in other words, train the model. The saved ML model was used as a starting point in the XAI framework (SHAP). We observed that there was an increase in the accuracy metric when the trained ML model was passed onto XAI.\u003c/p\u003e \u003cdiv id=\"Sec3\" class=\"Section2\"\u003e \u003cp\u003e \u003c/p\u003e \u003c/div\u003e"},{"header":"Introduction","content":"\u003cp\u003eNitrate pollution in groundwater has evolved as an important issue due to its impact on global health (Verma et al. \u003cspan citationid=\"CR27\" class=\"CitationRef\"\u003e2023\u003c/span\u003e). Groundwater has been a precious source of drinking water for several populations for centuries, but now it is ruined in terms of quantity and quality by anthropogenic activities (Aju et al. \u003cspan citationid=\"CR2\" class=\"CitationRef\"\u003e2024\u003c/span\u003e; P. Li et al. \u003cspan citationid=\"CR17\" class=\"CitationRef\"\u003e2021\u003c/span\u003e). The World Health Organization (WHO) declared that nitrate concentrations above 50mg/l can induce Blue baby syndrome (Pal et al. \u003cspan citationid=\"CR24\" class=\"CitationRef\"\u003e2024\u003c/span\u003e). Assessment of groundwater vulnerability has been a challenging task, and it was based on several vulnerability indexes that need more data, especially while studying groundwater pollution in urban areas (Asadi et al. \u003cspan citationid=\"CR6\" class=\"CitationRef\"\u003e2016\u003c/span\u003e). Chemical fertilizers, nitrogen in soil, manure, and sewage are considered the major sources of nitrates in the groundwater (Su et al. \u003cspan citationid=\"CR26\" class=\"CitationRef\"\u003e2021\u003c/span\u003e). The non-carcinogenic risk caused by excess nitrate in groundwater was higher in adult females and relatively lower in infants (Z. Li et al. \u003cspan citationid=\"CR20\" class=\"CitationRef\"\u003e2023\u003c/span\u003e). Health risk assessment studies showed that groundwater nitrate contamination affected breastfeeding and pregnant women more than children aged 10\u0026ndash;16 and older (Zhang et al. \u003cspan citationid=\"CR30\" class=\"CitationRef\"\u003e2021\u003c/span\u003e). Machine Learning tools were used to study the regional-scale groundwater nitrate contamination, and natural and anthropogenic NO3 demarcation was reported (Sarkar et al. \u003cspan citationid=\"CR25\" class=\"CitationRef\"\u003e2022\u003c/span\u003e). Boosted Regression Trees (BRT), Multivariate Discriminant Analysis (MDA), and Support Vector Machines (SVM) models were used to predict the incidence of groundwater contamination (Awais et al. \u003cspan citationid=\"CR7\" class=\"CitationRef\"\u003e2021\u003c/span\u003e). Geographically weighted regression (GWR) ensembled with support vector regression (SVR), k-nearest neighbor (KNN), and random forest regression (RFR) were used to predict nitrate contamination in groundwater with relatively higher accuracy (Mahboobi et al. \u003cspan citationid=\"CR21\" class=\"CitationRef\"\u003e2023\u003c/span\u003e). Multiple linear regression and deep neural network methods were outperformed by the extreme gradient boosting model in the prediction of groundwater NO\u003csub\u003e3\u003c/sub\u003e contamination (Gholami and Booij \u003cspan citationid=\"CR11\" class=\"CitationRef\"\u003e2022\u003c/span\u003e). Attempts were made to combine the AI frameworks, spatial mapping, experimental methods, and field investigations to monitor and predict nitrate contamination in multi-aquifer-sourced groundwater (Abba et al. \u003cspan citationid=\"CR1\" class=\"CitationRef\"\u003e2024\u003c/span\u003e). Generalized additive model using LOESS (GAMLOESS) and weighted subspace random forest (WSRF) models were produced and compared with KNN and RF in the susceptibility assessment of nitrate contamination in groundwater (Hosseini et al. \u003cspan citationid=\"CR13\" class=\"CitationRef\"\u003e2023\u003c/span\u003e). Game theory (GT) and the Hasse diagram technique (HDT) were integrated to assess the groundwater quality (Ding et al. \u003cspan citationid=\"CR9\" class=\"CitationRef\"\u003e2022\u003c/span\u003e). Monte Carlo simulation, game theory, and machine learning were integrated to study and optimize groundwater quality (Yan et al. \u003cspan citationid=\"CR29\" class=\"CitationRef\"\u003e2024\u003c/span\u003e). The eco-physical health of the watersheds was evaluated using supervised machine learning and algorithmic game theory, with RF outperforming other models (Nasiri Khiavi et al. \u003cspan citationid=\"CR23\" class=\"CitationRef\"\u003e2024\u003c/span\u003e). Multiple machine learning models were integrated with geospatial frameworks to manage nitrate contamination of groundwater quality in urban regions (Anjum et al. \u003cspan citationid=\"CR5\" class=\"CitationRef\"\u003e2023\u003c/span\u003e; Huang et al. \u003cspan citationid=\"CR14\" class=\"CitationRef\"\u003e2025\u003c/span\u003e; Jalali et al. \u003cspan citationid=\"CR19\" class=\"CitationRef\"\u003e2024\u003c/span\u003e; X. Li et al. \u003cspan citationid=\"CR19\" class=\"CitationRef\"\u003e2024\u003c/span\u003e). Machine and deep learning tools integrated with explainable AI (XAI) were used to predict the water quality index, and XG-Boost with SHAP (\u003cb\u003eSH\u003c/b\u003eapley \u003cb\u003eA\u003c/b\u003edditive ex\u003cb\u003eP\u003c/b\u003elanations) was employed to explain the results (Alshehri and Rahman \u003cspan citationid=\"CR3\" class=\"CitationRef\"\u003e2023\u003c/span\u003e). The prediction of the groundwater quality index was studied using SHAP and stacking ensemble models in various studies (Alshehri et al. 2024; Karimi et al. \u003cspan citationid=\"CR16\" class=\"CitationRef\"\u003e2024\u003c/span\u003e; W. Li et al. \u003cspan citationid=\"CR18\" class=\"CitationRef\"\u003e2022\u003c/span\u003e). Different machine-learning models were used to study diverse groundwater variables and water quality indexes using open-source platforms (Mogaraju \u003cspan citationid=\"CR22\" class=\"CitationRef\"\u003e2023\u003c/span\u003e). The research works mentioned partially addressed the demarcation of model effectiveness with and without location attributes (latitude and longitude) in studying the groundwater quality variables. We attempted to fill this research gap by framing a methodology to comprehend the effect of location attributes on model performance and prediction capability using ML and XAI.\u003c/p\u003e"},{"header":"Methodology","content":"\u003cp\u003eThe datasets required for this research work were obtained from the Central Pollution Control Board, Ministry of Environment, Forest, and Climate Change, Government of India, through the website \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://cpcb.nic.in/nwmp-data/\u003c/span\u003e\u003cspan address=\"https://cpcb.nic.in/nwmp-data/\" targettype=\"URL\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e. The groundwater quality datasets from the years 2019 and 2023 were considered in this study. Initially, the geostatistics were used to produce GIS maps for nitrates. Interpolation methods like Empirical Bayesian Kriging, Simple Kriging, Universal Kriging, Radial Basis Functions, Ordinary Kriging, Empirical Bayesian Kriging, Inverse Distance Weighted, Kernel Interpolation, and Global Polynomial Interpolation were tested to produce surface maps (Bajjali \u003cspan citationid=\"CR8\" class=\"CitationRef\"\u003e2023\u003c/span\u003e). Out of these interpolation methods, Empirical Bayesian Kriging outperformed others and gave a relatively accurate surface map; lower RMSE and ME were considered (Du et al. \u003cspan citationid=\"CR10\" class=\"CitationRef\"\u003e2025\u003c/span\u003e; Helmi et al. \u003cspan citationid=\"CR12\" class=\"CitationRef\"\u003e2023\u003c/span\u003e; Viegas et al. \u003cspan citationid=\"CR28\" class=\"CitationRef\"\u003e2024\u003c/span\u003e; Zowam and Milewski \u003cspan citationid=\"CR31\" class=\"CitationRef\"\u003e2024\u003c/span\u003e). For groundwater data with XY (2019), we compared the Light Gradient Boosting Machine, Ridge Regression, Linear Regression, Bayesian Ridge, Lasso Regression, Lasso Least Angle Regression, Elastic Net, Extreme Gradient Boosting, Least Angle Regression, Extra Trees Regressor, Random Forest Regressor, Gradient Boosting Regressor, K Neighbors Regressor, Huber Regressor, Orthogonal Matching Pursuit, Dummy Regressor, Decision Tree Regressor, AdaBoost Regressor, and Passive Aggressive Regressor models. The training dataset has 12188 (~ 90%) observations, and the test data has 1355 (~ 10%) observations. The variables considered are Latitude, Longitude, pH, EC, CO\u003csub\u003e3\u003c/sub\u003e, HCO\u003csub\u003e3\u003c/sub\u003e, Cl, SO\u003csub\u003e4\u003c/sub\u003e, PO\u003csub\u003e4\u003c/sub\u003e, TH, Ca, Mg, Na, K, F, TDS, SiO\u003csub\u003e2\u003c/sub\u003e, and NO\u003csub\u003e3\u003c/sub\u003e. For groundwater data without XY (2019), we compared the Linear Regression, Ridge Regression, Bayesian Ridge, Least Angle Regression, Lasso Regression, Lasso Least Angle Regression, Elastic Net, Huber Regressor, Light Gradient Boosting Machine, Extra Trees Regressor, K Neighbors Regressor, Extreme Gradient Boosting, Random Forest Regressor, Gradient Boosting Regressor, Orthogonal Matching Pursuit, Dummy Regressor, Passive Aggressive Regressor, Decision Tree Regressor, and AdaBoost Regressor models. The variables considered are pH, EC, CO\u003csub\u003e3\u003c/sub\u003e, HCO\u003csub\u003e3\u003c/sub\u003e, Cl, SO\u003csub\u003e4\u003c/sub\u003e, PO\u003csub\u003e4\u003c/sub\u003e, TH, Ca, Mg, Na, K, F, TDS, SiO\u003csub\u003e2\u003c/sub\u003e, and NO\u003csub\u003e3\u003c/sub\u003e.\u003c/p\u003e\u003cp\u003eFor groundwater data with XY (2023), we compared the Light Gradient Boosting Machine, Extra Trees Regressor, Random Forest Regressor, Gradient Boosting Regressor, Extreme Gradient Boosting, K Neighbors Regressor, Orthogonal Matching Pursuit, Dummy Regressor, Decision Tree Regressor, Huber Regressor, AdaBoost Regressor, Elastic Net, Lasso Least Angle Regression, Bayesian Ridge, Lasso Regression, Ridge Regression, Linear Regression, Least Angle Regression, and Passive Aggressive Regressor models. The training dataset has 15098 (~ 90%) observations, and the test data has 1678 (~ 10%) observations. The variables considered are Longitude, Latitude, pH, EC, CO\u003csub\u003e3\u003c/sub\u003e, HCO\u003csub\u003e3\u003c/sub\u003e, Cl, F, SO\u003csub\u003e4\u003c/sub\u003e, PO\u003csub\u003e4\u003c/sub\u003e, Total Hardness, Ca, Mg, Na, K, Fe, As, U, and NO\u003csub\u003e3\u003c/sub\u003e. For groundwater data without XY (2023), we compared the Light Gradient Boosting Machine, Random Forest Regressor, Extreme Gradient Boosting, Extra Trees Regressor, Gradient Boosting Regressor, K Neighbors Regressor, Linear Regression, Ridge Regression, Bayesian Ridge, Lasso Least Angle Regression, Lasso Regression, Least Angle Regression, Elastic Net, Huber Regressor, Orthogonal Matching Pursuit, Dummy Regressor, Decision Tree Regressor, Passive Aggressive Regressor, and AdaBoost Regressor models. The variables considered are pH, EC, CO\u003csub\u003e3\u003c/sub\u003e, HCO\u003csub\u003e3\u003c/sub\u003e, Cl, F, SO\u003csub\u003e4\u003c/sub\u003e, PO\u003csub\u003e4\u003c/sub\u003e, Total Hardness, Ca, Mg, Na, K, Fe, As, U, and NO\u003csub\u003e3\u003c/sub\u003e. The evaluation metrics considered to filter the relatively better model are MAE, MSE, RMSE, R\u003csup\u003e2\u003c/sup\u003e, RMSLE, and MAPE. The model that was selected for each case, i.e., groundwater data with XY and without XY for the years 2019 and 2023, is evaluated, and the importance of the factors that affect the model is provided. The training data and test data for each scenario were investigated with SHAP (\u003cb\u003eSH\u003c/b\u003eapley \u003cb\u003eA\u003c/b\u003edditive ex\u003cb\u003eP\u003c/b\u003elanations) using the same model that was selected for each case. The impact on the model for ML with lat-long (2019), ML without lat-long (2019), ML with lat-long (2023), and ML without lat-long (2023) were investigated separately, and reports are presented in the form of plots. GIS maps were also produced and presented here to provide a better idea of the nitrate distribution. The SHAP uses game theory to produce results. In this process, the values obtained are summed as the deviation between the outcome in the presence and absence of players. We used the Python framework for the analysis and generation of plots. ArcGIS Pro software was used to produce surface maps. The detailed methodology for the research work is provided in Fig.\u0026nbsp;\u003cspan refid=\"Fig1\" class=\"InternalRef\"\u003e1\u003c/span\u003e.\u003c/p\u003e"},{"header":"Results","content":"\u003cp\u003eThe spatial distribution of nitrates is given in Fig.\u0026nbsp;\u003cspan refid=\"Fig2\" class=\"InternalRef\"\u003e2\u003c/span\u003e for the year 2019. Some portions of the northwestern part of India exhibited high nitrate concentrations. The increased nitrate levels can be attributed to the intense agriculture in these areas. The use of excess synthetic fertilizers, unregulated irrigation practices, industries, and improper manure and waste management. In the central and southern regions, the nitrate levels are moderate. Northeastern and some southern regions exhibited manageable nitrate levels. The spatial distribution of nitrates is given in Fig.\u0026nbsp;\u003cspan refid=\"Fig3\" class=\"InternalRef\"\u003e3\u003c/span\u003e for the year 2023. Compared to 2019, nitrate levels in the northwestern region have increased. The central portion also exhibited a slight increase in nitrate levels. The northeastern regions exhibited a minimal increase in nitrate levels. Overall, the range of NO3 concentrations was lower in 2023 compared to that of 2019. The moderate and high levels were spatially extended. This also reflects that there is an increased trend in nitrate levels in central and southern regions. In 2019 and 2023, northern regions exhibited high nitrate levels except for some small regions. Empirical Bayesian Kriging (EBK) can be considered an advanced interpolation technique. EBK can be used to predict the spatial data, which is comprised of large data with multiple variables. The uncertainties in the semivariogram estimation can be managed by using Bayesian statistics. EBK helps us explain regional variability in detail. The highest level of nitrates recorded is given in Fig.\u0026nbsp;\u003cspan refid=\"Fig2\" class=\"InternalRef\"\u003e2\u003c/span\u003e for the year 2019, which was 991 mg/L, and for 2023, the highest level recorded was 477 mg/L. This shows that there is an overall decrease in the higher level of nitrates, but the spatial extent of the nitrate concentrations increased relatively. The features that affect the prediction of nitrates (with XY -2019) are given in Fig.\u0026nbsp;\u003cspan refid=\"Fig4\" class=\"InternalRef\"\u003e4\u003c/span\u003e. The Chloride (Cl), Bicarbonate (HCO3), and Sulphate (SO4) are the top three variables, along with Sodium (Na), that have affected the prediction process. The features that affect the prediction of nitrates (without XY -2019) are given in Fig.\u0026nbsp;\u003cspan refid=\"Fig5\" class=\"InternalRef\"\u003e5\u003c/span\u003e. The Phosphate (PO4), pH, and Fluoride (F) are the top three variables that have affected the prediction process. The features that affect the prediction of nitrates (with XY -2023) are given in Fig.\u0026nbsp;\u003cspan refid=\"Fig6\" class=\"InternalRef\"\u003e6\u003c/span\u003e. The Chloride (Cl), Bicarbonate (HCO3), and Sulphate (SO4) are the top three variables that have affected the prediction process. The features that affect the prediction of nitrates (without XY -2023) are given in Fig.\u0026nbsp;\u003cspan refid=\"Fig7\" class=\"InternalRef\"\u003e7\u003c/span\u003e. Chloride (Cl), sodium (Na), and bicarbonate (HCO3) are the top three variables that affect the prediction process. The beeswarm plot for XY Training data \u0026ndash; 2019 is provided in Fig.\u0026nbsp;\u003cspan refid=\"Fig8\" class=\"InternalRef\"\u003e8\u003c/span\u003e. The higher values in the TDS variable positively affected the model than the lower values. The higher values in the Cl variable negatively affected the model than the lower values. The higher values of the Na variable positively affected the model than the lower values. The beeswarm plot for XY Test data \u0026ndash; 2019 is provided in Fig.\u0026nbsp;\u003cspan refid=\"Fig9\" class=\"InternalRef\"\u003e9\u003c/span\u003e. The higher values in the TDS variable positively affected the model than the lower values. The higher values in the Cl variable negatively affected the model than the lower values. The higher values of the HCO3 variable negatively affected the model compared to the lower values. The beeswarm plot for Training data without XY \u0026ndash; 2019 is provided in Fig.\u0026nbsp;\u003cspan refid=\"Fig10\" class=\"InternalRef\"\u003e10\u003c/span\u003e. The higher values in the Cl variable negatively affected the model than the lower values. The higher values in the Na variable positively affected the model than the lower values. The higher values of the TH variable positively affected the model compared to the lower values. The beeswarm plot for Test data without XY \u0026ndash; 2019 is provided in Fig.\u0026nbsp;\u003cspan refid=\"Fig11\" class=\"InternalRef\"\u003e11\u003c/span\u003e. The higher values in the Cl variable negatively affected the model than the lower values. The higher values in the Na variable positively affected the model than the lower values. The higher values of the TH variable positively affected the model compared to the lower values. The beeswarm plot for Training data with XY \u0026ndash; 2023 is provided in Fig.\u0026nbsp;\u003cspan refid=\"Fig12\" class=\"InternalRef\"\u003e12\u003c/span\u003e. The higher values in the EC variable positively affected the model than the lower values. The higher values in the Cl variable negatively affected the model than the lower values. Some higher values of the HCO3 variable negatively affected the model compared to the lower values. The beeswarm plot for Test data with XY \u0026minus;\u0026thinsp;2023 is provided in Fig.\u0026nbsp;\u003cspan refid=\"Fig13\" class=\"InternalRef\"\u003e13\u003c/span\u003e. The higher values in the EC variable positively affected the model than the lower values. The higher values in the Cl variable negatively affected the model than the lower values. The higher values of the HCO3 variable negatively affected the model compared to the lower values. The beeswarm plot for Training data without XY \u0026ndash; 2023 is provided in Fig.\u0026nbsp;\u003cspan refid=\"Fig14\" class=\"InternalRef\"\u003e14\u003c/span\u003e. The higher values in the EC variable positively affected the model than the lower values. The higher values in the Cl variable negatively affected the model than the lower values. The higher values of the HCO3 variable negatively affected the model compared to the lower values. The beeswarm plot for Test data without XY \u0026ndash; 2023 is provided in Fig.\u0026nbsp;\u003cspan refid=\"Fig15\" class=\"InternalRef\"\u003e15\u003c/span\u003e. The higher values in the EC variable positively affected the model than the lower values. The higher values in the Cl variable negatively affected the model than the lower values. The higher values of the HCO3 variable negatively affected the model compared to the lower values. The model comparison with XY for the year 2019 is presented in Fig.\u0026nbsp;\u003cspan refid=\"Fig16\" class=\"InternalRef\"\u003e16\u003c/span\u003e. The Lightgbm model (R2\u0026thinsp;=\u0026thinsp;0.44) performed relatively better than other models. The model comparison without XY for the year 2019 is presented in Fig.\u0026nbsp;\u003cspan refid=\"Fig17\" class=\"InternalRef\"\u003e17\u003c/span\u003e. The LR (linear regression) (R2\u0026thinsp;=\u0026thinsp;0.48) model performed relatively better than other models. The model comparison with XY for the year 2023 is presented in Fig.\u0026nbsp;\u003cspan refid=\"Fig18\" class=\"InternalRef\"\u003e18\u003c/span\u003e. The Lightgbm model (R2\u0026thinsp;=\u0026thinsp;0.51) performed relatively better than other models. The model comparison without XY for the year 2023 is presented in Fig.\u0026nbsp;\u003cspan refid=\"Fig19\" class=\"InternalRef\"\u003e19\u003c/span\u003e. The Lightgbm model (R2\u0026thinsp;=\u0026thinsp;0.46) performed relatively better than other models. The comparison between ML and XAI is provided in Fig.\u0026nbsp;\u003cspan refid=\"Fig20\" class=\"InternalRef\"\u003e20\u003c/span\u003e, and the demarcation between them is given in Fig.\u0026nbsp;\u003cspan refid=\"Fig21\" class=\"InternalRef\"\u003e21\u003c/span\u003e. The \u0026lsquo;SHAP with XY 2019 Training data\u0026rsquo; provided a 28.23% increase, i.e., from 44%(ML) to 72% (XAI) increase in R2 value than ML (R2) for 2019 data. The \u0026lsquo;SHAP with XY 2023 Training data\u0026rsquo; provided a 24.88% increase, i.e., from 51%(ML) to 75.8% (XAI) increase in R2 value than ML (R2) for 2023 data. The \u0026lsquo;SHAP without XY 2023 Training data\u0026rsquo; provided a 28.3% increase, i.e., from 46.1%(ML) to 74.5% (XAI) increase in R2 value than ML (R2) for 2023 data.\u003c/p\u003e"},{"header":"Discussion","content":"\u003cp\u003eThe present research work started with the assumption that there may be a categorical increase in prediction accuracy if a machine learning (ML) model was trained with datasets (with and without XY separately) and supplied onto explainable artificial intelligence (XAI). We attempted to investigate if the ML models trained with the datasets can give better accuracy with XAI. We observed that there is an increase in accuracy when XAI is used with pre-trained ML models. The chloride, bicarbonate, and sulfate variables affected the prediction of nitrates when using 2019 data with XY, and phosphate, pH, and Fluoride variables dominated the prediction process when using 2019 data without XY. The chloride, bicarbonate, and sulfate variables affected the prediction process when using 2023 data, and chloride, sodium, and bicarbonate dominated the prediction process when using 2023 data without XY. We observed that the location attribute, i.e., latitude and longitude data, partially affected the variables that determined the prediction process. The works cited in the introduction section lack enough information to advocate that integrated ML and XAI lead to enhanced prediction metrics. We are convinced that these integrated frameworks can contribute to the current AI applications in groundwater science. There are certain challenges that are to be addressed while extending this sort of work further across other regions or on a global scale. Nitrate pollution is a problem for many, and initial challenges come from the data availability domain. The groundwater datasets are limited, and regularly obtaining the data is a hectic and costly task. The options are limited on the researcher\u0026rsquo;s side, and whatever data is available comes with gaps that demand synthetic data filling techniques, which attract wide-scale criticism. If the datasets are pushed to remove the data gaps, there will be diverse opinions about the sanctity of the observations and insights gathered. If the data gaps are filled with imputation techniques, the synthetic data fillers like SMOTE may give attractive data structure and insights but only partially provide insights based on the synthetic data. The efforts made in this research work handled the possible statistical drain in terms of data completeness and reliable data structure. The main attempt to keep the deviations at bay comes from limited or no use of synthetic data and using the ML and XAI frameworks that have in-built data preprocessors. We believe that this work may significantly outweigh its limitations but provide a reasonably reliant framework considering the standards of the time and state of art. We further our work with a notion to enhance accuracy by finding more datasets from reliable agencies that collect data regularly, hence providing sufficient room to work with the similar frameworks with least data preprocessing.\u003c/p\u003e"},{"header":"Conclusion","content":"\u003cp\u003eDuring the initial stages of this research work, our premise was to understand the role of location attributes in the prediction process when groundwater data with multiple variables were used. We aimed to leverage the machine learning frameworks in selecting a model that can predict the nitrate variable with reasonable accuracy. Our work has evolved to a point at which XAI usage becomes crucial to us to enhance prediction accuracy. The XAI via SHAP provided us with certain insights that were partially presented using ML operations. Through this work, we would like to contribute knowledge on using pre-trained ML models and their usage in XAI to get better results. This work considered the usage of groundwater quality parameters and can be extended to other environmental parameters if possible. This work is an observational study, and we conclude that XAI, when integrated with machine learning (ML) operations, can enhance our understanding of the interactions between variables and model efficiency.\u003c/p\u003e"},{"header":"Declarations","content":"\u003cp\u003e\u003cstrong\u003eAcknowledgment\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eThe authors are thankful to the Central Pollution Control Board, Ministry of Environment, Forest, and Climate Change, Government of India for providing data for this research work.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eFunding\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eThe authors declare that no funds of any sort were received during the preparation of this manuscript.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eCompeting Interests\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eThe authors have no competing interests to disclose.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eAuthor Contributions\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eThe corresponding author contributed to all sections of the manuscript.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eEthics approval\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eNot applicable\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eConsent to participate\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eNot applicable\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eConsent to publish\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eNot applicable\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eData availability statement\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eThe datasets used in this study can be obtained from the Central Pollution Control Board, Ministry of Environment, Forest, and Climate Change, Government of India, through the website https://cpcb.nic.in/nwmp-data/.\u0026nbsp;\u003c/p\u003e"},{"header":"References","content":"\u003col\u003e\u003cli\u003e\u003cspan\u003eAbba SI, Yassin MA, Jibril MM, Tawabini B, Soupios P, Khogali A et al (2024) Nitrate concentrations tracking from multi-aquifer groundwater vulnerability zones: Insight from machine learning and spatial mapping. Process Saf Environ Prot 184:1143\u0026ndash;1157. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1016/j.psep.2024.02.041\u003c/span\u003e\u003cspan address=\"10.1016/j.psep.2024.02.041\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eAju CD, l A, Raicy APMM, Reghunath MC, R., Gopinath G (2024) Emerging nitrate contamination in groundwater: Changing phase in a fast-growing state of India. Chemosphere 357:141964. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1016/j.chemosphere.2024.141964\u003c/span\u003e\u003cspan address=\"10.1016/j.chemosphere.2024.141964\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eAlshehri F, Rahman A (2023) Coupling Machine and Deep Learning with Explainable Artificial Intelligence for Improving Prediction of Groundwater Quality and Decision-Making in Arid Region, Saudi Arabia. Water 15(12):2298. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.3390/w15122298\u003c/span\u003e\u003cspan address=\"10.3390/w15122298\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eAlshehri F, Shahfahad, Rahman A (2024) Optimizing Machine Learning Models with Bayesian Techniques for Prediction of Groundwater Quality Index in Southwest Saudi Arabia. Earth Syst Environ 8(4):1417\u0026ndash;1436. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1007/s41748-024-00475-0\u003c/span\u003e\u003cspan address=\"10.1007/s41748-024-00475-0\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eAnjum R, Ali SA, Siddiqui MA (2023) Assessing the Impact of Land Cover on Groundwater Quality in a Smart City Using GIS and Machine Learning Algorithms. Water Air Soil Pollut 234(3):182. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1007/s11270-023-06198-8\u003c/span\u003e\u003cspan address=\"10.1007/s11270-023-06198-8\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eAsadi P, Ataie-Ashtiani B, Beheshti A (2016) Vulnerability assessment of urban groundwater resources to nitrate: the case study of Mashhad, Iran. Environ Earth Sci 76(1):41. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1007/s12665-016-6357-z\u003c/span\u003e\u003cspan address=\"10.1007/s12665-016-6357-z\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eAwais M, Aslam B, Maqsoom A, Khalil U, Ullah F, Azam S, Imran M (2021) Assessing Nitrate Contamination Risks in Groundwater: A Machine Learning Approach. Appl Sci 11(21):10034. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.3390/app112110034\u003c/span\u003e\u003cspan address=\"10.3390/app112110034\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eBajjali W (2023) Spatial Interpolation. In: Bajjali W (ed) ArcGIS Pro and ArcGIS Online: Applications in Water and Environmental Sciences. Springer International Publishing, Cham, pp 223\u0026ndash;242. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1007/978-3-031-42227-0_11\u003c/span\u003e\u003cspan address=\"10.1007/978-3-031-42227-0_11\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eDing F, Chen L, Sun C, Zhang W, Yue H, Na S (2022) An upgraded groundwater quality evaluation based on Hasse diagram technique \u0026amp; game theory. Ecol Ind 140:109024. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1016/j.ecolind.2022.109024\u003c/span\u003e\u003cspan address=\"10.1016/j.ecolind.2022.109024\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eDu X, Pan Y, Yang X, Chen L, Liu L, Lin Y (2025) Refined Urban Functional Zones Identification via Empirical Bayesian Kriging: A POI-Weighted Scoring Innovation. IEEE Access 13:22784\u0026ndash;22799 Presented at the IEEE Access. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1109/ACCESS.2025.3536000\u003c/span\u003e\u003cspan address=\"10.1109/ACCESS.2025.3536000\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eGholami V, Booij MJ (2022) Use of machine learning and geographical information system to predict nitrate concentration in an unconfined aquifer in Iran. J Clean Prod 360:131847. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1016/j.jclepro.2022.131847\u003c/span\u003e\u003cspan address=\"10.1016/j.jclepro.2022.131847\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eHelmi AM, Elgamal M, Farouk MI, Abdelhamed MS, Essawy BT (2023) Evaluation of Geospatial Interpolation Techniques for Enhancing Spatiotemporal Rainfall Distribution and Filling Data Gaps in Asir Region, Saudi Arabia. Sustainability 15(18):14028. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.3390/su151814028\u003c/span\u003e\u003cspan address=\"10.3390/su151814028\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eHosseini FS, Choubin B, Bagheri-Gavkosh M, Karimi O, Taromideh F, Mako C (2023) Susceptibility Assessment of Groundwater Nitrate Contamination Using an Ensemble Machine Learning Approach. Groundwater 61(4):510\u0026ndash;516. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1111/gwat.13258\u003c/span\u003e\u003cspan address=\"10.1111/gwat.13258\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eHuang Z, He B, Chu Y, Song Y, Shen Z (2025) Comparison and prediction of shallow groundwater nitrate in Shaying River basin based on urban distribution using multiple machine learning approaches. Water Environ Res 97(2):e70033. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1002/wer.70033\u003c/span\u003e\u003cspan address=\"10.1002/wer.70033\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eJalali R, Tishehzan P, Hashemi H (2024) A machine learning framework for spatio-temporal vulnerability mapping of groundwaters to nitrate in a data scarce region in Lenjanat Plain, Iran. Environ Sci Pollut Res 31(29):42088\u0026ndash;42110. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1007/s11356-024-33920-8\u003c/span\u003e\u003cspan address=\"10.1007/s11356-024-33920-8\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eKarimi H, Sahour S, Khanbeyki M, Gholami V, Sahour H, Shahabi-Ghahfarokhi S, Mohammadi M (2024) Enhancing groundwater quality prediction through ensemble machine learning techniques. Environ Monit Assess 197(1):21. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1007/s10661-024-13506-0\u003c/span\u003e\u003cspan address=\"10.1007/s10661-024-13506-0\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eLi P, Karunanidhi D, Subramani T, Srinivasamoorthy K (2021) Sources and Consequences of Groundwater Contamination. Arch Environ Contam Toxicol 80(1):1\u0026ndash;10. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1007/s00244-020-00805-z\u003c/span\u003e\u003cspan address=\"10.1007/s00244-020-00805-z\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eLi W, Ye X, Du X (2022) Imputation of Ammonium Nitrogen Concentration in Groundwater Based on a Machine Learning Method. Water 14(10):1595. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.3390/w14101595\u003c/span\u003e\u003cspan address=\"10.3390/w14101595\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eLi X, Liang G, Wang L, Yang Y, Li Y, Li Z et al (2024) Identifying the spatial pattern and driving factors of nitrate in groundwater using a novel framework of interpretable stacking ensemble learning. Environ Geochem Health 46(11):482. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1007/s10653-024-02201-1\u003c/span\u003e\u003cspan address=\"10.1007/s10653-024-02201-1\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eLi Z, Yang Q, Xie C, Lu X (2023) Source identification and health risks of nitrate contamination in shallow groundwater: a case study in Subei Lake basin. Environ Sci Pollut Res 30(5):13660\u0026ndash;13670. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1007/s11356-022-23129-y\u003c/span\u003e\u003cspan address=\"10.1007/s11356-022-23129-y\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eMahboobi H, Shakiba A, Mirbagheri B (2023) Improving groundwater nitrate concentration prediction using local ensemble of machine learning models. J Environ Manage 345:118782. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1016/j.jenvman.2023.118782\u003c/span\u003e\u003cspan address=\"10.1016/j.jenvman.2023.118782\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eMogaraju JK (2023) Application of machine learning algorithms in the investigation of groundwater quality parameters over YSR district, India. Turkish J Eng 7(1):64\u0026ndash;72. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.31127/tuje.1032314\u003c/span\u003e\u003cspan address=\"10.31127/tuje.1032314\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eNasiri Khiavi A, Tavoosi M, Khodamoradi H, Kuriqi A (2024) Integration of Watershed eco-physical health through Algorithmic game theory and supervised machine learning. Groundw Sustainable Dev 26:101216. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1016/j.gsd.2024.101216\u003c/span\u003e\u003cspan address=\"10.1016/j.gsd.2024.101216\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003ePal SC, Biswas T, Jaydhar AK, Ruidas D, Saha A, Chowdhuri I et al (2024) Source identification and potential health risks from elevated groundwater nitrate contamination in Sundarbans coastal aquifers, India. Sci Rep 14(1):4153. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1038/s41598-024-54646-0\u003c/span\u003e\u003cspan address=\"10.1038/s41598-024-54646-0\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eSarkar S, Mukherjee A, Gupta SD, Bhanja SN, Bhattacharya A (2022) Predicting Regional-Scale Elevated Groundwater Nitrate Contamination Risk Using Machine Learning on Natural and Human-Induced Factors. ACS ES\u0026amp;T Eng 2(4):689\u0026ndash;702. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1021/acsestengg.1c00360\u003c/span\u003e\u003cspan address=\"10.1021/acsestengg.1c00360\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eSu H, Kang W, Li Y, Li Z (2021) Fluoride and nitrate contamination of groundwater in the Loess Plateau, China: Sources and related human health risks. Environ Pollut 286:117287. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1016/j.envpol.2021.117287\u003c/span\u003e\u003cspan address=\"10.1016/j.envpol.2021.117287\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eVerma A, Sharma A, Kumar R, Sharma P (2023) Nitrate contamination in groundwater and associated health risk assessment for Indo-Gangetic Plain, India. Groundw Sustainable Dev 23:100978. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1016/j.gsd.2023.100978\u003c/span\u003e\u003cspan address=\"10.1016/j.gsd.2023.100978\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eViegas J, Gallardo A, Costa AC, Marinaro R (2024) Uncovering soft soils with 3D Empirical Bayesian Kriging A case study on cone penetration test data. Geotechnical Engineering Challenges to Meet Current and Emerging Needs of Society. CRC\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eYan Y, Zhang Y, Yang S, Wei D, Zhang J, Li Q et al (2024) Optimized groundwater quality evaluation using unsupervised machine learning, game theory and Monte-Carlo simulation. J Environ Manage 371:122902. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1016/j.jenvman.2024.122902\u003c/span\u003e\u003cspan address=\"10.1016/j.jenvman.2024.122902\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eZhang Q, Qian H, Xu P, Li W, Feng W, Liu R (2021) Effect of hydrogeological conditions on groundwater nitrate pollution and human health risk assessment of nitrate in Jiaokou Irrigation District. J Clean Prod 298:126783. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1016/j.jclepro.2021.126783\u003c/span\u003e\u003cspan address=\"10.1016/j.jclepro.2021.126783\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eZowam FJ, Milewski AM (2024) Groundwater Level Prediction Using Machine Learning and Geostatistical Interpolation Models. Water 16(19):2771. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.3390/w16192771\u003c/span\u003e\u003cspan address=\"10.3390/w16192771\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003c/ol\u003e"}],"fulltextSource":"","fullText":"","funders":[],"hasAdminPriorityOnWorkflow":false,"hasManuscriptDocX":true,"hasOptedInToPreprint":true,"hasPassedJournalQc":"","hasAnyPriority":true,"hideJournal":true,"highlight":"","institution":"","isAcceptedByJournal":false,"isAuthorSuppliedPdf":false,"isDeskRejected":"","isHiddenFromSearch":false,"isInQc":false,"isInWorkflow":false,"isPdf":false,"isPdfUpToDate":true,"isWithdrawnOrRetracted":false,"journal":{"display":true,"email":"
[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true},"keywords":"Kriging, SHAP, Pollution, Groundwater, Prediction, Regression","lastPublishedDoi":"10.21203/rs.3.rs-6310428/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-6310428/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"\u003cp\u003eGroundwater is a commodity we depend on for diverse needs, and maintaining its quality must be considered vital. We considered Machine Learning (ML) operations and Explainable Artificial Intelligence (XAI) to predict the nitrate concentration levels in the groundwater of India for the years 2019 and 2023. The variables used in this study are Latitude, Longitude, pH, EC, CO3, HCO3, Cl, SO4, PO4, TH, Ca, Mg, Na, K, F, TDS, SiO2, and NO3 for the 2019 dataset and Longitude, Latitude, pH, EC, CO3, HCO3, Cl, F, SO4, PO4, TH, Ca, Mg, Na, K, Fe, As, U, and NO3 for the 2023 dataset. We prepared GIS surface maps using interpolation supported by the Empirical Bayesian Kriging method. We investigated the model efficiency and feature importance in the presence and absence of location attributes. We considered 19 ML models and filtered Light Gradient Boosting Machine (LightGBM) and Liner Regression (LR) models that exhibited relatively better accuracy. We first trained these models and fed them to XAI via SHAP (SHapley Additive exPlanations), which was dependent on the game theory. We obtained a 28.23% and 24.88% increase in accuracy when comparing the 2019 and 2023 datasets with location attributes, respectively. We also observed a 28.3% increase in accuracy when the 2023 dataset without a location attribute was used. We conclude that ML can be integrated with XAI to improve the accuracy of the prediction of nitrate in groundwater studies.\u003c/p\u003e","manuscriptTitle":"Explainable Artificial Intelligence integrated with Machine learning operations to predict the nitrate concentrations in Groundwater","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2025-03-27 09:21:35","doi":"10.21203/rs.3.rs-6310428/v1","editorialEvents":[{"type":"communityComments","content":0}],"status":"published","journal":{"display":true,"email":"
[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true}}],"origin":"","ownerIdentity":"875f7f6e-6526-4c90-ae2b-14a50a20ca53","owner":[],"postedDate":"March 27th, 2025","published":true,"recentEditorialEvents":[],"rejectedJournal":[],"revision":"","amendment":"","status":"posted","subjectAreas":[{"id":46230357,"name":"Hydrology"},{"id":46230358,"name":"Artificial Intelligence and Machine Learning"},{"id":46230359,"name":"Environmental Chemistry"}],"tags":[],"updatedAt":"2025-03-27T09:21:35+00:00","versionOfRecord":[],"versionCreatedAt":"2025-03-27 09:21:35","video":"","vorDoi":"","vorDoiUrl":"","workflowStages":[]},"version":"v1","identity":"rs-6310428","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-6310428","identity":"rs-6310428","version":["v1"]},"buildId":"8U1c8b4HqxoKbykW_rLl7","isFallback":false,"isExperimentalCompile":false,"dynamicIds":[84888],"gssp":true,"scriptLoader":[]}
Text is read by the "Ask this paper" AI Q&A widget below.
Extraction quality varies by source — PMC NXML preserves structure
cleanly, OA-HTML may include some navigation residue, and OA-PDF can
have broken hyphenation. The publisher copy
(via DOI)
is the canonical version.