Skip to main content
Log in

STGs: construct spatial and temporal graphs for citywide crowd flow prediction

  • Published:
Applied Intelligence Aims and scope Submit manuscript

Abstract

Crowd flow prediction is one of the most remarkable issues in a wide range of areas, from traffic control to public safety, and aims to forecast the inflow and outflow of crowds in each region of a city. Most existing studies adopt CNN and its variants to discover the spatial patterns of grid maps (each grid represents a region) while ignoring the correlation between distant regions that may share similar temporal patterns. In this paper, we propose a gnn-based prediction method, called STGs, for crowd flow prediction, which jointly constructs spatial and temporal graphs from grid maps and then implements graph neural networks to directly capture the relationship between regions. Additionally, we introduce a gated fusion mechanism to combine spatial and temporal embedding from the corresponding graph, which further improves the performance of our STGs. We conduct numerical experiments to compare STGs with other baseline models using two real-world datasets, BikeNYC and TLC. Experimental results demonstrate the superiority of our STGs model; specifically, our model reduces the mean absolute error (MAE) of crowd flow prediction by approximately 7-8% compared to state-of-the-art baselines.

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.

Institutional subscriptions

Fig. 1
Fig. 2
Fig. 3
Fig. 4

Similar content being viewed by others

References

  1. Zheng Y, Capra L, Wolfson O, Yang H (2014) Urban computing: Concepts, methodologies, and applications. ACM Trans Intell Syst Technol 5(3):38:1–38:55. https://doi.org/10.1145/2629592

    Google Scholar 

  2. Zhang J, Zheng Y, Qi D (2017) Deep spatio-temporal residual networks for citywide crowd flows prediction. In: Singh SP, Markovitch S (eds) Proceedings of the thirty-first AAAI conference on artificial intelligence. AAAI Press, San Francisco, pp 1655–1661

  3. Zhang J, Zheng Y, Qi D, Li R, Yi X (2016) Dnn-based prediction model for spatio-temporal data. In: Ravada S, Ali ME, Newsam SD, Renz M, Trajcevski G (eds) Proceedings of the 24th ACM SIGSPATIAL international conference on advances in geographic information systems, GIS 2016. ACM, Burlingame, pp 92:1–92:4

  4. Zonoozi A, Kim J-j, Li X-L, Cong G (2018) Periodic-crn: A convolutional recurrent model for crowd density prediction with recurring periodic patterns. In: Lang J (ed) Proceedings of the twenty-seventh international joint conference on artificial intelligence, IJCAI 2018. ijcai.org, Stockholm, pp 3732–3738

  5. Lin Z, Feng J, Lu Z, Li Y, Jin D (2019) Deepstn+: Context-aware spatial-temporal neural network for crowd flow prediction in metropolis. In: The thirty-third aaai conference on artificial intelligence, AAAI 2019, The thirty-first innovative applications of artificial intelligence conference, IAAI 2019, The ninth AAAI symposium on educational advances in artificial intelligence, EAAI 2019. AAAI Press, Honolulu, pp 1020–1027

  6. Ahmed M, Cook A (1979) Analysis of freeway traffic time series data by using box-jenkins techniques. Transp Res Rec 773:1–9

    Google Scholar 

  7. Kamarianakis Y, Prastacos P (2003) Forecasting traffic flow conditions in an urban network: Comparison of multivariate and univariate approaches. Transp Res Rec 1857(1):74–84

    Article  Google Scholar 

  8. Van Der Voort M, Dougherty M, Watson S (1996) Combining kohonen maps with arima time series models to forecast traffic flow. Transp Res Part C: Emerging Technol 4(5):307–318

    Article  Google Scholar 

  9. Min W, Wynter L (2011) Real-time road traffic prediction with spatio-temporal correlations. Transp Res Part C: Emerging Technol 19(4):606–616

    Article  Google Scholar 

  10. Wu Z, Pan S, Chen F, Long G, Zhang C, Yu PS (2021) A comprehensive survey on graph neural networks. IEEE Trans Neural Netw Learn Syst 32(1):4–24. https://doi.org/10.1109/TNNLS.2020.2978386

    Article  MathSciNet  Google Scholar 

  11. Kipf TN, Welling M (2017) Semi-supervised classification with graph convolutional networks. In: 5th international conference on learning representations, ICLR 2017. OpenReview.net, Toulon

  12. Defferrard M, Bresson X, Vandergheynst P (2016) Convolutional neural networks on graphs with fast localized spectral filtering. In: Advances in neural information processing systems 29: annual conference on neural information processing systems 2016, Barcelona, pp 3837–3845

  13. Velickovic P, Cucurull G, Casanova A, Romero A, Liò P, Bengio Y (2018) Graph attention networks. In: 6th International conference on learning representations, ICLR 2018, Conference Track Proceedings. OpenReview.net, Vancouver

  14. Wang Y, Zhang D, Liu Yx, Dai B, Lee LH (2019) Enhancing transportation systems via deep learning: a survey. Transp Res Part C: Emerging Technol 99:144 –163. https://doi.org/10.1016/j.trc.2018.12.004

    Article  Google Scholar 

  15. Li Y, Yu R, Shahabi C, Liu Y (2018) Diffusion convolutional recurrent neural network: Data-driven traffic forecasting. In: 6th international conference on learning representations, ICLR 2018, Conference Track Proceedings. OpenReview.net, Vancouver

  16. Zhang J, Shi X, Xie J, Ma H, King I, Yeung D-Y (2018) Gaan: Gated attention networks for learning on large and spatiotemporal graphs. In: Proceedings of the thirty-fourth conference on uncertainty in artificial intelligence, UAI 2018. AUAI Press, Monterey, pp 339–349

  17. Yu B, Yin H, Zhu Z (2018) 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 2018, July 13-19, 2018. ijcai.org, Stockholm, pp 3634–3640

  18. Yao H, Wu F, Ke J, Tang X, Jia Y, Lu S, Gong P, Ye J, Li Z (2018) Deep multi-view spatial-temporal network for taxi demand prediction. In: Proceedings of the AAAI conference on artificial intelligence, vol 32

  19. Guo S, Lin Y, Feng N, Song C, Wan H (2019) Attention based spatial-temporal graph convolutional networks for traffic flow forecasting. In: The thirty-third aaai conference on artificial intelligence, AAAI 2019, The thirty-first innovative applications of artificial intelligence conference, IAAI 2019, The ninth AAAI symposium on educational advances in artificial intelligence, EAAI 2019. AAAI Press, Honolulu, pp 922–929

  20. Wu Z, Pan S, Long G, Jiang J, Zhang C (2019) Graph wavenet for deep spatial-temporal graph modeling. In: Proceedings of the twenty-eighth international joint conference on artificial intelligence, IJCAI 2019. ijcai.org, Macao, pp 1907–1913

  21. Yu B, Li M, Zhang J, Zhu Z (2019) 3d graph convolutional networks with temporal graphs: a spatial information free framework for traffic forecasting

  22. Shi X, Chen Z, Wang H, Yeung D-Y, Wong W-K, Woo W-c (2015) Convolutional LSTM network: A machine learning approach for precipitation nowcasting. In: Advances in neural information processing systems 28: annual conference on neural information processing systems 2015, Montreal, pp 802–810

  23. Jin W, Lin Y, Wu Z, Wan H (2018) Spatio-temporal recurrent convolutional networks for citywide short-term crowd flows prediction. In: Proceedings of the 2nd international conference on compute and data analysis, ICCDA 2018. ACM, DeKalb, pp 28–35

  24. Zonoozi A, Kim J-j, Li X-L, Cong G (2018) Periodic-crn: A convolutional recurrent model for crowd density prediction with recurring periodic patterns. In: Proceedings of the twenty-seventh international joint conference on artificial intelligence, IJCAI 2018. ijcai.org, Stockholm, pp 3732–3738

  25. Serrà J, Arcos JL (2014) An empirical evaluation of similarity measures for time series classification. Knowl Based Syst 67:305–314. https://doi.org/10.1016/j.knosys.2014.04.035

    Article  Google Scholar 

  26. Glorot X, Bengio Y (2010) Understanding the difficulty of training deep feedforward neural networks. In: Proceedings of the thirteenth international conference on artificial intelligence and statistics, AISTATS 2010, JMLR Proceedings, vol 9. JMLR.org, Chia Laguna Resort, pp 249–256

Download references

Acknowledgements

This work was supported by the National Natural Science Foundation of China under Grant 61876017 and 61906014.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Wei Lu.

Ethics declarations

Competing interests

The authors declare that they have no conflict of interest.

Additional information

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Xing, J., Kong, X., Xing, W. et al. STGs: construct spatial and temporal graphs for citywide crowd flow prediction. Appl Intell 52, 12272–12281 (2022). https://doi.org/10.1007/s10489-021-02939-6

Download citation

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10489-021-02939-6

Keywords

Navigation