# Autonomous Driving Decision-Making Method Based on Spatial-Temporal Fusion Trajectory Prediction
## 3 Results and Analysis
### Evaluation of Prediction Model
#### 3.1.2 Experimental Results of Prediction Model  
The prediction model in this paper is compared with three other prediction models: Bilstm (Bi-directional long short-term memory networks), a transformer encoder based on temporal features only, and a model based on spatial-temporal features, EGCN [21] (Evolving Graph Convolutional Networks), and two evaluation metrics commonly used in trajectory prediction were used to evaluate the predicted coordinates. (1) Average Displacement Error (ADE), the average Euclidean distance between the predicted and true trajectories. \[\text{ADE}=\frac{1}{N}\sum_{i=1}^{N}\sqrt{\left(x_{i}-x\right)^{2}+\left(y_{i} -y\right)^{2}} \tag{23}\]  
where \(N\) denotes the number of moments of the trajectory, \(x_{i}\) and \(y_{i}\) are the horizontal and vertical coordinates of the predicted position at the first moment, \(x\) and \(y\) are the horizontal and vertical coordinates of the true position at the moment \(i\). (2) Final Displacement Error (FDE), the Euclidean distance between the final prediction and the corresponding true trajectory position. \[\text{FDE}=\sqrt{\left(x_{f}-x\right)^{2}+\left(y_{f}-y\right)^{2}} \tag{24}\]  
where \(x_{f}\) and \(y_{f}\) are the horizontal and vertical coordinates of the predicted final position. \(x\) and \(y\) are the horizontal and vertical coordinates of the true final position. The results of the simulation tests for the ego-vehicle prediction using the data sets for both operating conditions are shown in Table 3:  
From Table 3, it can be seen that the temporal-based prediction model exhibits large errors in ADE and FDE values, and the US101 scenario, in which the vehicle traveling is more regular, has a smaller prediction error. Among them, the transformer encoder model is too large, which instead leads to increased optimization difficulty and obvious deviations in prediction accuracy. In contrast, the EGCN model and the model proposed in this study not only consider the feature interactions in the time dimension, but also combine the interactions between different vehicles at the same moment and achieve more ideal prediction results. The model proposed in this study extracts information about the surrounding environment more effectively through the mechanism of multi-head attention, which significantly improves the prediction effect, thus proving the superiority of this model in trajectory prediction. \begin{table}
\begin{tabular}{c c} \hline
**Parameter Name** & **Parameter Value** \\ \hline Input Dimension & 4 \\ Number of nodes in the hidden layer of the encoder & 128 \\ Number of nodes in the hidden layer of the LSTM & 256 \\ GCN parameter learning rate & \(5\times 10^{-3}\) \\ Model learning rate & \(5\times 10^{-4}\) \\ Batchsize & 128 \\ Input Sequence Length & 10 \\ Output sequence length & 10 \\ \hline \end{tabular}
\end{table} 
Table 2: Prediction model hyperparameter settings. Autonomous driving scenarios require high real-time performance and thus impose more stringent criteria on model efficiency. In order to evaluate the feasibility of the model in this paper in real applications, we choose three key metrics for performance evaluation: the number of floating-point operations (#FLOPs) is used to measure the computational complexity of the model, the number of parameters (# Params) denotes the total number of parameters in the model that need to be trained, and the inference time is the time required for each inference. A comparison of the specific metrics is shown in Table 4:  
According to Table 4, the temporal-based prediction model only relies on trajectory data as the input, so the number of parameters (param) and computation (FLOP) of its model is low. In contrast, the spatial-temporal fusion-based prediction model requires an additional input of neighborhood matrix in addition to trajectory data, and its prediction results include not only the trajectories of the ego-vehicle, but also the trajectories of the surrounding participants.