Dynamic spatiotemporal graph network with a temporal masked transformer for traffic flow forecasting

Accurate traffic flow forecasting requires a model to capture time-varying spatial correlations, nonlocal temporal dependencies, and recurring traffic patterns simultaneously. Existing spatiotemporal models often rely on fixed relational graphs or local temporal operators, which limits their ability to represent evolving dependencies in traffic networks. To address these limitations, we propose a Dynamic Spatiotemporal Graph Network with a Temporal Masked Transformer (DSGN-TMT). DSGN-TMT combines layer-specific independent blocks with cross-layer information-sharing blocks to learn complementary representations along the spatial, temporal, and feature dimensions. A time-aware dynamic graph constructor generates periodicity-conditioned spatial and temporal adjacency structures, while a temporal graph convolution module treats historical time slots as graph nodes to capture flexible temporal interactions. In addition, a Temporal Masked Transformer (TMT), a full-history contextual Transformer encoder with an optional masked-subsequence design, is integrated into the forecasting network and trained end-to-end using only forecasting loss; in both training and inference, the TMT processes the complete historical sequence without masking and produces context-aware temporal representations. Experiments on four PeMS benchmark datasets show that DSGN-TMT achieves the lowest MAE, RMSE, and MAPE among 23 comparison methods. Ablation results further demonstrate the complementary contributions of layer-specific learning, cross-layer sharing, dynamic graph construction, temporal graph convolution, and contextual temporal encoding. These results indicate that explicitly coordinating dynamic graph learning with contextual temporal representation is effective for traffic flow forecasting.

Authors

Institutions

Publication Details

Journal
Scientific Reports
Published
2026-11-09
DOI
https://doi.org/10.1038/s41598-026-80267-w
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
NOV
article

Dynamic spatiotemporal graph network with a temporal masked transformer for traffic flow forecasting

Xiaojun Liu, Xiaoling Zhang, Zuojun Wu
Scientific Reports
Traffic Prediction and Management Techniques
article

Dynamic spatiotemporal graph network with a temporal masked transformer for traffic flow forecasting

Xiaojun Liu, Xiaoling Zhang, Zuojun Wu
article en

Abstract

Accurate traffic flow forecasting requires a model to capture time-varying spatial correlations, nonlocal temporal dependencies, and recurring traffic patterns simultaneously. Existing spatiotemporal models often rely on fixed relational graphs or local temporal operators, which limits their ability to represent evolving dependencies in traffic networks. To address these limitations, we propose a Dynamic Spatiotemporal Graph Network with a Temporal Masked Transformer (DSGN-TMT). DSGN-TMT combines layer-specific independent blocks with cross-layer information-sharing blocks to learn complementary representations along the spatial, temporal, and feature dimensions. A time-aware dynamic graph constructor generates periodicity-conditioned spatial and temporal adjacency structures, while a temporal graph convolution module treats historical time slots as graph nodes to capture flexible temporal interactions. In addition, a Temporal Masked Transformer (TMT), a full-history contextual Transformer encoder with an optional masked-subsequence design, is integrated into the forecasting network and trained end-to-end using only forecasting loss; in both training and inference, the TMT processes the complete historical sequence without masking and produces context-aware temporal representations. Experiments on four PeMS benchmark datasets show that DSGN-TMT achieves the lowest MAE, RMSE, and MAPE among 23 comparison methods. Ablation results further demonstrate the complementary contributions of layer-specific learning, cross-layer sharing, dynamic graph construction, temporal graph convolution, and contextual temporal encoding. These results indicate that explicitly coordinating dynamic graph learning with contextual temporal representation is effective for traffic flow forecasting.

Scientific Reports
Shandong Institute of Petroleum and Chemical Technology (CN)
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.

Laika access coming soon