Spatio-Temporal Dynamic Graph Relation Learning for Urban Metro Flow Prediction

Peng Xie, Minbo Ma, Tianrui Li, Shenggong Ji, Shengdong Du, Zeng Yu, Junbo Zhang

TL;DR

Predicting metro passenger flow is notoriously difficult because station relationships change over time and every station has a unique "traffic personality." This paper introduces STDGRL, a model that learns these dynamic spatial relationships directly from data without needing a predefined map, outperforming 11 state-of-the-art baselines across four major city datasets.

What Problem Does This Paper Address?

Urban metro systems are the backbone of megacities, but predicting their inflow and outflow is a complex spatio-temporal puzzle. The authors identify three major gaps in existing research:

  1. Unique Traffic Patterns: A residential station has a massive morning peak, while a commercial hub peaks in the evening. Most models treat all stations as equal or use globally shared parameters, failing to capture these "node-specific" nuances.
  2. Static vs. Dynamic Graphs: Traditional Graph Neural Networks (GNNs) often rely on a fixed physical map (adjacency matrix). However, the functional relationship between stations changes based on time, weather, and social events.
  3. Long-term Accuracy: While many models handle the next 15 minutes well, their accuracy plummets as the prediction horizon extends (e.g., to an hour or more) because they rely on recurrent units (RNNs) that struggle with long-range dependencies.

Methods

The authors propose the Spatio-Temporal Dynamic Graph Relational Learning (STDGRL) model, which consists of three core components:

  • Node-specific Adaptive Parameter Learning (NAPL): Instead of forcing every station to use the same weights, NAPL learns unique embeddings for each station. This allows the model to "understand" the specific POI (Point of Interest) profile and traffic behavior of individual stations.
  • Dynamic Spatial Relationship Learning (DSRL): This module abandons the requirement for a predefined graph. It uses a learnable node embedding dictionary to calculate similarity between stations on the fly, effectively "discovering" hidden dependencies in the data that a physical map might miss.
  • Transformer-based Long-term Temporal Learning (LTTL): To solve the long-term prediction decay, the model employs a Transformer architecture. By using self-attention, it can weigh the importance of different historical time steps more effectively than traditional RNNs or LSTMs.

Finally, a Spatio-Temporal Fusion module merges these spatial and temporal insights using a gated mechanism to produce the final multi-step prediction.

Datasets

The model was evaluated on four large-scale metro datasets, all processed into 15-minute time slices:

  • CQMetro (Chongqing): A private dataset with 170 stations.
  • SHMetro (Shanghai): 288 stations.
  • HZMetro (Hangzhou): 80 stations.
  • BJMetro (Beijing): 276 stations.

These datasets provide a rigorous testing ground, covering different city scales and network topologies.

Key Insights and Ideas

  • The Map is Not the Territory: One of the most important "aha" moments is that the physical metro map is often a suboptimal graph for prediction. Data-driven dynamic graphs capture "functional" connections (e.g., two distant residential areas that both feed into the same business district) that physical proximity ignores.
  • Diversity Matters: The ablation studies show that the NAPL (node-specific) module is critical. Removing it caused a significant drop in performance, proving that modeling the "personality" of a station is just as important as modeling the flow of the network.
  • Attention is All You Need (for Long Horizons): While GRUs and LSTMs are standard for time series, the Transformer's ability to capture global dependencies allowed STDGRL to maintain much higher accuracy at the 60-minute mark compared to its peers.

Key Results

STDGRL consistently outperformed 11 baselines, including popular models like DCRNN, STGCN, and AGCRN.

  • Accuracy: On the Shanghai (SHMetro) dataset, STDGRL achieved a 7.48% improvement in MAPE for 15-minute predictions and a 12.29% improvement for 60-minute predictions compared to the best baseline.
  • Robustness: The model showed superior performance across all four cities, proving it isn't overfitted to a specific urban layout.
  • Ablation Success: The authors demonstrated that combining dynamic spatial learning with Transformer-based temporal learning provides a synergistic effect that neither can achieve alone.

Limitations and Future Work

While STDGRL is powerful, the authors acknowledge that it currently relies primarily on historical flow data. They suggest that future iterations could be even more robust by explicitly incorporating:

  • External Factors: Integrating weather data, holiday schedules, and local events (concerts, sports) directly into the embeddings.
  • POI Data: Explicitly using the types of buildings surrounding a station (offices vs. schools) to further refine the node-specific patterns.
  • Sudden Flow Detection: Improving the model's ability to predict "black swan" events or sudden surges in passenger volume.

Summary updated

BibTeX
@article{xie2023spatio,
  author = {Peng Xie and Minbo Ma and Tianrui Li and Shenggong Ji and Shengdong Du and Zeng Yu and Junbo Zhang},
  title = {{Spatio-Temporal Dynamic Graph Relation Learning for Urban Metro Flow Prediction}},
  journal = {IEEE Transactions on Knowledge and Data Engineering},
  year = {2023},
  url = {https://openreview.net/forum?id=xTWG69hcKc},
}
Figure