Abstract
Knowledge Distillation (KD) aims at improving the performance of a low-capacity student model by inheriting knowledge from a high-capacity teacher model. Previous KD methods typically train a student by minimizing a task-related loss and the KD loss simultaneously, using a pre-defined loss weight to balance these two terms. In this work, we propose to first transfer the backbone knowledge from a teacher to the student, and then only learn the task-head of the student network. Such a decomposition of the training process circumvents the need of choosing an appropriate loss weight, which is often difficult in practice, and thus makes it easier to apply to different datasets and tasks. Importantly, the decomposition permits the core of our method, Stage-by-Stage Knowledge Distillation (SSKD), which facilitates progressive feature mimicking from teacher to student. Extensive experiments on CIFAR-100 and ImageNet suggest that SSKD significantly narrows down the performance gap between student and teacher, outperforming state-of-the-art approaches. We also demonstrate the generalization ability of SSKD on other challenging benchmarks, including face recognition on IJB-A dataset as well as object detection on COCO dataset.
The Challenge of Hyperparameter Tuning in KD
Knowledge Distillation (KD) has become a cornerstone technique for model compression, enabling the deployment of high-performance deep learning models on resource-constrained devices. Traditionally, KD involves training a student model to minimize a composite loss function:
$$L = L_{task} + \lambda L_{KD}$$
where $L_{task}$ is the standard supervised loss (e.g., cross-entropy) and $L_{KD}$ is the distillation loss that encourages the student to mimic the teacher's behavior.
The primary bottleneck in this approach is the loss weight $\lambda$. As shown in Figure 3, the optimal value for $\lambda$ is highly sensitive to the specific dataset and architecture. A value that yields peak performance on CIFAR-100 may lead to suboptimal results on ImageNet. This sensitivity necessitates exhaustive grid searches, making traditional KD difficult to scale across diverse tasks.
Stage-by-Stage Knowledge Distillation (SSKD)
To address the hyperparameter sensitivity, the authors propose Stage-by-Stage Knowledge Distillation (SSKD). The core idea is to decouple the learning of feature representations (backbone) from the learning of the final task (task-head).
Phase 1: Backbone Mimicking
Instead of training the entire network at once with labels, SSKD first trains the student's backbone to mimic the teacher's intermediate features. This process is conducted stage-by-stage:
- Sequential Training: The backbone is divided into $K$ stages. In each stage $i$, the student learns to match the teacher's features $\mathbf{f}_i^T$ using a mimicking loss $\mathcal{L}_{S_i}$.
- Freezing Parameters: Once a stage is trained, its parameters are frozen. This prevents the "knowledge vanishing" problem often seen in multi-loss training, where gradients from later layers interfere with earlier ones.
- Label-Free Learning: Crucially, this phase does not require ground-truth labels, allowing the student to focus purely on capturing the teacher's representational power.
Phase 2: Task-Head Training
After the backbone is fully trained and frozen, the student learns the task-head (e.g., the final classification layer) using standard supervised learning with ground-truth labels. Because the backbone already provides high-quality features, the task-head converges quickly and effectively.
Experimental Results
SSKD was evaluated across a variety of benchmarks, demonstrating its robustness and state-of-the-art performance:
- ImageNet Classification: A ResNet-18 student trained via SSKD from a ResNet-34 teacher achieved 71.36% Top-1 accuracy, a significant improvement over the 69.57% baseline and surpassing existing KD methods like AT and FitNets.
- Object Detection: On the COCO dataset, SSKD improved the Average Precision (AP) of a ResNet-50 FPN model from 37.7% to 40.5%.
- Face Recognition: SSKD showed strong generalization on the IJB-A dataset, proving its utility beyond standard classification tasks.
Conclusion
SSKD offers an "embarrassingly simple" yet highly effective alternative to traditional knowledge distillation. By decomposing the training process into sequential stages and decoupling feature mimicking from task learning, it eliminates the need for sensitive hyperparameter tuning. This makes SSKD a practical and powerful tool for researchers and engineers looking to compress models for real-world deployment.
Summary updated