## 3 Methodology
### Framework Overview
#### 3.2.2 Multi-Stage Hybrid Spatio-Temporal Fusion  
Considering the complex and changing spatio-temporal information of the traffic network, we propose a multi-stage hybrid spatio-temporal fusion method. This effectively fuses temporal and spatial information at different levels and can capture longer-term spatio-temporal relationships. In the early stage, we fuse the static and dynamic spatio-temporal graphs obtained from the association graph, respectively, and retain the original characteristics of the data. Relevant parameters are reduced as much as possible to obtain the spatial graph and temporal information. To obtain a better representation of the spatio-temporal feature, we use the Node2 vec [35] method to perform node embedding operation on the spatial graph to obtain the spatial representation \(E_{s}\). As for the temporal information, in order to avoid matrix sparsity, we use the One-Hot encoding operation to obtain the time representation \(E_{t}\). The spatial and temporal representations are then fused to obtain the final spatio-temporal representation \(E_{st}\), as shown in Figure 4.  
In the mid-stage, inspired by the structure of LSTM, the gate fusion mechanism is used to adjust the state of information flow in neural networks. We design an adaptive  
Figure 4: Static and dynamic spatio-temporal representation fusion (here \(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; \(T_{d}\) is the daily One-Hot static encoding of the time series, \(T_{w}\) is the weekly One-Hot static encoding of the time series, and \(T_{sim}\) is the dynamic similarity graph representation of the time series). gated spatio-temporal fusion mechanism that weights the different feature vectors of the multimodal input by dynamically generating adaptive weights. It can adaptively learn and control important features and assign larger weights to them, which can increase the feature weights required by the target and reduce the irrelevant feature weights. The adaptive gating structure is shown in Figure 5.  
When feature \(X\) is input into the network, the adaptive gating adjustment parameter \(\alpha\) receives feature vectors from different modes and weights the importance of hidden layer information of each time step to the target information. It then adaptively adjusts the output information required by the target. For the hidden network layer \(l\), the calculation and weighting of the gate \(\alpha\) is defined as:  
\[H_{s}^{(l)}=G_{\otimes}(W_{s}\cdot X_{s}) \tag{4}\]  
\[H_{t}^{(l)}=T_{\otimes}(W_{t}\cdot X_{t}) \tag{5}\]  
\[\alpha=\sigma(\otimes(H_{s}^{(l)}+H_{t}^{(l)})) \tag{6}\]  
\[H_{st}^{(l+1)}=H_{s}^{(l)}\cdot\alpha+H_{t}^{(l)}\cdot(1-\alpha) \tag{7}\]  
where \(W\in\mathbb{R}^{C^{(in)}\times C^{(out)}}\) is the weight matrix, \(X_{s}\in\mathbb{R}^{N\times C}\) and \(X_{t}\in\mathbb{R}^{N\times C}\) are the input features of spatial and temporal information, respectively, \(H_{s}^{(l)}\) is the output of the hidden layer after the graph convolution of \(X_{s}\), \(H_{t}^{(l)}\) is the output of the hidden layer after the temporal convolution of \(X_{t}\). \(\otimes\) is the convolution operation, \(G_{\otimes}\) is the graph convolution operation, \(T_{\otimes}\) is the temporal convolution operation, and \(\sigma\) is the _sigmoid_ activation function, and \(H_{st}^{(l+1)}\) is the output result of the hidden layer \(l\). In the late decision stage, we use a multi-head attention mechanism to deeply fuse the results obtained in the early and middle stages again. For each head attention, we determine the importance of the spatio-temporal representation as predicted from the historical spatio-temporal representation and sum it with the weighted feature matrix after transformation. The multi-head attention results are then finally concatenated.