Skip to main content
Log in

A local global attention based spatiotemporal network for traffic flow forecasting

  • Published:
Cluster Computing Aims and scope Submit manuscript

Abstract

Accurate traffic forecasting is critical to improving the safety, stability, and efficiency of intelligent transportation systems. Although many spatiotemporal analysis methods have been proposed, accurate traffic prediction still faces many challenges, for example, it is difficult for long-term predictions to model the dynamics of traffic data in temporal and spatial to capture the periodicity and spatial heterogeneity of traffic data. Most existing studies relieve this problem by discovering hidden spatiotemporal dependencies with graph neural networks and attention mechanisms. However, the period-related information between spatiotemporal sequences is not sufficiently considered in these models. Therefore, we propose a local global spatiotemporal attention network (LGA) to solve the above challenge. Specifically, we present a local spatial attention module to extract the spatial correlation of hourly, daily, and weekly periodic information. We propose a weight attention mechanism to assign different weights of the periodic feature extracted on local spatial attention. The local periodic temporal features are extracted through the local temporal attention we proposed. And we develop the global spatiotemporal attention module to extract the global spatiotemporal information of the entire time slice, which is more conducive to learning the periodic features of traffic data. The extensive experiments on four real-world datasets demonstrate the effectiveness to our proposed model.The code is publicly available on github\(^1\) (github: https://github.com/lyc2580/LGAmodel.).

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Algorithm 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8

Similar content being viewed by others

Data availability

Enquiries about data availability should be directed to the authors.

Notes

  1. PEMS07, PEMS08, PEMS-BAY, and electricity: \(https://drive.google.com/drive/folders/14EJVODCU48fGK0FkyeVom_9lETh80Yjp\)

References

  1. Kutty, A.A., Wakjira, T.G., Kucukvar, M., Abdella, G.M., Onat, N.C.: Urban resilience and livability performance of European smart cities: A novel machine learning approach. J. Clean. Prod. 378, 134203 (2022)

    Article  Google Scholar 

  2. 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 Proceedings of the 30th ACM international conference on information and knowledge management, 4515–4525 (2021)

  3. Wu, Z., Pan, S., Chen, F., Long, G., Zhang, C., Philip, S.Y.: A comprehensive survey on graph neural networks. IEEE Trans. Neural Netw. Learn. Syst. 32(1), 4–24 (2020)

    Article  MathSciNet  Google Scholar 

  4. Jin, G., Liu, L., Li, F., Huang, J.: Spatio-temporal graph neural point process for traffic congestion event prediction. Proc. AAAI Conf. Artif. Intell. 37(12), 14268–14276 (2023)

    Google Scholar 

  5. Zonoozi, A., Kim, J.-j., Li, X.-L., Cong, G.: Periodic-crn: A convolutional recurrent model for crowd density prediction with recurring periodic patterns. In International Joint Conference on Artificial Intelligence, 3732–3738 (2018)

  6. Yao, H., Tang, X., Wei, H., Zheng, G., Li, Z.: Revisiting spatial-temporal similarity: A deep learning framework for traffic prediction. Proc. AAAI Conf. Artif. Intell. 33(01), 5668–5675 (2019)

    Google Scholar 

  7. Lin, Z., Feng, J., Lu, Z., Li, Y., Jin, D.: Deepstn+: Context-aware spatial-temporal neural network for crowd flow prediction in metropolis. Proc. AAAI Conf. Artif. Intell. 33(01), 1020–1027 (2019)

    Google Scholar 

  8. Guo, S., Lin, Y., Feng, N., Song, C., Wan, H.: Attention based spatial-temporal graph convolutional networks for traffic flow forecasting. Proc. AAAI Conf. Artif. Intell. 33(01), 922–929 (2019)

    Google Scholar 

  9. Zheng, C., Fan, X., Wang, C., Qi, J.: Gman: A graph multi-attention network for traffic prediction. Proc. AAAI Conf. Artif. Intell. 34(01), 1234–1241 (2020)

    Article  Google Scholar 

  10. Liang, Y., Ke, S., Zhang, J., Yi, X., Zheng, Y.: Geoman: Multi-level attention networks for geo-sensory time series prediction. Int. Joint Conf. Artif. Intell. 2018, 3428–3434 (2018)

    Google Scholar 

  11. 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. In Proceedings of the 33rd international conference on neural information processing systems, 5243–5253 (2019)

  12. Shih, S.-Y., Sun, F.-K., Lee, H.-Y.: Temporal pattern attention for multivariate time series forecasting. Mach. Learn. 108(8), 1421–1441 (2019)

    Article  MathSciNet  Google Scholar 

  13. LeCun, Y., Bottou, L., Bengio, Y., Haffner, P.: Gradient-based learning applied to document recognition. Proc. IEEE 86(11), 2278–2324 (1998)

    Article  Google Scholar 

  14. Jin, G., Li, F., Zhang, J., Wang, M., Huang, J.: Automated dilated spatio-temporal synchronous graph modeling for traffic prediction. IEEE Trans. Intell. Transp. Syst. (2022)

  15. Defferrard, M., Bresson, X., Vandergheynst, P.: Convolutional neural networks on graphs with fast localized spectral filtering. In Proceedings of the 30th international conference on neural information processing systems, 3844–3852 (2016)

  16. Welling, M., Kipf, T.N.: Semi-supervised classification with graph convolutional networks. J. Int. Conf. Learn. Representations (ICLR 2017), 1–14 (2016)

  17. Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A.N., Kaiser, Ł, Polosukhin, I.: Attention is all you need. Adv. Neural. Inf. Process. Syst. 30, 1–11 (2017)

    Google Scholar 

  18. Zhang, J., Zheng, Y., Qi, D.: Deep spatio-temporal residual networks for citywide crowd flows prediction. In Proceedings of the thirty-first AAAI conference on artificial intelligence, 1655–1661 (2017)

  19. Yao, H., Wu, F., Ke, J., Tang, X., Jia, Y., Lu, S., Gong, P., Ye, J., Li, Z.: Deep multi-view spatial-temporal network for taxi demand prediction. Proc AAAI Conference Artif. Intell. 32(1), 1–8 (2018)

    Article  Google Scholar 

  20. Wu, Z., Pan, S., Long, G., Jiang, J., Zhang, C.: “Graph wavenet for deep spatial-temporal graph modeling,” in Proceedings of the 28th International Joint Conference on Artificial Intelligence, pp. 1907–1913 (2019)

  21. Wu, Z., Pan, S., Long, G., Jiang, J., Chang, X., Zhang, C.: Connecting the dots: Multivariate time series forecasting with graph neural networks. In Proceedings of the 26th ACM SIGKDD international conference on knowledge discovery and data mining, 753–763 (2020)

  22. Jin, G., Sha, H., Xi, Z., Huang, J.: Urban hotspot forecasting via automated spatio-temporal information fusion. Appl. Soft Comput. 136, 110087 (2023)

    Article  Google Scholar 

  23. Jin, G., Liang, Y., Fang, Y., Shao, Z., Huang, J., Zhang, J., Zheng, Y.: Spatio-temporal graph neural networks for predictive learning in urban computing: A survey. IEEE Trans. Knowl. Data Eng. (2023)

  24. Holt, C.C.: Forecasting seasonals and trends by exponentially weighted moving averages. Int. J. Forecast. 20(1), 5–10 (2004)

    Article  Google Scholar 

  25. Alghamdi, T., Elgazzar, K., Bayoumi, M., Sharaf, T., Shah, S.: Forecasting traffic congestion using arima modeling. In 15th international wireless communications and mobile computing conference (IWCMC), vol. 2019, 1227–1232 (2019). IEEE

  26. Zhang, N., Zhang, Y., Lu, H.: Seasonal autoregressive integrated moving average and support vector machine models: prediction of short-term traffic flow on freeways. Transp. Res. Rec. 2215(1), 85–92 (2011)

    Article  Google Scholar 

  27. Shekhar, S., Williams, B.: Adaptive seasonal time series models for forecasting short-term traffic flow. Transp. Res. Record J. Transp. Res. Board 2024(2024), 116–125 (2007)

    Article  Google Scholar 

  28. Sun, H., Liu, H.X.: Short term traffic forecasting using the local linear regression model. In Center for traffic simulation studies, 1–10, (2002)

  29. Yan, H., Fu, L., Qi, Y., Cheng, L., Ye, Q., Yu, D.-J.: Learning a robust classifier for short-term traffic state prediction. Knowl. Based Syst. 242, 108368 (2022)

    Article  Google Scholar 

  30. AlKhereibi, A.H., Wakjira, T.G., Kucukvar, M., Onat, N.C.: Predictive machine learning algorithms for metro ridership based on urban land use policies in support of transit-oriented development. Sustainability 15(2), 1718 (2023)

    Article  Google Scholar 

  31. Bai, L., Yao, L., Li, C., Wang, X., Wang, C.: Adaptive graph convolutional recurrent network for traffic forecasting. Adv. Neural Inf. Process. Syst. 33, 17804–17815 (2020)

    Google Scholar 

  32. Li, Y., Yu, R., Shahabi, C., Liu, Y.: “Diffusion convolutional recurrent neural network: Data-driven traffic forecasting. In International conference on learning representations, 1–14 (2018)

  33. Li, F., Yan, H., Jin, G., Liu, Y., Li, Y., Jin, D.: Automated spatio-temporal synchronous modeling with multiple graphs for traffic prediction. Proceedings of the 31st ACM international conference on information and knowledge management, 1084–1093 (2022)

  34. Huang, R., Huang, C., Liu, Y., Dai, G., Kong, W.: Lsgcn: Long short-term traffic prediction with graph convolutional networks. In IJCAI, 2355–2361 (2020)

  35. Salamanis, A., Kehagias, D.D., Filelis-Papadopoulos, C.K., Tzovaras, D., Gravvanis, G.A.: Managing spatial graph dependencies in large volumes of traffic data for travel-time prediction. IEEE Trans. Intell. Transp. Syst. 17(6), 1678–1687 (2015)

    Article  Google Scholar 

  36. Chen, W., Chen, L., Xie, Y., Cao, W., Gao, Y., Feng, X.: Multi-range attentive bicomponent graph convolutional network for traffic forecasting. Proc. AAAI Conf. Artifi. Intell. 34(04), 3529–3536 (2020)

    Google Scholar 

  37. Wang, X., Ma, Y., Wang, Y., Jin, W., Wang, X., Tang, J., Jia, C., Yu, J.: Traffic flow prediction via spatial temporal graph neural network. Proc. Web Conf. 2020, 1082–1092 (2020)

    Google Scholar 

  38. Song, C., Lin, Y., Guo, S., Wan, H.: Spatial-temporal synchronous graph convolutional networks: A new framework for spatial-temporal network data forecasting. Proc. AAAI Conf. Artif. Intell. 34(01), 914–921 (2020)

    Google Scholar 

  39. Lai, G., Chang, W.-C., Yang, Y., Liu, H.: Modeling long-and short-term temporal patterns with deep neural networks. In The 41st international ACM SIGIR conference on research and development in information retrieval, 95–104 (2018)

  40. Shao, Z., Zhang, Z., Wang, F., Wei, W., Xu, Y.: Spatial-temporal identity: A simple yet effective baseline for multivariate time series forecasting. In Proceedings of the 31st ACM international conference on information and knowledge management, 4454–4458 (2022)

  41. Yu, B., Yin, H., Zhu, Z.: “Spatio-temporal graph convolutional networks: a deep learning framework for traffic forecasting. In Proceedings of the 27th international joint conference on artificial intelligence, 3634–3640 (2018)

  42. Cao, D., Wang, Y., Duan, J., Zhang, C., Zhu, X., Huang, C., Tong, Y., Xu, B., Bai, J., Tong, J.: Spectral temporal graph neural network for multivariate time-series forecasting. Adv. Neural Inf. Process. Syst. 33, 17766–17778 (2020)

    Google Scholar 

  43. Deng, J., Chen, X., Jiang, R., Song, X., Tsang, I. W.: St-norm: Spatial and temporal normalization for multi-variate time series forecasting. In Proceedings of the 27th ACM SIGKDD conference on knowledge discovery and data mining, 269–278 (2021)

  44. Wakjira, T.G., Rahmzadeh, A., Alam, M.S., Tremblay, R.: Explainable machine learning based efficient prediction tool for lateral cyclic response of post-tensioned base rocking steel bridge piers. Structures 44, 947–964 (2022)

    Article  Google Scholar 

  45. Pan, Z., Liang, Y., Wang, W., Yu, Y., Zheng, Y., Zhang, J.: Urban traffic prediction from spatio-temporal data using deep meta learning/ In Proceedings of the 25th ACM SIGKDD international conference on knowledge discovery & data mining, 1720–1730 (2019)

  46. Huang, X., Ye, Y., Yang, X., Xiong, L.: Multi-view dynamic graph convolution neural network for traffic flow prediction. Expert Syst. Appl. 222, 119779 (2023)

    Article  Google Scholar 

Download references

Funding

This research was supported by the National Natural Science Foundation of China under No.62062033, the National Natural Science Foundation of China under No.62067002 and the Natural Science Foundation of Jiangxi Province under Grant No.20232BAB202018.

Author information

Authors and Affiliations

Authors

Contributions

LY and LJ design the methodology and wrote the main manuscript text. HX and XL provided resources and software. WJ and HZ prepared figures and investigation. All authors reviewed the manuscript.

Corresponding author

Correspondence to Xiaohui Huang.

Ethics declarations

Competing interest

The authors declare no competing interests.

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.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Lan, Y., Ling, J., Huang, X. et al. A local global attention based spatiotemporal network for traffic flow forecasting. Cluster Comput (2024). https://doi.org/10.1007/s10586-024-04405-7

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s10586-024-04405-7

Keywords

Navigation