## 4 The Vehicle Trajectory Prediction Model
### Vehicle-Vehicle Interaction Module  
When vehicles move on highways or urban roads, there are significant interactions between a target vehicle and surrounding obstacles, especially moving targets. Such interactions are crucial for determining the future trajectory of the target vehicle. By observing the historical motion states of traffic participants and extracting their temporal features, we may obtain relationship coefficients between the target vehicle and the surrounding vehicles via a graph attention mechanism. A mixed traffic scenario consisting of multiple vehicles can be regarded as a multi-agent system expressed as the directed graph \(\mathcal{G}=(\mathcal{V},E)\), where \(\mathcal{V}=(V_{o},V_{i}),i\in\mathcal{N}(V_{o})\) represents the nodes consisting of vehicles and \(E\subset V\times V\) is the set of edges, denoting the interactions between nodes. Note that the edge information only exists for neighboring nodes, indicating that the motion of the vehicle is affected by the other vehicles nearby. Firstly, based on the motion states of the object vehicle and surrounding vehicles, the node information is encoded at each sampling time \(t\) as  
\[ \begin{split} m_{o}^{t}&=\sigma\big{(}W_{v}^{o}s_{ o}^{t}\big{)}\\ m_{i}^{t}&=\sigma\big{(}W_{v}^{i}s_{i}^{t}\big{)} \end{split}  \tag{2}\]  
where \(\sigma(\bullet)\) is the nonlinear activation function, and \(W_{v}^{o}\) and \(W_{v}^{i}\) are the weight matrixes for the object vehicle and surrounding vehicles, respectively. Considering that the trajectory and motion states of the vehicle are continuously time-varying parameters, the interactions between the motion states of all surrounding vehicles and the target vehicle also show temporal variations. Therefore, the LSTM is adopted here to process the historical motion states of the target vehicle and the surrounding vehicles, to obtain their potential temporal features, which are represented as temporal motion feature vectors in the following equations:  
\[ \begin{split} h_{o}^{t}&=\text{LSTM}\big{(}h_{o} ^{t-1},m_{o}^{t};W_{h}\big{)}\\ h_{i}^{t}&=\text{LSTM}\Big{(}h_{i}^{t-1},m_{i}^{t };W_{h}\Big{)}\end{split}  \tag{3}\]  
where \(h_{o}^{t}\) and \(h_{i}^{t}\) are the hidden feature vectors of the target and surrounding vehicles at time \(t\), while \(W_{h}\) is the LSTM encoder weight. Although different vehicles use separate LSTM networks, they share the same network parameters. Figure 2: The coordinate system for trajectory prediction. Based on the directed graph containing nodes and edges, the interaction features can be extracted by aggregating the node and edge information, which effectively indicates the vehicle-vehicle motion interaction mechanism. Here, the GAT is adopted to execute aggregation operations on neighboring nodes for adaptive matching of different node weights. The basic principle of GAT is shown in Figure 3.  
The general GAT architecture directly concatenates the node information to obtain the spatial weight coefficients. However, the node feature only contains the vehicles' own motion information, and it is difficult to represent the relative vehicle motion relationships via direct concatenation of each node. Moreover, it is impossible to explicitly express the physical collision constraints between vehicles. In fact, there are a number of well-established evaluation metrics that can effectively quantify the vehicle collision risk and provide a reliable basis for vehicle decision-making systems. For example, the time to collision (TTC) and time head way (THW) are widely adopted in adaptive cruise control (ACC) and autonomous emergency braking (AEB) for longitudinal collision risk assessment, which are also incorporated into the vehicle motion features to establish the cognitive model of driver behavior [31]. In complex environments, vehicle motion trends are influenced by a combination of multidimensional factors.