Introduction
Knowledge Distillation (KD) has become a cornerstone of efficient deep learning, allowing compact "student" models to inherit the performance of large, complex "teacher" ensembles. However, traditional KD suffers from a significant computational bottleneck: the requirement to pass every training sample through the heavy teacher network during every epoch. This "online" distillation can increase training time by several orders of magnitude, making it prohibitively expensive for many researchers.
Recent attempts to mitigate this, such as ReLabel, proposed pre-generating a global "label map" for each image. While faster, ReLabel introduces a "spatial mismatch" because the teacher sees the entire image while the student sees a random crop. This discrepancy leads to suboptimal supervision and information loss. Fast Knowledge Distillation (FKD) addresses these challenges by providing high-fidelity teacher supervision at a fraction of the traditional cost.
Methodology: The FKD Framework
FKD decouples the teacher's inference from the student's training through a two-phase process that ensures the student receives the exact "dark knowledge" intended for its specific view of the data.
- Label Generation Phase: Instead of a static global map, FKD samples $M$ random crops from each image. These crops are passed through the teacher model to generate precise "soft labels" (probability distributions). The framework stores the specific crop coordinates, augmentation parameters (e.g., horizontal flips), and the resulting labels in a dedicated storage system.
- Training Phase: During student training, the system retrieves the pre-saved coordinates and labels. The student is trained on the exact same views the teacher processed, effectively receiving "oracle" supervision without the need for live teacher inference during the training loop.
Efficiency and Optimization
To make this approach scalable for large-scale datasets like ImageNet, the authors introduced several key optimizations to handle data loading and storage.
Multi-crop Sampling
FKD utilizes multiple crops from the same image within a single mini-batch. This strategy significantly reduces the I/O overhead associated with loading high-resolution images from disk. Furthermore, training on multiple views of the same image helps stabilize the training process by mitigating sample variance. This approach also leads to a "serrated" learning rate curve when using cosine decay, which the authors found beneficial for convergence.
Soft Label Compression
Storing full 1,000-class probability vectors for millions of crops would require terabytes of space. FKD employs Marginal Smoothing with Top-K (MS) to compress these labels efficiently.
By storing only the top $K$ (e.g., 5 or 10) probabilities and applying a uniform smoothed value to the remaining classes, the storage requirement for ImageNet is reduced to approximately 13-22 GB. This makes the framework practical for standard hardware setups without sacrificing the quality of the distillation signal.
Key Results
The FKD framework demonstrates remarkable improvements in both accuracy and training efficiency across various benchmarks:
- State-of-the-Art Accuracy: A ResNet-50 trained via FKD achieved 80.1% Top-1 accuracy on ImageNet-1K, surpassing ReLabel by 1.2% and matching the performance of computationally expensive live distillation.
- Massive Speedup: FKD is 3–5x faster than vanilla KD. When using multiple crops per image, it can even outperform standard supervised training in terms of throughput.
- Broad Applicability: The benefits extend across architectures. For instance, a Vision Transformer (ViT-T) reached 75.2% accuracy using only 15% of the training resources typically required by the DeiT protocol.
- Robustness and Transferability: Models trained with FKD show improved performance on robustness benchmarks like ReaL and ImageNetV2, and they transfer well to downstream tasks such as object detection and instance segmentation on the COCO dataset.
Conclusion
Fast Knowledge Distillation (FKD) successfully bridges the gap between the efficiency of offline label generation and the accuracy of online teacher supervision. By addressing the spatial mismatch problem and introducing efficient label compression, FKD provides a scalable, high-performance framework for training modern visual recognition models. Future work may extend this paradigm to even larger datasets and diverse modalities such as video, where teacher computational costs are even more prohibitive.
Summary updated