Graph-Based Anomaly Detection for Historical Groundwater Databases
Historical groundwater databases may contain systematic errors involving ground elevations, spatial coordinates, or hydraulic head measurements, which can affect hydrogeological interpretation and downstream analyses. Conventional outlier detection methods assume independent observations and may perform poorly in spatially structured groundwater data, where local hydrogeological features and spatial autocorrelation shape the observed field. Here, we present a graph-based framework for identifying persistent anomalous records in legacy groundwater datasets by combining a regional trend model with a graph attention network (GAT) to account for spatial dependence. Residuals from the hybrid model are compared across two contrasting hydrological seasons to assess temporal persistence. The approach was tested on a historical piezometric dataset of 161 wells from the Tavoliere di Foggia aquifer in southern Italy, with missing well-depth records imputed using missForest prior to spatial modelling. In this dataset, the proposed framework identified anomalous residual patterns that were not captured by standard univariate tests and showed seasonal stability in a subset of records, suggesting either potential database inconsistencies or localized hydrogeological conditions not resolved by the model. This persistence criterion showed no overlap with a classical, spatially explicit statistic (Local Indicators of Spatial Association) applied to the model’s final residual field but computed without reference to any of the trained model’s own parameters, indicating that the two diagnostics capture distinct properties of that residual field, and a core subset of the flagged wells proved reproducible across repeated model retraining under different random seeds. Tracing one flagged well back through the original field archive confirmed a concrete database error invisible to classical tests: a missing depth-to-water measurement had been silently treated as zero rather than propagated as missing, producing a spurious hydraulic head numerically identical to the well’s ground elevation. Cross-referencing declared well elevations against two independent national digital terrain models further showed that the largest elevation discrepancies were significantly enriched among the wells already flagged by both the proposed framework and classical tests, providing external corroboration from a source unconnected to the hydraulic head record itself. The framework therefore offers a spatially explicit screening tool to support quality control in legacy archives and to prioritize records for targeted physical verification.
Authors
- Emanuele Barca (ORCID: https://orcid.org/0000-0001-8049-0537)
- Giuseppe Ferrari
Institutions
- National Research Council (IT)
Publication Details
- Journal
- Hydrology
- Published
- 2026-10-08
- DOI
- https://doi.org/10.3390/hydrology13100272
- Primary Topic
- Groundwater flow and contamination studies
- Type
- article
- Field-Weighted Citation Impact
- 0.00