[论文解读] Snapshot Distillation: Teacher-Student Optimization in One Generation
本文提出了一种名为快照蒸馏(Snapshot Distillation, SD)的新教师-学生优化框架,通过利用同一训练过程中的中间模型快照,实现在单个训练代次内进行知识蒸馏。通过采用循环学习率和平滑的教师信号,SD在仅增加约1/3训练时间的情况下,于CIFAR100和ImageNet上实现了稳定的准确率提升,优于基线模型,并能有效迁移至目标检测和语义分割等下游任务。
Optimizing a deep neural network is a fundamental task in computer vision, yet direct training methods often suffer from over-fitting. Teacher-student optimization aims at providing complementary cues from a model trained previously, but these approaches are often considerably slow due to the pipeline of training a few generations in sequence, i.e., time complexity is increased by several times. This paper presents snapshot distillation (SD), the first framework which enables teacher-student optimization in one generation. The idea of SD is very simple: instead of borrowing supervision signals from previous generations, we extract such information from earlier epochs in the same generation, meanwhile make sure that the difference between teacher and student is sufficiently large so as to prevent under-fitting. To achieve this goal, we implement SD in a cyclic learning rate policy, in which the last snapshot of each cycle is used as the teacher for all iterations in the next cycle, and the teacher signal is smoothed to provide richer information. In standard image classification benchmarks such as CIFAR100 and ILSVRC2012, SD achieves consistent accuracy gain without heavy computational overheads. We also verify that models pre-trained with SD transfers well to object detection and semantic segmentation in the PascalVOC dataset.
研究动机与目标
- 为解决传统教师-学生优化方法中高计算成本的问题,该方法需按顺序训练多个代次的模型。
- 通过复用同一训练过程中中间模型快照作为教师,实现在单个训练代次内有效进行知识蒸馏。
- 探究在相同训练过程中应用教师-学生蒸馏时,其最有效的条件。
- 证明同一训练代次中早期迭代的蒸馏信号可显著降低过拟合并提升泛化能力。
- 验证经SD训练的模型在下游视觉任务(如目标检测和语义分割)中具有良好泛化性能。
提出的方法
- 实施循环学习率调度,将每个周期的最终模型快照作为下一周期的教师。
- 利用每个训练周期的最后一个快照——已充分优化——作为教师模型,为下一周期的学生提供监督。
- 对教师模型输出的logits应用平滑技术,以提供更丰富、更稳定的监督信号,防止过拟合。
- 在训练过程中将蒸馏损失与标准交叉熵损失相结合,使学生网络学习模仿教师的软标签预测结果。
- 通过应用学习率热身与衰减周期,确保教师与学生之间存在足够的模型差异,从而将学生从教师权重中拉开。
- 保持教师与学生使用相同的网络架构,实现无需结构变更的直接知识迁移。
实验结果
研究问题
- RQ1是否可以在不顺序训练多个模型的前提下,有效实现在单个训练代次内的知识蒸馏?
- RQ2当教师模型源自同一训练过程的早期迭代时,实现有效教师-学生蒸馏的关键条件是什么?
- RQ3循环学习率调度如何支持在单个代次内构建高质量的教师模型?
- RQ4与原始模型输出相比,平滑的蒸馏信号是否能提升泛化能力并减少过拟合?
- RQ5SD带来的性能增益是否可迁移至目标检测和语义分割等下游视觉任务?
主要发现
- 快照蒸馏在CIFAR100和ILSVRC2012上实现了稳定的准确率提升,ResNet101和ResNet152的top-1错误率分别降低0.37%和0.26%。
- 在ResNet101上,top-1和top-5的相对准确率提升分别为1.71%和4.31%;在ResNet152上,分别为1.23%和1.94%,表明泛化能力强劲。
- SD仅需比基线训练多约1/3的训练时间,显著优于多代次蒸馏方法。
- 使用SD预训练的模型在PascalVOC上的目标检测任务中mAP达到74.93%(对比基线73.49%),语义分割任务中mIOU达到77.97%(对比基线77.53%)。
- 经过微调后,SD的性能增益依然保持,证实改进的表征可有效迁移至多样化的视觉任务。
- 训练曲线显示,SD缩小了训练与测试准确率之间的差距,表明通过蒸馏有效缓解了过拟合。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。