MultiSPANS: A Multi-range Spatial-Temporal Transformer Network for Traffic Forecast via Structural Entropy Optimization

Dongcheng Zou, Senzhang Wang, Xuefeng Li, Hao Peng, Yuandong Wang, Chunyang Liu, Kehua Sheng, Bo Zhang

TL;DR

MultiSPANS is a novel Transformer-based architecture that improves traffic forecasting by using "structural entropy" to automatically discover the hierarchical organization of road networks. By combining multi-scale convolutions with hierarchy-aware attention masks, the model captures complex spatial-temporal dependencies across multiple ranges more effectively than previous state-of-the-art methods.

What Problem Does This Paper Address?

Predicting traffic flow and speed is notoriously difficult because it involves "multi-range dependencies." A traffic jam might be caused by a local fender-bender (short-range) or a massive surge in commuters from a residential suburb to a commercial hub (long-range).

Existing deep learning models, like Graph Neural Networks (GNNs) and standard Transformers, often struggle with two things:

  1. Hierarchical Knowledge: They treat road sensors as a flat graph or a collection of points, ignoring the natural "zoning" of a city (neighborhoods, districts, etc.).
  2. Local Context: Standard Transformers often calculate attention between individual, discrete time points, which can be noisy and fail to capture the local "shape" of traffic patterns.

Methods

The authors introduce MultiSPANS, which stands for Multi-range Spatial-Prediction Attention Network with Structural entropy optimization. The architecture consists of three main innovations:

  • Multi-filter Convolution Module (MFCL): Before the data hits the Transformer, it passes through a set of 1D temporal filters and multi-hop graph convolutions. This creates "ST-tokens"—informative embeddings that encapsulate local temporal trends and spatial neighborhoods, making the subsequent attention mechanism more robust.
  • Structural Entropy Optimization: This is the core innovation. The model uses structural entropy minimization to unsupervisedly group sensors into a hierarchy called an "encoding tree." Essentially, the model "learns" the functional layout of the city—identifying which sensors belong to the same functional zones—without needing manual labels.
  • Hierarchy-Aware Attention: The encoding tree is used to generate multi-level attention masks and hierarchical correlation scores. This forces different "heads" of the Transformer to focus on different spatial scales. For example, some heads might only look at sensors within the same "neighborhood" (low-level in the tree), while others look at city-wide interactions (high-level).

Datasets

The model was evaluated on two standard large-scale real-world traffic datasets:

  • PEMSD4: Traffic data (flow, speed, occupancy) from the San Francisco Bay Area.
  • PEMSD8: Similar data from the San Bernardino area. The authors derived four specific benchmarks from these: PEMSD4-flow, PEMSD4-speed, PEMSD8-flow, and PEMSD8-speed.

Key Insights and Ideas

  • Unsupervised Zoning: One of the most powerful "aha" moments is that you don't need to tell the model how a city is organized. By minimizing structural entropy, the model mathematically discovers the most efficient way to represent the road network's hierarchy.
  • Convolutions as Tokenizers: By using convolutions to build tokens, the model effectively "denoises" the input. This allows it to utilize much longer historical windows (looking back further in time) with higher computational efficiency than standard Transformers.
  • Multi-Scale Specialization: By applying different masks to different attention heads, the model mimics how humans think about traffic: looking at the immediate street, the surrounding neighborhood, and the major highway arteries simultaneously.

Key Results

MultiSPANS consistently outperformed 12 baseline models, including popular ones like GMAN, STTN, and Graph WaveNet.

  • Accuracy: It achieved an average improvement of 2.57% in MAE (Mean Absolute Error) and 3.78% in RMSE (Root Mean Square Error) across all datasets.
  • Specific Gains: The most significant jump was seen in the PEMSD8-speed dataset, with a 4.23% improvement in MAE.
  • Long-Term Modeling: The model proved exceptionally good at handling longer historical look-back windows. While other models' performance often plateaus or degrades with more data, MultiSPANS's error continued to drop as the historical window increased from 12 to 48 steps.

Limitations and Future Work

While MultiSPANS is powerful, the authors note a few areas for growth:

  • Static vs. Dynamic: The structural entropy optimization currently relies on the static topology of the road network. In reality, road networks can be dynamic (e.g., road closures or new construction), which the current encoding tree might not capture in real-time.
  • Interpretability: While the hierarchical zoning is discovered mathematically, the authors suggest further research is needed to fully analyze how these "discovered" zones correlate with actual urban planning and land-use data.
  • Generalization: The authors plan to explore applying structural entropy-guided attention to other complex graph-based spatial-temporal tasks beyond traffic, such as power grid management or social network analysis.

Summary updated

BibTeX
@inproceedings{zou2024multispans,
  author = {Dongcheng Zou and Senzhang Wang and Xuefeng Li and Hao Peng and Yuandong Wang and Chunyang Liu and Kehua Sheng and Bo Zhang},
  title = {{MultiSPANS: A Multi-range Spatial-Temporal Transformer Network for Traffic Forecast via Structural Entropy Optimization}},
  booktitle = {WSDM},
  year = {2024},
  doi = {10.1145/3616855.3635820},
}
Figure