Memory-Augmented Spatio-Temporal Transformer for Robust Traffic Flow Forecasting
Source abstract
Abstract
Accurate traffic flow prediction plays a critical role in intelligent transportation systems, supporting traffic management, congestion mitigation, and efficient utilization of road resources. Advances in neural network-based methods, particularly graph neural networks (GNNs) and attention-based models, have demonstrated strong capability in modeling spatio-temporal traffic dynamics. However, existing approaches still face notable challenges: GNN-based models often rely on static adjacency matrices, limiting their ability to capture dynamic and long-range spatial dependencies, while attention-based models usually involve complex architectures and heavy reliance on large-scale pre-training data. To address these limitations, this study proposes a novel traffic flow prediction model that integrates a learnable memory tensor into an attention-based framework. The introduced memory mechanism provides persistent global context for modeling long-term temporal dependencies in an end-to-end manner, enabling efficient and dynamic spatio-temporal representation learning with a lightweight architecture. Extensive experiments on multiple real-world traffic datasets demonstrate that the proposed model achieves superior prediction accuracy and robustness compared with existing baselines. The proposed approach offers a new perspective for memory-enhanced spatio-temporal modeling and provides valuable insights for traffic forecasting and related intelligent transportation applications.
Source: crossref · Quality: baseline
Research context
OpenAlex topics: Traffic Prediction and Management Techniques · Traffic control and management · Transportation Planning and Optimization
SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.
Affiliations
School of Information and Software Engineering, University of Electronic Science and Technology of China, Chengdu 610054, China
School of Software Engineering, Chengdu University of Information Technology, Chengdu 610225, China
Funding
National Natural Science Foundation of China
References (46)
Show source-provided references
1. Traffic prediction using artificial intelligence: Review of recent advances and emerging opportunities10.1016/j.trc.2022.103921 ↗
2. A comprehensive review of traffic flow forecasting based on deep learning10.1016/j.neucom.2025.132269 ↗
3. A decomposition dynamic graph convolutional recurrent network for traffic forecasting10.1016/j.patcog.2023.109670 ↗
4. Dual dynamic spatial-temporal graph convolution network for traffic prediction10.1109/TITS.2022.3208943 ↗
5. Towards explainable traffic flow prediction with large language models10.1016/j.commtr.2024.100150 ↗
6. Predicting electric vehicle charging demand using a heterogeneous spatio-temporal graph convolutional network10.1016/j.trc.2023.104205 ↗
7. Demand forecasting and predictability identification of ride-sourcing via bidirectional spatial-temporal transformer neural processes10.1016/j.trc.2023.104427 ↗
8. The two-echelon truck-unmanned ground vehicle routing problem with time-dependent travel times10.1016/j.tre.2024.103954 ↗
9. Towards integrated and fine-grained traffic forecasting: A spatio-temporal heterogeneous graph transformer approach10.1016/j.inffus.2023.102063 ↗
10. A traffic flow dependency and dynamics based deep learning aided approach for network-wide traffic speed propagation prediction10.1016/j.trb.2022.11.009 ↗
11. Zhang, J., Zheng, Y., and Qi, D. (2017, January 4–9). Deep spatio-temporal residual networks for citywide crowd flows prediction. Proceedings of the AAAI Conference on Artificial Intelligence (AAAI-17), San Francisco, CA, USA.10.1609/aaai.v31i1.10735 ↗
12. Yu, B., Yin, H., and Zhu, Z. (2018, January 13–19). Spatio-temporal graph convolutional networks: A deep learning framework for traffic forecasting. Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence (IJCAI 2018), Stockholm, Sweden.10.24963/ijcai.2018/505 ↗
13. Kabashkin, I., Yatskiv, I., and Prentkovskis, O. (2023). Attention-based spatio-temporal graph convolutional networks—A systematic review. Reliability and Statistics in Transportation and Communication, Springer. Lecture Notes in Networks and Systems.10.1007/978-3-031-26655-3 ↗
14. Wu, Z., Pan, S., Long, G., Jiang, J., Chang, X., and Zhang, C. (2020, January 23–27). Connecting the dots: Multivariate time series forecasting with graph neural networks. Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining (KDD 2020), Virtual Event.10.1145/3394486.3403118 ↗
15. Artificial intelligence-based traffic flow prediction: A comprehensive review10.1186/s43067-023-00081-6 ↗
16. Short-term traffic forecasting model: Prevailing trends and guidelines10.1093/tse/tdac058 ↗
17. Physics-informed deep learning with Kalman filter mixture for traffic state prediction10.1016/j.ijtst.2024.04.002 ↗
18. MapsTSF: Efficient traffic prediction via hybrid Mamba 2-transformer spatiotemporal modeling and cross adaptive periodic sparse forecasting10.1007/s11227-025-07328-1 ↗
19. AdapGL: An adaptive graph learning algorithm for traffic prediction based on spatiotemporal neural networks10.1016/j.trc.2022.103659 ↗
20. Dynamic graph convolutional recurrent network for traffic prediction: Benchmark and solution10.1145/3532611 ↗
21. Decoupled dynamic spatial-temporal graph neural network for traffic forecasting10.14778/3551793.3551827 ↗
22. Learning dynamics and heterogeneity of spatial-temporal graph data for traffic forecasting10.1109/TKDE.2021.3056502 ↗
23. Jiang, R., Wang, Z., Yong, J., Jeph, P., Chen, Q., Kobayashi, Y., Song, X., Fukushima, S., and Suzumura, T. (2023, January 7–14). Spatio-temporal meta-graph learning for traffic forecasting. Proceedings of the AAAI Conference on Artificial Intelligence (AAAI-23), Washington, DC, USA.10.1609/aaai.v37i7.25976 ↗
24. Graph neural network for traffic forecasting: A survey10.1016/j.eswa.2022.117921 ↗
25. Liu, X., Xia, Y., Liang, Y., Hu, J., Wang, Y., Bai, L., Huang, C., Liu, Z., Hooi, B., and Zimmermann, R. (2026, February 17). LargeST: A Benchmark Dataset for Large-Scale Traffic Forecasting. Advances in Neural Information Processing Systems (NeurIPS 2023), Datasets and Benchmarks Track. Available online: https://proceedings.neurips.cc/paper_files/paper/2023/hash/ee57cd73a76bd927ffca3dda1dc3b9d4-Abstract-Datasets_and_Benchmarks.html.
26. Learning dynamic and hierarchical traffic spatiotemporal features with transformer10.1109/TITS.2021.3102983 ↗
27. Jiang, J., Han, C., Zhao, W.X., and Wang, J. (2023, January 7–14). PDFormer: Propagation delay-aware dynamic long-range transformer for traffic flow prediction. Proceedings of the AAAI Conference on Artificial Intelligence (AAAI-23), Washington, DC, USA.
28. STGM: Spatial-temporal graph mixed attention network for traffic flow prediction
29. PreSTNet: Pre-trained spatio-temporal network for traffic forecasting10.1016/j.inffus.2024.102241 ↗
30. AutoMSNet: Multi-source spatio-temporal network via automatic neural architecture search for traffic flow prediction10.1109/TITS.2022.3225553 ↗
31. A systematic review for transformer-based long-term series forecasting10.1007/s10462-024-11044-2 ↗
32. A memory guided transformer for time series forecasting10.14778/3705829.3705842 ↗
33. Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A.N., Kaiser, L., and Polosukhin, I. (2017, January 4–9). Attention is all you need. Proceedings of the Advances in Neural Information Processing Systems 30 (NeurIPS 2017), Long Beach, CA, USA.
34. Muformer: A long sequence time-series forecasting model based on modified multi-head attention10.1016/j.knosys.2022.109584 ↗
35. Laplacian eigenmaps for dimensionality reduction and data representation10.1162/089976603321780317 ↗
36. Yao, H., Wu, F., Ke, J., Tang, X., Jia, Y., Lu, S., Gong, P., Ye, J., and Li, Z. (2018, January 2–7). Deep multi-view spatial-temporal network for taxi demand prediction. Proceedings of the AAAI Conference on Artificial Intelligence (AAAI-18), New Orleans, LA, USA. Available online: https://ojs.aaai.org/index.php/AAAI/article/view/11836.10.1609/aaai.v32i1.11836 ↗
37. Lin, H., Zhang, Z., Wu, D., Zhang, Y., Yang, X., and Jia, W. (2020, January 23–27). Preserving dynamic attention for long-term spatial-temporal prediction. Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining (KDD 2020), Virtual Event.10.1145/3394486.3403046 ↗
38. Li, Y., Yu, R., Shahabi, C., and Liu, Y. (May, January 30). Diffusion convolutional recurrent neural network: Data-driven traffic forecasting. Proceedings of the International Conference on Learning Representations (ICLR 2018), Vancouver, BC, Canada.
39. Song, C., Lin, Y., Guo, S., and Wan, H. (2020, January 7–12). Spatial-temporal synchronous graph convolutional networks: A new framework for spatial-temporal network data forecasting. Proceedings of the AAAI Conference on Artificial Intelligence (AAAI-20), New York, NY, USA.10.1609/aaai.v34i01.5438 ↗
40. Li, M., and Zhu, Z. (2021, January 2–9). Spatial-temporal fusion graph neural networks for traffic flow forecasting. Proceedings of the AAAI Conference on Artificial Intelligence (AAAI-21), Virtual Event.
41. Fang, Z., Long, Q., Song, G., and Xie, K. (2021, January 14–18). Spatial-temporal graph ODE networks for traffic flow forecasting. Proceedings of the 27th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining (KDD 2021), Virtual Event (Singapore).10.1145/3447548.3467430 ↗
42. Choi, J., Choi, H., Hwang, J., and Park, N. (March, January 22). Graph neural controlled differential equations for traffic forecasting. Proceedings of the AAAI Conference on Artificial Intelligence (AAAI-22), Virtual Event.
43. Wu, Z., Pan, S., Long, G., Jiang, J., Chang, X., and Zhang, C. (2019, January 10–16). Graph WaveNet for deep spatial-temporal graph modeling. Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence (IJCAI 2019), Macao, China.10.24963/ijcai.2019/264 ↗
44. Zheng, C., Fan, X., Wang, C., and Qi, J. (2020, January 7–12). GMAN: A graph multi-attention network for traffic prediction. Proceedings of the AAAI Conference on Artificial Intelligence (AAAI-20), New York, NY, USA.
45. Xu, M., Dai, W., Liu, C., Gao, X., Lin, W., Qi, G., and Xiong, H. (2020). Spatial-temporal transformer networks for traffic flow forecasting. arXiv, Available online: https://arxiv.org/abs/2001.02908.
46. Adaptive adam-based optimizers using second-order weight decoupling and gradient-aware weight decay for vision transformer