Deep learning framework for mapping nitrate pollution in coastal aquifers under land use pressure
Morad Chahid, Jamal Eddine Stitou El-Messari, Ismail Hilal, Nouhayla Abdi, Tarig Ali, Rabin Chakrabortty, Khadeijah Yahya Faqeih, Somayah Moshrif Alamri, Eman Rafi Alamery, Aqil Tariq, Mourad Aqnouy
Abstract
Diffuse nitrate (NO₃ − ) contamination is a critical environmental concern threatening the quality of coastal groundwater resources, particularly in regions undergoing agricultural intensification and rapid land use changes. This study presents an explainable deep learning framework for predicting nitrate concentrations and identifying areas at risk of elevated contamination. The framework integrates key hydrochemical parameters electrical conductivity (EC), chloride (Cl − ), organic matter (OM), and fecal coliforms (FC) with remote-sensing derived indicators, including the Normalized Difference Vegetation Index (NDVI) and land use/land cover (LU/LC). Two deep learning models were evaluated in this study: a Multilayer Perceptron (MLP) and TabNet, a novel attention-based architecture for interpretable tabular data. TabNet outperformed MLP, achieving an overall accuracy of 81.60% and a Macro-averaged recall of 84.13%, while providing transparent feature attribution. LASSO regression identified FC (0.52) and EC (0.48) as dominant predictors, highlighting the combined influence of domestic wastewater and agricultural runoff on nitrate contamination. The output risk maps revealed spatially heterogeneous contamination patterns, with hotspots concentrated in agricultural and peri-urban areas. This research highlights the importance of integrating explainable AI with geospatial analysis to guide targeted groundwater monitoring and management strategies. This approach is transferable to other vulnerable coastal aquifers, supporting sustainable groundwater governance under diffuse pollution conditions.