# Autonomous Driving Decision-Making Method Based on Spatial-Temporal Fusion Trajectory Prediction
## 2 Method
### Predictive Model Based on Spatio-Temporal Feature Fusion  
The overall spatial-temporal feature-based prediction model is constructed in an encoder-decoder structure to establish a coding structure based on a spatial-temporal graph convolution network and a decoding structure based on an LSTM network. Specifically, the encoder utilizes a graph-based convolutional neural network and a multi-attention mechanism to capture spatial-temporal relationships and features in the data and convert the input data into high-dimensional features, while the decoder, LSTM, is responsible for efficiently converting the time-series data into predicted trajectory point outputs, and the whole trajectory prediction model is shown in Figure 2.  
Figure 1: Overall structure. Firstly, based on the historical trajectory information of the ego-vehicle as well as its surrounding traffic participants, the interaction between vehicles at moment \(t\) is modeled as a dynamic graph \(G_{t}(V_{t},E_{t})\) where \(V_{t}=\{v^{i}_{t}|i=1,\cdots,n\}\) is the node set for the graph at time \(t\). Each node in the node set represents the state of the vehicle within the range of interest from the ego-vehicle, including the position coordinates, velocity, and acceleration, which are highly relevant features of the vehicle trajectory, i.e., \(v^{i}_{t}=[x^{i}_{t},y^{i}_{t},u^{i}_{t},a^{i}_{t}]\). In the real operation, the node set \(V_{t}\) is usually expressed by the node embedding matrix \(H^{(l)}_{t}\) formed by the stacking of all the vehicle nodes at the moment \(t\). In order to better understand the temporal relationship between dynamic graphs at different moments, this paper concatenates the node embedding matrix with time embedding at each moment as the inputs to the graph neural network:  
\[H^{(l)}_{t\_emb}=\text{ concat}(H^{(l)}_{t},S_{t}) \tag{1}\]  
where \(S_{t}\) denotes the one-hot vector at time step \(t\) and its vector length is the total time step length T.  
\(E_{t}\) is the edge set in the graph at time \(t\), representing the association information between vehicle nodes. In arithmetic, \(E_{t}\) is usually expressed as an adjacency matrix \(A_{t}\).To describe the spatial information of the vehicles at each moment more intuitively, this paper uses the weighted adjacency matrix \(\overline{A_{t}}\) instead of \(A_{t}\). The distance between the two vehicles is used as a weighted value to reflect the positional relationship between them. At any time step \(t\), the element \(a[i][j]\) in the weighted neighborhood matrix is denoted as the Euclidean distance between vehicle \(i\) and vehicle \(j\), calculated as follows:  
\[a[i][j]=\sqrt{\left(x^{i}_{t}-x^{j}_{t}\right)^{2}+\left(y^{i}_{t}-y^{j}_{t} \right)^{2}} \tag{2}\]  
The single-step update method of the coding network can be expressed as:  
\[W^{(l)}_{t}=\text{GRU}\Big{(}H^{(l)}_{t\_emb},W^{(l)}_{t-1}\Big{)} \tag{3}\]  
Figure 2: Encoder-decoder network. where \(l\) is the number of layers, \(W_{t}^{(l)}\) is the weight matrix of the \(l\) layer of the GCN network. We set the number of layers \(l\) to 2. At time step \(t\), the GRU network updates the weight matrix \(W_{t}^{(l)}\) of the GCN network according to the node embedding matrix \(H_{t\_emb}^{(l)}\) of layer \(l\) and the hidden state \(W_{t-1}^{(l)}\) of the previous time step in order to retain the graph information of the previous time step. The GCN consists of a multilayer graph convolution, where each layer takes the weighted adjacency matrix \(\overline{A_{t}}\) and the node embedding matrix \(H_{t\_emb}^{(l)}\) as inputs, and updates the node embedding matrix \(H_{t\_emb}^{(l+1)}\) with the weight matrix \(W_{t}^{(l)}\).The resulting node embedding matrix not only reflects the spatial relationship between vehicles at the current moment, but also synthesizes the spatial relationship at the previous moment, and thus has continuity in the time sequence.