Skip to main content
QUICK REVIEW

[论文解读] AMD: Automatic Multi-step Distillation of Large-scale Vision Models

Cheng Han, Qifan Wang|arXiv (Cornell University)|Jul 5, 2024
Advanced Image and Video Retrieval TechniquesComputer Science被引用 3
一句话总结

本文提出自动多步蒸馏(AMD),一种通过自动级联蒸馏步骤压缩大规模视觉模型的新框架。AMD利用结构化剪枝与联合优化生成中间教师-学生模型,再通过负性能-尺度导数(NPSD)指标选择最优模型,相较于先前的多步方法将训练时间减少10倍,在CIFAR-100上实现高达15.91%的准确率提升,在ImageNet上实现4.03%的准确率提升,达到当前最优性能。

ABSTRACT

Transformer-based architectures have become the de-facto standard models for diverse vision tasks owing to their superior performance. As the size of the models continues to scale up, model distillation becomes extremely important in various real applications, particularly on devices limited by computational resources. However, prevailing knowledge distillation methods exhibit diminished efficacy when confronted with a large capacity gap between the teacher and the student, e.g, 10x compression rate. In this paper, we present a novel approach named Automatic Multi-step Distillation (AMD) for large-scale vision model compression. In particular, our distillation process unfolds across multiple steps. Initially, the teacher undergoes distillation to form an intermediate teacher-assistant model, which is subsequently distilled further to the student. An efficient and effective optimization framework is introduced to automatically identify the optimal teacher-assistant that leads to the maximal student performance. We conduct extensive experiments on multiple image classification datasets, including CIFAR-10, CIFAR-100, and ImageNet. The findings consistently reveal that our approach outperforms several established baselines, paving a path for future knowledge distillation methods on large-scale vision models.

研究动机与目标

  • 为解决在高压缩比(如10倍压缩)下压缩大容量视觉模型时知识蒸馏性能下降的问题。
  • 通过自动化选择最优中间教师-学生模型,消除多步蒸馏中昂贵的试错式超参数搜索。
  • 通过引入新型NPSD指标建模尺度-性能权衡,提升蒸馏效率与性能。
  • 实现对ViT和Swin Transformer等多样化架构的有效蒸馏,并在CNN上取得具有竞争力的结果。

提出的方法

  • 对教师模型应用结构化剪枝,生成一系列不同规模的中间教师-学生架构。
  • 采用联合优化框架同时训练所有教师-学生候选模型,实现在单次训练中高效搜索多种规模。
  • 引入负性能-尺度导数(NPSD)指标,量化候选教师-学生模型的性能-尺度最优性,指导最优模型的选择。
  • 采用多损失目标函数,结合交叉熵损失、logit级损失与特征模仿损失,以在各蒸馏阶段保留知识。
  • 基于NPSD选择最优教师-学生模型,以最大化下游学生模型的性能。
  • 通过标准蒸馏方法将该框架扩展至基于CNN的模型,取得具有竞争力的性能表现。

实验结果

研究问题

  • RQ1自动化多步蒸馏流程是否能在高压缩比下超越单步蒸馏与人工设计的多步蒸馏方法,有效压缩大视觉模型?
  • RQ2如何定量建模中间教师-学生模型的尺度-性能权衡,以指导最优选择?
  • RQ3与顺序训练相比,对多个教师-学生候选模型进行联合优化是否能提升训练效率与最终学生模型性能?
  • RQ4不同损失组件(交叉熵、logit、特征模仿)对最终蒸馏性能的贡献程度如何?
  • RQ5所提出的NPSD指标是否能可靠预测最优教师-学生模型,而无需进行 exhaustive 搜索?

主要发现

  • 在10倍压缩率下,AMD在CIFAR-100上相较基线方法实现15.91%的准确率提升,显著优于现有单步与多步蒸馏方法。
  • 在ImageNet上,AMD相较当前最优基线将学生模型准确率提升4.03%,展现出强大的跨数据集泛化能力。
  • 由于在所有候选教师-学生模型上实现联合优化,AMD相较其他多步蒸馏方法将训练时间减少最多10倍。
  • 消融实验表明,移除特征模仿损失($\mathcal{L}_{\text{feat}}$)导致性能下降最大(从80.19%降至75.24%),凸显其在知识迁移中的关键作用。
  • NPSD指标极为有效:其与学生模型性能高度相关,且可在无需 exhaustive 搜索的情况下实现最优教师-学生模型选择。
  • 引入DKD损失可带来微小性能提升(80.19% → 80.22%),但因引入额外超参数导致训练不稳定,故未在最终模型中使用。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。