latent features, they are further processed with a shared three-layer feed-forward neural network $$Y^{\mathcal T}=\text{ReLu}(\text{ReLu}(U^{\mathcal T}W^{\mathcal T}_0)W^{\mathcal T}_1)W^{\mathcal T}_2$$ where $U^{\mathcal T}=M^{\mathcal T}+X^{\mathcal T}$ is the residual connection for stable training.

As Eq. 11, the temporal transformer can be formulated as $$Y^{\mathcal T}={\mathcal T}(X^{\mathcal T})$$

It is worth noting that the in each temporal transformer layer, each time step can attend to all other time steps, thus long-range bidirectional temporal can be efficiently captured in each temporal layer. Furthermore, temporal transformer can be easily scaled to long sequence by increasing the slide window length $M$ without much sacrifice in computation efficiency. While RNNs-based models can not deal with long sequences due to the gradients vanishing/exploding. As for convolution-based model, for different sequences length, more layers are need and the filters windows and number of layers require explicitly designed to ensure that the whole sequence are covered to capture long-range dependencies.

Model Structures
----------------

### Spatial-temporal Blocks

The future traffic flow conditions of one location are determined by the traffic conditions of its neighbor locations, and the time when the influence will happen as well as some sudden changes (e.g traffic accidents, weather condition s). Thus to make accurate predictions, the 