Efficient Knowledge Distillation from Model Checkpoints

Chaofei Wang, Qisen Yang, Rui Huang, Shiji Song, Gao Huang

In the world of Knowledge Distillation (KD), the prevailing wisdom is straightforward: if you want to train a smart student model, you need a brilliant teacher. Consequently, researchers typically spend massive amounts of compute training large teacher models to full convergence—or even training ensembles of multiple teachers—to provide the best possible supervision.

However, this "better is better" assumption suffers from a flaw known as the capacity gap. When a teacher becomes too powerful or overly "certain" about its predictions, the gap between its complex internal representations and the student's limited capacity becomes too wide to bridge.

Counterintuitively, a partially trained model checkpoint often makes a better teacher than a fully converged, high-accuracy model.

Conceptual diagram illustrating how distilled student performance peaks using an intermediate teacher, even as the teacher's own performance continues to rise.

The Information Bottleneck Perspective

To understand why weaker models can be better teachers, the authors leverage Information Bottleneck (IB) theory. They quantify two key metrics during the training process:

  • $I(Y; F)$: The mutual information between features and the target label (which correlates with the model's accuracy).
  • $I(X; F)$: The mutual information between features and the input data (which correlates with the richness of "dark knowledge").

As a model converges, it falls into an over-convergence trap. Its accuracy ($I(Y; F)$) goes up, but its retention of input information ($I(X; F)$) eventually goes down. The model becomes overconfident and begins to discard information about non-target classes to strictly minimize its loss.

Unfortunately, this discarded information is exactly the "dark knowledge" a student needs to learn how the input relates to various classes. Intermediate models, which haven't yet collapsed their representations to focus solely on the target label, retain more of this critical input information.

Empirical Evidence: Better Students from "Worse" Teachers

The researchers validated these findings across standard computer vision benchmarks, including CIFAR-100, Tiny-ImageNet, and ImageNet, using architectures like Wide ResNets (WRN), ResNets, and MobileNetV2.

Test accuracy of student models plotted against the training epochs of their teachers. Student accuracy consistently peaks before the teacher reaches full convergence at 200 epochs.

The empirical results are striking. On CIFAR-100, a WRN-40-2 teacher at only 50% training (62.99% accuracy) produced a MobileNetV2 student with 68.99% accuracy. In contrast, the fully converged teacher (76.53% accuracy) produced a weaker student with only 68.03% accuracy.

By using intermediate checkpoints, practitioners can reduce teacher training time by 50% or more while simultaneously improving the final student model.

Snapshot Ensembles: "Free" Wins

The authors also explored the impact of this phenomenon on ensemble teachers. Training an ensemble of independent teachers is computationally expensive. However, a Snapshot Ensemble—taking multiple checkpoints from a single training trajectory—is essentially free.

Surprisingly, these weaker Snapshot Ensembles often provide better distillation signals than a strong ensemble of fully trained models, outperforming them in distillation accuracy by an average of 0.52%, despite the Snapshot Ensemble having significantly lower raw accuracy.

Optimizing Teacher Selection

To operationalize this discovery, the authors propose a simple selection algorithm that identifies the optimal checkpoint by maximizing the sum of normalized $I(X; F)$ and $I(Y; F)$, effectively balancing accuracy with feature diversity.

While highly effective, the current algorithm is student-agnostic (it does not account for the specific capacity of the student) and calculating mutual information adds some computational overhead. Nevertheless, the core finding remains a powerful paradigm shift for model compression: in knowledge distillation, a teacher that is still learning is often the best instructor.

Summary updated

BibTeX
@inproceedings{wang2022efficient,
  author = {Chaofei Wang and Qisen Yang and Rui Huang and Shiji Song and Gao Huang},
  title = {{Efficient Knowledge Distillation from Model Checkpoints}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=H86-wMtEuVs},
}
Figure