Skip to main content
QUICK REVIEW

[论文解读] What Happens During Finetuning of Vision Transformers: An Invariance Based Investigation

Gabriele Merlin, Vedant Nanda|arXiv (Cornell University)|Jul 12, 2023
Advanced Neural Network ApplicationsComputer Science被引用 3
一句话总结

本文研究了在视觉变换器(ViTs)的微调过程中,预训练期间学习到的不变性如何被保留或改变。通过基于STIR的新型不变性度量方法,研究发现:预训练在浅层中诱导出可迁移的不变性,而深层的不变性在微调过程中则被压缩至浅层——这为理解预训练为何能提升下游性能,以及模型表征在适应过程中的演化提供了洞见。

ABSTRACT

The pretrain-finetune paradigm usually improves downstream performance over training a model from scratch on the same task, becoming commonplace across many areas of machine learning. While pretraining is empirically observed to be beneficial for a range of tasks, there is not a clear understanding yet of the reasons for this effect. In this work, we examine the relationship between pretrained vision transformers and the corresponding finetuned versions on several benchmark datasets and tasks. We present new metrics that specifically investigate the degree to which invariances learned by a pretrained model are retained or forgotten during finetuning. Using these metrics, we present a suite of empirical findings, including that pretraining induces transferable invariances in shallow layers and that invariances from deeper pretrained layers are compressed towards shallower layers during finetuning. Together, these findings contribute to understanding some of the reasons for the successes of pretrained models and the changes that a pretrained model undergoes when finetuned on a downstream task.

研究动机与目标

  • 理解预训练为何能提升视觉变换器在下游任务中的性能,尤其是在迁移学习设置下。
  • 研究在下游任务微调过程中,预训练期间学习到的不变性如何被修改、保留或遗忘。
  • 表征微调过程中稳定性(保留旧不变性)与可塑性(学习新不变性)之间的动态权衡。
  • 开发新度量方法,以量化微调过程中跨层的不变性迁移与变化,超越传统的表征相似性或准确率分析。
  • 通过分析逐层不变性演化,为预训练-微调范式成功提供机制性解释。

提出的方法

  • 采用STIR(可迁移不变性相似性)来度量预训练模型与其微调版本在特定数据扰动下的共享不变性。
  • 定义新度量方法,以量化微调过程中的不变性遗忘(预训练不变性的丧失)与不变性学习(新不变性的获得)。
  • 在多个基准数据集(如CIFAR-10、ImageNet)和任务上应用这些度量,分析逐层不变性动态。
  • 通过分析早期训练动态(如各层遗忘率的平均值与标准差)与最终在损坏数据上的鲁棒性之间的相关性,评估模型稳定性的早期指标。
  • 系统性地改变超参数(学习率、优化器、数据增强)以验证观察到的不变性模式的稳健性。
  • 进行消融研究,以分离早期训练阶段对不变性稳定性和鲁棒性的贡献。

实验结果

研究问题

  • RQ1在ViT微调过程中,预训练期间学习到的不变性在多大程度上被保留或遗忘?
  • RQ2预训练ViT深层的不变性在微调过程中如何变化?是否存在向浅层压缩的证据?
  • RQ3不变性动态(遗忘与学习)与微调过程中模型鲁棒性之间存在何种关系?
  • RQ4早期训练动态——特别是各层遗忘率的标准差——能否作为最终模型鲁棒性的可靠指标?
  • RQ5不同优化器(如SGD与Adam)如何影响不变性动态与模型在损坏数据上性能之间的关系?

主要发现

  • 预训练在视觉变换器中诱导出可迁移的不变性,尤其集中在浅层,这对下游性能至关重要。
  • 在微调过程中,预训练模型深层的不变性被压缩至浅层,表明存在一种重新分配表征能力的机制。
  • 在早期训练阶段,各层遗忘率标准差与最终在损坏数据集上的鲁棒性存在强相关性,即使仅考虑前20个epoch也成立。
  • 这种相关性在早期训练阶段依然强烈,甚至可能增强,表明早期不变性动态可预测鲁棒性,而非仅仅是后期优化行为的结果。
  • 在SGD设置下,不变性动态与鲁棒性之间的关系在不同超参数配置下保持一致;但在Adam设置下则不一致,表明不变性稳定性具有优化器依赖性。
  • 研究结果表明,不变性压缩与分层遗忘动态是ViT中预训练-微调范式成功的关键机制。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。