Abstract
Traffic forecasting is an enduring research topic in the design of intelligent transportation systems and spatial-temporal data mining. Accurate prediction can help facilitate urban resource optimization and improve road efficiency. However, the complex spatial-temporal dependencies and dynamic urban conditions make it extremely challenging. Although many spatial-temporal modeling approaches have been proposed recently, they still suffer from the following three problems: (1) Inadequate modeling of temporal correlations; (2) Ignoring the fundamental fact that the location dependence of road networks changes dynamically over time; (3) Difficulty in extracting deeper spatial-temporal features layer by layer. In this paper, we propose a novel Dynamic Spatial-Temporal Attention-enhanced Network called DSTAN for traffic prediction. In DSTAN, we combine gated temporal units with trend-aware multi-head temporal attention to jointly capture local and long-range temporal dependencies. We also employ learnable node embeddings to extract heterogeneous information and integrate this with the spatial attention module to learn dynamic spatial correlations without any expert knowledge. Structurally, we stack multiple spatial-temporal blocks to improve the model’s capability to identify complex patterns. Extensive experiments have been conducted on four widely used datasets, demonstrating that our method surpasses all baseline methods while exhibiting strong interpretability.









Similar content being viewed by others
Explore related subjects
Discover the latest articles and news from researchers in related subjects, suggested using machine learning.Availability of Data and Materials
The traffic speed datasets are provided by the open source work DCRNN (https://github.com/liyaguang/DCRNN).
References
Yin, X., Wu, G., Wei, J., Shen, Y., Qi, H., Yin, B.: Deep learning on traffic prediction: Methods, analysis, and future directions. IEEE Trans. Intell. Transp. Syst. 23(6), 4927–4943 (2022)
Guo, S., Lin, Y., Wan, H., Li, X., Cong, G.: Learning dynamics and heterogeneity of spatial-temporal graph data for traffic forecasting. IEEE Trans. Knowl. Data Eng., 5415–5428 (2021)
Tedjopurnomo, D.A., Bao, Z., Zheng, B., Choudhury, F.M., Qin, A.K.: A survey on modern deep neural network for traffic prediction: Trends, methods and challenges. IEEE Trans. Knowl. Data. Eng., 1544–1561 (2020)
Li, H., Zhao, Y., Mao, Z., Qin, Y., Xiao, Z., Feng, J., Gu, Y., Ju, W., Luo, X., Zhang, M.: A survey on graph neural networks in intelligent transportation systems. CoRR. (2024) arXiv:2401.00713
Jiang, R., Yin, D., Wang, Z., Wang, Y., Deng, J., Liu, H., Cai, Z., Deng, J., Song, X., Shibasaki, R.: Dl-traff: Survey and benchmark of deep learning models for urban traffic prediction. In: CIKM, pp. 4515–4525 (2021)
Ye, J., Zhao, J., Ye, K., Xu, C.: How to build a graph-based deep learning architecture in traffic domain: A survey. IEEE Trans. Intell. Transp. Syst. 23(5), 3904–3924 (2022)
Luo, X., Zhu, C., Zhang, D., Li, Q.: Stg4traffic: A survey and benchmark of spatial-temporal graph neural networks for traffic prediction. CoRR. (2023) arXiv:2307.00495
Li, F., Feng, J., Yan, H., Jin, G., Yang, F., Sun, F., Jin, D., Li, Y.: Dynamic graph convolutional recurrent network for traffic prediction: Benchmark and solution. ACM Trans. Knowl. Disc. Data., 1–21 (2023)
Yu, B., Yin, H., Zhu, Z.: Spatio-temporal graph convolutional networks: A deep learning framework for traffic forecasting. In: Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence, IJCAI, pp. 3634–3640 (2018)
Wu, Z., Pan, S., Long, G., Jiang, J., Zhang, C.: Graph wavenet for deep spatial-temporal graph modeling. In: IJCAI, pp. 1907–1913 (2019)
Wu, Z., Pan, S., Long, G., Jiang, J., Chang, X., Zhang, C.: Connecting the dots: Multivariate time series forecasting with graph neural networks. In: SIGKDD, pp. 753–763 (2020)
Li, Y., Yu, R., Shahabi, C., Liu, Y.: Diffusion convolutional recurrent neural network: Data-driven traffic forecasting. In: 6th International Conference on Learning Representations, ICLR (2018)
Bai, L., Yao, L., Li, C., Wang, X., Wang, C.: Adaptive graph convolutional recurrent network for traffic forecasting. In: NeurIPS, pp. 17804–17815 (2020)
Weng, W., Fan, J., Wu, H., Hu, Y., Tian, H., Zhu, F., Wu, J.: A decomposition dynamic graph convolutional recurrent network for traffic forecasting. Pattern Recogn. 142, 109670 (2023)
Xu, M., Dai, W., Liu, C., Gao, X., Lin, W., Qi, G.-J., Xiong, H.: Spatial-temporal transformer networks for traffic flow forecasting. (2020) arXiv:2001.02908.
Lan, S., Ma, Y., Huang, W., Wang, W., Yang, H., Li, P.: DSTAGNN: dynamic spatial-temporal aware graph neural network for traffic flow forecasting. In: International Conference on Machine Learning, ICML 2022. Proceed. Mach. Learn. Res., vol. 162, pp. 11906–11917 (2022)
Cirstea, R., Yang, B., Guo, C., Kieu, T., Pan, S.: Towards spatio- temporal aware traffic time series forecasting. In: 38th IEEE International Conference on Data Engineering, ICDE, pp. 2900–2913 (2022)
Shao, Z., Zhang, Z., Wang, F., Wei, W., Xu, Y.: Spatial-temporal identity: A simple yet effective baseline for multivariate time series forecasting. In: CIKM, pp. 4454–4458 (2022)
Wang, Z., Nie, Y., Sun, P., Nguyen, N.H., Mulvey, J.M., Poor, H.V.: ST-MLP: A cascaded spatio-temporal linear framework with channel-independence strategy for traffic forecasting. CoRR. (2023) arXiv:2308.07496
Kumar, S.V., Vanajakshi, L.: Short-term traffic flow prediction using seasonal arima model with limited input data. European Trans. Res. Rev., 1–9 (2015)
Wu, C., Ho, J., Lee, D.T.: Travel-time prediction with support vector regression. IEEE Trans. Intell. Transp. Syst. 5(4), 276–281 (2004)
Lartey, B., Homaifar, A., Girma, A., Karimoddini, A., Opoku, D.: Xgboost: a tree-based approach for traffic volume prediction. In: 2021 IEEE International Conference on Systems, Man, and Cybernetics, pp. 1280–1286 (2021)
Bai, S., Kolter, J.Z., Koltun, V.: An empirical evaluation of generic convolutional and recurrent networks for sequence modeling. CoRR. (2018)
Fu, R., Zhang, Z., Li, L.: Using lstm and gru neural network methods for traffic flow prediction. In: 2016 31st Youth Academic Annual Conference of Chinese Association of Automation (YAC), pp. 324–328 (2016)
Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A.N., Kaiser, Ł., Polosukhin, I.: Attention is all you need. NeurIPS. (2017)
Kipf, T.N., Welling, M.: Semi-supervised classification with graph convolutional networks. In: ICLR (2017)
Wu, Z., Pan, S., Chen, F., Long, G., Zhang, C., Yu, P.S.: A comprehensive survey on graph neural networks. IEEE Trans. Neural Netw. Learn. Syst., 4–24 (2021)
Jiang, W., Luo, J.: Graph neural network for traffic forecasting: A survey. Exp. Syst. Appl., 117921 (2022)
Fang, Z., Long, Q., Song, G., Xie, K.: Spatial-temporal graph ODE networks for traffic flow forecasting. In: The 27th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pp. 364–373 (2021)
Choi, J., Choi, H., Hwang, J., Park, N.: Graph neural controlled differential equations for traffic forecasting. In: Thirty-Sixth AAAI Conference on Artificial Intelligence, AAAI, pp. 6367–6374 (2022)
Jiang, J., Han, C., Zhao, W.X., Wang, J.: Pdformer: Propagation delay-aware dynamic long-range transformer for traffic flow prediction. In: AAAI, pp. 4365–4373 (2023)
Radford, A., Wu, J., Child, R., Luan, D., Amodei, D., Sutskever, I., et al.: Language models are unsupervised multitask learners. OpenAI blog. 1(8), 9 (2019)
Lin, K., Wang, L., Liu, Z.: End-to-end human pose and mesh reconstruction with transformers. In: CVPR, pp. 1954–1963 (2021)
Huang, S., Wang, D., Wu, X., Tang, A.: Dsanet: Dual self-attention network for multivariate time series forecasting. In: Zhu, W., Tao, D., Cheng, X., Cui, P., Rundensteiner, E.A., Carmel, D., He, Q., Yu, J.X. (eds.) CIKM, pp. 2129–2132 (2019)
Liu, H., Dong, Z., Jiang, R., Deng, J., Deng, J., Chen, Q., Song, X.: Staeformer: Spatio-temporal adaptive embedding makes vanilla transformer SOTA for traffic forecasting. CoRR. (2023) arXiv:2308.10425
Wen, Q., Zhou, T., Zhang, C., Chen, W., Ma, Z., Yan, J., Sun, L.: Transformers in time series: A survey. In: Proceedings of the Thirty-Second International Joint Conference on Artificial Intelligence, IJCAI 2023, pp. 6778–6786
Yu, W., Zhu, C., Li, Z., Hu, Z., Wang, Q., Ji, H., Jiang, M.: A survey of knowledge-enhanced text generation. ACM Comput. Surv. 54(11s), 227–122738 (2022)
Chorowski, J., Bahdanau, D., Serdyuk, D., Cho, K., Bengio, Y.: Attention-based models for speech recognition. In: NeurIPS, pp. 577–585 (2015)
Lin, H., Bai, R., Jia, W., Yang, X., You, Y.: Preserving dynamic attention for long-term spatial-temporal prediction. In: The 26th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pp. 36–46 (2020)
Ye, X., Fang, S., Sun, F., Zhang, C., Xiang, S.: Meta graph transformer: A novel framework for spatial-temporal traffic prediction. Neurocomput 491, 544–563 (2022)
Oord, A.v.d., Dieleman, S., Zen, H., Simonyan, K., Vinyals, O., Graves, A., Kalchbrenner, N., Senior, A., Kavukcuoglu, K.: Wavenet: A generative model for raw audio. (2016) arXiv:1609.03499.
Dauphin, Y.N., Fan, A., Auli, M., Grangier, D.: Language modeling with gated convolutional networks. In: International Conference on Machine Learning, pp. 933–941 (2017)
Li, S., Jin, X., Xuan, Y., Zhou, X., Chen, W., Wang, Y.-X., Yan, X.: Enhancing the locality and breaking the memory bottleneck of transformer on time series forecasting. NeurIPS. (2019)
Shao, W., Jin, Z., Wang, S., Kang, Y., Xiao, X., Menouar, H., Zhang, Z., Zhang, J., Salim, F.: Long-term spatio-temporal forecasting via dynamic multiple-graph attention. In: IJCAI (2022)
Zheng, C., Fan, X., Wang, C., Qi, J.: Gman: A graph multi-attention network for traffic prediction. In: AAAI, pp. 1234–1241 (2020)
Chen, C., Petty, K., Skabardonis, A., Varaiya, P., Jia, Z.: Freeway performance measurement system: mining loop detector data. Transport. Res. Record. 1748(1), 96–102 (2001)
Jin, D., Shi, J., Wang, R., Li, Y., Huang, Y., Yang, Y.: Trafformer: Unify time and space in traffic prediction. In: Thirty-Seventh AAAI Conference on Artificial Intelligence, AAAI, pp. 8114–8122 (2023)
Shin, Y., Yoon, Y.: PGCN: progressive graph convolutional networks for spatial-temporal traffic forecasting. IEEE Trans. Intell. Transp. Syst. 25(7), 7633–7644 (2024)
Funding
Chunjiang Zhu is supported by UNCG Start-up Funds and Faculty First Award. Detian Zhang is partially supported by the Collaborative Innovation Center of Novel Software Technology and Industrialization, the Priority Academic Program Development of Jiangsu Higher Education Institutions.
Author information
Authors and Affiliations
Contributions
Xunlian Luo, Chunjiang Zhu, and Detian Zhang conceived of the presented idea. Xunlian Luo and Chunjiang Zhu wrote the main manuscript text. Xunlian Luo carried out the experiment. Xunlian Luo, Chunjiang Zhu, Detian Zhang and Qing Li reviewed the manuscript. Detian Zhang supervised the project.
Corresponding author
Ethics declarations
Competing Interests
The authors have no competing interests to declare that are relevant to the content of this paper.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Luo, X., Zhu, C., Zhang, D. et al. DSTAN: attention-enhanced dynamic spatial-temporal network for traffic forecasting. World Wide Web 28, 15 (2025). https://doi.org/10.1007/s11280-025-01328-0
Received:
Revised:
Accepted:
Published:
DOI: https://doi.org/10.1007/s11280-025-01328-0