Skip to main content
QUICK REVIEW

[論文レビュー] LoRA vs Full Fine-tuning: An Illusion of Equivalence

Reece Shuttleworth, Jacob Andreas|arXiv (Cornell University)|Oct 28, 2024
Embedded Systems Design TechniquesComputer Science被引用数 3
ひとこと要約

この論文は、LoRAとフルファインチューニングは下流タスクで同等のパフォーマンスを達成しているものの、LoRAファインチューニングモデルにおける事前学習重み行列に対して直交する高ランクの特異ベクトル(「インサイダー次元」としての新現象)の出現により、根本的に異なるモデル表現を学習することを示している。これらの構造的差異は、タスクパフォーマンスが同等であっても、一般化性能の低下と事前学習データおよび過去のタスクの忘却を引き起こす。

ABSTRACT

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.

研究の動機と目的

  • LoRAとフルファインチューニングが、下流タスクでの類似したパフォーマンスにもかかわらず、同等のモデル表現を生成するかどうかを調査すること。
  • ファインチューニング手法が事前学習モデル重み行列のスペクトル特性にどのように影響を与えるかを分析すること。
  • スペクトル差異の行動的影響、特に一般化性能と継続的学習における影響を理解すること。
  • LoRAにおけるインサイダー次元の根本的要因を同定し、その負の影響を軽減する戦略を評価すること。

提案手法

  • ファインチューニング前後における重み行列のスペクトル特性を特異値分解(SVD)を用いて分析し、構造的変化を検出する。
  • 事前学習済みとファインチューニング済みの特異ベクトル間のコサイン類似度を測定し、LoRAによって導入された新たな高ランク特異ベクトル(インサイダー次元)を同定する。
  • 事前学習分布の忘却と継続的学習ベンチマークを用いて、LoRAとフルファインチューニングにおける一般化行動を比較する。
  • LoRAのランクとスケーリング係数αがインサイダー次元の生成とモデル行動に与える影響を評価する。
  • 1つのLoRA行列(AまたはB)を固定することで、行列積の役割を隔離し、インサイダー次元の出現に寄与する要因を特定するアブレーションスタディを実施する。
  • ランク安定化LoRAを用いて、より高いランクのパrameterizationがフルファインチューニングの挙動をどれだけよく再現できるかを評価する。
Figure 1: Spectral dissimilarities between full fine-tuning and LoRA. Similarity matrix of pre- and post-fine-tuning singular vectors of the weight matrices to characterize spectral differences introduced upon fine-tuning, in a representative example for LLaMA-2 fine-tuned on Magicoder. Full fine-tu
Figure 1: Spectral dissimilarities between full fine-tuning and LoRA. Similarity matrix of pre- and post-fine-tuning singular vectors of the weight matrices to characterize spectral differences introduced upon fine-tuning, in a representative example for LLaMA-2 fine-tuned on Magicoder. Full fine-tu

実験結果

リサーチクエスチョン

  • RQ1LoRAとフルファインチューニングは、重み行列のスペクトル構造の観点から同等の解を生成するのか?
  • RQ2インサイダー次元の行動的影響は、モデルの一般化性能と継続的学習にどのように現れるのか?
  • RQ3なぜインサイダー次元はLoRAでは出現するが、フルファインチューニングでは出現しないのか?
  • RQ4より高いランクまたはランク安定化LoRAは、インサイダー次元の負の影響を軽減できるか?
  • RQ5ランクやスケーリング係数αなどのハイパーパrameterは、インサイダー次元の生成にどのように影響するか?

主な発見

  • LoRAファインチューニングは、事前学習重み行列に対してほぼ直交する高ランク特異ベクトル(「インサイダー次元」としての新現象)を導入するが、これはフルファインチューニングでは観察されない。
  • インサイダー次元を有するLoRAモデルは、タスクパフォーマンスが同等であっても、事前学習分布の忘却が顕著に増加する(例:MNLI, QQP, FEVER)。
  • 継続的学習において、インサイダー次元を有するLoRAモデルは、以前に学習したタスクのパフォーマンスが著しく低下し、評価されたすべてのデータセットでベースライン性能を下回る。
  • ランク安定化を施した高ランクLoRAモデル(例:r=64)は、ターゲットタスクでのパフォーマンスが低いランクのLoRA(r≤8)と同等であっても、一般化性能および継続的学習挙動においてフルファインチューニングに近く、良好な挙動を示す。
  • 固定スケーリング係数α=8(α=2rではなく)を用いたLoRAモデルは、より多くのインサイダー次元を示し、一般化性能も悪化する。これは、不適切なスケーリングが構造的乖離を悪化させることを示唆している。
  • LoRAにおける行列積BAは、AとBのスペクトル差を強調し、これがインサイダー次元生成の主要因であることが、Aを固定してBのみを学習させるアブレーション実験で示された。
Figure 2: Characterizing structural differences between solutions learnt by LoRA Vs full Fine-tuning. a) We measure the changes to the SVD of the pre-trained weights made during fine-tuning. We observe intruder dimensions introduced by LoRA in top ranking singular vectors but by full fine-tuning. b)
Figure 2: Characterizing structural differences between solutions learnt by LoRA Vs full Fine-tuning. a) We measure the changes to the SVD of the pre-trained weights made during fine-tuning. We observe intruder dimensions introduced by LoRA in top ranking singular vectors but by full fine-tuning. b)

この論文を読む

Nubintのビューアで原文を開き、読みながら気になる箇所をすぐに質問できます。

Nubintでこの論文を読む

このレビューはAIが論文の原文をもとに作成しました。引用する前に原文をご確認ください。