PDFormer: Propagation Delay-Aware Dynamic Long-Range Transformer for Traffic Flow Prediction

Jiawei Jiang, Chengkai Han, Wayne Xin Zhao, Jingyuan Wang

Introduction

Predicting traffic flow is a cornerstone of modern Intelligent Transportation Systems (ITS). Accurate forecasting enables better urban planning, reduced congestion, and improved navigation. However, the complex spatial-temporal dependencies inherent in urban traffic make this a challenging task. Traditional models, particularly those based on Graph Neural Networks (GNNs), often fall short because they rely on static graph structures and fail to account for the physical time it takes for traffic conditions to propagate across a network.

PDFormer (Propagation Delay-aware transFormer) is a novel architecture designed to address these limitations by explicitly modeling the "propagation delay"—the time it takes for traffic conditions to travel between locations—while maintaining high computational efficiency.

The Limitations of Existing Models

Most existing traffic prediction models suffer from three primary flaws:

  1. Static Dependencies: They often assume the relationship between two road segments is fixed, ignoring how patterns shift between morning rushes and midnight lulls.
  2. Short-range Bias: GNNs typically focus on immediate neighbors, struggling to capture "long-range" correlations, such as two distant shopping districts having similar traffic patterns.
  3. Ignoring Propagation Delay: In the real world, a traffic jam at Point A does not affect Point B instantly; there is a physical time delay as the congestion propagates. Most models assume "immediate message passing," which contradicts physical reality.

The PDFormer Architecture

PDFormer introduces a multi-pronged approach to solve these issues through a dynamic Transformer-based framework:

Spatial Self-Attention (SSA) with Graph Masking

Instead of a static graph, PDFormer uses self-attention to learn dynamic relationships. To keep this effective, it employs two types of masks:

  • Geographic Mask: Limits attention to nearby nodes to capture local flow.
  • Semantic Mask: Connects distant nodes that exhibit similar historical traffic patterns (calculated via Dynamic Time Warping), allowing the model to find "functional neighbors" across the city.

Delay-aware Feature Transformation (DFT)

This is the paper's core innovation. The authors use k-Shape clustering to identify representative short-term traffic patterns (e.g., a sudden drop or a steady increase). These patterns are integrated into the "Key" matrix of the spatial attention mechanism. This allows the model to explicitly account for how a pattern observed at one time step will influence a neighbor at a future time step.

Temporal Self-Attention (TSA)

This component captures long-range temporal dependencies and periodic trends, such as daily and weekly cycles, ensuring the model understands the broader temporal context.

Heterogeneous Attention Fusion

The model fuses geographic, semantic, and temporal attention heads into a unified representation, allowing it to weigh different types of influence simultaneously based on the current traffic state.

Experimental Evaluation

The authors evaluated PDFormer on six public, real-world datasets covering both highway and city-grid scenarios:

  • Graph-based (Highways): PeMS04, PeMS07, and PeMS08 (California).
  • Grid-based (Citywide): NYCTaxi (New York), CHIBike (Chicago), and T-Drive (Beijing).

These datasets vary in scale (from 75 to 1024 nodes) and time intervals (5 to 60 minutes), providing a robust benchmark for the model's versatility.

Key Results and Insights

  • State-of-the-Art Performance: PDFormer outperformed 17 baseline models (including DCRNN, GWNET, and GMAN) across all six datasets. On average, it improved prediction accuracy (MAE/MAPE/RMSE) by roughly 4.5% to 5.0% over previous best-performing models.
  • Computational Efficiency: Unlike heavy encoder-decoder structures, PDFormer uses a streamlined forward procedure. On the PeMS04 dataset, it reduced training time by over 35% and inference time by a staggering 80% compared to the ASTGNN baseline.
  • Traffic as a Physical Flow: The most significant insight is treating traffic as a physical process with velocity. By embedding historical patterns into the attention mechanism, the model learns that an event at one node usually impacts another node after a specific duration.
  • Interpretability: Visualization of the attention maps confirmed that the model correctly identifies both local neighbors and distant regions with similar functional roles when making predictions.

Conclusion and Future Work

PDFormer represents a significant advancement in traffic forecasting by bridging the gap between data-driven attention mechanisms and the physical realities of traffic propagation. While highly effective, the authors suggest that future work could explore pre-training techniques to improve performance in data-sparse regions and apply the "propagation delay" concept to other spatial-temporal tasks, such as wind power forecasting.

Summary updated

BibTeX
@inproceedings{jiang2023pdformer,
  author = {Jiawei Jiang and Chengkai Han and Wayne Xin Zhao and Jingyuan Wang},
  title = {{PDFormer: Propagation Delay-Aware Dynamic Long-Range Transformer for Traffic Flow Prediction}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2023},
  doi = {10.1609/aaai.v37i4.25556},
}
Figure