Abstract
Knowledge Distillation (KD) is a cornerstone of model compression, yet its performance is highly sensitive to hyperparameter choices often made by intuition. This study conducts a large-scale empirical investigation across 13 NLP datasets to quantify the impact of these choices and identifies a "stable" configuration that performs robustly across tasks without the need for expensive tuning.
Introduction
Knowledge Distillation involves training a smaller "student" model to mimic a larger "teacher." While powerful, the process is notoriously sensitive to specific settings: which teacher checkpoint to use, the distance metric between distributions, the weight of human labels, and temperature scaling. Most researchers rely on personal bias or random selection for these parameters. This paper fills the gap by systematically quantifying the "cost" of sub-optimal choices and providing evidence-based recommendations.
Methodology
The researchers evaluated 39 teacher-student-dataset triples across four major NLP tasks: Text Classification, Named Entity Recognition (NER), Reading Comprehension, and Machine Translation. To navigate the vast parameter space, they employed an approximate greedy search, starting from a standard default and iteratively optimizing individual parameters to isolate their effects.
Analysis of Parameter Impact
The study reveals that specific parameter choices significantly influence the final student performance. By comparing various configurations, the authors identified which settings consistently yield the best results.
Key Findings:
- The "Low-Loss" Teacher Wins: Surprisingly, the best teacher is not necessarily the one with the highest accuracy. Teachers with the lowest validation loss ($t_{ll}$)—indicating better-calibrated probability estimates—consistently produced superior students.
- Distance Metrics: Cross-Entropy (CE) generally outperformed Mean Squared Error (MSE) as a distance measure between teacher and student distributions.
- Human Labels are Optional: Tuning the weight of human labels ($\alpha$) provided the smallest performance gains but was the most computationally expensive to optimize. Distilling from the teacher's soft labels alone ($\alpha=1$) is often a sufficient strategy.
- Temperature Simplicity: Setting the student's temperature to 1 ($\tau_s = 1$) while scaling the teacher's was found to be as effective as scaling both, aiding model interpretability.
Quantifying the Cost of Sub-optimal Choices
The difference between a well-tuned configuration and a poor one is substantial. Choosing a "weak" configuration instead of a "strong" one resulted in a relative performance loss of up to 9.4%.
As shown in the figure above, the gap between the best and worst configurations widens significantly at higher deciles, reaching a 4.3% gain at the 90th percentile. Even compared to a random parameter selection, a tuned configuration offers a gain of up to 3%.
The "Stable" Configuration
The authors identified a specific configuration ($t = t_{ll}, \mathcal{L}_2 = CE, \tau_s = 1, \alpha = 1$) that is remarkably robust. This "stable" setup matched or outperformed best test-specific configurations in 40% of all cases, providing a high-quality default for researchers.
Conclusion
This investigation moves KD beyond "hyperparameter vibes" by providing a systematic look at parameter sensitivity. While the study focused on NLP, the identified stable configuration offers a reliable starting point for model compression. Future work remains to determine if these specific settings hold true for other domains like computer vision or for extremely large-scale models.
Summary updated