[论文解读] AdaptFormer: Adapting Vision Transformers for Scalable Visual Recognition
AdaptFormer 引入一个轻量化的瓶颈模块(AdaptMLP),在图像与视频任务中实现对预训练 Vision Transformer 的高效微调,表现可与完全微调相当或更好,且新参数占比不足 2%。
Pretraining Vision Transformers (ViTs) has achieved great success in visual recognition. A following scenario is to adapt a ViT to various image and video recognition tasks. The adaptation is challenging because of heavy computation and memory storage. Each model needs an independent and complete finetuning process to adapt to different tasks, which limits its transferability to different visual domains. To address this challenge, we propose an effective adaptation approach for Transformer, namely AdaptFormer, which can adapt the pre-trained ViTs into many different image and video tasks efficiently. It possesses several benefits more appealing than prior arts. Firstly, AdaptFormer introduces lightweight modules that only add less than 2% extra parameters to a ViT, while it is able to increase the ViT's transferability without updating its original pre-trained parameters, significantly outperforming the existing 100\% fully fine-tuned models on action recognition benchmarks. Secondly, it can be plug-and-play in different Transformers and scalable to many visual tasks. Thirdly, extensive experiments on five image and video datasets show that AdaptFormer largely improves ViTs in the target domains. For example, when updating just 1.5% extra parameters, it achieves about 10% and 19% relative improvement compared to the fully fine-tuned models on Something-Something~v2 and HMDB51, respectively. Code is available at https://github.com/ShoufaChen/AdaptFormer.
研究动机与目标
- 促进预训练 ViTs 在多样化的图像与视频任务中实现通用适配,而无需全面微调。
- 开发一个参数高效的适配器(AdaptMLP),并行插入到 ViT 的 MLP 模块。
- 展示 AdaptFormer 在多个数据集和模态下的可扩展性与鲁棒性。
提出的方法
- 将 ViT 的 MLP 模块替换为 AdaptMLP, AdaptMLP 是一个并行瓶颈模块,具备下投影(W_down)和上投影(W_up)以及 ReLU,通过带可学习比例因子 s 的残差融合实现。
- 仅对新增的 AdaptMLP 参数进行微调,冻结预训练的骨干网络。
- 使用冻结骨干网络加上自适应参数的组合进行推理,从而通过加载特定任务的 AdaptMLP 权重让单一模型适应多任务。
- 将 W_down 使用 Kaiming Normal 初始化,W_up/偏置用零初始化以确保起始稳定性并尽量保留原有函数。
- 将 AdaptFormer 与线性探针、全量微调以及视觉提示调优(VPT)在图像数据集(CIFAR-100、SVHN、Food-101)与视频数据集(Something-Something V2、HMDB51)上进行比较。
- 在中间维度 d_hat 变化的情况下,展示 AdaptFormer 具有较强性能且需要的可调参数少于 2%。
实验结果
研究问题
- RQ1一个轻量级的适配器模块是否可以被插入到 ViT 编码器中,以实现对多样化下游视觉任务的高效微调?
- RQ2在图像和视频基准上,AdaptFormer 相较于全量微调与其他参数高效方法的性能如何?
- RQ3适配器尺寸和融合策略对迁移性能和稳定性有何影响?
- RQ4当可调参数规模扩大、以及跨模态(图像 vs. 视频)迁移时,AdaptFormer 的鲁棒性如何?
主要发现
- AdaptFormer 在图像和视频数据集上始终优于线性探针和视觉提示调优。
- 在每模型约 0.1–1.6% 的可调参数(取决于配置)的情况下,AdaptFormer 在若干任务中达到或超过全量微调,在某些视频基准上实现约 5% 到 10% 的相对优势。
- 在自监督 ViT-B/16 上,AdaptFormer-64 超越 VPT,并接近全量微调,在 SSv2 上达到更高的 top-1 准确率,同时可调参数更少。
- 随着中间维度(d_hat)和 AdaptMLP 层数的增加,AdaptFormer 展现出良好的可扩展性和鲁棒性,平行插入优于串联。
- 在多个基准测试中,AdaptFormer 相对于全量微调在参数效率和通常的准确性方面都获得显著提升,例如在 SSv2 和 HMDB51 上,同时保持参数增长较小。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。