## 5 Experiments and Results
### Discussions  
In this section, we discuss and analyze the results obtained. Considering the convergence behaviors of the models, the results indicate that the models trained with FedAVG and FedSGDP2P can achieve comparable behaviors to Fedavg when provided with both IID and non-IID client data.  
From Table 2, some important points come to light. It shows that, generally, the number of communication rounds needed to cross the f1-score threshold varies depending on whether the data are IID or non-IID, with non-IID data often requiring more rounds. It further indicates that algorithms tend to reach the f1-score threshold more quickly with IID data than with non-IID data. This is expected, as non-IID data represent a more realistic but challenging scenario, where data are unevenly distributed across clients, which can complicate the learning process. Centralized algorithms, both FedAVG and FedSGD, show a consistent requirement for communication rounds, irrespective of the data distribution (IID or non-IID). In contrast, heuristic optimizations in decentralized settings (P2P) display a variation in the number of rounds needed, which could indicate that certain heuristics are better suited for specific data distributions.  
By observing the convergence behaviors of the models for FedAVG and FedP2P, we observe that the general behaviors are quite similar for both methods. Most experiments conclude with models reaching an accuracy of approximately 92%. These results suggest that the convergence behaviors of the average FedAVGP2P models are more comparable to those of FedAVG when the size of C is sufficient.  
Let us consider the experiments with the fewest models sent over the network when the model f1-score reached 90%: in both cases, with IID and non-IID client data, both FedAV G and FedSGDP2P required higher network communication costs (number of rounds). However, naturally, with FedAVGP2P, the burden of communication costs is distributed among the participating clients rather than being heavily concentrated on a central server. Therefore, if there is a communication constraint at the central server level, such as insufficient bandwidth, FedAVGP2P may be a suitable approach.  
Regarding the effect of the heuristics, for higher values of C, we observe comparable convergence behaviors for all the algorithms. This partly indicates that when communicating with a large portion of clients in the network, the choice of neighbors with whom each client communicates is not of significant importance. This situation makes us push our analysis further as to why the use of heuristics did not perform better than the original FedAVGP2P and FedSGDP2P. One possible reason could be that the heuristic leads the network clients to communicate more frequently with the same type of neighbors. This, in turn, could introduce multiple clusters in the network, where clients are more likely to communicate with neighbors within the same cluster. Additionally, this could prolong the time  
Figure 13: Compare a model that uses gradient vectors from its neighbors and both its gradient vectors (orange) and a model that uses only gradient vectors from its neighbors (green). Here, we set the number of steps per round to 1.  
during which clients receive model parameters from neighbors outside their own cluster, potentially leading to lower performance by reducing the diversity of model parameters received by each client.