## 3 Methodology
### Framework Overview
#### 3.2.3 FDGCN Layer  
In the MEDGCN, each FDGCN layer consists of graph convolutional network, temporal convolutional network, adaptive gating and residual connections [34]. The graph convolutional network obtains the spatial dependence between nodes by continuously aggregating neighborhood information, as shown in Figure 6.  
Extraction of spatial dependencies: we refer to DCNN so that we can use spatially diffused graph convolution to extract spatial dependencies between nodes in the traffic network. DCNN regard graph convolution as a diffusion process, which assumes that information is transferred from one node to another adjacent node with a certain transition probability and that it is continuously diffused. If the traffic road network is regarded as graph \(G(V,E)\), where \(V\in\mathbb{R}^{N\times N}\) is the set of all nodes, \(E\) is the set of edges, and \(X\in\mathbb{R}^{N\times C}\) is the feature matrix. If \(v_{i},v_{j}\in V\), for the network hidden layer \(l\), the diffusion graph convolution of node \(v_{i}\to v_{j}\) is defined as:  
\[z=f\Big{(}W\odot P_{v_{l}\to v_{j}}X\Big{)} \tag{11}\]  
where \(f\) is the mapping function, \(W\in\mathbb{R}^{C^{(in)}\times C^{(out)}}\) denotes the weight matrix, \(z\in\mathbb{R}^{N\times C}\) denotes the output. \(P_{v_{l}\to v_{j}}\in\mathbb{R}^{N\times N}\) denotes the probability transition matrix, \(N\) is the number of nodes, the \(\odot\) operator represents element-wise multiplication, and finally output through the fully connected layer. In our work, we use the adjacency matrix \(A_{s}\) obtained from the spatial fusion graph with distance and spatial similarity as the probability transition matrix \(P\) for diffusion convolution. Implicit representation of the previous layer is then calculated as a function of this layer. If given a node \(v_{i}\) and its \(p\)-order neighbor set \(v_{p}^{*}\) in the graph, for the network hidden layer \(l\), we define the diffusion graph convolution of node \(v_{i}\to v_{p}^{*}\) as:  
\[H_{v_{l}\to v_{p}^{*}}^{(l)}=f(A_{s}H_{v_{l}\to v_{p}^{*}}^{(l-1)}W^{(l)}) \tag{12}\]  
\[A_{s}=A_{sd}+A_{ss}+I_{N} \tag{13}\]  
Figure 6: A GCN aggregates neighborhood information to obtain the spatial dependence between nodes (order = 1, the node aggregates its first-order neighbors; order = 2, the node aggregates its second-order neighbors). where \(A_{s}\in\mathbb{R}^{N\times N}\), \(A_{sd}\) is the static distance graph of nodes, \(A_{ss}\) is the dynamic similarity graph of nodes, and \(I_{N}\) is the identity matrix. In our work, the diffusion order of the graph convolution is 2, and the node is diffused to its 2-order neighbors, then the diffusion convolution of the node \(v_{i}\) is defined as:  
\[H_{v_{i}}^{(0)}=X_{v_{i}} \tag{14}\]  
\[H_{v_{i}\to v_{1}^{*}}^{(1)}=f(A_{s}H_{v_{i}}^{(0)}W\ ^{(1)}) \tag{15}\]  
\[H_{v_{i}\to v_{2}^{*}}^{(2)}=f(A_{s}H_{v_{i}\to v_{1}^{*}}^{(1)}W\ ^{(2)}) \tag{16}\]  
\[H_{v_{i}}=\sigma(H_{v_{i}}^{(0)}+H_{v_{i}\to v_{1}^{*}}^{(1)}+H_{v_{i}\to v_{2 }^{*}}^{(2)}) \tag{17}\]  
where \(v_{1}^{*}\) and \(v_{2}^{*}\) are the 1-order neighbor set and 2-order neighbor set of the node \(v_{i}\), \(\sigma\) is the \(Relu\) activation function. Extraction of spatial dependencies. Temporal Convolutional Network (TCN) [36] is a model proposed in recent years with time series data processing ability. Its modeling ability on time series data sets is better than the recurring structure in a recurrent neural network, it is simple and effective without skipping cross-layer connections and can be computed in parallel. For the value of a hidden layer \(l\) in the network at time \(t\), it only depends on the value of the previous layer \(l-1\) at time \(t\) and before, and cannot see the future. Therefore, it is more suitable for traffic prediction with time series characteristics. To keep each hidden layer the same length as the input layer, the temporal convolutional network increases channels via zero padding.