Trafformer: Unify Time and Space in Traffic Prediction
Di Jin, Jiayi Shi, Rui Wang, Yawen Li, Yuxiao Huang, Yu-Bin Yang
Abstract
Traffic prediction is an important component of the intelligent transportation system. Existing deep learning methods encode temporal information and spatial information separately or iteratively. However, the spatial and temporal information is highly correlated in a traffic network, so existing methods may not learn the complex spatial-temporal dependencies hidden in the traffic network due to the decomposed model design. To overcome this limitation, we propose a new model named Trafformer, which unifies spatial and temporal information in one transformer-style model. Trafformer enables every node at every timestamp interact with every other node in every other timestamp in just one step in the spatial-temporal correlation matrix. This design enables Trafformer to catch complex spatial-temporal dependencies. Following the same design principle, we use the generative style decoder to predict multiple timestamps in only one forward operation instead of the iterative style decoder in Transformer. Furthermore, to reduce the complexity brought about by the huge spatial-temporal self-attention matrix, we also propose two variants of Trafformer to further improve the training and inference speed without losing much effectivity. Extensive experiments on two traffic datasets demonstrate that Trafformer outperforms existing methods and provides a promising future direction for the spatial-temporal traffic prediction problem.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 5cb7f356-0a63-41dd-9ff5-31c3df038d07Cited by top-tier papers4
- Unraveling the 'Anomaly' in Time Series Anomaly Detection: A Self-supervised Tri-domain SolutionYuting Sun, Guansong Pang, Guanhua Ye, Tong Chen et al.ICDE 2024 · 18 citations
- LLGformer: Learnable Long-range Graph Transformer for Traffic Flow PredictionDi Jin, Cuiying Huo, Jiayi Shi, Dongxiao He et al.WWW 2025 · 14 citations
- How Different from the Past? Spatio-Temporal Time Series Forecasting with Self-Supervised Deviation LearningHaotian Gao, Zheng Dong, Jiawei Yong, Shintaro Fukushima et al.NeurIPS 2025 · 9 citations
- VisiFold: Long-Term Traffic Forecasting via Temporal Folding Graph and Node VisibilityZhiwei Zhang, Xinyi Du, Weihao Wang, Xuanchi Guo et al.ICDE 2026
Builds on9
- Swin Transformer: Hierarchical Vision Transformer using Shifted WindowsZe Liu, Yutong Lin, Yue Cao, Han Hu et al.ICCV 2021 · 31,683 citations
- Informer: Beyond Efficient Transformer for Long Sequence Time-Series ForecastingHaoyi Zhou, Shanghang Zhang, Jieqi Peng, Shuai Zhang et al.AAAI 2021 · 7,289 citations
- Autoformer: Decomposition Transformers with Auto-Correlation for Long-Term Series ForecastingHaixu Wu, Jiehui Xu, Jianmin Wang, Mingsheng LongNeurIPS 2021 · 5,824 citations
- Reformer: The Efficient TransformerNikita Kitaev, Lukasz Kaiser, Anselm LevskayaICLR 2020 · 2,878 citations
- Adaptive Graph Convolutional Recurrent Network for Traffic ForecastingLei Bai, Lina Yao, Can Li, Xianzhi Wang et al.NeurIPS 2020 · 2,206 citations
Related papers
- SSL-STMFormer Self-Supervised Learning Spatio-Temporal Entanglement Transformer for Traffic Flow PredictionZetao Li, Zheng Hu, Peng Han, Yu Gu et al.AAAI 2025 · 12 citations
- Unified Spatio-Temporal Tokens are Bases for Generalizable Traffic ForecastingYujun Chen, Shihao Tu, Wenyue Ding, Yicheng Lu et al.KDD 2026
- Spatial-Temporal Fusion Graph Neural Networks for Traffic Flow ForecastingMengzhang Li, Zhanxing ZhuAAAI 2021 · 1,037 citations
- PDFormer: Propagation Delay-Aware Dynamic Long-Range Transformer for Traffic Flow PredictionJiawei Jiang, Chengkai Han, Wayne Xin Zhao, Jingyuan WangAAAI 2023 · 542 citations
- Traffic Flow Prediction via Spatial Temporal Graph Neural NetworkXiaoyang Wang, Yao Ma, Yiqi Wang, Wei Jin et al.WWW 2020 · 644 citations
