## 4 Methodology
### Graph Convolutional Gated Recurrent Layer  
The spectral-based GCN has shown great potential in capturing spatial correlations among traffic sequences [35,36]. Given the traffic road nodes, the GCN is a fundamental operation for extracting features from these nodes. The graph convolution operation is approximated using a first-order Chebyshev polynomial expansion as follows:  
\[\mathbf{Z}=\mathbf{X}*_{\mathcal{G}}\mathbf{\Theta}=\left(\mathbf{I}_{N}+\mathbf{D}^{\frac{1}{2}} \mathbf{A}\mathbf{D}^{\frac{1}{2}}\right)\mathbf{X}\mathbf{W}+\mathbf{b} \tag{8}\]  
Here, \(\mathbf{X}\in R^{N\times c}\) and \(\mathbf{Z}\in R^{N\times h}\) are the input and output of the graph convolution operation \((*_{\mathcal{G}})\). \(\mathbf{A}\in R^{N\times N}\) is the adjacency matrix, \(\mathbf{D}\in R^{N\times N}\) is the degree matrix,and \(\mathbf{W}\in R^{c\times h}\) and \(\mathbf{b}\in R^{h}\) denote the learnable weight and bias, respectively. However, Equation (8) only considers the effect of first-order neighboring nodes. According to the summary and analysis of [PERSON] et al. [37], we employ a diffusion convolution layer to model the graph signal's diffusion process within \(K\) finite steps. Thus, for Equation (8), we utilize the diffusion convolution in the following manner:  
\[\mathbf{Z}=\mathbf{X}*_{\mathcal{G}}\mathbf{\Theta}=\sum_{k=0}^{K}\Big{(}\mathbf{I}_{N}+\mathbf{D}^ {\frac{1}{2}}\mathbf{A}\mathbf{D}^{\frac{1}{2}}\Big{)}^{k}\mathbf{X}\mathbf{W}_{k}+\mathbf{b} \tag{9}\]  
Besides spatial correlation, traffic prediction is also influenced by complex temporal correlation. The GRU has gained popularity and has been extensively applied in time series prediction. Similar to previous works [18], we combined the diffusion graph convolution and GRU modules and refer to them as the GC-GRU. As illustrated in Figure 3, the GC-GRU replaces the linear layers responsible for the gating and update gates in the GRU with the graph convolution. As a result, the GC-GRU can effectively model both temporal and spatial correlations in the input graph signal, as shown in the following equation:  
\[\left\{ \begin{array}{l}\mathbf{u}_{t}=Sigmoid([\mathbf{X}_{t},\mathbf{H}_{t-1}]*_{ \mathcal{G}}\mathbf{\Theta}_{u})\\ \mathbf{r}_{t}=Sigmoid([\mathbf{X}_{t},\mathbf{H}_{t-1}]*_{\mathcal{G}}\mathbf{\Theta}_{r}) \\ \mathbf{\hat{h}}_{t}=Tanh\Big{(}[\mathbf{X}_{t},(\mathbf{r}_{t}\odot\mathbf{H}_{t-1})]*_{ \mathcal{G}}\mathbf{\Theta}_{\hat{h}_{t}}\Big{)}\\ \mathbf{H}_{t}=\mathbf{u}_{t}\odot\mathbf{H}_{t-1}+(1-\mathbf{u}_{t})\odot\mathbf{\hat{h}}_{t} \end{array} \right. \tag{10}\]  
At time step \(t\), \(\mathbf{X}_{t}\) represents the input and \(\mathbf{H}_{t}\) represents the output hidden state of GC-GRU. \(\mathbf{u}_{t}\) and \(\mathbf{r}_{t}\) denote the update gate and reset gate. The notation \(*_{\mathcal{G}}\) denotes the diffusion graph convolution operation defined by Equation (10), and \(\mathbf{\Theta}_{u},\mathbf{\Theta}_{r},\mathbf{\Theta}_{\hat{h}_{t}}\) are the learnable parameters corresponding to the diffusion graph convolution. \(\odot\) denotes the Hadamard product. Although the GRU addresses the issue of vanishing gradients in RNNs during backpropagation, it cannot retain all the information for long durations. In a multi-layer GRU, the lower layers can capture local temporal dependencies, while higher layers can capture longer-range temporal dependencies. However, using multiple layers of GRU during training can lead to problems like vanishing or exploding gradients. Residual connections mitigate the decay of gradients during the propagation between layers. Adding residual connections in multi-layer GRUs can alleviate the vanishing or exploding gradient issues, making the training process more stable. As shown in Figure 2, DSTGFCN adopts two layers of GC-GRU in both the encoder and decoder to enhance the model's ability to extract spatial and temporal features in long-term prediction scenarios.