Dynamic Graph Construction and Continuous Spatiotemporal Evolution for Traffic Forecasting
Abstract
1. Introduction
- 1.
- A dynamic prediction model based on continuous ordinary differential equations is proposed to effectively alleviate the over-smoothing problem in discrete graph propagation and improve the continuity and expressive ability of traffic dependency modeling.
- 2.
- An adaptive dynamic graph construction strategy is designed to replace traditional predefined static adjacency structures, so as to more effectively capture latent and time-varying correlations among road nodes.
- 3.
- A local correlation-aware module and a spatiotemporal fusion prediction module are developed to jointly model local dependencies between non-adjacent nodes and global spatiotemporal interactions, thereby improving the overall prediction accuracy of the model.
- 4.
- Extensive experiments on five real-world traffic benchmark datasets show that the proposed DPMCODE outperforms existing comparison methods in overall performance and demonstrates strong effectiveness and competitiveness.
2. Related Work
2.1. Static Graph-Based Traffic Forecasting Methods
2.2. Dynamic Graph-Based Traffic Forecasting Methods
3. Problem Formulation
4. Model
4.1. Local Correlation-Aware Dynamic Relation Module
4.2. Coupled Continuous Spatiotemporal Evolution Module
4.3. Spatiotemporal Fusion Prediction Module
4.4. Loss Function
5. Experiments
5.1. Dataset
5.2. Experimental Setup
5.3. Baseline
5.4. Model Performance Experiment
5.5. Ablation Experiment
5.6. Hyperparameter Sensitivity Experiments
5.7. Visual Experiment
6. Limitations and Future Work
7. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Yu, H.; Jiang, C.; Fang, Q.; Wei, T.; Xu, L. Deep learning driven spatiotemporal prediction of global carbon emissions from container shipping. Transp. Res. Part D Transp. Environ. 2026, 151, 105169. [Google Scholar] [CrossRef]
- Liu, Z.; Zou, G.; Wang, T.; Tu, M.; Wang, H.; Li, Y. Learning and Predicting Traffic Conflicts in Mixed Traffic: A Spatiotemporal Graph Neural Network with Manifold Similarity Learning. Expert Syst. Appl. 2026, 309, 131183. [Google Scholar] [CrossRef]
- Ji, J.; Wang, J.; Mou, Y.; Long, C.; Wu, J. How to Break It Down for Building It Up? Theory Guided Graph Decomposition Learning for Spatiotemporal Traffic Prediction. IEEE Trans. Pattern Anal. Mach. Intell. 2026, 48, 5442–5459. [Google Scholar] [CrossRef] [PubMed]
- Zhang, Q.; Shang, Q.; Zhou, Q.; Yang, M.; Xu, B.; Yang, Z. DGSSformer: Dynamically Global Aware Spatiotemporal Synchronous Transformer for Traffic Prediction. Expert Syst. Appl. 2026, 307, 131063. [Google Scholar] [CrossRef]
- Yang, S.; Wu, Q.; Li, M. Decoupled Multi Spatio Temporal Fusion Graph Convolutional Recurrent Network for Traffic Prediction. Eng. Appl. Artif. Intell. 2026, 163, 112956. [Google Scholar] [CrossRef]
- Liu, P.; Zhu, Y.; Yang, Y.; Tang, J.; Jiang, X.; Wang, J. MSF GODE: Multi scale Frequency Domain Learning in Graph Neural ODEs for Accurate Traffic Flow Forecasting. Neurocomputing 2025, 658, 131566. [Google Scholar] [CrossRef]
- Luo, Q.; He, S.; Han, X.; Wang, Y.; Li, H. LSTTN: A Long Short Term Transformer Based Spatiotemporal Neural Network for Traffic Flow Forecasting. Knowl.-Based Syst. 2024, 293, 111637. [Google Scholar] [CrossRef]
- Méndez, M.; Merayo, M.G.; Núñez, M. Long Term Traffic Flow Forecasting Using a Hybrid CNN BiLSTM Model. Eng. Appl. Artif. Intell. 2023, 121, 106041. [Google Scholar] [CrossRef]
- Xu, Y.; Han, L.; Zhu, T.; Sun, L.; Du, B.; Lv, W. Generic Dynamic Graph Convolutional Network for Traffic Flow Forecasting. Inf. Fusion 2023, 100, 101946. [Google Scholar] [CrossRef]
- Huo, G.; Zhang, Y.; Wang, B.; Gao, J.; Hu, Y.; Yin, B. Hierarchical Spatio Temporal Graph Convolutional Networks and Transformer Network for Traffic Flow Forecasting. IEEE Trans. Intell. Transp. Syst. 2023, 24, 3855–3867. [Google Scholar] [CrossRef]
- Zhao, W.; Yuan, G.; Zhang, Y.; Liu, X.; Liu, S.; Zhang, L. An Interpretable and Efficient Multi Scale Spatio Temporal Neural Network for Traffic Flow Forecasting. Expert Syst. Appl. 2026, 296, 128961. [Google Scholar] [CrossRef]
- Liu, P.; Zhu, Y.; Yang, Y.; Wang, C.; Jie, J. A Unified Diffusion Framework for Traffic Imputation and Prediction with Physical Priors. IEEE Trans. Mob. Comput. 2025, 25, 341–357. [Google Scholar] [CrossRef]
- Chen, H.; Grant Muller, S. Use of Sequential Learning for Short Term Traffic Flow Forecasting. Transp. Res. Part C Emerg. Technol. 2001, 9, 319–336. [Google Scholar] [CrossRef]
- Hung, R.J. Graph Neural Networks for City Scale Electric Vehicle Charging Demand and Road Network Flow Forecasting: Empirical Ablations on Graph Structure and Exogenous Features. Electronics 2026, 15, 859. [Google Scholar] [CrossRef]
- Freeman, R.; Bagui, S.S.; Bagui, S.C.; Mink, D.; Cameron, S.; Carvalho, G.C.S.D. A Hybrid Time Series Forecasting Model Combining ARIMA and Decision Trees to Detect Attacks in MITRE ATT&CK Labeled Zeek Log Data. Electronics 2026, 15, 871. [Google Scholar] [CrossRef]
- Li, H.; Liu, W.; Chen, H. Multi Scale Graph Decoupling Spatial Temporal Network for Traffic Flow Forecasting in Complex Urban Environments. Electronics 2026, 15, 495. [Google Scholar] [CrossRef]
- Pang, J.; Wu, M.; Xie, B.; Bi, Y.; Luo, Z. Dynamic Graph Information Bottleneck for Traffic Prediction. Electronics 2026, 15, 623. [Google Scholar] [CrossRef]
- Wei, C.; Chen, C.; Wu, X.; Pan, D.; Yu, Q.; Zheng, X.; Luo, Y. Attention Dynamic Graph Convolutional Network for Traffic Flow Prediction. Eng. Appl. Artif. Intell. 2026, 163, 112642. [Google Scholar] [CrossRef]
- Li, X.; Bao, Y. Adaptive Gated Meta Graph Retention Network: A Model for Urban Traffic Flow Prediction. Expert Syst. Appl. 2026, 298, 129703. [Google Scholar] [CrossRef]
- Chen, Y.; Xia, D.; Liu, Y.; Zhang, F.; Zhang, W.; Hu, Y.; Li, Y.; Li, H. Mamba CorRL: Mamba Correlation Graph Convolutional Networks with Reinforcement Learning for Traffic Flow Prediction. Eng. Appl. Artif. Intell. 2026, 165, 113369. [Google Scholar] [CrossRef]
- Lv, H.; Chen, X.; Xiu, W. TSAformer: A Traffic Flow Prediction Model Based on Cross Dimensional Dependency Capture. Electronics 2026, 15, 231. [Google Scholar] [CrossRef]
- Gao, M.; Yu, H.; Jiao, P. MLGO: Multi Layer Graph Neural ODEs for Traffic Forecasting. Neural Netw. 2026, 198, 108540. [Google Scholar] [CrossRef]
- Shi, Y.; Zhou, W. MP Transformer: A Hybrid Model Integrating Multi Period ARIMA and Dynamically Gated Attention for Time Series Forecasting. Inf. Technol. Control 2026, 55, 243–256. [Google Scholar] [CrossRef]
- Liu, C.; Kou, Y.; Wang, S.; Xie, Z.; Su, Y. Research on Traffic Flow Prediction of Progressive Graph Convolutional Networks Based on Spatio Temporal Self Attention Mechanism. Sci. Rep. 2026, 16, 14112. [Google Scholar] [CrossRef] [PubMed]
- Tang, J.; Zhu, R.; Wu, F.; He, X.; Huang, J.; Zhou, X.; Sun, Y. Deep Spatio Temporal Dependent Convolutional LSTM Network for Traffic Flow Prediction. Sci. Rep. 2025, 15, 11743. [Google Scholar] [CrossRef]
- Ji, J.; Dong, H. Spatio Temporal Graph Convolutional Networks for Traffic Prediction Considering Multiple Spatio Temporal Information. In Proceedings of the 2024 20th International Conference on Mobility, Sensing and Networking (MSN), Harbin, China, 20–22 December 2024; IEEE: New York, NY, USA, 2024; pp. 730–737. [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; AAAI: Washington, DC, USA, 2020; Volume 34, pp. 914–921. [Google Scholar]
- Zhong, L.; Wang, B.; Tian, Z.; Liu, W.; She, W. WaveGFormer: A Wavelet Enhanced Graph Transformer for Spatio Temporal Traffic Flow Forecasting. Inf. Sci. 2026, 740, 123187. [Google Scholar] [CrossRef]
- Li, M.; Zhu, Z. Spatial Temporal Fusion Graph Neural Networks for Traffic Flow Forecasting. In Proceedings of the AAAI Conference on Artificial Intelligence, Virtual, 2–9 February 2021; AAAI: Washington, DC, USA, 2021; Volume 35, pp. 4189–4196. [Google Scholar]
- Hosseini, S.M.; Rahmatinia, S.M.; Hosseini Seno, S.A. Integrated Spatio Temporal Modeling with Hybrid Graph Convolutions and the Graph Fourier Neural Operator for Traffic Prediction. Sci. Rep. 2026, 16, 12945. [Google Scholar] [CrossRef] [PubMed]
- Pandey, S.; Sharma, S.; Kumar, R.; Moreira, J.M.; Chandra, J. STARK: Enhancing Traffic Prediction Through Spatiotemporal Adaptive Refinement With Knowledge Distillation. IEEE Trans. Comput. Soc. Syst. 2026, 1–13. [Google Scholar] [CrossRef]
- Zhang, H.; Qi, F.; Zhang, Y.; Qin, Y.; Li, Y. A Traffic Flow Forecasting Model Based on Dynamic Graph Learning and Temporally Adaptive Attention. Saf. Sci. 2026, 195, 107063. [Google Scholar] [CrossRef]
- Li, Y.; Yu, R.; Shahabi, C.; Liu, Y. Diffusion Convolutional Recurrent Neural Network: Data Driven Traffic Forecasting. In Proceedings of the International Conference on Learning Representations, Vancouver, BC, Canada, 30 April–3 May 2018. [Google Scholar]
- Weng, W.; Fan, J.; Wu, H.; Zhang, Y.; Li, F.; Yu, B. A Decomposition Dynamic Graph Convolutional Recurrent Network for Traffic Forecasting. Pattern Recognit. 2023, 142, 109670. [Google Scholar] [CrossRef]
- Hu, J.; Lin, X.; Wang, C. DSTGCN: Dynamic Spatial Temporal Graph Convolutional Network for Traffic Prediction. IEEE Sens. J. 2022, 22, 13116–13124. [Google Scholar] [CrossRef]
- Zhou, J.; Qin, X.; Ding, Y.; Ma, H. Spatial Temporal Dynamic Graph Differential Equation Network for Traffic Flow Forecasting. Mathematics 2023, 11, 2867. [Google Scholar] [CrossRef]
- Fang, Z.; Long, Q.; Song, G.; Xie, K. Spatial Temporal Graph ODE Networks for Traffic Flow Forecasting. In Proceedings of the 27th ACM SIGKDD Conference on Knowledge Discovery & Data Mining, Virtual, 14–18 August 2021; Association for Computing Machinery: New York, NY, USA, 2021; pp. 364–373. [Google Scholar]
- Jin, M.; Zheng, Y.; Li, Y.F.; Chen, S.; Yang, B.; Pan, S. Multivariate Time Series Forecasting with Dynamic Graph Neural ODEs. IEEE Trans. Knowl. Data Eng. 2022, 35, 9168–9180. [Google Scholar] [CrossRef]
- Wiseman, Y. Real-Time Monitoring of Traffic Congestions. In Proceedings of the IEEE International Conference on Electro Information Technology, Lincoln, NE, USA, 14–17 May 2017; IEEE: New York, NY, USA, 2017; pp. 501–505. [Google Scholar]
- Jiang, S.; Huang, S. Robust Learning of Huber Loss under Exponentially Strongly Mixing Sequence. J. Complex. 2026, 95, 102045. [Google Scholar] [CrossRef]







| Method | Graph Structure Type | Dynamic Graph Update | Continuous Modeling Mechanism | Local Non-Adjacent Relation Modeling |
|---|---|---|---|---|
| STGCN | Predefined static graph | × | × | × |
| STFGNN | Predefined static graph | × | × | × |
| DCRNN | Predefined diffusion graph | ✓ | × | × |
| DGCRN | Adaptive dynamic graph | ✓ | × | × |
| ST-DGDE | Adaptive dynamic graph | ✓ | ✓ | × |
| STGODE | Predefined static graph | × | ✓ | × |
| DPMCODE | Probabilistic adaptive dynamic graph | ✓ | ✓ | ✓ |
| Dataset | Time Steps | Time Range | ||
|---|---|---|---|---|
| PEMS03 | 358 | 547 | 26,208 | 09/2018–11/2018 |
| PEMS04 | 307 | 340 | 16,992 | 01/2018–02/2018 |
| PEMSD7 | 228 | 1132 | 12,672 | 05/2012–06/2012 |
| PEMS08 | 170 | 295 | 17,856 | 07/2016–08/2016 |
| PEMS-BAY | 325 | 2369 | 52,116 | 01/2017–05/2017 |
| Hyperparameter | Value |
|---|---|
| Framework | Python + PyTorch |
| GPU | NVIDIA GeForce RTX 3090 |
| Optimizer | Adam |
| Input length | 12 |
| Prediction horizon | 12 |
| Number of layers | 2 |
| Embedding dimension | 32 |
| Batch size | 16 |
| Learning rate | 0.001 |
| Dataset | Metric | ARIMA | FC-LSTM | GraphWaveNet | STGCN | STGODE | DCRNN | DGCRN | STSGCN | Ours |
|---|---|---|---|---|---|---|---|---|---|---|
| PEMS03 | MAE | 35.41 | 22.33 | 19.12 | 17.55 | 16.50 | 17.99 | 15.98 | 17.48 | 15.89 |
| RMSE | 47.59 | 35.11 | 32.77 | 30.42 | 27.84 | 30.36 | 27.41 | 29.21 | 27.31 | |
| MAPE | 33.78 | 25.33 | 18.89 | 17.34 | 16.69 | 18.34 | 17.36 | 16.38 | ||
| PEMS04 | MAE | 33.73 | 26.77 | 24.89 | 21.16 | 20.84 | 22.84 | 19.77 | 18.52 | |
| RMSE | 48.80 | 40.65 | 39.66 | 34.72 | 32.84 | 33.62 | 30.44 | 29.41 | ||
| MAPE | 24.18 | 18.23 | 17.29 | 13.83 | 14.17 | 14.64 | 13.00 | 11.99 | ||
| PEMS08 | MAE | 31.09 | 23.09 | 18.28 | 17.15 | 16.86 | 16.22 | 17.38 | 15.83 | |
| RMSE | 44.32 | 35.17 | 30.05 | 27.09 | 26.28 | 26.10 | 27.28 | 23.91 | ||
| MAPE | 22.73 | 14.99 | 12.15 | 11.29 | 12.06 | 12.06 | 10.96 | 10.80 |
| Dataset | Metric | ARIMA | GraphWaveNet | DCRNN | STSGCN | STGCN | STGODE | Ours |
|---|---|---|---|---|---|---|---|---|
| PEMSD7 | MAE | 7.27 | 3.19 | 3.83 | 3.04 | 4.01 | 2.88 | |
| RMSE | 13.20 | 6.24 | 7.18 | 5.93 | 7.55 | 5.21 | ||
| MAPE | 10.38 | 8.02 | 9.81 | 7.55 | 9.67 | 7.33 | ||
| PEMS-BAY | MAE | 3.38 | 2.07 | 2.02 | 2.49 | 2.04 | 1.63 | |
| RMSE | 6.50 | 4.74 | 4.63 | 5.69 | 4.89 | 3.21 | ||
| MAPE | 8.30 | 4.90 | 4.79 | 5.79 | 4.61 | 3.72 |
| Model | MAE | Training Time (s) | Inference Time (s) | Parameters | FLOPs (G) |
|---|---|---|---|---|---|
| BaseLine | 1.89 | 54 | 2 | 284,631 | 0.45 G |
| w/o ODE | 1.76 | 132 | 46 | 361,248 | 1.01 G |
| w/o LCA | 1.72 | 145 | 51 | 428,516 | 1.22 G |
| w/o SFP | 1.69 | 153 | 55 | 487,903 | 1.31 G |
| w/o Gumbel | 1.74 | 151 | 52 | 474,309 | 1.29 G |
| DPMCODE-S | 1.71 | 161 | 58 | 513,290 | 1.45 G |
| DPMCODE-D | 1.67 | 178 | 64 | 615,894 | 1.85 G |
| DPMCODE | 1.63 | 170 | 60 | 546,937 | 1.57 G |
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. |
© 2026 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.
Share and Cite
Zhu, Y.; Wang, C.; Liu, P.; Yang, Y. Dynamic Graph Construction and Continuous Spatiotemporal Evolution for Traffic Forecasting. Electronics 2026, 15, 2369. https://doi.org/10.3390/electronics15112369
Zhu Y, Wang C, Liu P, Yang Y. Dynamic Graph Construction and Continuous Spatiotemporal Evolution for Traffic Forecasting. Electronics. 2026; 15(11):2369. https://doi.org/10.3390/electronics15112369
Chicago/Turabian StyleZhu, Yaodong, Caixia Wang, Peng Liu, and Yang Yang. 2026. "Dynamic Graph Construction and Continuous Spatiotemporal Evolution for Traffic Forecasting" Electronics 15, no. 11: 2369. https://doi.org/10.3390/electronics15112369
APA StyleZhu, Y., Wang, C., Liu, P., & Yang, Y. (2026). Dynamic Graph Construction and Continuous Spatiotemporal Evolution for Traffic Forecasting. Electronics, 15(11), 2369. https://doi.org/10.3390/electronics15112369

