Knowledge distillation (KD) in federated learning is a communication-efficient paradigm where clients avoid sending full model parameters. Instead, each client trains a local model on its private data and transmits a compact representation of its learned "knowledge," typically in the form of softened output logits or intermediate embeddings. The central server then aggregates these knowledge signals and distills them into a single, improved global model. This process drastically reduces uplink communication costs compared to transmitting dense gradients or weights.
Glossary
Knowledge Distillation in Federated Learning

What is Knowledge Distillation in Federated Learning?
Knowledge distillation in federated learning is a communication-efficient technique where clients train local models and send compact 'knowledge' (e.g., softened output logits or embeddings) to the server, which distills this into a global model, avoiding the transmission of full parameter updates.
The core mechanism leverages a teacher-student framework at the server. The aggregated client knowledge acts as a consensus teacher, providing a richer training signal than simple labels. The server's global model is the student, trained to mimic this softened output distribution. This approach directly mitigates client drift caused by non-IID data and is often combined with techniques like differential privacy for enhanced security. It is a key strategy within hierarchical federated learning architectures and for enabling federated learning for TinyML on bandwidth-constrained edge devices.
Key Characteristics of Federated Knowledge Distillation
Federated Knowledge Distillation (FKD) is a paradigm that decouples model training from parameter exchange. Instead of transmitting large model weights, clients share compact representations of their learned knowledge, which the server distills into a global model.
Decoupled Training and Aggregation
In FKD, the student model (the final global model) and the client models (which can be teachers) are architecturally and functionally separate. Clients train their local models independently. The server never receives or aggregates these model parameters. Instead, it receives and aggregates knowledge, such as softened logits or embeddings, and uses this to train the student model via distillation loss. This breaks the direct parameter synchronization loop of standard Federated Averaging (FedAvg).
Knowledge as the Communication Primitive
The core transmitted payload is not a gradient or parameter update, but a knowledge representation. Common forms include:
- Softened Logits: The output layer predictions (logits) softened by a high temperature parameter from the client's local model applied to a shared (or generated) calibration dataset.
- Embeddings: Intermediate feature representations from a specific layer of the client model.
- Label Distributions: For semi-supervised settings, clients may send aggregated soft labels for unlabeled data. This representation is often orders of magnitude smaller than a full model update, especially for large models.
Heterogeneity Tolerance via Output Space
FKD can naturally handle statistical heterogeneity (non-IID data) across clients. Because knowledge is shared in the output or feature space, clients can use:
- Different model architectures (heterogeneous FKD).
- Different private datasets. The server's distillation process focuses on aligning the behavior (output predictions) of the global student with the ensemble of client behaviors, rather than forcing parameter consensus. This can reduce client drift as local models are not penalized for diverging to fit their local data.
Server-Side Distillation Loss
The server aggregates knowledge (e.g., averages softened logits from clients) to create a teacher ensemble. It then trains the global student model by minimizing a distillation loss (e.g., Kullback-Leibler divergence) between the student's predictions and the ensemble's predictions on an anchor dataset. This dataset can be:
- A small public proxy dataset.
- Synthetically generated data.
- Sampled from client-shared knowledge. This process transfers the collective knowledge of the clients into a single, compact student model without direct access to client parameters or raw data.
Privacy-Preserving Properties
FKD offers inherent privacy benefits, though they are distinct from cryptographic guarantees:
- No Parameter Transmission: Client model parameters, which could be inverted to reveal training data, are never shared.
- Knowledge Obfuscation: Softened logits or aggregated embeddings contain less explicit information about individual data points than raw gradients.
- Composability with Stronger Techniques: The knowledge vector can be further protected with Differential Privacy (adding noise) or Secure Aggregation (masking values during transmission) to achieve formal privacy guarantees.
Trade-offs and Design Choices
Implementing FKD involves key engineering decisions:
- Anchor Data: Requires a public or generated dataset for distillation, which may not be available in all domains.
- Knowledge Design: Choosing what knowledge to share (logits vs. embeddings) and at what temperature balances communication cost and information fidelity.
- Client-Server Synchronization: Can be performed in rounds (synchronous) or as knowledge arrives (asynchronous).
- Client Model Architecture: Homogeneous clients simplify aggregation; heterogeneous clients offer flexibility but complicate knowledge alignment. The primary trade-off is often between ultimate model performance (sometimes lower than FedAvg with full participation) and significant reductions in uplink communication cost and robustness to system heterogeneity.
Knowledge Distillation vs. Federated Averaging (FedAvg)
A comparison of two core paradigms for aggregating knowledge in federated learning, highlighting their mechanisms, communication costs, and suitability for different system constraints.
| Feature / Mechanism | Knowledge Distillation (KD) | Federated Averaging (FedAvg) |
|---|---|---|
Core Aggregation Unit | Knowledge (e.g., softened logits, embeddings) | Model Parameters (weights, gradients) |
Primary Communication Payload | Compact output vectors (size: O(#classes)) | Full model parameters (size: O(#parameters)) |
Client-Server Interface | Clients send knowledge; server distills a new model | Clients send model deltas; server averages them |
Model Heterogeneity Support | ||
Formal Privacy Guarantees (e.g., DP) | Inherited from knowledge encoding | Applied directly to parameter updates |
Typical Convergence Speed | Slower, requires more rounds for knowledge transfer | Faster for IID data, suffers from client drift on non-IID |
Server-Side Computation | High (requires training a model via distillation) | Low (primarily a weighted average) |
Client-Side Computation | Moderate (train local model to convergence) | Moderate to High (multiple local SGD steps) |
Handling Non-IID Data | More robust, aligns via task output space | Challenging, requires techniques like FedProx |
Communication Cost per Round | Low (KB - MB range) | High (MB - GB range) |
Common Variants and Techniques
Knowledge distillation in federated learning is not a monolithic technique. It encompasses several distinct architectural approaches and distillation targets, each designed to maximize knowledge transfer while minimizing communication overhead.
Logit-Based Distillation
The most common approach where clients send softened model outputs (logits) instead of parameter gradients. The server aggregates these logits (e.g., by averaging) and uses them as soft targets to train the global model via a distillation loss (e.g., Kullback-Leibler divergence). This is highly communication-efficient as logit vectors are typically much smaller than full model weights.
- Key Advantage: Drastically reduces uplink payload size.
- Challenge: Requires clients to have sufficient local data to produce meaningful, calibrated logits.
- Example: A client with 10 local images sends a 10x1000 logit matrix (for 1000 classes) instead of millions of weight parameters.
Feature-Based Distillation
This variant distills knowledge from intermediate feature representations (activations) of a neural network, not just the final output layer. Clients send compressed representations from a designated hint layer. The server trains the global model to mimic these intermediate features using a mean squared error or similar loss.
- Key Advantage: Transfers richer, more generalizable knowledge about data structure.
- Use Case: Particularly effective for convolutional neural networks where early layers capture fundamental visual features.
- Communication Trade-off: Feature maps can be large; techniques like average pooling or bottleneck layers are used to compress them before transmission.
Ensemble Distillation
A technique where the server maintains and distills from an ensemble of client models. Instead of aggregating a single global model, the server treats the collection of client models as a committee. Knowledge is distilled from this ensemble's combined predictions into a single, compact global model.
- Key Advantage: Improves robustness and model performance by leveraging diverse client knowledge.
- Process: 1) Clients train local models. 2) Server collects models/logits. 3) Server uses unlabeled public data or a generator to produce inputs, queries the ensemble, and distills the outputs.
- Benefit: Can mitigate the effects of non-IID data across clients.
Two-Way Distillation
Also known as mutual distillation or co-distillation, this is a bidirectional process. Knowledge flows both from clients to server and from server to clients. Clients not only contribute knowledge but also receive and distill knowledge from the global model or other clients' models to improve their local performance.
- Key Advantage: Enables personalized federated learning; clients benefit from global knowledge while specializing for their local data.
- Mechanism: In each round, the server may broadcast a lightweight generalized model or meta-information that clients distill into their local models alongside their own training.
- Outcome: Produces a strong global model and a set of specialized, high-performance local models.
Data-Free Distillation
A critical technique for scenarios where the server cannot access a representative dataset. The server generates synthetic data (e.g., via a generative adversarial network) to act as input for the distillation process. It queries client models with this synthetic data to produce logits for aggregation and distillation.
- Key Advantage: Preserves data privacy absolutely; no real client data or samples are ever shared or reconstructed at the server.
- Challenge: Requires sophisticated generation to produce data that effectively covers the input distribution learned by the clients.
- Application: Essential for highly regulated domains like healthcare and finance.
Online vs. Offline Distillation
This distinction defines the temporal relationship between client training and server distillation.
- Online Distillation: The distillation process is interleaved with federated training rounds. The global model is updated via distillation after each communication round, allowing for continuous, incremental learning. This is the standard approach in iterative FL.
- Offline Distillation: Clients perform complete local training independently. They then send their final model knowledge (e.g., logits on a shared public dataset) to the server in a single communication round. The server performs a one-time distillation to produce the final global model.
- Trade-off: Online enables finer convergence; offline is the ultimate in communication reduction, akin to one-shot federated learning.
Frequently Asked Questions
Knowledge distillation is a communication-efficient technique in federated learning where clients send compact representations of their learned knowledge to the server, instead of full model parameters, to build a global model.
Knowledge distillation in federated learning is a communication-efficient paradigm where clients train local models on their private data and transmit compact, information-rich representations of their learned knowledge—such as softened output logits or embeddings—to a central server, which then distills this collective knowledge into a single, high-performance global model.
Unlike standard federated learning, which communicates full model parameter updates, this method drastically reduces uplink communication costs. The server acts as a 'student' model that learns from the aggregated 'teacher' knowledge provided by the clients, avoiding the transmission of millions of floating-point weights. This technique is particularly valuable in bandwidth-constrained environments like mobile networks or for models with large parameter counts.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Knowledge distillation is one of several techniques designed to reduce the communication burden in federated learning. The following terms represent complementary or foundational concepts within this domain.
Gradient Quantization
A core compression technique where high-precision gradient values (e.g., 32-bit floating point) are mapped to a lower-bit representation (e.g., 8-bit integers) before transmission from client to server. This reduces the number of bits required per parameter update.
- Key Mechanism: Reduces the bit-width of communicated data.
- Trade-off: Introduces quantization noise, which must be managed to preserve convergence.
- Example: Converting gradients from FP32 to INT8 reduces communication payload by ~75%.
Gradient Sparsification
A technique where only a critical subset of gradient values is selected for transmission, while others are set to zero. This creates a sparse update tensor, which can be highly compressed.
- Common Method: Transmit only gradients with the largest magnitudes (top-k sparsification).
- Benefit: Can achieve compression ratios of 100x or more by sending <1% of values.
- Challenge: Often requires error feedback to accumulate and transmit discarded gradients in subsequent rounds, preventing information loss.
Sparse Ternary Compression (STC)
An aggressive compression method that combines sparsification and extreme quantization. Client updates are compressed into a format where each transmitted value is one of three levels: {-α, 0, +α}.
- Process: First, sparsify to select top-k values. Second, quantize each selected value to its sign (
+1or-1) multiplied by a scaling factorα. - Efficiency: Achieves high compression by drastically reducing both the number of values sent and their bit representation.
- Use Case: Effective for scenarios with extremely constrained uplink bandwidth.
Federated Averaging (FedAvg)
The foundational algorithm for federated learning. Clients perform multiple local Stochastic Gradient Descent steps on their data and send the updated model weights (or weight deltas) to the server for averaging.
- Core Idea: Reduces communication frequency by performing more local computation per round.
- Challenge: Can lead to client drift on non-IID data, where local models diverge from the global objective.
- Relation to Distillation: FedAvg communicates parameters; knowledge distillation communicates softened outputs or embeddings, offering a different representational format.
Client Drift
A fundamental challenge in federated learning where local client models diverge from the global optimum due to performing multiple steps of local optimization on statistically heterogeneous (non-IID) data.
- Cause: The local objective on a client's unique data distribution differs from the global objective.
- Impact: Degrades convergence speed and final model accuracy, as simple averaging of drifted models is suboptimal.
- Mitigation: Algorithms like FedProx (adds a proximal term) or SCAFFOLD (uses control variates) are designed to correct for drift. Knowledge distillation can also mitigate drift by aligning models on a shared output space.
Partial Participation
A system-level constraint and design principle where only a subset of the total available clients is selected to participate in any given federated learning round.
- Necessity: Driven by practical limits on server bandwidth, client availability, and energy constraints.
- Implication: Inherently limits per-round communication volume but introduces sampling variance.
- Strategy: Adaptive client selection algorithms optimize which clients participate based on factors like data utility, compute capability, or network conditions to maximize learning efficiency per communication cost.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us