## 4 The Vehicle Trajectory Prediction Model
### Vehicle-Vehicle Interaction Module
The artificial potential field method is widely used to establish multi-agents' interactions, which represents the combined effect of obstacles in the environment on the target, as determined by adding the attractive and repulsive fields together. As for vehicle-vehicle interaction, the repulsive field is the most suitable to characterize the effect of surrounding vehicles on the target vehicle, which generates the repulsive force need for the target vehicle to adjust its future motion trends in order to avoid potential collision risks and ensure a safe driving space [32; 33; 34]. Thus, we adopt the repulsive potential field as the priori information about the edge features. The repulsive force between vehicles at time \(t\) can be presented as  
\[ \begin{split} F^{t}_{ij}&=c_{ij}e^{-(c^{t}_{ij}x^{ t}_{ij}+c^{t}_{ji}y^{t}_{ij})}\\ c^{t}_{xij}&=\frac{1}{u^{t}_{ij}+p}\\ c^{t}_{yij}&=\frac{1}{\overline{w}_{j}}\end{split}  \tag{4}\]  
where \(F^{t}_{ij}\) is the repulsive force on the \(i\)th vehicle generated by the \(j\)th vehicle. \(c_{ij}\) is the scaling factor determined by the vehicle type. \(x^{t}_{ij}y^{t}_{ij}\) denote the relative longitudinal and  
Figure 3: The principle of the graph attention mechanism. lateral distances between the \(i\)th and the \(j\)th vehicles. \(u_{ij}^{t}\) is the relative longitudinal velocity. Note that compared with longitudinal collision, lateral collision is more dangerous. Even if the collision speed is low, it is still prone to causing dangerous conditions such as vehicle side slip and spinning. Hence, we introduce \(c_{xij}^{t}\) and \(c_{yij}^{t}\) as the shape factors defining the vehicle collision risk at different scales for the longitudinal and lateral directions. \(p\) is a very small positive number and \(W_{j}\) is the width factor for the \(j\)th vehicle. For the partial derivatives of \(F_{ij}^{t}\) with respect to \(x_{ij}^{t}\) and \(y_{ij}^{t}\), the longitudinal and lateral repulsive force gradients of the vehicle can be obtained as  
\[ \begin{split}& g_{xij}^{t}=\frac{\partial F_{ij}^{t}}{\partial x_{ ij}^{t}}\\ & g_{yij}^{t}=\frac{\partial F_{ij}^{t}}{\partial y_{ij}^{t}} \end{split}  \tag{5}\]  
After summing up the repulsive force gradients generated by the surrounding vehicles, the total gradient of the \(i\)th vehicle is  
\[ \begin{split}& g_{xi}^{t}=\sum g_{xij}^{t};j\in\mathcal{N}(V_{i}) \\ & g_{yi}^{t}=\sum g_{yij}^{t};j\in\mathcal{N}(V_{i})\end{split}  \tag{6}\]  
When applying an artificial potential field, we regard the longitudinal and lateral repulsive force gradients as the priori edge information and concatenate that with vehicles' own motion feature parameters to form new node features, as  
\[ \begin{split}&\widetilde{h}_{o}^{t}=\left(h_{o}^{t}\Big{\|}g_{xo}^{t} \Big{\|}g_{yo}^{t}\ \right),j\in\mathcal{N}(V_{o})\\ &\widetilde{h}_{i}^{t}=\left(h_{i}^{t}\Big{\|}g_{xixi}^{t}\Big{\|} g_{yi}^{t}\ \right),j\in\mathcal{N}(V_{i})\end{split}  \tag{7}\]  
where \(\|\) defines the concatenation operation. Then, the attention coefficients between individual nodes can be calculated as  
\[ \begin{split}& a_{ij}^{t}=\frac{\exp\biggl{(}\mathrm{LeakyReLU} \biggl{(}a^{T}\biggl{[}W\widetilde{h}_{i}^{t}\Big{\|}W\widetilde{h}_{j}^{t} \biggr{]}\biggr{)}\biggr{)}}{\sum_{k\in\mathcal{N}(i)}\exp\biggl{(}\mathrm{ LeakyReLU}\biggl{(}a^{T}\biggl{[}W\widetilde{h}_{i}^{t}\biggr{\|}W \widetilde{h}_{k}^{t}\biggr{]}\biggr{)}\biggr{)}}\end{split}  \tag{8}\]  
where \(a_{ij}^{t}\) is the attention coefficient of node \(j\) to node \(i\), \(W\) is the weight matrix of the trainable linear transformation for each node, \(a\) is the weight vector of the single-layer feed-forward neural network, and \(\mathrm{LeakyReLU}(\bullet)\) is the LeakyReLU activation function. Subsequently, the weighted sum of node features is derived based on the graph attention coefficients. The output of GAT can be reformulated as the new node feature  
\[ \begin{split}&\hat{h}_{i}^{t}=\sigma\biggl{(}\sum_{j\in\mathcal{N}( i)}\alpha_{ij}^{t}W\widetilde{h}_{j}^{t}\biggr{)}\end{split}