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.).
Similar content being viewed by others
Data availability
Enquiries about data availability should be directed to the authors.
Notes
PEMS07, PEMS08, PEMS-BAY, and electricity: \(https://drive.google.com/drive/folders/14EJVODCU48fGK0FkyeVom_9lETh80Yjp\)
References
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
Shih, S.-Y., Sun, F.-K., Lee, H.-Y.: Temporal pattern attention for multivariate time series forecasting. Mach. Learn. 108(8), 1421–1441 (2019)
LeCun, Y., Bottou, L., Bengio, Y., Haffner, P.: Gradient-based learning applied to document recognition. Proc. IEEE 86(11), 2278–2324 (1998)
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)
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)
Welling, M., Kipf, T.N.: Semi-supervised classification with graph convolutional networks. J. Int. Conf. Learn. Representations (ICLR 2017), 1–14 (2016)
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)
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)
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)
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)
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)
Jin, G., Sha, H., Xi, Z., Huang, J.: Urban hotspot forecasting via automated spatio-temporal information fusion. Appl. Soft Comput. 136, 110087 (2023)
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)
Holt, C.C.: Forecasting seasonals and trends by exponentially weighted moving averages. Int. J. Forecast. 20(1), 5–10 (2004)
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
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)
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)
Sun, H., Liu, H.X.: Short term traffic forecasting using the local linear regression model. In Center for traffic simulation studies, 1–10, (2002)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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
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
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.
About this article
Cite this article
Lan, Y., Ling, J., Huang, X. et al. A local global attention based spatiotemporal network for traffic flow forecasting. Cluster Comput 27, 8459–8475 (2024). https://doi.org/10.1007/s10586-024-04405-7
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10586-024-04405-7