Introduction
Large-scale Pre-trained Language Models (PLMs) like BERT and RoBERTa have revolutionized NLP but remain computationally prohibitive for many real-world deployments. Knowledge Distillation (KD) is the standard remedy, where a large "teacher" model guides a smaller "student." However, traditional KD is "static," applying the same supervision and data throughout the entire training process. This paper introduces Dynamic KD, a framework where the student adaptively adjusts its teacher, training data, and learning objectives based on its evolving competency.
The Dynamic KD Framework
The core innovation of Dynamic KD is using the student's prediction uncertainty (measured via entropy) as a proxy for its "competency." This allows for adaptation across three dimensions:
- Dynamic Teacher Adoption: The student can query different teachers. "Hard Selection" splits a batch between a small and big teacher based on uncertainty, while "Soft Selection" weights multiple teachers' influences on the fly.
- Dynamic Data Selection: Similar to active learning, the student only queries the teacher for "informative" instances—those where the student is most uncertain—avoiding redundant training on mastered data.
- Dynamic Supervision Adjustment: The framework balances matching the teacher’s internal "hidden" layers (Patient Loss) and its final output (KL-divergence). As the student matures, it shifts focus from internal representations to final predictions.
Efficiency and the "10% Rule"
A standout finding is the 10% Rule: training on just the top 10% most "uncertain" instances can achieve performance comparable to training on the full dataset. This suggests that up to 90% of KD training time on large datasets is spent on redundant information.
By using dynamic data selection (with a ratio of $r=0.1$), the authors reduced computational costs (FLOPs) from 45.1B to 14.7B on original datasets, and from 24.9B to 4.65B on augmented datasets, with negligible accuracy loss.
Key Insights and Results
- The Capacity Gap: Counter-intuitively, a 24-layer BERT-Large teacher often produces a worse 6-layer student than a 12-layer BERT-Base teacher. The "capacity gap" makes the larger teacher's sharp predictions harder to mimic.
- Performance Boost: On the SST-5 sentiment task, Dynamic KD achieved 48.1% accuracy, significantly outperforming static Vanilla KD (47.4%) and BERT-PKD (46.6%).
- Learning Evolution: Early in training, students benefit more from internal "hidden" states. As they mature, matching the final output distribution becomes more effective.
Conclusion
Dynamic KD transforms distillation from a rigid process into an adaptive one. By focusing on informative data and adjusting supervision based on student competency, it achieves superior performance while drastically reducing computational overhead. Future work will explore the integration of these dynamic components and their application to generative tasks.
Summary updated