FedKD: Communication Efficient Federated Learning via Knowledge Distillation

Chuhan Wu, Fangzhao Wu, Ruixuan Liu, Lingjuan Lyu, Yongfeng Huang, Xing Xie · DOI

Abstract

Federated learning is widely used to learn intelligent models from decentralized data. In federated learning, clients need to communicate their local model updates in each iteration of model learning. However, model updates are large in size if the model contains numerous parameters, and there usually needs many rounds of communication until model converges. Thus, the communication cost in federated learning can be quite heavy. In this paper, we propose a communication efficient federated learning method based on knowledge distillation. Instead of directly communicating the large models between clients and server, we propose an adaptive mutual distillation framework to reciprocally learn a student and a teacher model on each client, where only the student model is shared by different clients and updated collaboratively to reduce the communication cost. Both the teacher and student on each client are learned on its local data and the knowledge distilled from each other, where their distillation intensities are controlled by their prediction quality. To further reduce the communication cost, we propose a dynamic gradient approximation method based on singular value decomposition to approximate the exchanged gradients with dynamic precision. Extensive experiments on benchmark datasets in different tasks show that our approach can effectively reduce the communication cost and achieve competitive results.

Introduction

Federated Learning (FL) has emerged as a powerful paradigm for training machine learning models on decentralized data without compromising user privacy. However, a significant bottleneck remains: the "bandwidth problem." In standard FL, clients must frequently transmit large model updates to a central server. For massive models like BERT, these updates are enormous, making large-scale deployment nearly impossible for edge devices with limited connectivity. While existing solutions like gradient compression or standard knowledge distillation (KD) help, they often sacrifice accuracy or require shared public datasets that are not always available in privacy-sensitive scenarios.

Methodology

FedKD addresses the communication bottleneck through two primary innovations: Adaptive Mutual Distillation and Dynamic Gradient Approximation.

Adaptive Mutual Distillation

Instead of training and transmitting a single large model, each client maintains two models: a large Teacher and a small Student. These models learn reciprocally through a mutual distillation process. The Teacher helps the Student learn from local data, while the Student—which receives aggregated global knowledge from the server—helps the Teacher improve.

Overview of the FedKD framework, illustrating the adaptive mutual distillation between local Teacher and Student models, and the SVD-based gradient compression for communication.

To ensure robustness, the intensity of this distillation is controlled by an adaptive weighting mechanism. If a model's prediction quality is low, its influence on the other model is reduced to prevent the propagation of errors. Crucially, only the Student's updates are sent to the server, while the large Teacher model remains local to the client, significantly reducing the volume of data transmitted.

Dynamic Gradient Approximation

To further shrink the Student's updates, FedKD employs a dynamic gradient approximation method based on Singular Value Decomposition (SVD). Gradients are compressed into low-rank matrices using a dynamic energy threshold ($T$). Early in training, the system uses high compression (low $T$) to provide "rough" updates. As the model nears convergence and updates become more subtle, the precision is automatically increased (high $T$), ensuring both efficiency and final model accuracy.

Experimental Setup

The researchers evaluated FedKD on two distinct decentralized tasks:

  • MIND (Microsoft News Dataset): A large-scale dataset for personalized news recommendation involving 1 million users.
  • SMM4H (Social Media Mining for Health): A binary classification task for detecting adverse drug reaction mentions in tweets.

Results and Discussion

FedKD demonstrates that high performance can be achieved with minimal communication overhead. On the MIND dataset, standard Federated Learning (FedAvg) required 2.05 GB of communication per client, whereas FedKD achieved comparable results with only 0.11 GB—a nearly 20x reduction.

Effectiveness of Mutual Distillation

A key insight of FedKD is that the mutual distillation process acts as a form of regularization. The small Student model, by aggregating global knowledge from all clients, eventually helps the locally-isolated Teacher model surpass the performance of a full-sized model trained via standard FL. As shown in the ablation studies, both the Teacher and Student models benefit significantly from the exchange of knowledge, regardless of the student's layer depth (e.g., 2-layer vs 4-layer architectures).

Impact of Mutual Distillation (MD) on the performance (AUC) of Teacher and Student models across different model sizes.

Scalability and Baselines

FedKD outperformed other communication-efficient baselines such as FetchSGD and FedDropout. Furthermore, the performance of FedKD remained stable or improved as the number of clients increased, proving its viability for large-scale deployments. While the method increases local computation due to dual-model training and SVD operations, the trade-off is a 95% reduction in bandwidth costs.

Conclusion

FedKD provides a robust solution for bandwidth-constrained federated learning. By combining adaptive mutual distillation with dynamic SVD-based compression, it enables the collaborative training of high-performance models with drastically reduced communication requirements. Future work will focus on optimizing local computation for low-power IoT devices and exploring the framework's performance on highly non-IID data distributions.

Summary updated

BibTeX
@inproceedings{wu2022fedkd,
  author = {Chuhan Wu and Fangzhao Wu and Ruixuan Liu and Lingjuan Lyu and Yongfeng Huang and Xing Xie},
  title = {{FedKD: Communication Efficient Federated Learning via Knowledge Distillation}},
  booktitle = {Nature Communications},
  year = {2022},
  doi = {10.1038/s41467-022-29763-x},
}
Figure