In continual learning, KD is a core method for mitigating catastrophic forgetting. A frozen copy of the model from a previous task (the teacher) provides soft targets—its output probability distributions (logits)—which serve as a training signal for the updated model (the student) on new data. This consistency loss penalizes the student for deviating from the teacher's predictions, thereby preserving the original task's knowledge. The technique often operates alongside a standard cross-entropy loss for the new task's labels.
Primary Use Cases for Knowledge Distillation
Knowledge Distillation (KD) is a versatile technique where a compact 'student' model is trained to mimic the output behavior of a larger 'teacher' model. In continual learning, it is a core method for preserving a model's original capabilities while integrating new knowledge.
Catastrophic Forgetting Mitigation
In continual learning, KD is a primary defense against catastrophic forgetting. A frozen copy of the model from a previous task (the teacher) provides soft targets (logits) to guide the updated model (the student) on new data. The student is trained with a combined loss:
- A distillation loss (e.g., KL divergence) to match the teacher's output distribution on new data, preserving old knowledge.
- A standard cross-entropy loss to learn the new task's labels. This technique, exemplified by Learning without Forgetting (LwF), allows sequential learning without storing raw past data, though it is often combined with a small memory buffer for best results.
Ensemble Knowledge Transfer
KD can consolidate the collective knowledge of multiple teacher models (an ensemble) into a single, unified student model. This is valuable when:
- Different models are experts on different tasks or data domains.
- Maintaining and running a full ensemble is prohibitively expensive for inference.
- A committee of models provides diverse, robust predictions that a single student can learn to approximate. The student learns a richer, more generalized representation by mimicking the averaged or combined predictions of the ensemble, often achieving better performance than learning from any single teacher.
Cross-Architecture & Cross-Modality Transfer
KD enables knowledge transfer between fundamentally different model architectures or data modalities. This is crucial for:
- Transferring capabilities from a vision transformer (ViT) to a more efficient convolutional neural network (CNN).
- Bridging modalities, such as distilling knowledge from a large multimodal model (processing image+text) into a smaller, vision-only model, enriching its representations.
- Enabling novel hardware support, where a model trained for one type of accelerator (e.g., GPU) has its knowledge transferred to a model optimized for a different one (e.g., NPU). The process focuses on matching the output behavior and feature representations, not the internal structure.
Privacy-Preserving & Federated Learning
KD supports privacy-centric learning paradigms. In Federated Learning, a central server can distill knowledge from aggregated client model updates without accessing raw, sensitive local data. The server acts as a teacher, refining a global student model. Similarly, KD can be used to create synthetic data or model surrogates that retain utility but have provably removed private information, enabling safer data sharing and model deployment in regulated industries like healthcare and finance.
Improving Robustness & Calibration
A well-trained teacher model often produces softened probability distributions (soft labels) that contain richer information than one-hot encoded ground truth. Training a student on these soft labels can lead to:
- Better model calibration, where the predicted confidence scores more accurately reflect the true likelihood of correctness.
- Improved robustness to label noise and adversarial examples, as the student learns the smoother decision boundaries of the teacher.
- Enhanced generalization on out-of-distribution data by learning the teacher's relative uncertainties across different classes.




