[Paper Review] Accelerating Large Scale Knowledge Distillation via Dynamic Importance Sampling
This paper proposes dynamic importance sampling (DIS) to accelerate large-scale knowledge distillation by sampling a subset of ranked classes from a dynamically updated proposal distribution derived from teacher-student prediction differences. The method reduces training time by up to 23% on CIFAR-100 and Market-1501 while maintaining or even improving performance over full distillation, demonstrating that adaptive sampling preserves critical gradient information.
Knowledge distillation is an effective technique that transfers knowledge from a large teacher model to a shallow student. However, just like massive classification, large scale knowledge distillation also imposes heavy computational costs on training models of deep neural networks, as the softmax activations at the last layer involve computing probabilities over numerous classes. In this work, we apply the idea of importance sampling which is often used in Neural Machine Translation on large scale knowledge distillation. We present a method called dynamic importance sampling, where ranked classes are sampled from a dynamic distribution derived from the interaction between the teacher and student in full distillation. We highlight the utility of our proposal prior which helps the student capture the main information in the loss function. Our approach manages to reduce the computational cost at training time while maintaining the competitive performance on CIFAR-100 and Market-1501 person re-identification datasets.
Motivation & Objective
- To reduce the high computational cost of large-scale knowledge distillation, particularly due to full softmax normalization over thousands of classes.
- To explore whether importance sampling with a data-adaptive prior can effectively approximate full distillation with reduced computation.
- To develop a dynamic sampling strategy that adapts during training based on teacher-student prediction discrepancies.
- To outperform fixed sampling baselines (uniform and teacher-prediction-based) in both efficiency and accuracy.
- To validate that sampling from a dynamic prior preserves essential gradient information for effective knowledge transfer.
Proposed method
- The method uses a dynamic proposal distribution derived from the frequency of prediction differences between teacher and student models across training batches.
- Classes are ranked by the magnitude of the difference in their logits between teacher and student, and the most informative classes are prioritized for sampling.
- A backward-view implementation is used: gradients are computed only over a sampled subset of classes, avoiding full softmax computation.
- The proposal distribution is updated iteratively during training to reflect evolving student performance and prediction shifts.
- The approach is framed within an importance-sampling-based distillation framework, where the loss is approximated using weighted samples from the dynamic distribution.
- The method is compared against fixed baselines: uniform sampling and sampling directly from the teacher’s prediction distribution.
Experimental results
Research questions
- RQ1Can dynamic importance sampling reduce computational cost in large-scale knowledge distillation without sacrificing model performance?
- RQ2How does a data-driven, adaptive proposal distribution compare to fixed sampling strategies like uniform or teacher-based sampling?
- RQ3Does sampling from a dynamic prior derived from prediction differences preserve sufficient gradient information for effective knowledge transfer?
- RQ4Can the proposed method achieve faster training speed while maintaining or improving accuracy relative to full distillation?
- RQ5What is the impact of introducing randomness in class selection on model generalization and robustness?
Key findings
- The dynamic importance sampling (DIS) method reduced training time by 23% on a 2 GHz Intel Core i5 CPU and Tesla M60 GPU compared to full distillation on CIFAR-100.
- DIS outperformed both uniform sampling and teacher-prediction-based sampling, especially when the subset size was small.
- On the Market-1501 person re-identification dataset, DIS achieved a top-1 accuracy close to full distillation while significantly reducing computational cost.
- The method maintained competitive performance even when sampling only a small fraction of classes, indicating effective preservation of critical gradient information.
- The dynamic prior derived from prediction-difference frequency statistics proved more effective than static or fixed distributions.
- The results suggest that introducing randomness in sampling may provide implicit regularization, improving generalization in low-sample regimes.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.