NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Revisiting Knowledge Distillation: The Hidden Role of Dataset Size

Giulia Lanzillotta, Felix Sarnthein, Gil Kur, Thomas Hofmann, Bobby He

TL;DR

Knowledge distillation (KD) is traditionally viewed through the lenses of model compression and generalization. This paper introduces a critical third dimension: data efficiency. The authors demonstrate that the benefits of distillation are massively amplified in low-data regimes, allowing models to achieve the same performance as standard label-based training while using up to 3x less data.

What Problem Does This Paper Address?

Despite its widespread use, the "how" and "why" of Knowledge Distillation remain subjects of intense debate. Most research assumes a setting where the teacher and student are trained on the same amount of data. This paper argues that this focus overlooks a fundamental variable: dataset size.

The authors set out to investigate if KD provides a unique advantage when training data is scarce. By shifting the perspective from "how much can we shrink the model?" to "how much can we shrink the dataset?", they aim to reconcile competing theories—like label smoothing versus "dark knowledge"—and provide a more unified understanding of distillation's mechanics.

Methods

The researchers employed a controlled experimental framework to isolate the impact of dataset size. Their setup involves:

  • Student-Teacher Pairs: Comparing students trained with standard one-hot labels (Label Training or LT) against students trained using the soft outputs of a teacher model (KD).
  • Data Scaling: They varied the relative dataset fraction ($\kappa = M/N$), where $M$ is the number of samples available to the student and $N$ is the number of samples the teacher was trained on.
  • Cross-Architecture/Modality Testing: Experiments spanned CNNs (ResNets) and Transformers (ViT, GPT-like models) across both computer vision and natural language processing tasks.
  • Representational Analysis: They used Centered Kernel Alignment (CKA) to measure how closely the internal features of the student aligned with the teacher's features across different data scales.
Figure 1: Overview of our study. (Left and Center) Schematic summary of the contributions of this work. Prior research has primarily emphasized two main benefits of knowledge distillation—model compression and improved generalization. We introduce a third, previously underexplored dimension: data efficiency, showing that distillation yields the largest relative gains in low-data regimes. (Right) Experimental setup used throughout the paper. Students share the same architecture as the teacher or are smaller, and are trained with varying dataset fractions and temperatures. We systematically compare training with one-hot labels versus distillation targets to isolate the role of soft supervision across data scales.

Datasets

The study utilized a diverse set of benchmarks to ensure robustness:

  • Vision: CIFAR10-5m (a synthetic extension of CIFAR10 with 6 million images), CIFAR100, and ImageNet.
  • Language: The Languini Books dataset for autoregressive language modeling.
  • Transfer Learning: Six specialized datasets (FLOWERS, DTD, AIRCRAFT, CALTECH, CARS, FOOD) were used to test KD's effectiveness in low-data transfer scenarios using pre-trained teachers.

Key Insights and Ideas

  • The Low-Data Power-Up: The performance gap between distillation and standard training isn't just preserved when data is scarce—it's amplified. While KD might offer a ~1% accuracy boost on a full dataset, that gain can jump to 10-25% when using only 2% of the data.
  • Rejecting the Label Smoothing Hypothesis: A popular theory suggests KD works simply by regularizing the model (similar to label smoothing). However, the authors found that while label smoothing provides a small, constant benefit, the benefits of KD scale dramatically as data decreases. This suggests KD provides specific "dark knowledge" about inter-class relationships that simple smoothing cannot replicate.
  • Emergent Representational Alignment: In a surprising finding, the authors observed that logit-based distillation (which only looks at the teacher's final output) actually forces the student's internal features to align with the teacher's. This effect is most pronounced in low-data regimes.
  • The Temperature Connection: Higher softmax temperatures ($\tau$) create smoother targets that distribute "knowledge" more effectively across classes, which is critical for learning when samples are few.
Test error and perplexity as a function of dataset fraction, showing KD consistently dominating label training in low-data regimes.

Key Results

  • 3x Data Efficiency: Across multiple tasks, distillation allowed students to match the performance of label-trained models using roughly three times less data.
  • Quantifiable Gains: On CIFAR100, the performance increment (PI) reached 25% in low-data settings. On the Languini Books dataset, KD provided a 10% gain in perplexity at low data scales.
  • Student-Teacher Size Ratio: The "crossover point" where label training finally catches up to distillation depends on model size. Larger, more overparameterized students are actually better at extracting benefit from teacher guidance when data is scarce.
  • Computational Trade-offs: While KD is data-efficient, it isn't always computationally efficient. The extra forward passes required for the teacher can sometimes result in higher total FLOPs than standard training, despite needing fewer data samples.
Figure 3: Test perplexity over FLOPs for GPT-MINI students trained with either distillation or label training, varying teacher size.

Limitations and Future Work

  • Task-Specific Mechanics: The authors noted that representational alignment behaved differently in vision versus language tasks, suggesting that the underlying mechanisms of KD might be task-dependent.
  • Computational Overhead: As noted in the results, the practical "efficiency" of KD is hindered by the cost of teacher inference. Future work could explore ways to achieve data efficiency without the heavy computational tax.
  • Theoretical Foundations: While the paper provides strong empirical evidence for the "dark knowledge" hypothesis in low-data regimes, a rigorous theoretical characterization of the optimization dynamics that lead to this efficiency is still missing. The authors suggest that "Neural Collapse" theory might be a promising avenue for explaining these observations.

Summary updated

BibTeX
@inproceedings{lanzillotta2025revisiting,
  author = {Giulia Lanzillotta and Felix Sarnthein and Gil Kur and Thomas Hofmann and Bobby He},
  title = {{Revisiting Knowledge Distillation: The Hidden Role of Dataset Size}},
  booktitle = {Repository},
  year = {2025},
  doi = {10.3929/ethz-c-000792426},
}
Figure