Physics-aware graph attention network for real-time water contamination forecasting
摘要
Urban water distribution networks (WDNs) frequently face acute contamination crises, necessitating robust real-time forecasting solutions. This study introduces the Physics-aware Graph Attention Network (PA-GAT), an innovative deep-learning framework integrating physics-supervised learning, adaptive graph attention mechanisms, and multi-scale temporal modeling. PA-GAT reshapes conventional graph-based network topology into a directed graph with trainable edge weights, dynamically inferring flow preferences under varying hydraulic conditions. Its stacked graph attention architecture, enhanced by residual history injections, preserves critical temporal dependencies, while dilated convolutional blocks decouple short-term fluctuations from long-term trends, overcoming vanishing-gradient challenges. A physics-aware training strategy is adopted, whereby EPANET simulations governed by advection-decay dynamics are used to generate physically consistent concentration trajectories. The PA-GAT model is then supervised to approximate these targets, enabling it to implicitly inherit physical consistency. Validated on three case studies, PA-GAT demonstrates that it significantly outperforms SOTA data-driven approaches, achieving a remarkable 8.02% Mean Absolute Percentage Error (MAPE) and a minimal Mean Absolute Error (MAE) of 0.0047 mg/L. Consequently, PA-GAT emerges as a powerful, scalable, and interpretable solution, setting a new benchmark for operational readiness in urban water quality forecasting.