FedClassAvg: Local Representation Learning for Personalized Federated Learning on Heterogeneous Neural Networks

Jaehee Jang, Heonseok Ha, Dahuin Jung, Sungroh Yoon

Introduction

Federated Learning (FL) has emerged as a powerful paradigm for training machine learning models across decentralized edge devices while preserving data privacy. However, real-world deployments face two significant hurdles: model heterogeneity and data heterogeneity. Standard FL assumes all clients use identical architectures, which is impractical given the varying hardware capabilities of edge devices. Furthermore, non-IID (not independently and identically distributed) data across clients often leads to poor performance for a single global model.

While Personalized FL (PFL) addresses data heterogeneity, existing solutions for model heterogeneity often rely on Knowledge Distillation (KD). KD typically requires a shared public "anchor" dataset, which is often unavailable in privacy-sensitive domains, or imposes heavy computational costs on resource-constrained devices.

The FedClassAvg Framework

To overcome these challenges, we present FedClassAvg, a novel framework designed for heterogeneous neural networks. FedClassAvg decomposes each client's model into a local feature extractor ($F_k$) and a shared classifier ($C_k$).

The FedClassAvg framework: (A) Global classifier aggregation at the server and (B) Local client updates using supervised contrastive and proximal losses.

The framework operates through three primary mechanisms:

  1. Global Classifier Averaging: Instead of synchronizing entire models, clients only communicate the weights of their final classification layers. The server performs a weighted average of these classifiers based on local dataset sizes ($|D_k|$) to produce a global consensus classifier ($C$). This significantly reduces communication overhead.
  2. Local Representation Learning: To ensure that different architectures (e.g., ResNet, ShuffleNet) can work with a shared classifier, clients employ a Supervised Contrastive Loss ($L^{CL}$). This loss encourages the feature extractor to map data points of the same class into similar regions of the feature space, creating a "universal language" for the shared classifier.
  3. Proximal Regularization: A regularization term ($L^R$) is introduced to keep the local classifier weights close to the global average, preventing local training from diverging too far from the collective knowledge.

Experimental Evaluation

FedClassAvg was evaluated on three major benchmarks: CIFAR-10, Fashion-MNIST, and EMNIST. To simulate realistic conditions, the researchers applied Dirichlet and skewed distributions to create high levels of data heterogeneity.

Key Results

  • Superior Accuracy: FedClassAvg consistently outperformed state-of-the-art baselines. On CIFAR-10 with a Dirichlet distribution, it achieved 76.70% accuracy, compared to 62.28% for KT-pFL and 68.94% for local-only training.
  • Extreme Efficiency: By only exchanging classifier weights, the communication cost was reduced to as little as 2KB to 22KB per round. This represents a ~2000x reduction compared to sharing a full ResNet-18 model (~44MB).
  • Robustness to Heterogeneity: The combination of contrastive learning and classifier averaging allowed clients with vastly different architectures to collaborate effectively without needing a public dataset.

Key Insights

  • The Classifier as a Shared Language: The core innovation is that the classifier acts as a "universal agreement" on the feature space. As long as clients agree on the regions for specific classes, the underlying feature extractors can vary wildly.
  • Contrastive Learning as the Glue: Without supervised contrastive loss, different architectures would map features so differently that a shared classifier would fail. This loss stabilizes the feature space across heterogeneous models.

Conclusion

FedClassAvg provides a scalable and efficient solution for personalized federated learning in heterogeneous environments. By treating the classifier as a shared decision boundary and using contrastive learning to align diverse feature extractors, it achieves high performance with minimal communication costs. While currently assuming shared classifier structures, future work will explore adapting the averaging mechanism for even greater architectural flexibility.

Summary updated

BibTeX
@inproceedings{jang2022fedclassavg,
  author = {Jaehee Jang and Heonseok Ha and Dahuin Jung and Sungroh Yoon},
  title = {{FedClassAvg: Local Representation Learning for Personalized Federated Learning on Heterogeneous Neural Networks}},
  booktitle = {ICPP},
  year = {2022},
  doi = {10.1145/3545008.3545073},
}

Loading related content...

Figure