Abstract Accurate traffic flow prediction is critical for intelligent transportation systems; however, traditional models often struggle to capture complex spatio-temporal dependencies and mitigate temporal lag issues in forecasts. This article proposes a novel framework, termed the spatio-temporal transformer with graph attention (STTFGA), to address these challenges by integrating transformer-based temporal modeling with graph attention mechanisms. The STTFGA employs a streamlined transformer module to extract temporal features from traffic sequences and leverages graph attention layers to model dynamic spatial relationships among road segments. Furthermore, the model incorporates a post-processing module that enhances prediction accuracy through an optimal temporal offset identification strategy and amplitude scaling to correct temporal lags. Evaluations on real-world traffic speed datasets demonstrate that STTFGA significantly outperforms baseline models in terms of mean absolute error, mean absolute percentage error, and root mean square error. Ablation studies further validate the contribution of each component, underscoring the efficacy of the hybrid transformer-graph attention architecture. This study provides a robust framework for capturing spatio-temporal heterogeneity in traffic flows, offering valuable insights for advanced predictive methods in urban transportation applications.
Zhai et al. (Sun,) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: