## 3 Methodology
### Capture of Pedestrian Interaction  
Pedestrian movement is greatly shaped by the presence of nearby crowds, as individuals instinctively avoid paths where collisions might occur. Thus, incorporating human interactions into the analysis is essential for enhancing the precision of trajectory predictions. To achieve this, we utilize graph attention networks to capture potential interactions between pedestrians at the same moment in the scene, ensuring a more realistic representation of their movement patterns. Specifically, the edges of the graph are used to represent interactions among individuals. At time t, all pedestrians within the scene are interconnected, forming a completegraph \(G_{t}=(V_{t},E_{t})\). Here, \(V_{t}=\{v_{i}^{t}|\forall_{i}\in\{1,\ldots,N\}\}\) denotes the vertices of the graph, each symbolizing a pedestrian present in the scene. Similarly, \(E_{t}=\{e_{ij}^{t}|\forall_{i},j\in\{1,\ldots,N\}\}\) encompasses all edges within the graph \(G_{t}\), representing the interactions among all pedestrians. Crucially, the significance of the edges in \(E_{t}\) is determined by importance scores derived from the Graph Attention Network, as shown in Figure 4. This approach dynamically adjusts the intensity of interactions between different pedestrians, not only modeling the direct influence between adjacent pedestrians but also capturing complex global interactions, which is suitable for dealing with the complex and dynamic behavior of pedestrians in crowded environments. This highlights the influence of surrounding neighbors in a crowd on the differential importance of individual pedestrian actions. In the graph attention layer, the input consists of node feature vectors \(h=\{\overset{\rightarrow}{h}_{1},\overset{\rightarrow}{h}_{2},\ldots, \overset{\rightarrow}{h}_{N}\}\), where each node feature vector \(\overset{\rightarrow}{h}_{i}\in R^{F}\), with \(N\) representing the total number of nodes and \(F\) being the dimensionality of each node's features. The output is \(h^{\prime}=\{\overset{\rightarrow}{h}_{1},\overset{\rightarrow}{h}_{2}, \ldots,\overset{\rightarrow}{h}_{N}\}\), where each \(\overset{\rightarrow}{h}_{i}^{\prime}\in R^{F^{\prime}}\)(\(F^{\prime}\) and \(F\) may differ). Throughout the observation sequence \(\mathbf{t}=1,\ldots,\mathbf{T}_{obs}\), the LSTM encodes the node features \(s_{i}^{t}\) for use in the graph attention layer. The importance score \(e_{ij}\) indicates how influential node \(j\) is to node \(i\); a higher score means a stronger influence. This importance score \(e_{ij}\) is calculated using the following equation:  
\[q_{ij}^{t}=\left[W_{f_{i}^{t}}\parallel W_{f_{j}^{t}}\right] \tag{11}\]  
\[\mathbf{e}_{ij}^{t}=\frac{\exp\left(LeakyReLU\left(a^{T}q_{ij}^{t}\right) \right)}{\sum_{k\in\mathcal{N}_{i}}\exp\left(LeakyReLU\left(a^{T}q_{ik}^{t} \right)\right)} \tag{12}\]  
In this process, \(\mathbf{W}\in\mathbb{R}^{F^{\prime}\times F}\) is a weight matrix, where \(F\) denotes the dimensionality of the input \(s_{i}^{t}\), and \(F^{\prime}\) corresponds to the dimensionality of the output. The operation \(\parallel\) is utilized for concatenating the high-dimensional features of pedestrians and their immediate neighbors, resulting in a vector \(q_{ij}^{t}\in\mathbb{R}^{2F^{\prime}}\). Here, \(\mathbf{e}_{ij}^{t}\) denotes the varied importance scores allocated to pedestrian \(i\) and its neighboring individuals at time step \(t\). The term \(\mathcal{N}_{i}\) refers to the set of pedestrians interacting with pedestrian \(i\), linked through the graph's edges. Consequently, the attention layer's output is structured as follows:  
\[\hat{s}_{i}^{t}=\sigma(\sum_{j\in\mathcal{N}_{i}}\mathbf{e}_{ij}^{t}W_{f_{j} ^{t}}) \tag{13}\]  
Figure 4: Each neighbor in the graph has a different importance score for the current pedestrian. where \(\sigma\) is a nonlinear function and the hidden state \(\hat{s}_{i}^{t}\) contains the interaction effects of the surrounding neighbors on pedestrian \(i\).