Abstract
Knowledge Distillation (KD) is a cornerstone technique for model compression, where a large "teacher" model transfers its learned features to a smaller "student." Traditionally, it was assumed that a more accurate teacher would naturally produce a better student. However, recent findings highlight a "capacity gap": students often struggle to mimic overly complex teachers. This paper introduces a "prune, then distill" framework that simplifies the teacher model via unstructured pruning before distillation. This approach provides "student-friendly" knowledge that serves as a superior regularizer. Our results on CIFAR100 and TinyImageNet show that pruning the teacher consistently enhances student accuracy, even when the teacher's own performance slightly degrades.
Introduction: The Capacity Gap in Distillation
The primary goal of Knowledge Distillation is to create compact, efficient models without sacrificing the performance of their larger counterparts. Despite its success, KD faces a significant hurdle known as the capacity gap. When the architectural difference between the teacher and student is too large, the student lacks the representational power to capture the teacher's complex decision boundaries. This leads to a counter-intuitive phenomenon where a more powerful teacher can actually result in a weaker student.
The authors of this paper investigate whether reducing teacher complexity through pruning—a technique typically used for standalone model compression—can bridge this gap and facilitate more effective knowledge transfer.
Methodology: The Prune, Then Distill Framework
The proposed framework consists of a simple three-step pipeline designed to generate "student-friendly" teachers.
- Teacher Training: A standard, high-capacity teacher network is trained to convergence.
- Unstructured Pruning: The teacher undergoes unstructured pruning, specifically using the LR rewinding technique. This process removes individual weights based on magnitude, creating a sparse version of the teacher.
- Knowledge Distillation: The pruned, sparse teacher is used to train the student model using vanilla KD (KL-divergence loss).
Beyond standard distillation, the authors introduce a sparsity-aware student design. By creating a student with the same depth as the teacher but adjusting channel counts to match the non-zero weight distribution of the pruned teacher, the student's physical architecture is optimized to receive the teacher's specific knowledge.
Theoretical Insights: Pruning as Regularization
A key contribution of this work is the theoretical link between teacher pruning and Label Smoothing Regularization (LSR). The authors prove that distilling from a pruned teacher is mathematically equivalent to using "smoother" labels. Pruning acts as a sparsity-inducing regularizer on the teacher, making its output probabilities less "peaky" or overconfident. This prevents the student from overfitting to the teacher's noise and encourages better generalization.
Experimental Results
The framework was evaluated on the CIFAR100 and TinyImageNet benchmarks across various architectures, including VGG and ResNet.
Key Findings
- Improved Student Accuracy: Across nearly all tested configurations, pruning the teacher led to higher student accuracy. For instance, a VGG11 student distilled from a standard VGG19 achieved 72.02% accuracy, which rose to 72.67% when the teacher was pruned by 79%.
- Self-Distillation Gains: In self-distillation scenarios (e.g., ResNet18 to ResNet18), pruning the teacher by 36% improved student accuracy from 57.97% to 59.39% on TinyImageNet.
- Teacher Accuracy vs. Student Performance: A striking observation is that the student's performance often improves even if the teacher's own accuracy decreases after pruning. The "student-friendliness" of the simplified knowledge is more critical than the teacher's absolute top-1 accuracy.
Conclusion and Future Directions
The "prune, then distill" strategy effectively addresses the capacity gap by simplifying the teacher's knowledge. By bridging unstructured pruning and structured student design, the authors provide a pathway to high-performance, hardware-compatible models.
Future research could explore dynamic joint optimization, where pruning and distillation occur simultaneously, or investigate the framework's efficacy with more complex distillation losses and larger-scale datasets like ImageNet-1k.
Summary updated