Towards Model Agnostic Federated Learning Using Knowledge Distillation

Andrei Afonin, Sai Praneeth Karimireddy

Standard Federated Learning (FL) requires all participants to use the exact same model architecture, which is a major bottleneck for real-world collaboration. This paper reveals that using Knowledge Distillation (KD) to make FL "model-agnostic" often leads to a surprising "information decay" where models get worse over time, and proposes new strategies to stabilize learning across diverse architectures.

The Challenge of Model-Agnostic Federated Learning

In traditional Federated Learning (like the famous FedAvg algorithm), a central server averages the parameters of models sent by different clients. This only works if everyone uses the same architecture—you cannot average the weights of a tiny mobile-friendly CNN with a massive server-side Transformer.

In the real world, different "agents" (hospitals, banks, or mobile users) have varying hardware constraints and might prefer different models (e.g., one uses a Random Forest while another uses a Neural Network). To solve this, researchers have turned to Knowledge Distillation (KD), where agents share their predictions rather than their parameters. However, KD-based protocols often perform poorly in practice. This paper investigates why KD fails in federated settings and explores how to fix it without relying on a shared public dataset.

Theoretical Framework and Methods

To move away from the "black box" nature of neural networks, the authors analyze the problem through Federated Kernel Ridge Regression. This mathematically tractable framework is rich enough to capture non-linear learning and model heterogeneity.

They analyze three main KD protocols:

  1. Alternating KD (AKD): Agents take turns. Agent A trains on its data, predicts labels for Agent B’s data, and then Agent B trains on those predictions.
  2. Averaged KD (AvgKD): Instead of just training on the other agent's predictions, agents average those predictions with their own original ground-truth labels. This "re-injects" the original signal into every round.
  3. Ensembled KD (EKD): A novel approach where the final prediction is a weighted sum (an ensemble) of models from every round of the distillation process.

Key Insights: The "Telephone Game" Effect

The authors prove that AKD is mathematically equivalent to "alternating projections" between convex sets.

Alternating projections converging to zero

In geometry, if you keep projecting a point back and forth between two non-intersecting planes, you eventually spiral down to zero. In FL, this means the models eventually lose all information about the original labels and converge to a useless "zero" state.

The "speed" of this degradation is directly tied to data heterogeneity. If Agent A has never seen a "9," its predictions on Agent B's "9"s will be garbage. This mismatch acts as a filter that strips away information in every round. Theoretically, while individual models in the KD process degrade, a specific infinite ensemble of these models (EKD) can actually recover the optimal global solution.

Key Results

The authors validated their theory using synthetic data, MNIST, and CIFAR-10, controlling data diversity to simulate scenarios where different agents see entirely different classes.

Training loss across rounds for different KD schemes
  • AKD Performance Collapse: In both theory and experiments (using CNNs and Random Forests), AKD performance dropped sharply (loss increased) as communication rounds increased.
  • AvgKD Stability: By mixing predictions with ground-truth labels, AvgKD stopped the performance collapse. It consistently outperformed standard FedAvg in highly heterogeneous (non-IID) data settings.
  • EKD Improvement: The Ensembled KD approach successfully drove the training loss down, approaching the centralized baseline.
  • Empirical Match: The behavior of complex neural networks closely matched the predictions made by the authors' simpler Kernel Ridge Regression theory, proving the framework's utility.

Limitations and Future Work

While EKD is theoretically "optimal," it requires a massive ensemble (up to 500 models) to match centralized performance, which is computationally expensive for a single device. Furthermore, moving models or large sets of predictions back and forth is communication-heavy. The authors suggest exploring Homomorphic Encryption to allow agents to compute predictions on each other's data without seeing the raw data or the full model. Finally, testing these model-agnostic protocols on massive, real-world "foundation models" remains an open challenge.

Summary updated

BibTeX
@inproceedings{afonin2022towards,
  author = {Andrei Afonin and Sai Praneeth Karimireddy},
  title = {{Towards Model Agnostic Federated Learning Using Knowledge Distillation}},
  booktitle = {International Conference on Learning Representations},
  year = {2022},
  url = {https://openreview.net/forum?id=lQI_mZjvBxj},
}
Figure