Extralonger: Toward a Unified Perspective of Spatial-Temporal Factors for Extra-Long-Term Traffic Forecasting

Zhiwei Zhang, Shaojun E, Fandong Meng, Jie Zhou, Wenjuan Han · DOI

Abstract

Traffic forecasting is a critical component of Intelligent Transportation Systems (ITS), yet existing deep learning models often struggle with the "complexity wall" imposed by separate spatial and temporal processing. We present Extralonger, a Transformer-based architecture that unifies spatial and temporal factors into a single representation. By reducing computational complexity from $O(NT^2 + TN^2)$ to $O(T^2 + N^2)$, Extralonger extends forecasting horizons from hours to a full week while achieving significant gains in training speed and memory efficiency.

Introduction

Accurate traffic forecasting is essential for urban management and congestion reduction. However, state-of-the-art models typically treat time (temporal steps $T$) and space (sensor nodes $N$) as distinct dimensions, leading to an explosion in computational requirements as the prediction window grows. This has historically limited forecasts to a 1–4 hour horizon. Real-world applications require "extra-long-term" forecasts—predicting patterns days or even a week in advance—which necessitates a more efficient approach to spatial-temporal modeling.

Methodology

Extralonger is built on the principle that space and time are inseparable. The architecture consists of three primary components: a unified embedding layer, a three-route transformer, and a prediction layer.

Unified Spatial-Temporal Representation

The core innovation of Extralonger is the "squeezing" of dimensions to create a unified representation. Instead of a 3D data cube, the model uses linear layers to generate two 2D representations:

  • Temporal Representation ($E_t$): Embeds information from all nodes into each time step.
  • Spatial Representation ($E_s$): Embeds information from all time steps into each node.
Dimension squeezing process for unified spatial-temporal representation.

This channel-mixed approach allows the model to capture global dependencies in a single pass, drastically reducing the complexity of the attention mechanism.

Three-Route Transformer Architecture

The unified embeddings are processed through three parallel routes to capture different aspects of the traffic data:

  1. Temporal Route: Utilizes a standard Transformer to model time-series trends.
  2. Spatial Route: Employs a Global-Local Spatial Transformer that combines self-attention for global similarities with an adjacency-matrix mask for local physical connectivity.
  3. Mixed Route: Captures the intricate interplay between spatial and temporal dynamics.
Overall architecture of the Extralonger model.

Additionally, a Learnable Noise Injection module is included to enhance robustness against real-world sensor errors and outliers.

Evaluation and Results

Extralonger was evaluated on three major traffic benchmarks: PEMS04, PEMS08, and Seattle Loop. The model demonstrated superior performance in both long-term (4 hours) and extra-long-term (1 week) scenarios.

Efficiency Gains

The reduction in complexity translated into massive performance improvements:

  • Training Speed: Extralonger is up to 500x faster to train than previous state-of-the-art methods like SSTBAN.
  • Memory Usage: It achieved a 172x reduction in memory consumption for long-horizon tasks.
  • Inference Speed: Inference was measured at 385x faster than baselines.

Forecasting Accuracy

Extralonger consistently outperformed traditional models (e.g., DCRNN, GWNet, GMAN) across RMSE, MAE, and MAPE metrics. Notably, it maintained steady accuracy even when predicting a full week (2016 time steps) into the future, a task previously considered computationally infeasible.

Conclusion

Extralonger represents a paradigm shift in traffic forecasting by treating space and time as a unified entity. Its efficiency not only solves the "complexity wall" but also enables practical, extra-long-term forecasting for modern cities. Future work will focus on improving performance during unpredictable peak-hour fluctuations and integrating real-time event awareness into the data-driven framework.

Summary updated

BibTeX
@inproceedings{zhang2024extralonger,
  author = {Zhiwei Zhang and Shaojun E and Fandong Meng and Jie Zhou and Wenjuan Han},
  title = {{Extralonger: Toward a Unified Perspective of Spatial-Temporal Factors for Extra-Long-Term Traffic Forecasting}},
  booktitle = {FM4Science @ NeurIPS},
  year = {2024},
  url = {https://openreview.net/forum?id=hE3vlUiyfS},
}
Figure