In this paper, we seek to address several challenges facing the traffic forecasting problem, and propose a novel paradigm of Spatial Temporal Transformer Networks (STTNs). Our contributions are summarized below.

-   We propose a novel paradigm of Spatial Temporal Transformer Networks (STTNs) that can dynamically model long-range spatial-temporal dependencies.

-   A new variant of graph neural network named [*spatial transformer*]{} is developed to model the time-varying directed spatial dependencies by dynamically attending to hidden spatial patterns of traffic flows.

-   A temporal transformer that enables an efficient parallelization of long-range temporal dependencies is also developed.

This paper is structured as follows. In section II, we briefly review the existing spatial and temporal dependencies modeling approaches. In section III, we formally formulate the traffic forecasting problem as a spatial-temporal graph prediction problem. Then, in section IV, we present the proposed Spatial temporal networks for traffic forecasting, and elaborate the components. In Section V, we conduct extensive experiments on real-world traffic datasets and make comparison with state-of-the-arts. Finally, we conclude our paper and present our further work in section VI.

Related Work
============

In traffic flows forecasting, how to effectively and efficiently model spatial and temporal dependencies is the core problem. In 