## Materials and Methods
### Structures of the Three Spatial-Temporal Components
#### 3.3.1 Dynamic Temporal Module  
We propose a dynamic temporal module to extract the temporal dependencies of the traffic data. The dynamic temporal module is composed of multiple residual blocks containing stacked dilated casual convolutions [43]. It has a long receptive field so as to capture both short-term neighboring and long-term periodic temporal dependencies with high effectiveness.  
**Dilated Casual Convolution:** Dilated causal convolution (DCC) is based on 1D convolution, injecting holes into the convolution kernel, padding zeros to the input sequence to keep its length unchanged, skipping a fixed step, and sliding on the input sequence to operate convolution. In Figure 6, for a 1D sequence \(x\in\mathbb{R}^{T}\) when the convolution kernel is \(f\in\mathbb{R}^{K}\), \(x_{t}\) denotes the \(t\)th value in the 1D sequence \(x\), the dilated causal convolution is \(F\), and the \(t\)th value of the dilated causal convolution result is as follows:  
\[F_{t}(x)=(f*_{d}x)_{t}=\sum_{i=0}^{K-1}f(i)\cdot x_{t-d\cdot i} \tag{5}\]  
where \(d\) refers to the dilation factor. It is the distance skipped during the convolution process. Multiple stacked dilated casual convolutions with progressively increasing dilation factor \(d^{(l)}=2^{(l-1)}\) make the model's receptive field grow exponentially, where \(l\) denotes the number of layers.  
Figure 5: An example of extracting time series segments. \(\mathcal{X}_{h}\), \(\mathcal{X}_{d}\), and \(\mathcal{X}_{w}\) correspond to the three time series fragments input into the model. \(\mathcal{X}_{p}\) is the time series to be predicted and its length is \(T_{p}\). The lengths of \(\mathcal{X}_{h}\), \(\mathcal{X}_{d}\), and \(\mathcal{X}_{w}\) are \(T_{h}\), \(T_{d}\), and \(T_{w}\). Here, \(T_{p}\) is equal to \(T_{h}\) and \(T_{d}\), \(T_{w}\) are double \(T_{h}\).  
**Residual Block Architecture:** As shown in Figure 4, a residual block contains two stacked dilated causal convolutional layers and an identity map. The identity map is connected across layers. It addresses the gradient explosion problem in the deep networks. Weight normalization [44] is added after each dilated causal convolution layer to tackle the overfitting problem. For non-linearity, the rectified linear unit (ReLU) [45] keeps the model's convergence rate steady. The dilation factors of two DCC layers in a residual block are the same. Given an input \(X^{l}\in\mathbb{R}^{N\times T\times F}\), the result \(X^{l+1}\in\mathbb{R}^{N\times T\times F^{\prime}}\) after passing through the \((l+1)\)th residual block is:  
\[X^{l+1}=X^{l}+ReLU(\Phi_{1}*_{d_{1}}(ReLU(\Phi_{0}*_{d_{0}}X^{l}))) \tag{6}\]  
where \(\Phi_{0}\), \(\Phi_{1}\in\mathbb{R}^{F\times F^{\prime}\times K}\) are the convolution kernels for two dilated causal convolutions in a residual block. \(F\) and \(F^{\prime}\) represent the number of input features and output channels, respectively; \(d_{0}\) and \(d_{1}\) are the dilation factors; and K is the length of the convolution kernel.  
Most previous models used RNN- and CNN-based methods to capture temporal dependencies, but they cannot handle very long sequences and are prone to the problem of gradient explosions. In contrast, residual blocks have a larger receptive field via stacking fewer dilated casual convolutional layers, and the introduction of residual connections also eliminates the problem of gradient disappearance or explosion. Besides, this architecture can be calculated in parallel with much less resource consumption.