Introduction
Deep Neural Networks (DNNs) are powerful but often too large and computationally expensive for edge devices or embedded systems. Knowledge Distillation (KD) is a popular solution where a small "student" network learns to mimic a large, pre-trained "teacher" network.
However, traditional KD has a blind spot: it only looks at the teacher's final output (the "dark knowledge" of a fully trained model). This ignores the valuable "experience" gained during the teacher's training process. Just as a human student benefits from seeing how a teacher works through a problem—including the detours and failures—a neural network student can learn more effectively by observing the teacher's evolution from a novice to an expert.
Methodology: Experience Ensemble Knowledge Distillation (EEKD)
The authors propose Experience Ensemble Knowledge Distillation (EEKD). Unlike classical KD, which transfers knowledge from a single pre-trained teacher, EEKD utilizes multiple snapshots of the teacher model taken throughout its training process.
The workflow consists of three main steps:
- Snapshot Collection: During the teacher's training, intermediate models (snapshots) are saved at uniform intervals.
- Knowledge Integration: Instead of using these snapshots individually, they are integrated into a single "virtual teacher" using an ensemble technique.
- Self-Attention Weighting: This is the core innovation. Rather than giving every snapshot equal importance, EEKD uses a self-attention module to adaptively assign weights to different intermediate models based on the input data and the student's current state. This allows the student to focus on "simpler" teacher snapshots early in training and "expert" snapshots later on.
Experimental Results
The method was evaluated on benchmark image classification datasets including CIFAR-100 and ImageNet-1K.
Weighting Strategy Analysis
A key finding is the effectiveness of the attention-based weighting strategy. The authors compared several approaches: mean weighting, linear increase/decrease, and the proposed attention-based mechanism.
As shown in the experimental data, the attention-based strategy consistently yields the highest accuracy for the student model (EEKD column). For instance, with a ResNet-110 teacher and ResNet-20 student, the attention-based EEKD achieves 72.91% accuracy, outperforming simpler weighting schemes and vanilla KD (70.67%).
Key Insights
- The Value of the Path: Intermediate models capture different facets of the data. Early snapshots might focus on simple textures, while later ones capture complex semantic relationships. By seeing the whole path, the student gets a more comprehensive "education."
- Efficiency over Standard Ensembles: Traditional ensemble distillation requires training multiple independent teachers, which is computationally expensive. EEKD achieves the benefits of an ensemble by simply "saving its work" during a single training run, reducing training costs significantly.
- Bridging the Gap: For ResNet-34 to ResNet-18 distillation on ImageNet, EEKD reduced the performance gap between teacher and student by 54%.
Conclusion
EEKD demonstrates that a teacher's training history is a rich source of information for distillation. By adaptively ensembling intermediate snapshots, students can learn more effectively than by mimicking a single final model. While the student's training process becomes slightly more computationally intensive due to multiple teacher inferences, the gains in accuracy and the reduction in teacher training costs make it a compelling alternative to traditional KD and ensemble methods.
Summary updated