Spatial-Temporal Transformer Networks for Traffic Flow Forecasting

Mingxing Xu, Wenrui Dai, Chunmiao Liu, Xing Gao, Weiyao Lin +2 more
1/9/2020
eess.SPcs.LG
transformer-attention

Official code: xumingxingsjtu/STTN (113 stars, Python, last commit 2021-11-17).

Abstract

Traffic forecasting has emerged as a core component of intelligent transportation systems. However, timely accurate traffic forecasting, especially long-term forecasting, still remains an open challenge due to the highly nonlinear and dynamic spatial-temporal dependencies of traffic flows.

Show full abstract

In this paper, we propose a novel paradigm of Spatial-Temporal Transformer Networks (STTNs) that leverages dynamical directed spatial dependencies and long-range temporal dependencies to improve the accuracy of long-term traffic forecasting. Specifically, we present a new variant of graph neural networks, named spatial transformer, by dynamically modeling directed spatial dependencies with self-attention mechanism to capture realtime traffic conditions as well as the directionality of traffic flows. Furthermore, different spatial dependency patterns can be jointly modeled with multi-heads attention mechanism to consider diverse relationships related to different factors (e.g. similarity, connectivity and covariance). On the other hand, the temporal transformer is utilized to model long-range bidirectional temporal dependencies across multiple time steps. Finally, they are composed as a block to jointly model the spatial-temporal dependencies for accurate traffic prediction. Compared to existing works, the proposed model enables fast and scalable training over a long range spatial-temporal dependencies. Experiment results demonstrate that the proposed model achieves competitive results compared with the state-of-the-arts, especially forecasting long-term traffic flows on real-world PeMS-Bay and PeMSD7(M) datasets.

View on arXivView PDF

Code Implementations(1)

The official code for "Spatial temporal transformer networks for traffic flow forecasting"

11322Python5 years ago
traffic-network-analysistransformer

Similar Papers

Cite this paper

@article{xu2020spatialtemporal,
  title  = {Spatial-Temporal Transformer Networks for Traffic Flow Forecasting},
  author = {Mingxing Xu and Wenrui Dai and Chunmiao Liu and Xing Gao and Weiyao Lin and Guo-Jun Qi and Hongkai Xiong},
  year   = {2020},
  eprint = {2001.02908},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2001.02908}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2001.02908.svg)](https://codeofpaper.com/paper/2001.02908)

Discussion