Demand Forecasting from Spatiotemporal Data with Graph Networks and Temporal-Guided Embedding

Doyup Lee, Suehun Jung, Yeongjae Cheon, Dongil Kim, Seungil YouarXiv 2019

Abstract

Short-term demand forecasting models commonly combine convolutional and recurrent layers to extract complex spatiotemporal patterns in data. Long-term histories are also used to consider periodicity and seasonality patterns as time series data. In this study, we propose an efficient architecture, Temporal-Guided Network (TGNet), which utilizes graph networks and temporal-guided embedding. Graph networks extract invariant features to permutations of adjacent regions instead of convolutional layers. Temporal-guided embedding explicitly learns temporal contexts from training data and is substituted for the input of long-term histories from days/weeks ago. TGNet learns an autoregressive model, conditioned on temporal contexts of forecasting targets from temporal-guided embedding. Finally, our model achieves competitive performances with other baselines on three spatiotemporal demand dataset from real-world, but the number of trainable parameters is about 20 times smaller than a state-of-the-art baseline. We also show that temporal-guided embedding learns temporal contexts as intended and TGNet has robust forecasting performances even to atypical event situations.

Introduction

In the world of ride-hailing and bike-sharing, knowing where the next surge in demand will happen is critical for operational efficiency. Accurate predictions allow for better fleet balancing, dynamic pricing, and improved customer satisfaction. However, predicting urban demand is a complex "spatiotemporal" challenge. Models must account for spatial dependencies—where activity in one neighborhood influences another—and temporal dependencies, such as the distinct differences between a weekday morning rush and a Sunday afternoon.

Temporal patterns of demand across different areas, holiday status, and days of the week.

Current state-of-the-art models have become increasingly complex, often relying on massive parameter counts and extensive "long-term histories" (data from days or weeks prior) to capture periodicity. These heavy-duty architectures, typically combining Convolutional Neural Networks (CNNs) and LSTMs, are prone to overfitting and can be difficult to scale. Researchers from POSTECH, Kakao Brain, and Kakao Mobility propose TGNet, a streamlined model that achieves competitive performance with 20 times fewer parameters.

The TGNet Architecture

TGNet introduces two primary innovations to simplify and improve demand forecasting:

  1. Permutation-Invariant Graph Networks: Standard CNNs are "permutation-variant," meaning they are sensitive to the specific orientation of neighboring regions. TGNet utilizes graph networks that are permutation-invariant, focusing on proximity rather than directionality. This approach captures the essential influence of neighboring areas while drastically reducing the parameter count.
  2. Temporal-Guided Embedding (TGE): Instead of ingesting weeks of historical data to find patterns, TGNet uses a small fully connected layer to learn an "encoding" of the temporal context. By feeding the model metadata such as time-of-day, day-of-week, and holiday status, the TGE learns to represent these contexts explicitly. This allows the model to understand concepts like "rush hour" directly from the metadata.

Experimental Results

The researchers evaluated TGNet on three real-world datasets: NYC-bike, NYC-taxi, and SEO-taxi. The SEO-taxi dataset is particularly notable for its scale, covering 12.5x more regions than the NYC sets.

Efficiency and Scalability

TGNet achieves its performance with approximately 475,000 parameters, compared to the 9.4 million used by the state-of-the-art STDN model. This efficiency proved crucial on the large-scale SEO-taxi dataset, where more complex models failed to train effectively. TGNet, by contrast, remained easily trainable and provided a strong performance baseline.

Interpretability of Temporal Context

The power of the Temporal-Guided Embedding is visible through t-SNE visualizations. The model naturally clusters similar time periods, effectively "learning" the calendar. For instance, it groups weekday mornings together while clearly separating them from weekends and holidays.

t-SNE visualization of learned temporal-guided embeddings, showing natural clustering of weekdays, weekends, and holidays.

Robustness to Atypical Events

Most models struggle with "atypical events"—rare, high-volume surges like festivals or concerts. Because TGNet focuses on learning the context of demand rather than just memorizing history, it generalizes significantly better to these outliers. In predicting the top 1% of demand surges for NYC-taxi, TGNet achieved an RMSE of 19.64, while the next best model (STDN) lagged significantly at 210.34.

Conclusion

TGNet demonstrates that efficiency does not have to come at the cost of accuracy. By rethinking how spatial and temporal dependencies are captured, the authors provide a robust, scalable baseline for demand forecasting. While the current model does not incorporate external signals like weather, its success with temporal-guided embeddings suggests a promising path for future research into context-aware forecasting models.

Check out the full paper: arXiv:1905.10709

Summary updated

BibTeX
@misc{lee2019demand,
  author = {Doyup Lee and Suehun Jung and Yeongjae Cheon and Dongil Kim and Seungil You},
  title = {{Demand Forecasting from Spatiotemporal Data with Graph Networks and Temporal-Guided Embedding}},
  year = {2019},
  eprint = {1905.10709},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1905.10709},
}
Figure