Skip to content
Open access

Graph-informed temporal fusion transformer (GIFT) for spatio-temporal water quality classification

Aug 2026 · Discover Artificial Intelligence · Vol 6 · 0 citations · 18 references
Computer Science

Abstract

Accurate classification of water quality is critical for environmental management and public health. Existing machine learning models often struggle to capture the complex, intertwined spatio-temporal dynamics inherent in hydrological systems. This study introduces the Graph-Informed Temporal Fusion Transformer (GIFT), a novel deep learning architecture designed to address this challenge. GIFT integrates a Graph Neural Network (GNN) for spatial feature extraction with a Temporal Fusion Transformer (TFT) for temporal dependency modeling. The GNN learns topological representations of monitoring station networks, which are then injected as static covariates into the TFT-grounding the temporal model in spatial context without altering its validated internal architecture. Evaluated on a real-world dataset comprising 5895 records from 109 monitoring stations over five years (New South Wales, Australia), GIFT achieves a weighted F1-Score of 0.9719, competitive with the temporal-only TFT-Only baseline (F1 = 0.9825; Δ 1.06 percentage points), confirming that decoupling spatial and temporal learning does not compromise aggregate accuracy. To validate task non-triviality, a deterministic CCME rule-based baseline achieves F1 = 0.9235—confirming that classification requires genuine model learning rather than formula reproduction. GIFT’s decisive advantage emerges under individual sensor malfunction: when four of eight physicochemical sensors are disabled (50% sensor capacity), GIFT (F1 = 0.6716) outperforms zero-imputation RF baselines (F1 = 0.3410) by + 33.1 percentage points—degrading at approximately half the rate. Under station-level failure (40% stations offline), GIFT maintains F1 = 0.7490, a statistically significant + 2.5 percentage-point advantage over TFT-Only with zero imputation (F1 = 0.7236; p < 0.001, N = 15 trials), reflecting the incremental but consistent benefit of GNN-derived spatial priors as a fallback mechanism. These results demonstrate that decoupling spatial graph learning from temporal modeling is a more effective strategy than the prevailing “deep fusion” approaches, positioning GIFT as a reproducible benchmark for spatio-temporal classification in environmental science.

Read PDF

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.