Multi-Step Passenger Flow Prediction for Urban Metro System Based on Spatial-Temporal Graph Neural Network
Abstract
:1. Introduction
- A novel spatiotemporal graph neural network (STGNN) is proposed for multistep passenger flow prediction in metro stations.
- A spatial modeling module is proposed, which consists of a dynamic global attention network (DAGN) and graph convolution network (GCN). DAGN implicitly captures the dynamic influence of passenger flow variation between global node pairs, and GCN can integrate the structural information of the input graph.
- A temporal modeling module consisting mainly of series decomposition blocks and locality-aware sparse attention blocks (LSA). A series decomposition block is employed to better capture the global characteristics of time series. At the same time, the LSA block can extract multiple local contexts and reduce the computational complexity for long sequence modeling.
- Both simulation and real-world datasets are used in the experiments. For simulation data, the simulation scenario is the real-world 3D architecture model of Chengdu Metro Line 10 Shuangliu International Airport Terminal 1 station. The passenger flow data are acquired based on AnyLogic pedestrian simulation. For large-scale real-world data, the Automatic Fare Collection (AFC) data in Hangzhou, China, are acquired. The experimental results demonstrate that our proposed STGNN outperforms all those ten baselines.
2. Related Works
2.1. Attention-Based Models
2.2. Spatial-Temporal Graph Neural Networks
3. Methodology
3.1. Problem Formulation
3.2. Overview
3.3. Spatial Modeling
3.3.1. Dynamic Global Attention Network
3.3.2. Incorporation of Structural Information
3.4. Temporal Modeling
3.4.1. Temporal Encoder
3.4.2. Temporal Decoder
3.5. Locality-Aware Sparse Attention
3.6. Embedding
3.7. Loss Function
4. Experiments
4.1. Data Preparation
4.1.1. AnyLogic Simulation in Metro Station
4.1.2. Hangzhou Metro System
4.2. Setting
4.3. Baseline Methods
4.4. Performance Evaluation
4.4.1. Comparison with Baseline Methods
4.4.2. Comparison with Ground Truth
4.5. Effect of Different Network Configurations
4.6. Ablation Experiments
4.7. Computation Cost Study
5. Discussion and Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Wei, Y.; Chen, M.C. Forecasting the short-term metro passenger flow with empirical mode decomposition and neural networks. Transp. Res. Part C Emerg. Technol. 2012, 21, 148–162. [Google Scholar] [CrossRef]
- Wu, Y.; Hernández-Lobato, J.M.; Zoubin, G. Dynamic covariance models for multivariate financial time series. In Proceedings of the International Conference on Machine Learning, Atlanta, GA, USA, 16–21 June 2013; pp. 558–566. [Google Scholar]
- Mudelsee, M. Climate Time Series Analysis; Atmospheric and Oceanographic Sciences Library; Springer: Cham, Switzerland, 2010; 397p. [Google Scholar]
- Dai, X.; Fu, R.; Lin, Y.; Li, L.; Wang, F. Y Deeptrend: A deep hierarchical neural network for traffic flow prediction. arXiv 2017, arXiv:1707.03213. [Google Scholar]
- Van Lint, J.W.C.; Van Hinsbergen, C.P.I.J. Short-term traffic and travel time prediction models. Artif. Intell. Appl. Crit. Transp. Issues 2012, 22, 22–41. [Google Scholar]
- Ahmed, M.S.; Cook, A. R Analysis of Freeway Traffic Time-Series Data by Using Box-Jenkins Techniques; Transportation Research Board, National Academies of Sciences, Engineering, and Medicine: Washington, DC, USA, 1979; No. 722. [Google Scholar]
- Milenković, M.; Švadlenka, L.; Melichar, V.; Bojović, N.; Avramović, Z. SARIMA modelling approach for railway passenger flow forecasting. Transport 2018, 33, 1113–1120. [Google Scholar] [CrossRef]
- Chen, E.; Ye, Z.; Wang, C.; Xu, M. Subway passenger flow prediction for special events using smart card data. IEEE Trans. Intell. Transp. Syst. 2019, 21, 1109–1120. [Google Scholar] [CrossRef]
- Ariyo, A.A.; Adewumi, A.O.; Ayo, C.K. Stock price prediction using the ARIMA model. In Proceedings of the 2014 UKSim-AMSS 16th International Conference on Computer Modelling and Simulation, Cambridge, UK, 26–28 March 2014; pp. 106–112. [Google Scholar]
- Williams, B.M.; Hoel, L.A. Modeling and forecasting vehicular traffic flow as a seasonal ARIMA process: Theoretical basis and empirical results. J. Transp. Eng. 2003, 129, 664–672. [Google Scholar] [CrossRef]
- Bengio, Y.; LeCun, Y. Scaling learning algorithms towards AI. Large Scale Kernel Mach. 2007, 34, 1–41. [Google Scholar]
- Ahmed, N.K.; Atiya, A.F.; Gayar, N.E.; El-Shishiny, H. An empirical comparison of machine learning models for time series forecasting. Econom. Rev. 2010, 29, 594–621. [Google Scholar] [CrossRef]
- Martínez, F.; Frías, M.P.; Pérez, M.D.; Rivera, A.J. A methodology for applying k-nearest neighbor to time series forecasting. Artif. Intell. Rev. 2019, 52, 2019–2037. [Google Scholar] [CrossRef]
- Wu, C.H.; Ho, J.M.; Lee, D.T. Travel-time prediction with support vector regression. IEEE Trans. Intell. Transp. Syst. 2004, 5, 276–281. [Google Scholar] [CrossRef]
- Vlahogianni, E.I.; Golias, J.C.; Karlaftis, M.G. Short-term traffic forecasting: Overview of objectives and methods. Transp. Rev. 2004, 24, 533–557. [Google Scholar] [CrossRef]
- LeCun, Y.; Bengio, Y.; Hinton, G. Deep learning. Nature 2015, 521, 436–444. [Google Scholar] [CrossRef]
- Guo, J.; He, H.; He, T.; Lausen, L.; Li, M.; Lin, H.; Shi, X.; Wang, C.; Xie, J.; Sheng Zha, S.; et al. Gluoncv and gluonnlp: Deep learning in computer vision and natural language processing. J. Mach. Learn. Res. 2020, 21, 845–851. [Google Scholar]
- Zheng, W.; Lee, D.H.; Shi, Q. Short-term freeway traffic flow prediction: Bayesian combined neural network approach. J. Transp. Eng. 2006, 132, 114–121. [Google Scholar] [CrossRef]
- Xiao, H.; Sun, H.; Ran, B.; Oh, Y. Fuzzy-neural network traffic prediction framework with wavelet decomposition. Transp. Res. Rec. 2003, 1836, 16–20. [Google Scholar] [CrossRef]
- Wang, L.; Zeng, Y.; Chen, T. Back propagation neural network with adaptive differential evolution algorithm for time series forecasting. Expert Syst. Appl. 2015, 42, 855–863. [Google Scholar] [CrossRef]
- Yu, J.; de Antonio, A.; Villalba-Mora, E. Deep learning (CNN, RNN) applications for smart homes: A systematic review. Computers 2022, 11, 26. [Google Scholar] [CrossRef]
- Lim, B.; Zohren, S. Time-series forecasting with deep learning: A survey. Philos. Trans. R. Soc. A 2021, 379, 20200209. [Google Scholar] [CrossRef] [PubMed]
- Yu, H.; Wu, Z.; Wang, S.; Wang, Y.; Ma, X. Spatiotemporal recurrent convolutional networks for traffic prediction in transportation networks. Sensors 2017, 17, 1501. [Google Scholar] [CrossRef]
- Khalil, S.; Amrit, C.; Koch, T.; Dugundji, E. Forecasting public transport ridership: Management of information systems using CNN and LSTM architectures. Procedia Comput. Sci. 2021, 184, 283–290. [Google Scholar] [CrossRef]
- Zhao, L.; Song, Y.; Zhang, C.; Liu, Y.; Wang, P.; Lin, T.; Deng, M.; Li, H. T-gcn: A temporal graph convolutional network for traffic prediction. IEEE Trans. Intell. Transp. Syst. 2019, 21, 3848–3858. [Google Scholar] [CrossRef]
- Song, H.; Rajan, D.; Thiagarajan, J.; Spanias, A. Attend and diagnose: Clinical time series analysis using attention models. In Proceedings of the AAAI Conference on Artificial Intelligence, New Orleans, LA, USA, 2–7 February 2018; Volume 32. No. 1. [Google Scholar]
- Huang, S.; Wang, D.; Wu, X.; Tang, A. Dsanet: Dual self-attention network for multivariate time series forecasting. In Proceedings of the 28th ACM International Conference on Information and Knowledge Management, Beijing, China, 3–7 November 2019; pp. 2129–2132. [Google Scholar]
- Hao, S.; Lee, D.H.; Zhao, D. Sequence to sequence learning with attention mechanism for short-term passenger flow prediction in large-scale metro system. Transp. Res. Part C Emerg. Technol. 2019, 107, 287–300. [Google Scholar] [CrossRef]
- Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kasier, L.; Polosukhin, I. Attention is all you need. Adv. Neural Inf. Process. Syst. 2017, 30, 5998–6008. [Google Scholar]
- Zhou, H.; Zhang, S.; Peng, J.; Zhang, S.; Li, J.; Xiong, H.; Zhang, W. Informer: Beyond efficient transformer for long sequence time-series forecasting. In Proceedings of the AAAI Conference on Artificial Intelligence, Vancouver, BC, Canada, 2–9 February 2021; Volume 35, No. 12. pp. 11106–11115. [Google Scholar]
- Kitaev, N.; Kaiser, Ł.; Levskaya, A. Reformer: The efficient transformer. In Proceedings of the International Conference on Learning Representations, Virtual, 26 April–1 May 2020. [Google Scholar]
- Wang, J.; Yang, C.; Jiang, X.; Wu, J. WHEN: A Wavelet-DTW hybrid attention network for heterogeneous time series analysis. In Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, Long Beach, CA, USA, 6–10 August 2023; pp. 2361–2373. [Google Scholar]
- Foumani, N.M.; Tan, C.W.; Webb, G.I.; Salehi, M. Improving position encoding of transformers for multivariate time series classification. Data Min. Knowl. Discov. 2024, 38, 22–48. [Google Scholar] [CrossRef]
- Liu, Y.; Hu, T.; Zhang, H.; Wu, H.; Wang, S.; Ma, L.; Long, M. iTransformer: Inverted transformers are effective for time series forecasting. In Proceedings of the Twelfth International Conference on Learning Representations, Vienna, Austria, 7–11 May 2023. [Google Scholar]
- Yin, D.; Jiang, R.; Deng, J.; Li, Y.; Xie, Y.; Wang, Z.; Zhou, Y.; Song, X.; Shang, J.S. MTMGNN: Multi-time multi-graph neural network for metro passenger flow prediction. GeoInformatica 2023, 27, 77–105. [Google Scholar] [CrossRef]
- Lu, Y.; Zheng, C.; Zheng, S.; Ma, J.; Wu, Z.; Wu, F.; Shen, Y. Multi-Spatio-Temporal Convolutional Neural Network for Short-Term Metro Passenger Flow Prediction. Electronics 2023, 13, 181. [Google Scholar] [CrossRef]
- Ou, J.; Sun, J.; Zhu, Y.; Jin, H.; Liu, Y.; Zhang, F.; Huang, J.; Wang, X. STP-TrellisNets+: Spatial-temporal parallel TrellisNets for multi-step metro station passenger flow prediction. IEEE Trans. Knowl. Data Eng. 2022, 35, 7526–7540. [Google Scholar] [CrossRef]
- Geng, X.; Li, Y.; Wang, L.; Zhang, L.; Yang, Q.; Ye, J.; Liu, Y. Spatiotemporal multi-graph convolution network for ride-hailing demand forecasting. In Proceedings of the AAAI Conference on Artificial Intelligence, Honolulu, HI, USA, 27 January–1 February 2019; Volume 33, No. 1. pp. 3656–3663. [Google Scholar]
- Song, C.; Lin, Y.; Guo, S.; Wan, H. Spatial-temporal synchronous graph convolutional networks: A new framework for spatial-temporal network data forecasting. In Proceedings of the AAAI Conference on Artificial Intelligence, New York, NY, USA, 7–12 February 2020; Volume 34, No. 1. pp. 914–921. [Google Scholar]
- Liang, Y.; Ke, S.; Zhang, J.; Yi, X.; Zheng, Y. Geoman: Multi-level attention networks for geo-sensory time series prediction. In Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence, Stockholm, Sweden, 13–19 July 2018; Volume 2018, pp. 3428–3434. [Google Scholar]
- Guo, S.; Lin, Y.; Feng, N.; Song, C.; Wan, H. Attention based spatial-temporal graph convolutional networks for traffic flow forecasting. In Proceedings of the AAAI Conference on Artificial Intelligence, Honolulu, HI, USA, 27 January–1 February 2019; Volume 33, No. 1. pp. 922–929. [Google Scholar]
- Feng, A.; Tassiulas, L. Adaptive Graph Spatial-Temporal Transformer Network for Traffic Forecasting. In Proceedings of the 31st ACM International Conference on Information & Knowledge Management, Atlanta, GA, USA, 17–21 October 2022; pp. 3933–3937. [Google Scholar]
- Liu, Y.; Guo, B.; Meng, J.; Zhang, D.; Yu, Z. Spatio-Temporal Memory Augmented Multi-Level Attention Network for Traffic Prediction. IEEE Trans. Knowl. Data Eng. 2023, 36, 2643–2658. [Google Scholar] [CrossRef]
- Wu, Z.; Jain, P.; Wright, M.; Mirhoseini, A.; Gonzalez, J.E.; Stoica, I. Representing long-range context for graph neural networks with global attention. Adv. Neural Inf. Process. Syst. 2021, 34, 13266–13279. [Google Scholar]
- Topping, J.; Di Giovanni, F.; Chamberlain, B.P.; Dong, X.; Bronstein, M. Understanding over-squashing and bottlenecks on graphs via curvature. In Proceedings of the International Conference on Learning Representations, Virtual, 25–29 April 2022. [Google Scholar]
- He, M.; Wei, Z.; Wen, J.R. Convolutional neural networks on graphs with chebyshev approximation, revisited. Adv. Neural Inf. Process. Syst. 2022, 35, 7264–7276. [Google Scholar]
- Wu, H.; Xu, J.; Wang, J.; Long, M. Autoformer: Decomposition transformers with auto-correlation for long-term series forecasting. Adv. Neural Inf. Process. Syst. 2021, 34, 22419–22430. [Google Scholar]
- 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. Adv. Neural Inf. Process. Syst. 2019, 32, 5243–5253. [Google Scholar]
- Bai, S.; Kolter, J.Z.; Koltun, V. An empirical evaluation of generic convolutional and recurrent networks for sequence modeling. Universal Language Model Fine-tuning for Text Classification. arXiv 2018, arXiv:1803.01271. [Google Scholar]
- Kinga, D.; Adam, J.B. A method for stochastic optimization. In Proceedings of the International Conference on Learning Representations (ICLR), San Diego, CA, USA, 7–9 May 2015; Volume 5, p. 6. [Google Scholar]
- Hochreiter, S.; Schmidhuber, J. Long short-term memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef]
- Wu, H.; Hu, T.; Liu, Y.; Zhou, H.; Wang, J.; Long, M. Timesnet: Temporal 2D-variation modeling for general time series analysis. In Proceedings of the Eleventh International Conference on Learning Representations, Virtual, 25–29 April 2022. [Google Scholar]
- Defferrard, M.; Bresson, X.; Vandergheynst, P. Convolutional neural networks on graphs with fast localized spectral filtering. Adv. Neural Inf. Process. Syst. 2016, 29, 3844–3852. [Google Scholar]
- Choi, J.; Choi, H.; Hwang, J.; Park, N. Graph neural controlled differential equations for traffic forecasting. In Proceedings of the AAAI Conference on Artificial Intelligence, Online, 22 February–1 March 2022; Volume 36, No. 6. pp. 6367–6374. [Google Scholar]
- 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. 2021, 34, 5415–5428. [Google Scholar] [CrossRef]
Datasets | Nodes | Time Span | Daily Range |
---|---|---|---|
Ours | 13 | 1 January–21 January | 6:00–23:00 |
Hangzhou | 81 | 1 January 2019–26 January 2019 | 6:00–23:30 |
Models | Prediction Step = 10 | Prediction Step = 20 | Prediction Step = 30 | Prediction Step = 60 | ||||
---|---|---|---|---|---|---|---|---|
RMSE | MAE | RMSE | MAE | RMSE | MAE | RMSE | MAE | |
LSTM | 6.40 | 3.68 | 6.65 | 3.81 | 7.43 | 4.10 | 9.62 | 5.39 |
Reformer | 6.80 | 3.25 | 7.38 | 3.43 | 8.68 | 3.98 | 9.27 | 4.56 |
Autoformer | 6.45 | 2.85 | 6.64 | 2.98 | 7.55 | 3.58 | 9.60 | 4.77 |
TimesNet | 5.41 | 2.38 | 6.02 | 2.61 | 6.46 | 2.98 | 7.41 | 3.39 |
GCN | 9.33 | 5.04 | 10.11 | 6.02 | 10.59 | 6.18 | 11.17 | 7.55 |
T-GCN | 5.85 | 2.76 | 6.54 | 3.14 | 7.30 | 3.35 | 8.72 | 4.22 |
STG-NCDE | 7.39 | 3.94 | 8.30 | 3.89 | 9.93 | 4.66 | 10.81 | 5.89 |
ASTGCN | 5.14 | 2.19 | 5.81 | 2.61 | 6.92 | 2.69 | 7.71 | 3.42 |
ASTGNN | 4.89 | 2.01 | 5.55 | 2.46 | 6.71 | 2.47 | 7.58 | 3.29 |
STGNN (ours) | 4.58 | 1.91 | 5.07 | 2.23 | 5.67 | 2.39 | 7.17 | 3.08 |
Models | Prediction Step = 10 | Prediction Step = 20 | ||||||
---|---|---|---|---|---|---|---|---|
Inflow | Outflow | Inflow | Outflow | |||||
RMSE | MAE | RMSE | MAE | RMSE | MAE | RMSE | MAE | |
LSTM | 29.13 | 19.15 | 38.93 | 23.74 | 32.92 | 21.29 | 41.42 | 25.17 |
Reformer | 22.47 | 13.27 | 30.83 | 18.01 | 24.43 | 14.01 | 31.29 | 18.47 |
Autoformer | 24.59 | 15.41 | 32.65 | 20.68 | 32.44 | 19.95 | 39.44 | 24.30 |
TimesNet | 23.94 | 14.03 | 32.10 | 17.95 | 25.36 | 14.91 | 33.81 | 18.91 |
GCN | 67.82 | 38.51 | 74.44 | 41.10 | 68.60 | 39.80 | 75.22 | 42.91 |
T-GCN | 27.96 | 17.08 | 35.94 | 22.79 | 30.53 | 18.45 | 38.62 | 24.04 |
STG-NCDE | 24.20 | 13.57 | 31.61 | 18.35 | 30.93 | 16.86 | 42.21 | 23.37 |
ASTGCN | 23.01 | 14.36 | 32.99 | 19.86 | 25.03 | 14.92 | 34.33 | 21.88 |
ASTGNN | 20.61 | 12.30 | 28.63 | 17.12 | 22.36 | 13.44 | 29.54 | 17.86 |
STGNN (ours) | 18.90 | 11.58 | 27.02 | 16.90 | 20.10 | 12.01 | 27.51 | 17.05 |
Models | Prediction Step = 30 | Prediction Step = 60 | ||||||
---|---|---|---|---|---|---|---|---|
Inflow | Outflow | Inflow | Outflow | |||||
RMSE | MAE | RMSE | MAE | RMSE | MAE | RMSE | MAE | |
LSTM | 34.41 | 22.38 | 43.47 | 26.94 | 37.20 | 24.25 | 46.42 | 29.39 |
Reformer | 25.41 | 14.40 | 31.83 | 18.83 | 27.26 | 15.86 | 34.42 | 20.55 |
Autoformer | 38.75 | 22.79 | 41.56 | 25.59 | 54.38 | 29.14 | 57.25 | 32.14 |
TimesNet | 26.47 | 15.18 | 34.95 | 19.34 | 28.62 | 16.73 | 36.33 | 20.66 |
GCN | 69.20 | 40.50 | 76.46 | 43.34 | 73.83 | 44.84 | 80.11 | 46.76 |
T-GCN | 32.96 | 20.08 | 40.79 | 25.99 | 35.33 | 23.45 | 44.32 | 28.34 |
STG-NCDE | 38.95 | 20.45 | 51.39 | 27.40 | 41.81 | 22.03 | 54.53 | 30.10 |
ASTGCN | 30.34 | 17.99 | 36.80 | 22.10 | 32.87 | 19.96 | 39.33 | 23.28 |
ASTGNN | 23.97 | 13.92 | 30.43 | 18.32 | 25.59 | 14.95 | 32.92 | 19.96 |
STGNN (ours) | 21.44 | 12.65 | 27.81 | 17.12 | 23.40 | 13.78 | 28.93 | 18.35 |
Models | Computation Time for Training Epoch (s) | |
---|---|---|
Prediction Step = 30 | Prediction Step = 60 | |
STG-NODE | 119 | 209 |
ASTGCN | 11.49 | 27.81 |
ASTGNN | 18.33 | 33.31 |
STGNN | 8.59 | 13.28 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Chang, Y.; Zong, M.; Dang, Y.; Wang, K. Multi-Step Passenger Flow Prediction for Urban Metro System Based on Spatial-Temporal Graph Neural Network. Appl. Sci. 2024, 14, 8121. https://doi.org/10.3390/app14188121
Chang Y, Zong M, Dang Y, Wang K. Multi-Step Passenger Flow Prediction for Urban Metro System Based on Spatial-Temporal Graph Neural Network. Applied Sciences. 2024; 14(18):8121. https://doi.org/10.3390/app14188121
Chicago/Turabian StyleChang, Yuchen, Mengya Zong, Yutian Dang, and Kaiping Wang. 2024. "Multi-Step Passenger Flow Prediction for Urban Metro System Based on Spatial-Temporal Graph Neural Network" Applied Sciences 14, no. 18: 8121. https://doi.org/10.3390/app14188121
APA StyleChang, Y., Zong, M., Dang, Y., & Wang, K. (2024). Multi-Step Passenger Flow Prediction for Urban Metro System Based on Spatial-Temporal Graph Neural Network. Applied Sciences, 14(18), 8121. https://doi.org/10.3390/app14188121