## 5 Simulation Results and Discussion
### Performance Comparison of Attention-Mechanism-Based PFL with Traditional FL Methods  
In this section, we compare the performance of the proposed attention mechanism-based PFL approach with the traditional FL methods, particularly FedAvg and FedSGD, when varying the number of vehicles (\(V\)) and varying road length (\(R_{L}\)). The percentage of latency violations in PFL with attention mechanism and conventional FL and the average delay experienced by a packet are illustrated in Figure 8. During the local model hyper-parameter updates, each local model weight is normalized to a value between 0.20 and 0.85  
Figure 6: Variation in percentage of latency violations with number of vehicles (\(V\)) in FedSGD and PFL scenarios. Figure 7: Variation in average latency (ms) in FedAvg and PFL scenarios with \(V\) for different road lengths (\(R_{L}\)). to measure the variance in the data distribution during the dataset partitioning. The FedAvg and FedSGD algorithms emphasize vehicle-specific model hyper-parameter transmissions to the UAV. As illustrated, PFL with attention mechanism also significantly outperforms FedAvg and FedSGD as well as PFL, which implies that the attention mechanism leverages the similarity of data distributions in clusters of vehicles to improve the performance over heterogeneous data. It is also observed that a vehicle accumulates a higher reward to maintain a higher probability to remain in a cluster during all TTIs. The higher reward of a vehicle emphasizes consistent presence in a PFL cluster and model transmission to the UAV, which improves the global model's convergence rate. The consistency of local model updates and transmission to the UAV increases the accumulated reward and leads to quicker local model convergence. However, the trend is adversely impacted as the number of vehicles increases, as more vehicles complete their local model hyper-parameter updates and compete to gain access to the UAV's resources, i.e., bandwidth and available battery power over state-action pairs. As compared to PFL, where the percentage of latency violations lies between 18 and 28%, the percentage of latency violations for PFL with attention mechanism decreases considerably. As noted from Figure 8, the percentage of latency violations for PFL with attention mechanism lies between 12 and 20%, marking a steep decline of 15% as compared to PFL. The variation in average latency (ms) in the FedSGD and PFL with attention mechanism scenarios is illustrated in Figure 9.  
Figure 10 illustrates the variation in average packet delay (ms) in PFL for a varying number of vehicles (\(V\)) for different road lengths (\(R_{L}\)). As illustrated in Figure 10, when the road length (\(R_{L}\)) is increased to 4 km, the delay exceeds the latency threshold (\(L_{max}\)) of 30 ms. From Figures 9 and 10, we observe that there is an approximate 20% reduction in latency for the same number of vehicles that are served by the UAV in a given TTI when utilizing the trajectory predictions of the PFL model with attention mechanism. The attention mechanism leads to improved trajectory prediction compared to conventional FL as well as PFL. Also, PFL with attention mechanism handles the data heterogeneity effectively. Figure 11 illustrates the variations in average latency (ms) in the FedAvg, FedSGD, PFL, and PFL with attention mechanism scenarios with a varying number of vehicles (\(V\)) for road length (\(R_{L}\)) = 2 km. Figure 11 illustrates the outputs of Figures 8 and 9 on a single plot for comparative analysis. It is observed from Figure 11 that the average latency achieved in the case of FedAvg and FedSGD over a road length (\(R_{L}\))  
Figure 8: Variation in percentage of latency violations with number of vehicles (\(V\)) in PFL and PFL with attention mechanism. of 2 km for varying vehicle velocities is between 16 ms and 24 ms. For the same vehicle velocities and road length, the average latency for PFL and PFL with attention mechanism is between 10 ms and 18 ms.