UDCFormer: upstream-downstream coupled transformer for midstream water quality forecasting on directed river networks
摘要
River water quality forecasting on directed river networks requires jointly modeling temporal dynamics and directional spatial dependencies among monitoring sites. Existing spatio-temporal models often emphasize upstream-to-downstream propagation and overlook downstream feedback effects induced by boundary conditions, regulation, or mixing, which can degrade midstream forecasting accuracy, especially at longer horizons. This paper proposes UDCFormer, an upstream–downstream coupled Transformer for midstream water quality forecasting. UDCFormer introduces a direction-aware bidirectional diffusion mechanism to capture coupled upstream driving and downstream feedback dependencies on directed river graphs, and integrates temporal multi-head self-attention to model long-range temporal patterns. The model is trained with midstream-supervised objectives and supports both continuous-value forecasting and water-quality grade assessment under the GB3838-2002 standard. Experiments on three real-world datasets from different basins, covering multiple forecasting horizons, demonstrate that UDCFormer consistently outperforms representative spatio-temporal baselines, achieving average MAE and MSE reductions of 20.3% and 14.5% relative to the second-best model, while exhibiting improved robustness in long-horizon forecasting. Ablation studies further verify the necessity of bidirectional diffusion and its synergy with temporal attention for capturing coupled river-network dependencies.