Revisit the Power of Vanilla Knowledge Distillation: from Small Scale to Large Scale

Zhiwei Hao, Jianyuan Guo, Kai Han, Han Hu, Chang Xu, Yunhe Wang

Researchers have long assumed that "Vanilla" Knowledge Distillation (KD) is too simple to compete with modern, complex variants. However, recent findings reveal a "small data pitfall": while complex KD methods shine on tiny datasets like CIFAR-100, their advantage vanishes on large-scale datasets like ImageNet-1K. By simply using stronger training recipes and larger datasets, the elegantly simple vanilla KD achieves state-of-the-art results, proving that we don't need "bells and whistles" to make distillation work at scale.

The "Small Data Pitfall" in Knowledge Distillation

In the quest to deploy massive AI models on edge devices, researchers use Knowledge Distillation (KD)—a process where a large "teacher" model trains a smaller "student" model. Over the years, the field has moved away from the original Vanilla KD (which only looks at the teacher's final output probabilities) toward increasingly complex methods. These variants might involve "hints" from intermediate layers, contrastive learning, or complex loss functions.

The authors argue that the KD community has been misled by benchmarking primarily on small datasets (like CIFAR-100) with weak training schedules.

Performance gap between Vanilla KD and complex variants shrinks as dataset size increases.

As illustrated above, on CIFAR-100, complex KD methods outperform Vanilla KD by a wide margin. However, as the dataset size increases (from 30% of ImageNet to 100%), that performance gap almost entirely disappears. This raises a critical question: Do these complex innovations actually matter when we move to the large-scale, high-performance scenarios used in the real world?

Going Back to Basics: Methodology

To test the true potential of Vanilla KD—which uses the Kullback-Leibler (KL) divergence to minimize the difference between the teacher’s and student’s output logits—the researchers combined it with modern training paradigms:

  1. Strong Training Recipes: They utilized modern optimization techniques (like the LAMB optimizer) and heavy data augmentation (Mixup, Cutmix, RandAugment) typically used to train high-performance models from scratch.
  2. Longer Schedules: They extended training durations significantly (up to 4800 epochs in some cases) to see if Vanilla KD just needed more time to "soak in" the teacher's knowledge.
  3. Heterogeneous Pairs: They tested distillation across different architectures, such as using a Vision Transformer (ViT) or ConvNeXt teacher to train a ResNet student.

Key Insights: Logits vs. Hints

One of the most significant findings involves the debate between logit-based and hint-based distillation. "Hint-based" KD (matching intermediate features) often requires more training time and performs worse than logit-based KD when the teacher and student have different architectures.

CKA heatmaps showing how different architectures represent features.

Using Center Kernel Analysis (CKA), the authors demonstrated that different architectures "see" features differently. Because of these inherent representational differences, it can actually be counterproductive to force a student to mimic a teacher's internal representations. Logits, being the final abstraction, provide a cleaner transfer of knowledge.

Furthermore, simply using a bigger teacher doesn't always help, as a student might hit a "capacity ceiling." However, if the teacher is trained on a larger dataset (like ImageNet-21K), the student's performance improves significantly. Ultimately, Vanilla KD proves robust across various hyper-parameters (learning rate, weight decay), whereas more complex methods often require meticulous tuning to stay competitive.

State-of-the-Art Results

Without any architectural changes or complex loss functions, Vanilla KD set new benchmarks for distilled models on ImageNet-1K:

  • ResNet-50: Achieved 83.1% top-1 accuracy (surpassing previous SOTA distilled versions).
  • ViT-Small: Achieved 84.3% top-1 accuracy.
  • ConvNeXtV2-Tiny: Achieved 85.0% top-1 accuracy.

When these distilled models were used as backbones for object detection on the COCO dataset, they outperformed models trained from scratch by over 3% AP, showing that the "knowledge" gained during distillation transfers exceptionally well to downstream tasks.

Limitations and Future Work

While the results are impressive, the authors acknowledge a significant practical hurdle: training time. To reach these state-of-the-art numbers, the models require very long training schedules (e.g., 1200 to 4800 epochs). This results in high computational costs and a larger carbon footprint.

Future research should focus on finding ways to achieve these "large-scale" gains more efficiently, potentially by optimizing the training schedule or finding the "sweet spot" where the student reaches peak performance without thousands of epochs. Most importantly, this work suggests that the community should stop relying solely on small-scale benchmarks like CIFAR-100 when proposing and evaluating new KD algorithms.

Summary updated

BibTeX
@inproceedings{hao2023revisit,
  author = {Zhiwei Hao and Jianyuan Guo and Kai Han and Han Hu and Chang Xu and Yunhe Wang},
  title = {{Revisit the Power of Vanilla Knowledge Distillation: from Small Scale to Large Scale}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=67MTWzhEOn},
}
Figure