Dynamic Spatio-Temporal Hypergraph Convolutional Network for Traffic Flow Forecasting
<p>Schematic diagram of two types of intersection structures in a traffic network.</p> "> Figure 2
<p>Graph structure and hypergraph structure.</p> "> Figure 3
<p>The overall framework of the model.</p> "> Figure 4
<p>Hyperedge outlier mechanism.</p> "> Figure 5
<p>PeMSD4 and PeMSD8 datasets sensor distribution maps.</p> "> Figure 6
<p>Performance comparison of different forecasting models across multiple datasets at various time steps.</p> "> Figure 7
<p>Comparison of predictive curves for DSTHGCN with ground truth and Graph WaveNet on PeMSD4 at Nodes #1, #69, #123, and #196.</p> "> Figure 8
<p>Hyperparameter study on PeMSD4 and PeMSD8.</p> ">
Abstract
:1. Introduction
- (1)
- Proposed a new dynamic spatio-temporal hypergraph convolutional network (DSTHGCN) framework for traffic flow prediction, which effectively captures more accurate traffic flow information by combining traffic flow graphs and hypergraphs through collaborative convolution.
- (2)
- Unlike most traffic flow prediction models, this paper proposes a feature extraction module that can extract dynamic features of nodes and edges separately. These features are used to update the hyperedges and graph node information in the hypergraph, thereby revealing more complex underlying relationships in the dynamic traffic system.
- (3)
- Introduced a hyperedge outlier removal mechanism to identify and remove outliers in the hyperedges, thereby optimizing the hypergraph structure and better capturing the higher-order relationships within the data.
2. Related Work
3. Methodology
3.1. Preliminaries
- 1.
- Graph: The traffic network is defined as , where and correspond to the number of nodes (the number of sensors) and the set of edges in the traffic network, respectively. denotes the adjacency matrix of the graph, indicating the proximity between two nodes. The left hand side half of Figure 2 shows a simple graph converted into the adjacency matrix, where the elements of the matrix indicate whether there is an edge between the nodes in the graph. If there is an edge between node i and j, then the element in the i-th row and j-th column of the matrix is 1; otherwise, it is 0. Given the adjacency matrix and historical information over time steps, learning a function that uses historical data from time steps to predict traffic information for the next time steps:
- 2.
- GCN: This is a graph-based convolution that captures the interrelationships between nodes through graph convolution operations, thereby updating node features. We can describe the convolution process as follows:
- 3.
- Hypergraph: The hypergraph is defined as , where and denote the node set and the set of nodes within hyperedges, respectively; is the incidence matrix of and . When is associated with , ; otherwise, it is 0. Then, the degrees of nodes and hyperedges are represented by and , respectively. The diagonal matrix corresponds to hyperedge weights. The right hand side half of Figure 2 shows a hypergraph converted into a matrix. The rows of the matrix represent nodes, and the columns represent edges. If a node is connected to an edge, the corresponding element is 1; otherwise, it is 0. The specific representation is shown as follows:
- 4.
- HGCN: The convolution process of a hypergraph is defined as follows:
3.2. Framework of DSTHGCN
3.2.1. Dynamic Feature Extraction
- (1)
- Extraction of dynamic features of traffic flow graph nodes
- (2)
- Extraction of dynamic features of the graph edges of traffic flow
3.2.2. Dynamic Graph Convolution
3.2.3. Dynamic Hypergraph Convolution
Algorithm 1: Training Algorithm for DSTHGCN. |
Input: Node features of the traffic flow graph ; |
Output: New node features generated by the collaborative convolutions on the traffic flow graph and its dual hypergraph; |
1: The dynamic features of the nodes are obtained through Equation (8); |
2: The dynamic edge features are obtained through Equation (12); |
3: Update by Equation (13); |
4: Update by Equation (14); |
5: Transform the node features of the traffic flow graph into the hyperedge features of the hypergraph; |
6: Update by Equation (13); 7: Update by Equation (16); |
8: Map the hyperedge features from Equation (16) back to the node features of the traffic flow graph to obtain ; |
9: Finally, a concatenation operation is performed to obtain ; |
3.2.4. Hyperedge Outlier Removal Mechanism
3.2.5. Evaluation Metrics
4. Experiments
4.1. Datasets
4.2. Experimental Setups
4.3. Baselines
- (1)
- HA: The historical average method uses the mean traffic flow from the same time point over the past few days or weeks as the predicted value.
- (2)
- ARIMA: Autoregressive integrated moving average model, a classic method for time series forecasting.
- (3)
- FC-LSTM: This model is a combination of fully connected layers and Long Short-Term Memory networks, often used for time series problems.
- (4)
- ASTGCN (r) [12]: This model captures the dynamic spatio-temporal features of traffic flow data using a spatio-temporal attention mechanism while considering the periodicity of the spatio-temporal network.
- (5)
- STGODE [37]: This model utilizes ordinary differential equations on graphs to model the dynamics of spatio-temporal data.
- (6)
- Graph WaveNet [38]: It combines graph convolution with causal convolutional networks to capture the spatio-temporal dependencies in the data.
- (7)
- DSTAGNN [39]: This model employs an improved multi-head attention mechanism to capture the dynamic spatial dependencies between nodes.
4.4. Experimental Results and Analysis
4.5. Ablation Study
4.6. Hyperparameter Sensitivity Analysis
4.7. Computational Time Analysis
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Krizhevsky, A.; Sutskever, I.; Hinton, G.E. ImageNet classification with deep convolutional neural networks. Commun. ACM 2017, 60, 84–90. [Google Scholar] [CrossRef]
- Tian, H.; Su, J.; Kochan, O. Research on Traffic Flow Prediction Based on ISMA-CNN-GRU Model. In Proceedings of the COLINS, Kharkiv, Ukraine, 20–21 April 2023; Volume 1, pp. 40–50. [Google Scholar]
- Cho, K.; van Merriënboer, B.; Gulcehre, C.; Bahdanau, D.; Bougares, F.; Schwenk, H.; Bengio, Y. Learning phrase representations using RNN Encoder-Decoder for statistical machine translation. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), Doha, Qatar, 25–29 October 2014; pp. 1724–1734. [Google Scholar]
- Hochreiter, S.; Schmidhuber, J. Long Short-Term Memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef] [PubMed]
- Yao, Y.; Ye, Z.; Bai, W.; Kochan, O.; Mokhun, S. Time Series Prediction Based on LSTM and Modified Hybrid Breeding Optimization Algorithm. In Proceedings of the 2023 13th International Conference on Advanced Computer Information Technologies (ACIT), Wrocław, Poland, 21–23 September 2023; pp. 584–590. [Google Scholar] [CrossRef]
- Sun, L.; Qin, H.; Przystupa, K.; Majka, M.; Kochan, O. Individualized Short-Term Electric Load Forecasting Using Data-Driven Meta-Heuristic Method Based on LSTM Network. Sensors 2022, 22, 7900. [Google Scholar] [CrossRef] [PubMed]
- 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]
- Zheng, C.; Fan, X.; Pan, S.; Jin, H.; Peng, Z.; Wu, Z.; Wang, C.; Yu, P.S. Spatio-temporal joint graph convolutional networks for traffic forecasting. IEEE Trans. Knowl. Data Eng. 2023, 36, 372–385. [Google Scholar] [CrossRef]
- Jiang, R.; Cai, Z.; Wang, Z.; Yang, C.; Fan, Z.; Chen, Q.; Tsubouchi, K.; Song, X.; Shibasaki, R. DeepCrowd: A deep model for large-scale citywide crowd density and flow prediction. IEEE Trans. Knowl. Data Eng. 2021, 35, 276–290. [Google Scholar] [CrossRef]
- Gu, J.; Zhou, Q.; Yang, J.; Liu, Y.; Zhuang, F.; Zhao, Y.; Xiong, H. Exploiting interpretable patterns for flow prediction in dockless bike sharing systems. IEEE Trans. Knowl. Data Eng. 2020, 34, 640–652. [Google Scholar] [CrossRef]
- Yu, B.; Yin, H.; Zhu, Z. Spatio-Temporal Graph Convolutional Networks: A Deep Learning Framework for Traffic Forecasting. arXiv 2017, arXiv:1709.04875. [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 2019. [Google Scholar]
- Bai, L.; Yao, L.; Li, C.; Wang, X.; Wang, C. Adaptive graph convolutional recurrent network for traffic forecasting. Adv. Neural Inf. Process. Syst. 2020, 33, 17804–17815. [Google Scholar]
- Li, F.; Feng, J.; Yan, H.; Jin, G.; Yang, F.; Sun, F.; Jin, D.; Li, Y. Dynamic graph convolutional recurrent network for traffic forecasting: Benchmark and solution. ACM Trans. Knowl. Discov. Data 2021, 17, 1–21. [Google Scholar]
- Sun, X.; Cheng, H.; Liu, B.; Li, J.; Chen, H.; Xu, G.; Yin, H. Self-supervised hypergraph representation learning for sociological analysis. IEEE Trans. Knowl. Data Eng. 2023, 35, 11860–11871. [Google Scholar] [CrossRef]
- Liu, S.; Chen, H.; Chen, X.Y.; He, J.J. A dual-branch spatio-temporal graph convolutional neural network for traffic flow prediction. Inf. Control. 2022, 1–14. [Google Scholar] [CrossRef]
- Zeng, Y.C.; Shao, M.H.; Sun, L.J.; Lu, C. Traffic prediction and congestion control based on directed graph convolutional neural network. China J. Highw. Transp. 2021, 34, 239–248. [Google Scholar]
- Feng, Y.; You, H.; Zhang, Z.; Ji, R.; Gao, Y. Hypergraph neural networks. In Proceedings of the 33rd AAAI Conference on Artificial Intelligence, Honolulu, HI, USA, 27 January–1 February 2019; pp. 3558–3565. [Google Scholar]
- Pedronette, D.C.G.; Valem, L.P.; Almeida, J.; Torres, R.D.S. Multimedia retrieval through unsupervised hypergraph-based manifold ranking. IEEE Trans. Image Process. 2019, 28, 5824–5838. [Google Scholar] [CrossRef]
- Ta, X.; Liu, Z.; Hu, X.; Yu, L.; Sun, L.; Du, B. Adaptive spatio-temporal graph neural network for traffic forecasting. Knowl.-Based Syst. 2022, 242, 108199. [Google Scholar] [CrossRef]
- 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 & Data Mining, Virtual Event, CA, USA, 6–10 July 2020. [Google Scholar]
- Wei, S.; Yang, Y.; Liu, D.; Deng, K.; Wang, C. Transformer-Based Spatiotemporal Graph Diffusion Convolution Network for Traffic Flow Forecasting. Electronics 2024, 13, 3151. [Google Scholar] [CrossRef]
- Naganand, Y.; Madhav, N.; Prateek, Y.; Vikram, N.; Anand, L.; Partha, T. HyperGCN: A new method of training graph convolutional networks on hypergraphs. In Proceedings of the 33rd International Conference on Neural Information Processing Systems, Vancouver, BC, Canada, 8–14 December 2019; pp. 1511–1522. [Google Scholar]
- Zhang, Y.K.; Wu, Z.H.; Lin, Y.F.; Zhao, Y.J. Spatio-temporal hypergraph convolutional network for traffic flow prediction. J. Comput. Appl. 2021, 41, 3578–3584. [Google Scholar]
- Bai, S.; Zhang, F.; Torr, P.H.S. Hypergraph convolution and hypergraph attention. Pattern Recognit. 2021, 110, 107637. [Google Scholar] [CrossRef]
- Wang, J.; Zhang, Y.; Hu, Y.; Yin, B. Metro flow prediction with hierarchical hypergraph attention networks. IEEE Trans. Artif. Intell. 2021, 5, 3012–3021. [Google Scholar] [CrossRef]
- Gao, Y.; Feng, Y.; Ji, J.R. HGNN+: General hypergraph neural networks. IEEE Trans. Pattern Anal. Mach. Intell. 2023, 45, 3181–3199. [Google Scholar] [CrossRef]
- Chen, H.; Yin, H.; Sun, X.; Chen, T.; Gabrys, B.; Musial, K. Multi-level graph convolutional networks for cross-platform anchor link prediction. In Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, Virtual Event, 6–10 July 2020. [Google Scholar]
- Wang, J.; Zhang, Y.; Wang, L.; Hu, Y.; Piao, X.; Yin, B. Multitask Hypergraph Convolutional Networks: A Heterogeneous Traffic Prediction Framework. IEEE Trans. Intell. Transp. Syst. 2022, 23, 18557–18567. [Google Scholar] [CrossRef]
- Zhao, Z.Z.; Shen, G.J.; Zhou, J.J.; Jin, J.C.; Kong, X.J. Spatial-temporal hypergraph convolutional network for traffic forecasting. PeerJ Comput. Sci. 2023, 9, 341–345. [Google Scholar] [CrossRef] [PubMed]
- Wang, S.; Zhang, Y.; Qi, H.; Zhao, M.; Jiang, Y. Dynamic spatial-temporalhypergraph convolutional network for skeleton-based action recognition. In Proceedings of the 2023 IEEE International Conference on Multimedia and Expo (ICME), Brisbane, Australia, 10–14 July 2023; pp. 2147–2152. [Google Scholar]
- Dong, Z.; Yu, S.; Shen, Y. Multi-scale dynamic hypergraph convolutional network for traffic flow forecasting. J. Shanghai Jiaotong Univ. (Sci.) 2024. [Google Scholar] [CrossRef]
- Zou, G.; Lai, Z.; Wang, T.; Liu, Z.; Li, Y. MT-STNet: A novel multi-task spatio-temporal network for highway traffic flow prediction. IEEE Trans. Intell. Transp. Syst. 2024, 25, 8221–8236. [Google Scholar] [CrossRef]
- Xia, L.; Liang, Y.; Zheng, P.; Huang, X. Residual-hypergraph convolution network: A model-based and data-driven integrated approach for fault diagnosis in complex equipment. IEEE Trans. Instrum. Meas. 2023, 72, 1–11. [Google Scholar] [CrossRef]
- 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; pp. 914–921. [Google Scholar]
- Chen, Y.; Segovia-Dominguez, I.; Gel, Y.R. Z-gcnets: Time zigzags at graph convolutional networks for time series forecasting. In Proceedings of the International Conference on Machine Learning, Online, 18–24 July 2021. [Google Scholar]
- Fang, Z.; Long, Q.; Song, G.; Xie, K. Spatial-temporal graph ODE networks for traffic flow forecasting. arXiv 2021, arXiv:2106.12931. [Google Scholar]
- Wu, Z.; Pan, S.; Long, G.; Jiang, J.; Zhang, C. Graph WaveNet for deep spatial-temporal graph modeling. arXiv 2019, arXiv:1906.00121. [Google Scholar]
- 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 Proceedings of the International Conference on Machine Learning, Baltimore, ML, USA, 17–23 July 2022; pp. 11906–11917. [Google Scholar]
Datasets | #Nodes | Edges | #TimeSteps | Time Interval | Time Range |
---|---|---|---|---|---|
PeMSD4 | 307 | 340 | 16,992 | 5 min | 1/1/2018–2/28/2018 |
PeMSD8 | 170 | 295 | 17,856 | 5 min | 7/1/2016–8/31/2016 |
Models | PeMSD4 | PeMSD8 | ||||
---|---|---|---|---|---|---|
MAE | RMSE | MAPE | MAE | RMSE | MAPE | |
HA | 38.03 | 59.24 | 27.88 | 34.86 | 59.24 | 27.88 |
ARIMA | 33.73 | 48.80 | 24.18 | 31.09 | 44.32 | 22.73 |
FC-LSTM | 26.77 | 40.65 | 18.23 | 23.09 | 35.17 | 14.99 |
ASTGCN(r) | 22.20 | 34.69 | 15.0 | 17.31 | 26.93 | 11.0 |
Graph WaveNet | 25.32 | 39.04 | 17.51 | 19.16 | 30.59 | 12.24 |
STGODE | 20.77 | 32.50 | 14.06 | 16.78 | 25.80 | 11.27 |
DSTAGNN | 19.58 | 31.91 | 13.28 | 15.75 | 25.08 | 10.54 |
DSTHGCN | 18.95 | 30.29 | 12.69 | 14.89 | 23.74 | 9.67 |
Datasets | Models | 15 Min | 30 Min | 60 Min | ||||||
---|---|---|---|---|---|---|---|---|---|---|
MAE | RMSE | MAPE | MAE | RMSE | MAPE | MAE | RMSE | MAPE | ||
PeMSD4 | ASTGCN (r) | 20.00 | 31.59 | 13.0 | 21.96 | 34.3 | 15.0 | 26.04 | 39.63 | 18.0 |
Graph WaveNet | 20.97 | 32.92 | 14.67 | 24.58 | 38.11 | 16.67 | 32.66 | 49.16 | 23.09 | |
STGODE | 18.89 | 30.85 | 13.31 | 20.44 | 32.62 | 14.04 | 23.63 | 35.42 | 15.32 | |
DSTAGNN | 18.63 | 30.08 | 12.64 | 19.55 | 31.89 | 13.21 | 21.34 | 34.75 | 14.41 | |
DSTHGCN (ours) | 18.12 | 29.11 | 12.12 | 19.05 | 30.53 | 12.68 | 20.63 | 32.72 | 13.69 | |
PeMSD8 | ASTGCN (r) | 15.86 | 24.69 | 10.0 | 17.17 | 26.75 | 11.0 | 20.15 | 30.84 | 12.0 |
Graph WaveNet | 15.87 | 25.34 | 9.98 | 18.67 | 30.10 | 11.73 | 24.80 | 39.09 | 16.21 | |
STGODE | 15.75 | 23.94 | 10.24 | 16.78 | 25.87 | 11.19 | 18.4 | 28.64 | 12.64 | |
DSTAGNN | 14.8 | 23.73 | 9.77 | 15.55 | 24.98 | 10.46 | 17.75 | 27.38 | 11.61 | |
DSTHGCN (ours) | 14.07 | 22.09 | 9.04 | 15.02 | 23.87 | 9.63 | 16.70 | 26.42 | 10.69 |
Models | PeMSD4 | PeMSD8 | ||||
---|---|---|---|---|---|---|
MAE | RMSE | MAPE | MAE | RMSE | MAPE | |
DSTHGCN-1 | 19.26 | 30.70 | 13.28 | 15.40 | 24.26 | 10.53 |
DSTHGCN-2 | 19.08 | 30.60 | 13.23 | 15.26 | 24.16 | 10.45 |
DSTHGCN | 18.95 | 30.29 | 12.69 | 14.89 | 23.74 | 9.67 |
Datasets | Computation Time (Training (s/epoch)/Inference (s)) | ||||
---|---|---|---|---|---|
ASTGCN | Graph WaveNet | STGODE | DSTAGNN | DSTHGCN | |
PeMSD4 | 84.395/9.455 | 80.31/7.52 | 32.04/6.01 | 45.58/4.26 | 37.66/7.44 |
PeMSD8 | 45.58/4.26 | 24.61/1.67 | 27.69/5.13 | 28.51/3.19 | 21.58/2.43 |
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
Ye, Z.; Wang, H.; Przystupa, K.; Majewski, J.; Hots, N.; Su, J. Dynamic Spatio-Temporal Hypergraph Convolutional Network for Traffic Flow Forecasting. Electronics 2024, 13, 4435. https://doi.org/10.3390/electronics13224435
Ye Z, Wang H, Przystupa K, Majewski J, Hots N, Su J. Dynamic Spatio-Temporal Hypergraph Convolutional Network for Traffic Flow Forecasting. Electronics. 2024; 13(22):4435. https://doi.org/10.3390/electronics13224435
Chicago/Turabian StyleYe, Zhiwei, Hairu Wang, Krzysztof Przystupa, Jacek Majewski, Nataliya Hots, and Jun Su. 2024. "Dynamic Spatio-Temporal Hypergraph Convolutional Network for Traffic Flow Forecasting" Electronics 13, no. 22: 4435. https://doi.org/10.3390/electronics13224435
APA StyleYe, Z., Wang, H., Przystupa, K., Majewski, J., Hots, N., & Su, J. (2024). Dynamic Spatio-Temporal Hypergraph Convolutional Network for Traffic Flow Forecasting. Electronics, 13(22), 4435. https://doi.org/10.3390/electronics13224435