A Gated Attention Transformer with Dynamic Spatio-Temporal Decoupling for Traffic Flow Prediction
摘要
Traffic flow prediction, as a core task in intelligent transportation systems (ITS), faces dual challenges across temporal and spatial dimensions. Temporally, traffic flow exhibits high dynamics and significant non-stationarity due to unexpected events. Spatially, nodes in the traffic network not only maintain long-term stable dependencies but also form complex and evolving spatial structures over time. To address these challenges, this paper proposes a novel prediction model based on the Transformer encoder architecture, termed A Gated Attention Transformer with Dynamic Spatio-Temporal Decoupling (DGAFormer), which achieves fine-grained modeling of traffic patterns through a dynamic spatio-temporal decoupling mechanism. Specifically, DGAFormer comprises: (1) a gated temporal attention module enhanced by global-local mechanisms to jointly capture long-term dependencies and local abrupt changes; (2) a gated spatial attention module that integrates dynamic node interactions across distinct temporal views with a static adaptive adjacency matrix to unify the modeling of stable and evolving spatial dependencies; and (3) a cross-attention module that captures the coupled relationships between temporal and spatial features and facilitates multidimensional information interaction. Extensive experiments on four real-world traffic datasets demonstrate that DGAFormer consistently outperforms state-of-the-art baselines across diverse traffic scenarios, validating its effectiveness and robustness in modeling complex spatio-temporal dynamics.