ST-GNNFormer: coupling dynamic graph learning and multi-scale temporal attention for traffic flow forecasting
Urban traffic flow prediction is a fundamental task in intelligent transportation systems, yet it remains exceptionally challenging due to the entangled nature of spatial heterogeneity, non-stationary temporal dynamics, and multi-scale periodicity in real-world road networks. Existing graph neural network (GNN)- and transformer-based methods often treat spatial and temporal modeling as largely independent components, thereby overlooking the synergistic interactions between structural topology and sequential patterns. To address these limitations, we propose ST-GNNFormer, a novel Hybrid Spatio-Temporal Graph Transformer that tightly couples adaptive graph learning with multi-scale temporal attention for fine-grained traffic prediction. Specifically, ST-GNNFormer consists of four collaborating modules: (i) an Adaptive Dynamic Graph Learning (ADGL) module that infers time-varying adjacency from learnable node embeddings conditioned on temporal context, capturing both structural and semantic proximity; (ii) a Spatial Graph Transformer (SGT) that integrates graph-structure biases into multi-head self-attention to propagate spatially correlated features over the learned topology; (iii) a Temporal Multi-Scale Transformer (TMST) that simultaneously models short-term fluctuations and long-range periodicity across multiple temporal granularities; and (iv) a Cross-Scale Fusion (CSF) gate that adaptively merges spatial and temporal representations at each encoder layer. Extensive experiments on four public benchmarks-METR-LA, PEMS-BAY, PEMS04, and PEMS08-demonstrate that ST-GNNFormer consistently outperforms 8 competitive baselines by up to 7.5% in MAE at the 60-minute prediction horizon while maintaining competitive computational efficiency. Ablation studies and visualization analyses confirm the individual contributions of each module and reveal physically meaningful attention patterns that align with real-world traffic dynamics.
Authors
- Zhengjia Chen (ORCID: https://orcid.org/0000-0002-6301-4931)
- Junhao Chen
Institutions
- Chongqing University of Science and Technology (CN)
- Nanyang Technological University (SG)
- Chongqing University of Technology (CN)
- Chongqing Jiaotong University (CN)
Publication Details
- Journal
- Scientific Reports
- Published
- 2026-07-01
- DOI
- https://doi.org/10.1038/s41598-026-59250-y
- Primary Topic
- Traffic Prediction and Management Techniques
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- Chongqing Jiaotong University