arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.21228cs.LGcs.CL
收藏

LoRA 与全量微调:等价性的假象

LoRA vs Full Fine-tuning: An Illusion of Equivalence

MIT CSAIL(麻省理工学院计算机科学与人工智能实验室)

Reece Shuttleworth, Jacob Andreas, Antonio Torralba, Pratyusha Sharma

AI总结:

该研究通过谱特性分析对比LoRA与全量微调的权重差异,发现LoRA会产生导致遗忘的入侵维度,验证了二者解的不等价性,并指出持续学习场景下入侵维度累积会使LoRA性能下降。

摘要:

微调是使预训练大语言模型适配下游任务的关键范式。近年来,低秩适配(Low-Rank Adaptation, LoRA)等方法已被证明可在可训练参数量大幅减少的情况下有效微调大语言模型。但它们学到的解决方案真的等价吗?我们通过从谱特性的角度分析模型的权重矩阵,研究了 LoRA 和全量微调对预训练模型的改变方式。我们发现,LoRA 和全量微调得到的权重矩阵,其奇异值分解呈现出截然不同的结构:经 LoRA 训练的权重矩阵会产生新的高排名奇异向量,我们称之为“入侵维度(intruder dimensions)”,而全量微调训练的权重矩阵则没有。此外,我们拓展了“LoRA 的遗忘程度低于全量微调”这一发现,并证实其遗忘现象极大程度上集中在入侵维度上——通过在微调后改变入侵维度对应的奇异值,对其进行因果干预,我们证明了正是这些维度导致了遗忘。此外,将这些奇异值大幅缩小,能显著提升模型对预训练分布的建模能力,且下游任务性能的下降幅度极小。基于此,我们可以推断入侵维度的累积会产生危害并导致更多遗忘。这种影响在持续学习过程中会因顺序微调而被放大,我们的实验表明,LoRA 模型在该场景下确实会累积入侵维度,且表现往往更差,这凸显了我们研究发现的实用价值。

英文摘要:

Fine-tuning is a crucial paradigm for adapting pre-trained large language models to downstream tasks. Recently, methods like Low-Rank Adaptation (LoRA) have been shown to effectively fine-tune LLMs with an extreme reduction in trainable parameters. But, \emph{are their learned solutions really equivalent?} We study how LoRA and full-finetuning change pre-trained models by analyzing the model's weight matrices through the lens of their spectral properties. We find that LoRA and full fine-tuning yield weight matrices whose singular value decompositions exhibit very different structure: weight matrices trained with LoRA have new, high-ranking singular vectors, which we call \emph{intruder dimensions}, while those trained with full fine-tuning do not. Further, we extend the finding that LoRA forgets less than full fine-tuning and find its forgetting is vastly localized to the intruder dimension -- by causally intervening on the intruder dimensions by changing their associated singular values post-fine-tuning, we show that they cause forgetting. Moreover, scaling them down significantly improves modeling of the pre-training distribution with a minimal drop in downstream task performance. Given this, we should expect accumulating intruder dimensions to be harmful and lead to more forgetting. This will be amplified during continual learning because of sequentially fine-tuning, and we show that LoRA models do accumulate intruder dimensions here tend to perform worse in this setting, emphasizing the practicality of our findings.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑