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 H ybrid S patio- T emporal G raph T rans f ormer 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.
Chen et al. (Wed,) studied this question.