# Hybrid Graph Models for Traffic Prediction
## 4 Methodology
### DGCN Block  
As shown in Figure 7, the HGM uses a graph convolutional network to mine potential topological information. The HGM dynamically updates the adjacency matrix during model training to construct topological information of the traffic network. Meanwhile, the DGCN adopts the 1D convolution to extract nonlinear temporal dependencies. The previous GNN-based methods mainly construct the topology information of the traffic network through distance or similarity between nodes. The adjacency matrix is considered prior knowledge and is fixed during the model training process. These methods are subjective and incomplete and may cause a huge impact on the predictive performance. [PERSON] et al. [43] combined attention with a graph to reflect the dynamic information of the network, but it still relies on prior knowledge to a certain extent. However, the constructed distance-based adjacency matrix cannot fully represent the topological information of the traffic network.  
The HGM proposes a novel way of generating network topology information. Specifically, as shown in Figure 8, the proposed method randomly initializes two node embeddings \(E_{1},E_{2}\in R^{N\times D_{4}}\) with learnable parameters, which can be updated during the model training process and can be defined as:  
\[A_{adp}=softmax(RELU(E_{1}E_{2}^{T}))\]  
Figure 6: Gated function.  
Figure 7: Dynamic graph convolution network.  
The proposed method multiplies \(E_{1}\) and \(E_{2}\) to calculate the adaptive adjacency matrix, removes the weak correlation of the adaptive adjacency matrix by the ReLU activation function, and normalizes the adjacency matrix through the softmax function. From a spatial-based perspective, the graph convolutional neural network updates the signal of the current node by aggregating and transforming the information of adjacent nodes. After obtaining the dynamic adjacency matrix, the graph convolutional neural network in the proposed method can be defined as:  
\[h^{l}=A_{adp}h^{l-1}W\]  
where \(A_{adp}\) represents the proposed dynamic adjacency matrix, \(h^{l-1}\) and \(h^{l}\) denote the input and output of the hidden layer, and \(W\) indicates trainable weights.  
In the temporal dimension, instead of building a complex neural network, a 1D convolutional neural network is used to extract nonlinear temporal dependencies after aggregating spatial signals through a dynamic adjacency matrix. Specifically, the proposed method sets the size of the 1D convolution kernel to \(size=3\), and the sliding step size to \(s=1\) to extract temporal features, and then the size of the time dimension is converted into \(Q\) through linear projection operations to obtain the future road conditions.  
As mentioned above, we detail the core principles of the STA module and the DGCN. As shown in Figure 3, in order to extract deep features, the proposed method adopts a residual network to stack \(L\) layers of STA module and DGCN. The extraction of static and dynamic information is achieved through different branches. In addition, the HGM dynamically calculates weights according to branch results to improve the predictive performance of the model.