Predicting citywide crowd flows using deep spatio-temporal residual networks

Junbo Zhang, Yu Zheng, Dekang Qi, Ruiyuan Li, Xiuwen Yi, Tianrui Li

TL;DR

Researchers have developed ST-ResNet, a deep learning framework that predicts the flow of people (inflow and outflow) across an entire city. By using a multi-branch residual network to capture spatial dependencies and temporal patterns like daily cycles and weekly trends, the model significantly outperforms traditional time-series methods and standard recurrent neural networks (RNNs).

What Problem Does This Paper Address?

Predicting how crowds move through a city is vital for traffic management and public safety—preventing tragedies like the 2015 Shanghai New Year’s Eve stampede or managing sudden surges from events like "Pokemon Go" gatherings.

However, citywide forecasting is incredibly complex because it involves:

  1. Spatial Dependencies: Traffic in one neighborhood is affected by both its immediate neighbors and distant regions (e.g., people commuting from suburbs to the city center).
  2. Temporal Dependencies: Flow is influenced by what happened an hour ago (closeness), what happened at the same time yesterday (period), and long-term changes like seasonal shifts (trend).
  3. External Factors: Weather (rain/snow) and special events (holidays) can drastically alter normal patterns.

Existing models like ARIMA or basic LSTMs often struggle to capture these multi-layered, citywide interactions simultaneously.

Methods

The authors propose ST-ResNet, an end-to-end deep spatio-temporal residual network. Its architecture is divided into four main components:

  • Three Temporal Branches: The model processes three different time scales—closeness, period, and trend—through separate branches. Each branch uses Residual Units (based on Convolutional Neural Networks) to capture spatial features.
  • Residual Learning: By using residual connections (shortcuts that skip layers), the authors can build very deep networks (up to 12+ layers) without suffering from the "vanishing gradient" problem, allowing the model to capture citywide, long-range spatial dependencies.
  • External Component: A separate fully-connected neural network processes metadata like weather conditions, wind speed, and holidays.
  • Parametric Fusion: Instead of just adding the branches together, the model learns a "weight matrix" that determines how much influence each temporal branch has on a specific region. For example, a business district might be more influenced by "period" (daily commutes) than a residential area.

Datasets

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

  • TaxiBJ: GPS trajectories from over 34,000 Beijing taxicabs across four time intervals between 2013 and 2016, paired with 16 types of meteorological data.
  • BikeNYC: Trip data from the New York City Citi Bike system in 2014 (April to September), including trip duration and station locations.

Key Insights and Ideas

  • CNNs over RNNs for Time: While RNNs/LSTMs are the "standard" for sequences, the authors found that for spatio-temporal data, deep CNNs (via ResNet) are better at capturing the "image-like" nature of citywide flow while avoiding the difficulty of training LSTMs on very long sequences (like a full week of data).
  • Deep is Better for Distance: To capture dependencies between distant regions, you need a large "receptive field." Stacking many convolutional layers allows a single "pixel" in the high-level feature map to account for a much larger area of the city.
  • The "UrbanFlow" System: This isn't just a theoretical paper; the authors deployed a real-time system on Microsoft Azure called UrbanFlow, which monitors and forecasts crowd flows in Guiyang, China.

Key Results

ST-ResNet consistently outperformed nine well-known baselines, including ARIMA, Seasonal ARIMA, and various flavors of RNNs and LSTMs.

  • Accuracy: On the TaxiBJ dataset, ST-ResNet achieved an RMSE of 16.89, significantly lower than DeepST (18.18) and nearly 26% better than traditional ARIMA (22.78).
  • Generalization: On the BikeNYC dataset, it achieved an RMSE of 6.33, outperforming the best baseline by a significant margin.
  • Ablation Studies: The authors proved that including the "External" component (weather/holidays) and using the "Parametric Fusion" method both contributed to lower error rates compared to simpler versions of the model.

Limitations and Future Work

  • Grid Constraints: The model relies on partitioning the city into a regular $I \times J$ grid. While simple, this doesn't perfectly map to irregular city blocks or administrative boundaries.
  • Data Variety: The current study focuses on taxis and bikes. The authors suggest that future work should integrate more diverse data sources, such as metro card swipes, bus trajectories, and mobile phone signals, to create a more holistic "city pulse."
  • Multi-step Prediction: While the model is excellent at "one-step ahead" prediction, accuracy naturally degrades as the look-ahead window increases, though it remains more robust than LSTMs for medium-range forecasts.

Summary updated

BibTeX
@article{zhang2018predicting,
  author = {Junbo Zhang and Yu Zheng and Dekang Qi and Ruiyuan Li and Xiuwen Yi and Tianrui Li},
  title = {{Predicting citywide crowd flows using deep spatio-temporal residual networks}},
  journal = {Artificial Intelligence},
  year = {2018},
  url = {https://openreview.net/forum?id=T8hvhAB7guO},
}
Figure