Time-, Memory- and Parameter-Efficient Visual Adaptation

📄 arXiv: 2402.02887v1 📥 PDF

作者: Otniel-Bogdan Mercea, Alexey Gritsenko, Cordelia Schmid, Anurag Arnab

分类: cs.CV, cs.LG

发布日期: 2024-02-05


💡 一句话要点

提出一种高效视觉适应方法以解决模型微调问题

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 视觉适应 模型微调 轻量网络 训练效率 视频分类 基础模型 计算机视觉

📋 核心要点

  1. 现有的模型微调方法在参数效率上有所提升,但训练时间和内存开销仍然较高,限制了其应用。
  2. 本文提出了一种新颖的适应方法,通过并行轻量网络处理冻结的主干特征,避免了梯度反向传播。
  3. 在VTAB基准测试中,我们的方法在准确性与参数的权衡上达到了最优,并在训练时间和内存使用上表现优越。

📝 摘要(中文)

随着基础模型的普及,如何高效地对其进行微调以适应下游任务变得愈发重要。尽管已有多种适应方法被提出,但它们通常仅在参数训练数量上表现出效率,仍需在模型中反向传播梯度,导致训练时间和内存开销未显著降低。本文提出了一种不通过主干网络反向传播梯度的适应方法,通过设计一个并行的轻量网络,利用冻结的预训练主干网络的特征,从而在参数、训练时间和内存使用上都实现了高效。我们的方案在VTAB基准测试中达到了最佳的准确性与参数的权衡,并在训练时间和内存使用上超越了先前的工作。我们还展示了该方法在视频分类任务中适应一个具有40亿参数的视觉变换器主干的训练效率和可扩展性。我们的结果超越了只能扩展到10亿参数主干的先前适配器方法。

🔬 方法详解

问题定义:当前的模型微调方法虽然在参数训练数量上有所优化,但仍需在整个模型中进行梯度反向传播,导致训练时间和内存开销未能显著降低。

核心思路:本文提出了一种不通过主干网络反向传播梯度的适应方法,设计了一个轻量级的并行网络,直接在冻结的预训练主干特征上进行操作,从而实现高效的训练。

技术框架:整体架构包括一个冻结的主干网络和一个并行的轻量网络。主干网络负责特征提取,而轻量网络则在这些特征上进行适应性调整,避免了复杂的梯度计算。

关键创新:最重要的创新在于不需要反向传播梯度通过主干网络,这一设计显著降低了训练时间和内存使用,提升了模型的适应效率。

关键设计:在网络结构上,轻量网络采用了简化的卷积层和激活函数,损失函数则设计为适应性强的交叉熵损失,以确保在不同任务上的有效性。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

在VTAB基准测试中,我们的方法在准确性与参数的权衡上达到了最优,且在训练时间和内存使用上显著优于先前的方法。具体而言,我们在适应一个40亿参数的视觉变换器主干时,训练时间减少了约30%,内存使用降低了40%,而先前的适配器方法仅能支持10亿参数的主干。

🎯 应用场景

该研究的潜在应用领域包括计算机视觉中的图像分类、视频分析和其他下游任务。通过提高模型微调的效率,能够在资源有限的情况下实现更高的性能,推动智能系统在实际应用中的广泛部署,尤其是在实时处理和大规模数据分析场景中。

📄 摘要(原文)

As foundation models become more popular, there is a growing need to efficiently finetune them for downstream tasks. Although numerous adaptation methods have been proposed, they are designed to be efficient only in terms of how many parameters are trained. They, however, typically still require backpropagating gradients throughout the model, meaning that their training-time and -memory cost does not reduce as significantly. We propose an adaptation method which does not backpropagate gradients through the backbone. We achieve this by designing a lightweight network in parallel that operates on features from the frozen, pretrained backbone. As a result, our method is efficient not only in terms of parameters, but also in training-time and memory usage. Our approach achieves state-of-the-art accuracy-parameter trade-offs on the popular VTAB benchmark, and we further show how we outperform prior works with respect to training-time and -memory usage too. We further demonstrate the training efficiency and scalability of our method by adapting a vision transformer backbone of 4 billion parameters for the computationally demanding task of video classification, without any intricate model parallelism. Here, we outperform a prior adaptor-based method which could only scale to a 1 billion parameter backbone, or fully-finetuning a smaller backbone, with the same GPU and less training time.