[论文解读] Accelerating Large Scale Knowledge Distillation via Dynamic Importance Sampling
本文提出动态重要性采样(DIS),通过从基于教师-学生预测差异动态更新的提议分布中采样一组排序后的类别,以加速大规模知识蒸馏。该方法在CIFAR-100和Market-1501上将训练时间最多减少23%,同时保持或甚至提升全量蒸馏的性能,表明自适应采样能够保留关键的梯度信息。
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.
研究动机与目标
- 为降低大规模知识蒸馏的高计算成本,特别是由于对数千个类别进行完整softmax归一化所带来的开销。
- 探究是否可利用数据自适应的先验进行重要性采样,以在减少计算量的同时有效逼近全量蒸馏。
- 开发一种在训练过程中根据教师-学生预测差异自适应调整的采样策略。
- 在效率和准确率方面均优于固定采样基线(均匀采样和基于教师预测的采样)。
- 验证从动态先验中采样是否能保留对有效知识迁移至关重要的梯度信息。
提出的方法
- 该方法使用基于教师与学生模型在训练批次中预测差异频率的动态提议分布。
- 根据教师与学生在logits上差异的大小对类别进行排序,优先采样最具信息量的类别。
- 采用反向视角实现:仅对采样的类别子集计算梯度,避免完整softmax计算。
- 在训练过程中迭代更新提议分布,以反映学生性能的演变和预测偏移的变化。
- 该方法被置于基于重要性采样的蒸馏框架中,损失通过来自动态分布的加权样本进行近似。
- 将该方法与固定基线进行比较:均匀采样和直接从教师预测分布中采样。
实验结果
研究问题
- RQ1动态重要性采样能否在不牺牲模型性能的前提下降低大规模知识蒸馏的计算成本?
- RQ2与固定采样策略(如均匀采样或基于教师的采样)相比,基于数据驱动的自适应提议分布表现如何?
- RQ3从基于预测差异的动态先验中采样是否能保留足够的梯度信息以实现有效的知识迁移?
- RQ4所提方法能否在保持或提升准确率的同时,实现比全量蒸馏更快的训练速度?
- RQ5在类别选择中引入随机性对模型泛化能力和鲁棒性有何影响?
主要发现
- 在2 GHz Intel Core i5 CPU和Tesla M60 GPU上,与CIFAR-100的全量蒸馏相比,动态重要性采样(DIS)将训练时间减少了23%。
- DIS在子集大小较小时,显著优于均匀采样和基于教师预测的采样。
- 在Market-1501行人重识别数据集上,DIS在显著降低计算成本的同时,达到了接近全量蒸馏的top-1准确率。
- 即使仅采样极少数类别,该方法仍保持了具有竞争力的性能,表明关键梯度信息得到有效保留。
- 基于预测差异频率统计的动态先验比静态或固定分布更有效。
- 结果表明,在低样本情形下,采样中的随机性可能提供隐式正则化,从而提升泛化能力。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。