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

Filip Szatkowski, Mateusz Pyla, Marcin Przewiezlikowski, Sebastian Cygert, Bartlomiej Twardowski, Tomasz Trzcinski

Introduction

Machine learning models frequently encounter catastrophic forgetting, where training on new tasks causes an abrupt loss of performance on previously learned ones. In Class Incremental Learning (CIL), researchers aim to teach models new classes sequentially. A particularly challenging variant is the "exemplar-free" setting, where the model must learn without access to any stored data from previous tasks.

The standard approach to mitigate forgetting is Knowledge Distillation (KD). In this framework, the model from the previous step (the Teacher) guides the current model (the Student). The Student is penalized if its predictions for old classes deviate from the Teacher's outputs. However, this paper identifies a critical flaw: the Teacher is typically kept frozen. When presented with data from a new distribution, the Teacher's internal Batch Normalization (BN) statistics become mismatched, leading to noisy signals and degraded learning.

Methodology: Teacher Adaptation (TA)

The authors propose Teacher Adaptation (TA), a simple yet powerful modification to the standard KD pipeline. Unlike traditional methods that freeze the Teacher entirely, TA allows the Teacher to update its Batch Normalization statistics (mean and variance) using the new task's data, while keeping its weights fixed.

Comparison between Standard Knowledge Distillation and Knowledge Distillation with Teacher Adaptation.

By allowing the Teacher to adapt its internal scaling to the current data distribution, the features it extracts become more compatible with what the Student is currently learning. This reduces the "representation shift" that otherwise plagues the distillation process.

Key Insights and Empirical Analysis

The core discovery of this work is that high KD loss in exemplar-free learning is often not due to the Teacher "forgetting," but because the Teacher and Student are essentially "speaking different languages" due to mismatched BN statistics.

Analysis of KD/CE losses, representation similarity (CKA), and task-agnostic accuracy over multiple tasks.

As shown in the experimental analysis, TA leads to a significantly lower and more stable Knowledge Distillation loss. Furthermore, Centered Kernel Alignment (CKA) metrics reveal that the Student's representations remain much closer to the Teacher's throughout training when TA is employed. This stability allows the Student to retain old knowledge more effectively without sacrificing the plasticity needed to learn new features.

Experimental Results

The researchers evaluated TA across diverse benchmarks including CIFAR100, TinyImageNet200, and DomainNet. Key findings include:

  • Performance Boosts: On a 10-task CIFAR100 split, TA improved average incremental accuracy from 42.52% to 45.25%. In longer sequences (26 tasks), the improvement was even more dramatic, jumping from 17.64% to 26.15%.
  • Robustness: TA proved highly effective in handling domain shifts (e.g., moving from sketches to real photos) and environmental noise. The performance gap between standard KD and TA widened as distribution shifts became more severe.
  • Versatility: TA is a "plug-and-play" enhancement that can be integrated into various existing KD-based methods (such as GKD or ANCL) with negligible computational overhead.

Conclusion

Teacher Adaptation reveals that the common practice of freezing the Teacher model in continual learning is counterproductive. By simply allowing Batch Normalization statistics to update, we can bridge the representation gap between old and new tasks. This approach significantly reduces catastrophic forgetting and provides a robust, easy-to-implement foundation for future research in exemplar-free class incremental learning.

Summary updated

BibTeX
@inproceedings{szatkowski2024adapt,
  author = {Filip Szatkowski and Mateusz Pyla and Marcin Przewiezlikowski and Sebastian Cygert and Bartlomiej Twardowski and Tomasz Trzcinski},
  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