Online Metro Origin-Destination Prediction via Heterogeneous Information Aggregation

Lingbo Liu, Yuying Zhu, Guanbin Li, Ziyi Wu, Lei Bai, Liang Lin

Efficient metro operation relies on knowing exactly where passengers are going. However, predicting these patterns in real-time is a "missing data" nightmare. This paper introduces a novel deep learning framework that turns incomplete real-time data into highly accurate ridership forecasts.

TL;DR

The authors propose the Heterogeneous Information Aggregation Machine (HIAM), a framework that solves the "incomplete data" problem in online metro systems by explicitly modeling unfinished trips and the causal relationships between passenger entries and exits. It achieves state-of-the-art performance on massive datasets from Shanghai and Hangzhou, significantly outperforming existing spatial-temporal models.

What Problem Does This Paper Address?

In a perfect world, we would have a complete Origin-Destination (OD) matrix at every moment—knowing exactly where every passenger who just entered station A will eventually exit. In reality, we only know a passenger's destination once they swipe out at their exit station.

This creates a massive gap for "online" (real-time) systems. At any given time interval, a large portion of passengers are still in transit. If we only look at "finished" trips, our data is sparse and uninformative. Most existing methods either ignore these ongoing trips or try to predict entries (OD) and exits (Destination-Origin or DO) as separate, independent tasks.

Fig. 1. Illustration of the difference between station-level ridership and origin-destination ridership. (a) is a metro system with four stations. (b) and (c) are the inflow/outflow of each station, respectively. (d) is an Origin-Destination (OD) matrix that represents the destination distribu- tion of incoming passengers. (e) is a Destination-Origin (DO) matrix that represents the origin distribution of outgoing passengers.

Methods

The core of the solution is the Heterogeneous Information Aggregation Machine (HIAM). It moves beyond simple time-series forecasting by integrating three distinct types of data: incomplete OD matrices, unfinished order vectors, and complete DO matrices.

1. Modeling the "Unfinished"

Instead of discarding passengers currently on trains, HIAM uses an OD modeling branch to estimate their potential destinations. It does this by looking at long-term (e.g., all Mondays in the training set) and short-term (e.g., yesterday at the same time) historical distributions. This "complements" the sparse real-time data.

Fig. 2. Illustration of the incomplete OD matrix in online metro systems. Suppose there were 228 passengers that entered station s in the past 15 minutes and 136 people have arrived at their destinations up to now. Unfortunately, the destinations of the remaining people are unknowable. In this case, we can only construct an incomplete OD matrix from finished trip transactions.

2. Dual Information Transformer (DIT)

The authors observe a fundamental link: today's entries (OD) are tomorrow's exits (DO). This is OD-to-DO causality. Conversely, there is DO-to-OD correlation, especially at "tide stations" in residential or office areas. The DIT is a novel attention mechanism that allows OD and DO features to interact and enhance each other mutually.

The architecture of HIAM, featuring parallel OD and DO branches linked by the Dual Information Transformer.

3. Spatial-Temporal Graph Learning

Since metro systems have a non-Euclidean topology (stations are nodes, tracks are edges), the model uses Graph Convolutional Gated Recurrent Units (GCGRU). This allows the network to learn patterns based on the actual physical layout of the metro map rather than just treating stations as independent entities.

Datasets

The model was evaluated on two massive, real-world benchmarks:

  • SHMOD (Shanghai Metro): 288 stations, ~8.82 million daily transactions.
  • HZMOD (Hangzhou Metro): 80 stations, ~2.35 million daily transactions. Both datasets use 15-minute time intervals and were split into standard training, validation, and testing sets.

Key Insights and Ideas

  • Ongoing trips are a goldmine: Explicitly estimating where current passengers are likely to go (based on historical patterns) provides a much stronger signal for prediction than relying solely on completed trips.
  • Joint Modeling is Essential: Modeling OD and DO together via the DIT significantly boosts accuracy for both. The model learns that a surge in entries at a residential station in the morning will inevitably lead to a surge in exits at office-heavy stations shortly after.
  • Topology Matters: Using graph convolutions to respect the physical connections of the metro network is far superior to standard RNNs or CNNs that ignore the underlying "map."

Key Results

HIAM consistently outperformed ten baseline and state-of-the-art methods (including GraphWaveNet, DCRNN, and Informer) across all time horizons (15, 30, 45, and 60 minutes).

  • Accuracy: On the Shanghai dataset, HIAM achieved a Mean Absolute Percentage Error (MAPE) of 38.36% for 60-minute OD prediction, a notable improvement over the previous best-performing model (PVCGN at 39.34%).
  • Consistency: The performance gains were even more pronounced on the Hangzhou dataset, where HIAM outperformed the next best model by over 2% MAPE in several categories.
  • Ablation Success: Removing the "unfinished order" estimation or the DIT interaction caused performance to drop significantly, proving these novel components are the primary drivers of the model's success.

Limitations and Future Work

  • Matrix Compression: To handle the extreme sparsity of OD matrices (most station pairs have zero ridership at any given time), the authors merge "weakly-relevant" stations. While this improves overall network-wide accuracy, it might lose fine-grained detail for niche travel patterns.
  • External Factors: The current model relies purely on historical ridership data. The authors suggest that future iterations could incorporate external variables like weather conditions, holidays, or major city events (concerts, sports) which can cause sudden, non-periodic spikes in ridership.

Summary updated

Abstract

Metro origin-destination prediction is a crucial yet challenging time-series analysis task in intelligent transportation systems, which aims to accurately forecast two specific types of cross-station ridership, i.e., Origin-Destination (OD) one and Destination-Origin (DO) one. However, complete OD matrices of previous time intervals can not be obtained immediately in online metro systems, and conventional methods only used limited information to forecast the future OD and DO ridership separately. In this work, we proposed a novel neural network module termed Heterogeneous Information Aggregation Machine (HIAM), which fully exploits heterogeneous information of historical data (e.g., incomplete OD matrices, unfinished order vectors, and DO matrices) to jointly learn the evolutionary patterns of OD and DO ridership. Specifically, an OD modeling branch estimates the potential destinations of unfinished orders explicitly to complement the information of incomplete OD matrices, while a DO modeling branch takes DO matrices as input to capture the spatial-temporal distribution of DO ridership. Moreover, a Dual Information Transformer is introduced to propagate the mutual information among OD features and DO features for modeling the OD-DO causality and correlation. Based on the proposed HIAM, we develop a unified Seq2Seq network to forecast the future OD and DO ridership simultaneously. Extensive experiments conducted on two large-scale benchmarks demonstrate the effectiveness of our method for online metro origin-destination prediction. Our code is resealed at https://github.com/HCPLab-SYSU/HIAM.
BibTeX
@article{liu2023online,
  author = {Lingbo Liu and Yuying Zhu and Guanbin Li and Ziyi Wu and Lei Bai and Liang Lin},
  title = {{Online Metro Origin-Destination Prediction via Heterogeneous Information Aggregation}},
  journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
  year = {2023},
  doi = {10.1109/tpami.2022.3178184},
}
Figure