Boosting Federated Learning Convergence with Prototype Regularization

Yu Qiao, Huy Q. Le, Choong Seon HongarXiv 2023 · DOI

Abstract

Federated Learning (FL) enables collaborative model training without sharing raw data, but it is frequently hampered by data heterogeneity (non-IID data) across clients. This paper introduces Federated Prototype Regularization (FedPR), a novel framework that leverages global prototypes as anchors to guide local model updates. By incorporating a regularization term that aligns local feature representations with global class-wise prototypes, FedPR significantly mitigates model drift. Experimental results on MNIST and Fashion-MNIST demonstrate that FedPR achieves up to an 8.9% accuracy improvement and faster convergence compared to the baseline FedAvg algorithm.

Introduction

Federated Learning (FL) has emerged as a critical paradigm for training machine learning models across decentralized devices while preserving data privacy. However, a significant challenge in FL is data heterogeneity. In real-world deployments, data is rarely Independent and Identically Distributed (IID). For instance, different users may possess data from entirely different classes. When a global model is trained using standard algorithms like FedAvg in such non-IID environments, local updates often conflict, leading to "client drift," slow convergence, and degraded final accuracy.

Methodology: Federated Prototype Regularization (FedPR)

To address the challenge of data heterogeneity, we propose FedPR. The central innovation is the use of "prototypes"—mean feature representations for each class—to provide a shared global understanding of the feature space.

The FedPR framework workflow involving local training, prototype calculation, and global aggregation.

As illustrated in the workflow above, the FedPR process consists of five key steps:

  1. Local Training: Clients perform standard local training on their private datasets.
  2. Prototype Calculation: Each client computes "local prototypes" by averaging the feature vectors (encoder outputs) for each class present in their local data.
  3. Model Averaging: Clients send their model weights to the server for standard aggregation.
  4. Prototype Aggregation: Clients also upload their local prototypes. The server averages these to form a set of Global Prototypes.
  5. Model & Prototype Back: The server sends the aggregated model and global prototypes back to the clients.

During the next round of local training, clients incorporate a Prototype Regularization term into their loss function. This $\ell_2$ distance penalty encourages the local feature extractor to produce representations that are close to the global anchors, effectively stabilizing the learning process across heterogeneous clients.

Experimental Results

We evaluated FedPR using MNIST and Fashion-MNIST datasets under a highly non-IID setting (Dirichlet distribution with $\alpha = 0.05$) across 10 clients. This creates a challenging scenario where most clients only have access to a few classes.

Comparison of average test accuracy over communication rounds on the Fashion-MNIST dataset.

As shown in the performance comparison above, FedPR demonstrates a clear advantage in both convergence speed and final accuracy on the Fashion-MNIST dataset. Specifically:

  • Accuracy Improvement: FedPR achieved an average test accuracy of 86.05% on Fashion-MNIST, representing an 8.9% boost over FedAvg. On MNIST, it reached 94.62%, a 3.3% improvement.
  • Convergence Speed: FedPR reaches target accuracy levels in significantly fewer communication rounds. This efficiency is vital for edge devices with limited bandwidth and power.

Conclusion

FedPR offers a computationally efficient solution to the problem of data heterogeneity in Federated Learning. By using global prototypes as anchors, it prevents local models from drifting too far from a globally consistent feature representation. Future work will focus on evaluating FedPR on more complex, high-resolution datasets and exploring its scalability in larger networks with hundreds of clients.

Summary updated

BibTeX
@misc{qiao2023boosting,
  author = {Yu Qiao and Huy Q. Le and Choong Seon Hong},
  title = {{Boosting Federated Learning Convergence with Prototype Regularization}},
  year = {2023},
  eprint = {2307.10575},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2307.10575},
}
Figure