VanillaKD: 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 · DOI

Abstract

Knowledge Distillation (KD) research has recently favored complex, feature-based methods over the original "Vanilla KD" approach. This paper identifies a "small data pitfall" where Vanilla KD appears inferior on small datasets like CIFAR-100 but emerges as a state-of-the-art powerhouse when scaled to ImageNet-1K. By employing modern training recipes and extended schedules, Vanilla KD achieves record-breaking accuracies for standard architectures like ResNet-50 (83.1%) and ViT-S (84.3%) without additional architectural complexity.

Introduction

Knowledge Distillation (KD) aims to transfer knowledge from a large "teacher" model to a smaller "student" model. Since the introduction of "Vanilla KD" by Hinton et al. in 2015, which uses soft targets from the teacher's output probabilities, the field has shifted toward more intricate methods. These often involve "hint-based" learning, requiring the student to mimic the teacher's internal hidden layers. However, this study argues that the perceived weakness of Vanilla KD is a byproduct of testing on small-scale benchmarks, a phenomenon termed the "small data pitfall."

The Small Data Pitfall

The authors demonstrate that many modern KD variants act as "crutches" for models trained on limited data. On datasets like CIFAR-100, these complex designs show significant gains. However, as the dataset size increases toward ImageNet-1K, the performance gap between Vanilla KD and its complex counterparts narrows and eventually reverses.

Performance gap between Vanilla KD and modern variants (DIST, DKD) across different dataset scales.

Methods: The Power of the Recipe

The core contribution is not a new algorithm, but the realization that Vanilla KD, when paired with a "stronger recipe," outperforms modern alternatives. The authors utilize:

  • Advanced Optimizers: Transitioning from standard SGD to AdamW and LAMB.
  • Heavy Data Augmentation: Incorporating Mixup, Cutmix, and RandAugment.
  • Extended Schedules: Training for up to 4800 epochs to ensure the student fully captures the teacher's distribution.
  • Loss Function Refinements: Using Binary Cross-Entropy (BCE) and binary KL divergence (BKL) to stabilize and improve distillation.
Comparison of KD methods under previous and stronger training recipes.

Experimental Results

Using ImageNet-1K as the primary benchmark, Vanilla KD achieves state-of-the-art results for distilled models:

  • ResNet-50: 83.1% top-1 accuracy.
  • ViT-Small: 84.3% top-1 accuracy.
  • ConvNeXtV2-Tiny: 85.0% top-1 accuracy.

Beyond classification, Vanilla KD-trained backbones show superior generalization on downstream tasks. For instance, a ResNet-50 student improved object detection on the COCO dataset by +3.1% box AP compared to standard supervised pre-training. The method also demonstrates robustness on out-of-distribution benchmarks like ImageNet-Real and ImageNet-V2.

Discussion and Limitations

Vanilla KD's reliance on logits makes it architecture-agnostic, avoiding the computational overhead and compatibility issues of hint-based methods. However, the primary drawback is the high computational cost associated with extremely long training schedules. Future research is needed to achieve these performance gains more efficiently. Additionally, while larger teachers generally improve student performance, there are diminishing returns when the teacher-student capacity gap becomes too large.

Conclusion

Vanilla KD remains a formidable baseline that, when properly tuned with modern training techniques, surpasses more complex distillation methods at scale. This work encourages the community to revisit fundamental methods and consider the impact of dataset scale and training recipes on algorithmic comparisons.

Summary updated

BibTeX
@inproceedings{hao2023vanillakd,
  author = {Zhiwei Hao and Jianyuan Guo and Kai Han and Han Hu and Chang Xu and Yunhe Wang},
  title = {{VanillaKD: 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