NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Heterogeneous Federated Learning Using Knowledge Codistillation

Jared Lichtarge, Ehsan Amid, Shankar Kumar, Tien-Ju Yang, Rohan Anil, Rajiv MathewsarXiv 2023 · DOI

Abstract

Federated Learning (FL) typically requires a uniform model architecture across all participating clients, often defaulting to a "lowest common denominator" model that underutilizes high-capacity devices. This paper introduces a novel framework that partitions clients based on hardware capacity and employs bi-directional knowledge distillation on the server. By allowing different model architectures to learn from each other, the proposed methods effectively utilize the untapped processing power of high-end devices without excluding low-end ones.

Introduction

The standard Federated Learning algorithm, FedAvg, imposes a "one-size-fits-all" constraint, requiring every client to host the exact same model architecture. In practice, client pools are highly heterogeneous, comprising devices with vastly different hardware capabilities. To ensure broad participation, researchers often settle for small models compatible with the weakest devices. This results in a significant "capacity gap," where high-end devices have unused modeling potential. The challenge lies in enabling large and small models to train together and share knowledge without compromising privacy or requiring identical parameters.

Proposed Methods: Knowledge Codistillation

The authors propose two algorithms that leverage Knowledge Codistillation—a technique where two models act as both teacher and student to one another—to bridge the gap between different model sizes. This distillation occurs on the server using an unlabeled or out-of-domain dataset, ensuring no additional computational burden is placed on the clients.

Comparison of standard FedAvg (a) with the proposed partitioned approach using Knowledge Co-Distillation (b).
  1. PeriodicCodist (Periodic Codistillation): Models are trained independently in their respective pools (small models on all/low-power devices, large models on high-power devices) via standard FedAvg. Periodically, the server performs bi-directional distillation between the two server-side models to synchronize their knowledge.
  2. MergedCodist (Merged Gradient Codistillation): This integrated approach calculates a "distillation gradient" alongside the standard FedAvg gradient at every round. These gradients are merged using an interpolation factor $\alpha$ to update the models, ensuring a continuous flow of information between pools.

Experimental Setup

The methods were evaluated on two primary tasks:

  • Image Classification: Using CIFAR-100, with CIFAR-10 serving as an "out-of-domain" distillation dataset to test robustness against imperfect proxy data.
  • Language Modeling: Using StackOverflow, with C4-MOD (a modified version of the Colossal Clean Crawled Corpus) as the out-of-domain distillation data.

Key Insights

  • The "Small Teacher" Effect: Interestingly, small models can effectively teach large models. Because small models are trained on the entire client pool, they access a wider variety of data than large models, which are restricted to high-end device subsets.
  • Robustness to Proxy Data: Performance gains were observed even with out-of-domain server data (e.g., using CIFAR-10 to assist CIFAR-100 training), indicating the method does not require perfect, labeled server-side datasets.
  • Data Efficiency: Experiments showed that as few as 600 unlabeled examples on the server were sufficient for performance improvements, making the approach practical for real-world scenarios with scarce server data.
  • Handling Domain Shift: In scenarios where high-capacity and low-capacity clients see different data types, MergedCodist facilitates "domain transfer," allowing both models to perform well across all data types.

Results

In nearly all test scenarios, both codistillation methods outperformed the FedAvg baseline. The gains were most pronounced when the high-capacity pool was small. For instance, on CIFAR-100, PeriodicCodist improved large model accuracy from 24.76% to 31.09%.

Performance comparison of FedAvg, PeriodicCodist, and MergedCodist across CIFAR and StackOverflow datasets.

In domain-shifted StackOverflow setups, MergedCodist provided a +5% accuracy boost for the small model on data it had never encountered during local training.

Limitations and Future Work

While client-side compute remains unchanged, MergedCodist increases server-side computational costs due to per-round distillation. Additionally, the method requires some relevant unlabeled proxy data on the server. Future research may explore dynamic adjustment of the merging factor ($\alpha$) and alternative client partitioning criteria beyond hardware capacity.

This framework offers a practical path for implementing heterogeneous FL in diverse device ecosystems, with code to be released upon publication.

Summary updated

BibTeX
@misc{lichtarge2023heterogeneous,
  author = {Jared Lichtarge and Ehsan Amid and Shankar Kumar and Tien-Ju Yang and Rohan Anil and Rajiv Mathews},
  title = {{Heterogeneous Federated Learning Using Knowledge Codistillation}},
  year = {2023},
  eprint = {2310.02549},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2310.02549},
}
Figure