CDGNet: A Cross-Time Dynamic Graph-based Deep Learning Model for Traffic Forecasting

Yuchen Fang, Yanjun Qin, Haiyong Luo, Fang Zhao, Liang Zeng, Bo Hui, Chenxing WangarXiv 2021

Abstract

Accurate traffic forecasting is essential for Intelligent Transportation Systems (ITS) but remains challenging due to complex spatio-temporal dependencies. Traditional models often rely on static or independent dynamic graphs, failing to capture the "ripple effect" where traffic conditions at one location influence distant areas after a time lag. This paper introduces CDGNet, a novel architecture featuring a Cross-time Dynamic Graph Convolutional Network (CDGCN). By modeling inter-spatial dependencies across different time steps, CDGNet effectively captures the hysteresis effect in traffic flow. Experimental results on major benchmarks (METR-LA, PEMS-BAY, PEMSD4) demonstrate that CDGNet achieves state-of-the-art performance.

1. Introduction

Traffic forecasting involves predicting future traffic states (e.g., speed, volume) based on historical sensor data. The underlying road network is best represented as a graph, where nodes are sensors and edges represent relationships. However, these relationships are not static; they change based on time of day, weather, and incidents. A critical challenge is the "ripple effect"—the temporal delay with which traffic congestion propagates through a network.

2. Problem Statement: Beyond Static Graphs

Most existing traffic models utilize one of three graph paradigms:

  1. Static Graphs: Relationships are fixed based on physical distance or connectivity.
  2. Learnable Static Graphs: Adjacency matrices are learned but remain constant after training.
  3. Independent Dynamic Graphs: A unique graph is generated for each time slice, but spatial correlations are modeled only within that specific slice.

These approaches ignore the hysteresis effect, where traffic at time $t$ at location A impacts location B at time $t+n$. CDGNet addresses this by introducing cross-time dynamic dependencies.

Comparison of graph modeling approaches: (a) Pre-defined static, (b) Learnable static, (c) Dynamic, and (d) Cross-time dynamic graph (CDGNet).

3. Methodology

CDGNet employs an encoder-decoder structure optimized for long-term forecasting.

3.1 Cross-time Dynamic Graph Convolution (CDGCN)

The core innovation is the CDGCN, which calculates correlations between the current time slice and all historical slices. This allows the model to capture "inter-spatial" dependencies, effectively tracking how past states in one region influence future states elsewhere.

3.2 Gating Mechanism and Sparsity

To handle the inherent sparsity of road networks and reduce noise, CDGNet incorporates a gating mechanism using ReLU and identity matrices. This filters out weak or irrelevant correlations between distant, unrelated sensors, focusing the model on meaningful traffic interactions.

3.3 Computational Efficiency

A naive implementation of cross-time graph convolution is computationally prohibitive ($O(T^5 N^3)$). CDGNet optimizes this to $O(T^3 N^3)$ by utilizing temporal self-attention to compress historical information before the graph convolution step, making the model feasible for standard traffic datasets.

4. Experimental Evaluation

The model was evaluated on three public datasets: METR-LA (Los Angeles highways), PEMS-BAY (Bay Area), and PEMSD4 (San Francisco).

4.1 Results

CDGNet consistently outperformed baselines such as DCRNN, STGCN, and GMAN. On the METR-LA dataset for a 1-hour prediction horizon, CDGNet achieved a Mean Absolute Error (MAE) of 3.32, a significant improvement over GMAN (3.44) and DCRNN (3.61).

4.2 Key Insights

  • Inter-spatial Dependency: Ablation studies confirmed that modeling dependencies across time steps is the primary driver of CDGNet's accuracy.
  • Dynamic Adaptation: Visualization of learned adjacency matrices showed the model adapts to different spatial densities during morning and evening peaks.
  • Reduced Accumulative Error: The Transformer-based architecture mitigates the error accumulation typically seen in RNN-based models for long-term horizons.

5. Conclusion

CDGNet introduces a paradigm shift in traffic forecasting by explicitly modeling cross-time dynamic spatial dependencies. By capturing the "ripple effect," it provides more accurate and robust predictions across various traffic regimes. Future work will explore scaling these techniques to larger city-wide networks and applying the cross-time dynamic graph approach to other multivariate time-series domains like meteorology and energy management.

Summary updated

BibTeX
@misc{fang2021cdgnet,
  author = {Yuchen Fang and Yanjun Qin and Haiyong Luo and Fang Zhao and Liang Zeng and Bo Hui and Chenxing Wang},
  title = {{CDGNet: A Cross-Time Dynamic Graph-based Deep Learning Model for Traffic Forecasting}},
  year = {2021},
  eprint = {2112.02736},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2112.02736},
}
Figure