Yanchen Liu, Jia-Qiang Lv, Bo Li, Wan-Xin Yin, Bo Sun, Jiale Chen, Md Sahidul Islam, He Bai, Liang Peng, Xia Huang
Reliable perception of urban drainage systems is essential for understanding the dynamic behaviour and managing water-environment risks. Yet structural and hydraulic complexity and sparse sensor deployment constrain the characterisation of evolving operational states. Here, we propose an end-to-end graph learning framework (STGAT) that extracts the spatiotemporal regularities across nodes from sparse and heterogeneous monitoring data. STGAT transforms multi-variable temporal sequences into aligned node-level latent representations within a shared feature space. It then introduces a topology-modulated graph attention mechanism that combines a fixed GIS-derived topology prior with input-dependent attention coefficients to learn state-dependent inter-node dependencies. This design integrates temporal alignment, spatial information routing, and physical prior embedding within a single differentiable architecture. Consequently, forecasting and anomaly-related errors can guide feature extraction and dependency learning during end-to-end optimisation. Results demonstrate that STGAT achieves high-fidelity capture of hydraulic and water-quality patterns (NSE ≥ 0.90). It also maintains stronger predictive skill than a range of baseline models across increasing forecast horizons, particularly for outlet flow and overflow-prone water levels. Its anomaly detection rate (Recall ≥ 82%) and restoration accuracy (NSE = 0.92), compared with NSE values of 0.45-0.77 for the baseline models. These results demonstrate that end-to-end graph learning provides a new pathway towards topology-aware and data-efficient state perception in urban drainage systems.