Skip to main content
QUICK REVIEW

[论文解读] Low-rank Attention Side-Tuning for Parameter-Efficient Fine-Tuning

Ningyuan Tang, Minghao Fu|arXiv (Cornell University)|Feb 6, 2024
Sparse and Compressive Sensing TechniquesEngineering被引用 3
一句话总结

本文提出低秩注意力侧调优(LAST),一种参数高效微调方法,通过用低秩自注意力模块构成的侧网络替代冻结的预训练模型,从而消除主干网络的梯度计算。LAST在VTAB-1K上实现SOTA精度,相比先前的PEFT方法,GPU显存降低30%,训练速度提升60%,同时通过并行训练支持高效的超参数搜索。

ABSTRACT

In finetuning a large pretrained model to downstream tasks, parameter-efficient fine-tuning (PEFT) methods can effectively finetune pretrained models with few trainable parameters, but suffer from high GPU memory consumption and slow training speed. Because learnable parameters from these methods are entangled with the pretrained model, gradients related to the frozen pretrained model's parameters have to be computed and stored during finetuning. We propose Low-rank Attention Side-Tuning (LAST), which disentangles the trainable module from the pretrained model by freezing not only parameters but also outputs of the pretrained network. LAST trains a side-network composed of only low-rank self-attention modules. By viewing the pretrained model as a frozen feature extractor, the side-network takes intermediate output from the pretrained model and focus on learning task-specific knowledge. We also show that LAST can be highly parallel across multiple optimization objectives, making it very efficient in downstream task adaptation, for example, in finding optimal hyperparameters. LAST outperforms previous state-of-the-art methods on VTAB-1K and other visual adaptation tasks with roughly only 30\% of GPU memory footprint and 60\% of training time compared to existing PEFT methods, but achieves significantly higher accuracy.

研究动机与目标

  • 解决参数高效微调(PEFT)方法中高GPU显存消耗和训练速度慢的问题。
  • 克服现有侧调优与非侧调优PEFT方法在准确率与效率之间的权衡。
  • 通过支持多种配置的多个LAST模型并行训练,实现高效的超参数搜索。
  • 证明仅使用低秩注意力模块即可在下游适应任务中优于完整的前馈网络。
  • 表明冻结预训练模型的参数与输出可显著降低显存与训练时间,且不损失性能。

提出的方法

  • LAST引入一个仅由低秩自注意力模块组成的侧网络,该侧网络关注冻结的预训练ViT的中间特征。
  • 侧网络端到端训练,而预训练模型的参数与激活值完全冻结,从而消除主干网络的梯度计算。
  • 低秩注意力模块使用秩为4或8的投影,而非完整的注意力矩阵,显著减少参数量与显存占用。
  • 对低秩注意力应用偏差校正机制,以稳定训练并提升性能。
  • 该方法支持在多个超参数配置下并行训练,实现高效的超参数搜索。
  • 侧网络以可配置的间隔因子$ g $和堆叠因子$ T $,堆叠于ViT的多个层上,支持灵活的架构设计。

实验结果

研究问题

  • RQ1仅基于低秩注意力模块的侧调优方法是否能在保持低显存与快速训练的同时,实现高于现有PEFT方法的准确率?
  • RQ2在侧调优中从侧网络中移除前馈网络是否能带来更高的参数效率与性能提升?
  • RQ3该方法是否能在单张12GB显存的GPU(TITAN Xp)上以32的批量大小训练大型ViT-g模型,尽管其模型规模庞大?
  • RQ4LAST的性能如何随堆叠因子$ T $与间隔因子$ g $的增加而变化?
  • RQ5通过同时训练多个配置不同的模型,LAST是否能实现高效的并行超参数搜索?

主要发现

  • LAST在使用ViT-B时,于VTAB-1K上实现76.5%的平均准确率,达到SOTA水平,优于LoRA、VPT-Deep与BitFit。
  • 在TITAN Xp GPU上,GPU显存使用量降低至1.33 GB,相比全微调(6.09 GB)减少了78%。
  • 训练速度提升至281 ms/批,相比全微调(582 ms/批)降低了52%。
  • 从侧网络中移除前馈网络后,平均准确率达到76.5%;而添加前馈网络未带来性能提升,反而增加显存与参数量。
  • 该方法使ViT-g模型可在单张TITAN Xp GPU上以批量大小32成功训练,这是以往标准PEFT方法无法实现的。
  • t-SNE可视化显示,LAST在VTAB数据集上的分类聚类效果优于线性探测、LoRA与全微调。

阅读本论文

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

在 Nubint 中阅读本论文

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