STTFGA: a traffic prediction model based on spatio-temporal transformer and graph attention mechanism

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.

Authors

Institutions

Publication Details

Journal
The Computer Journal
Published
2026-02-22
DOI
https://doi.org/10.1093/comjnl/bxag025
Primary Topic
Traffic Prediction and Management Techniques
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

STTFGA: a traffic prediction model based on spatio-temporal transformer and graph attention mechanism

Jiadong Sun, Yun He, Shichen Zhai
The Computer Journal
Traffic Prediction and Management Techniques
article

STTFGA: a traffic prediction model based on spatio-temporal transformer and graph attention mechanism

Jiadong Sun, Yun He, Shichen Zhai
article en

Abstract

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.

The Computer Journal
Wuxi No.2 People's Hospital (CN), Wuxi Institute of Technology (CN)
Sustainable cities and communities
Openalex Percentile: Top 29%
Traffic Prediction and Management Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.