Abstract
With ever growing scale of neural models, knowledge distillation (KD) attracts more attention as a prominent tool for neural model compression. However, there are counter intuitive observations in the literature showing some challenging limitations of KD. A case in point is that the best performing checkpoint of the teacher might not necessarily be the best teacher for training the student in KD. Therefore, one important question would be how to find the best checkpoint of the teacher for distillation? Searching through the checkpoints of the teacher would be a very tedious and computationally expensive process, which we refer to as the checkpoint-search problem. Moreover, another observation is that larger teachers might not necessarily be better teachers in KD which is referred to as the capacity-gap problem. To address these challenging problems, in this work, we introduce our progressive knowledge distillation (Pro-KD) technique which defines a smoother training path for the student by following the training footprints of the teacher instead of solely relying on distilling from a single mature fully-trained teacher. We demonstrate that our technique is quite effective in mitigating the capacity-gap problem and the checkpoint search problem. We evaluate our technique using a comprehensive set of experiments on different tasks such as image classification (CIFAR-10 and CIFAR-100), natural language understanding tasks of the GLUE benchmark, and question answering (SQuAD 1.1 and 2.0) using BERT-based models and consistently got superior results over state-of-the-art techniques.
Introduction
Knowledge Distillation (KD) is the standard method for model compression, where a large "teacher" model transfers its knowledge to a smaller "student" model. However, researchers often encounter two major hurdles: the Capacity Gap and the Checkpoint Search Problem. The capacity gap occurs when a teacher is so complex that the student fails to learn effectively from its final state. The checkpoint search problem arises because the most accurate version of a teacher is often not the best one for distillation, requiring a tedious and expensive search for the optimal intermediate checkpoint.
Pro-KD (Progressive Knowledge Distillation) addresses these issues by asking: What if the student learns while the teacher is still a student itself? Instead of distilling from a static, mature teacher, Pro-KD allows the student to follow the teacher's entire learning trajectory.
Methodology
Pro-KD introduces a two-phase progressive training regime designed to smooth the student's learning curve and capture "Dark Knowledge" before it is compressed away by a fully trained model.
Phase I: Step-by-Step Distillation
In this phase, the teacher and student are trained simultaneously. For every epoch the teacher learns, the student performs several training steps to mimic the teacher’s current logits. This captures rich relational information between data samples early in the training process.
Dynamic Temperature Scaling
A critical innovation in Pro-KD is the adaptive temperature. In standard KD, a fixed temperature is used to smooth the teacher's probability distribution. Pro-KD uses a temperature that starts high (maximum smoothing) and decreases linearly to 1 as training progresses. This makes the teacher's "hints" easy to digest early on and gradually increases the difficulty as the student matures.
Phase II: Ground-Truth Fine-Tuning
After the teacher has finished its training and the student has followed its "footsteps," the student is fine-tuned for a few additional epochs using only the hard ground-truth labels and standard cross-entropy loss.
Experimental Evaluation
The authors evaluated Pro-KD across a diverse set of benchmarks to prove its versatility, including image classification (CIFAR-10/100), Natural Language Understanding (GLUE benchmark), and Question Answering (SQuAD 1.1/2.0).
Key Results
Pro-KD consistently outperformed standard (Vanilla) KD and more complex state-of-the-art methods like TAKD (Teacher Assistant KD) and RCO (Route Constrained Optimization).
As shown in the results for CIFAR-10, a ResNet-8 student reached 90.01% accuracy with Pro-KD, compared to 88.45% with Vanilla KD and 88.47% with TAKD. Similar gains were observed in NLU; on the MNLI task, Pro-KD achieved a score of 84.83/84.84, significantly outperforming the "No KD" baseline. On SQuAD 2.0, Pro-KD achieved a score of 76.0, while Vanilla KD trailed at 73.65.
Conclusion
By following the teacher's trajectory, Pro-KD eliminates the need for expensive checkpoint searching while effectively bridging the capacity gap. While simultaneous training increases initial compute overhead, the performance gains and the removal of trial-and-error search make it a highly effective framework for modern model compression. Future work will investigate the scalability of this approach to massive architectures like GPT-3.
Summary updated