Abstract
Federated Learning (FL) typically employs a centralized hub-and-spoke model, which often leads to communication bottlenecks and sensitivity to device failures. We present FedP2P, a hierarchical FL framework that organizes edge devices into local peer-to-peer (P2P) clusters. By performing local synchronization via bandwidth-efficient primitives before global aggregation, FedP2P significantly reduces the server's communication load. Experimental results show that FedP2P achieves up to 10x communication speedup and 8% higher accuracy compared to traditional Federated Averaging (FedAvg), while maintaining high resilience to stragglers.
Introduction
Standard Federated Learning (FL) relies on a centralized architecture where a single server coordinates updates from thousands or millions of edge devices. This design introduces two primary challenges: the bandwidth bottleneck at the central server and the straggler effect, where slow or disconnected devices delay the entire training round. Existing frameworks often fail to exploit the underlying network topology, ignoring the high-bandwidth potential of local device-to-device communication.
The FedP2P Architecture
To overcome these limitations, we propose FedP2P (Federated Peer-to-Peer). FedP2P restructures the communication topology from a simple star graph into a hierarchical cluster-based system. The training process is divided into three distinct phases:
- Local P2P Network Formation: The central server partitions $N$ participating devices into $L$ small clusters. Instead of broadcasting to all devices, the server communicates only with a single "agent" device per cluster.
- P2P Synchronization: Within each cluster, devices perform local training on their respective data. They then use Allreduce—a bandwidth-optimal communication primitive—to synchronize their models with immediate peers. This step happens in parallel across all clusters, shifting the heavy synchronization load to the network edge.
- Global Synchronization: The central server collects the aggregated model from the agent of each cluster, performs a final global average, and redistributes the updated global model to the agents for the subsequent round.
By utilizing P2P communication for local consensus, FedP2P minimizes the data transfer requirements at the central hub and allows for more frequent synchronization without saturating the server's bandwidth.
Experimental Setup
We evaluated FedP2P against the industry-standard Federated Averaging (FedAvg) using a variety of benchmarks:
- Real-world Datasets: MNIST (digits), FEMNIST (62-class images), and The Complete Works of William Shakespeare (next-character prediction via LSTMs).
- Synthetic Datasets: We developed SynCov and SynLabel to simulate covariance and label probability shifts, respectively. These datasets specifically test the algorithm's performance under non-IID (Independent and Identically Distributed) conditions typical of real-world deployments.
Results and Discussion
FedP2P demonstrates superior performance across multiple metrics:
- Communication Efficiency: FedP2P achieved a 10x speedup in total communication time compared to FedAvg in large-scale scenarios. This is attributed to the reduced number of direct connections to the central server.
- Accuracy and Convergence: The framework consistently outperformed FedAvg, showing an 8% to 9% improvement in accuracy on the Shakespeare and MNIST tasks. The local consensus step within P2P groups acts as a natural denoiser, leading to smoother and faster convergence.
- Resilience to Stragglers: In stress tests where 50% of devices dropped out, FedP2P's accuracy remained stable. In contrast, FedAvg exhibited high instability, with accuracy fluctuations of up to 20% between rounds.
Conclusion and Future Work
FedP2P represents a significant step toward scalable and robust federated learning. By exploiting underutilized edge bandwidth, it achieves substantial gains in both efficiency and model quality. Future research will explore topology-aware grouping to further optimize clusters based on physical network proximity and investigate advanced cryptographic methods to ensure privacy within the P2P communication layer without sacrificing performance gains.
Summary updated