# Pedestrian Trajectory Prediction Based on Dual Social Graph Attention Network
## 4 Experiment and Results
### Ablation Experiments  
In this section, to verify the effectiveness of the proposed directed social attention function and group attention function, we design a set of experiments to conduct ablation studies on the model. Table 3 shows different experimental configurations, where the baseline model (Basel) indicates that the model does not use our attention functions but only aggregates the node features of the two branches through the basic adjacency matrix. The Social option indicates whether to use the directed social attention function for individual features, and the Group option indicates whether to use the group attention function for group features. As shown in Table 3, in this comparative experiment, we observe that although both methods contribute to improving the model performance, the effect is relatively limited when only the group attention function is combined with the baseline model. In contrast, after introducing the directed social attention function, the model performance is significantly improved, with ADE/FDE reduced to 0.42 and 0.68, respectively. Finally, when both functions are introduced simultaneously, the model performance is further enhanced, indicating that our approach of collecting more pedestrian features through these two methods to improve model performance is correct. To verify the effectiveness of the proposed Spatio-Temporal Weighted Attention Network, we conducted relevant research on the calculation of directed weighted graphs and used different methods to calculate the directed weighted graph. Specifically, we designed four methods for experimental testing. As shown in Table 4, in the first method (M1), based on the Directed Graph Convolutional Neural Network (DGCN), the node features of the next layer are propagated after calculating the adjacency matrix through in-degree normalization. \[h_{i}^{l+1}=\sigma(D^{-1}Ah_{j}^{l}) \tag{15}\] \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Basel** & **Social** & **Group** & **ETH** & **HOTEL** & **UNIV** & **ZARA1** & **ZARA2** & **AVG** \\ \hline \(\surd\) & & & 0.66/1.21 & 0.45/0.77 & 0.49/0.91 & 0.37/0.60 & 0.35/0.56 & 0.46/0.81 \\ \(\surd\) & & \(\surd\) & 0.68/1.27 & 0.43/0.71 & 0.54/0.97 & 0.36/0.55 & 0.33/0.53 & 0.47/0.80 \\ \(\surd\) & \(\surd\) & & 0.61/1.05 & 0.38/0.60 & 0.44/0.74 & 0.34/0.53 & 0.31/0.50 & 0.42/0.68 \\ \(\surd\) & \(\surd\) & \(\surd\) & 0.60/0.97 & 0.34/0.54 & 0.42/0.76 & 0.31/0.49 & 0.29/0.47 & 0.39/0.64 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: In the ablation experiments, “Social” and “Group” refer to the individual and group feature modules, respectively, while “Basel” indicates the baseline model without these modules. as shown in Equation (15). \(h_{j}^{l}\) represents the feature vector of node \(j\) in the \(l\)-th layer, A is the adjacency matrix, \(D^{-1}\) is the inverse of the degree matrix, \(\sigma\) is the activation function, and \(h_{i}^{l+1}\) denotes the feature vector of node \(i\) in the \((l+1)\)-th layer. The second method is an improved approach based on Graph Attention Networks (GATs). In this method, \(\alpha_{ij}^{l}\) represents the attention coefficient between node \(i\) and node \(j\) in the \(l\)-th layer, and \(W_{ij}\) is the weight of the directed weighted graph. The meanings of other symbols are consistent with those in Equation (16). \(W_{ij}\) directly acts as an explicit weighting factor in the propagation of node features, and the propagation equation is as follows:  
\[h_{i}^{l+1}=\sigma(\sum_{j\in V_{i}}a_{ij}^{l}h_{j}^{l}W_{ij}) \tag{16}\]  
In the third method, we add the weights \(W_{ij}\) of the directed weighted graph to the node features and then participate in the aggregation propagation, as shown in Equations (15) and (16). In this context, \(a_{k}^{T}\) is a learnable parameter used to weight node features during the feature aggregation process. \(\gamma\) is a learnable scalar that modulates the interaction between edge weights and node features. The meanings of other symbols are consistent with those in Equation (17).