Adapt Your Teacher: Improving Knowledge Distillation for Exemplar-free Continual Learning

Filip Szatkowski, Mateusz Pyla, Marcin Przewięźlikowski, Sebastian Cygert, Bartłomiej Twardowski, Tomasz Trzciński

TL;DR

Researchers have introduced Teacher Adaptation (TA), a simple yet powerful tweak for exemplar-free continual learning. By allowing the "teacher" model to update its batch normalization statistics on new data—rather than keeping it completely frozen—they significantly reduce representation drift and catastrophic forgetting without needing to store any private user data.

What Problem Does This Paper Address?

In Class Incremental Learning (CIL), an AI model learns new tasks sequentially. The ultimate goal is to learn new things without forgetting the old ones. A popular strategy is Knowledge Distillation (KD): a "teacher" model (the version of the model from the previous task) guides a "student" model (the one currently learning) to keep its outputs consistent with what was learned before.

However, most effective CIL methods rely on "exemplars"—a small buffer of saved images from previous tasks. Storing these is often impossible due to privacy concerns (e.g., medical data) or hardware limitations (e.g., edge devices). In these exemplar-free settings, standard KD often fails. The authors discovered why: when a frozen teacher model encounters data from a new, unseen distribution, its internal representations shift significantly. This creates a "noisy" distillation signal that actually harms the student, leading to rapid forgetting.

Methods

The core innovation is Teacher Adaptation (TA). In standard KD, the teacher is a static snapshot. In TA, the authors allow the teacher to update its Batch Normalization (BN) statistics (mean and variance) using the current task's data, while keeping its actual weights fixed.

Figure 1. Enhancement of vanilla Knowledge Distillation approach used in Continual Learning with our method of Teacher Adaptation. When training the student model on the new task, we allow the teacher model to continuously update its batch normalization statis- tics, which reduces the divergence between the representations in both models. Our method leads to lower knowledge distillation loss and an overall more stable model.

As shown in Figure 1, this allows the teacher to "acclimatize" to the new data distribution. The authors also combine this with a warmup phase, where only the new classification head is trained initially to prevent large, disruptive gradients from flowing through the entire network at the start of a new task.

Datasets

The authors evaluated their method across a wide range of computer vision benchmarks:

  • Standard Benchmarks: CIFAR100, TinyImageNet200, and ImageNet100.
  • Domain Shift: DomainNet (testing how models handle shifts like moving from "real" photos to "sketches").
  • Fine-Grained Classification: A collection of specialized datasets including Oxford Flowers, MIT Indoor Scenes, CUB-200 Birds, and Stanford Cars.
  • Robustness Test: A "corrupted CIFAR100" benchmark where they manually added varying levels of Gaussian noise to every other task to simulate extreme distribution shifts.

Key Insights and Ideas

  • The BN Bottleneck: The "Aha!" moment was realizing that the teacher's internal representations diverge from the student's not because the weights are wrong, but because the normalization statistics are biased toward old data.
  • Stability through Alignment: By updating BN stats, the Centered Kernel Alignment (CKA)—a measure of how similar two neural representations are—stays much higher between the teacher and student. This results in a much smoother and lower KD loss (see Figure 2).
  • Alleviating Recency Bias: TA helps the model distinguish between tasks more effectively. Standard KD often suffers from "recency bias," where the model over-predicts the most recently learned classes. TA reduces this by providing a more stable reference point.
TA leads to lower KD loss and higher representation similarity (CKA)

Key Results

Teacher Adaptation consistently outperformed standard KD baselines across almost all settings:

  • Accuracy Gains: On CIFAR100 (10 tasks), TA improved incremental accuracy by roughly 3-5% across different KD variants (GKD, MKD, TKD).
  • Robustness to Noise: The gap between TA and standard KD widened as data corruption increased. In the corrupted CIFAR100 experiment, TA maintained significantly higher accuracy while standard KD's performance plummeted (see Figure 3).
  • Long-Term Stability: The benefits were most pronounced in scenarios with many small tasks (e.g., 20 tasks vs. 10 tasks), where representation drift usually accumulates and destroys performance.
TA is more robust to increasing levels of data corruption/noise

Limitations and Future Work

While highly effective, the authors noted a few areas for improvement:

  • Pre-training Effects: If the model starts with a very strong feature extractor (e.g., pre-trained on a large portion of the dataset), the gains from TA are less dramatic because the initial BN stats are already a good approximation for the whole dataset.
  • Loss Function Sensitivity: TA showed slightly less improvement when used with the MKD (Multi-class Knowledge Distillation) variant, likely due to how the sigmoid-based loss interacts with logit magnitudes.
  • Beyond BN: The study focused on Batch Normalization. Future work could explore adapting other architectural components or investigating if similar "teacher tuning" helps in non-vision domains like Natural Language Processing.

Summary updated

BibTeX
@inproceedings{szatkowski2024adapt,
  author = {Filip Szatkowski and Mateusz Pyla and Marcin Przewięźlikowski and Sebastian Cygert and Bartłomiej Twardowski and Tomasz Trzciński},
  title = {{Adapt Your Teacher: Improving Knowledge Distillation for Exemplar-free Continual Learning}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2024},
  doi = {10.1109/wacv57701.2024.00198},
}
Figure