[논문 리뷰] PiSSA: Principal Singular Values and Singular Vectors Adaptation of Large Language Models
PiSSA는 파라미터 효율적인 파인튜닝 방법으로, 프리트레이닝 가중치의 주된 특이값/벡터에서 학습 가능한 어댑터를 초기화하고 잔차 구성요소를 고정시켜, 훨씬 적은 학습 가능한 매개변수로 전체 파인튜닝 성능에 도달하거나 이를 능가합니다.
To parameter-efficiently fine-tune (PEFT) large language models (LLMs), the low-rank adaptation (LoRA) method approximates the model changes $ΔW \in \mathbb{R}^{m imes n}$ through the product of two matrices $A \in \mathbb{R}^{m imes r}$ and $B \in \mathbb{R}^{r imes n}$, where $r \ll \min(m, n)$, $A$ is initialized with Gaussian noise, and $B$ with zeros. LoRA freezes the original model $W$ and updates the "Noise & Zero" adapter, which may lead to slow convergence. To overcome this limitation, we introduce Principal Singular values and Singular vectors Adaptation (PiSSA). PiSSA shares the same architecture as LoRA, but initializes the adaptor matrices $A$ and $B$ with the principal components of the original matrix $W$, and put the remaining components into a residual matrix $W^{res} \in \mathbb{R}^{m imes n}$ which is frozen during fine-tuning. Compared to LoRA, PiSSA updates the principal components while freezing the "residual" parts, allowing faster convergence and enhanced performance. Comparative experiments of PiSSA and LoRA across 12 different models, ranging from 184M to 70B, encompassing 5 NLG and 8 NLU tasks, reveal that PiSSA consistently outperforms LoRA under identical experimental setups. On the GSM8K benchmark, Mistral-7B fine-tuned with PiSSA achieves an accuracy of 72.86%, surpassing LoRA's 67.7% by 5.16%. Due to the same architecture, PiSSA is also compatible with quantization to further reduce the memory requirement of fine-tuning. Compared to QLoRA, QPiSSA exhibits smaller quantization errors in the initial stages. Fine-tuning LLaMA-3-70B on GSM8K, QPiSSA attains an accuracy of 86.05%, exceeding the performances of QLoRA at 81.73%. Leveraging a fast SVD technique, PiSSA can be initialized in only a few seconds, presenting a negligible cost for transitioning from LoRA to PiSSA. Code is available at https://github.com/GraphPKU/PiSSA.
연구 동기 및 목표
- 대규모 언어 모델의 미세 조정 비용을 저 intrinsic 차원 활용으로 감소시키는 것을 동기로 함.
- PiSSA를 도입하여 사전 학습 가중치의 주된 SVD 구성요소에서 어댑터를 초기화합니다.
- PiSSA가 더 적은 학습 가능한 매개변수로 전체 미세 조정보다 나은 또는 같은 성능을 달성한다는 것을 Demonstrate합니다.
- PiSSA가 양자화 기반 PEFT(QLoRA, LoftQ 등)에서 양자화 오차와 최종 성능에 어떤 영향을 미치는지 보여줍니다.
제안 방법
- self-attention 및 MLP 계층의 가중치 행렬 W의 경제 사이즈 SVD를 계산합니다.
- W를 특이값을 기반으로 주된(pri) 구성요소와 잔여(res) 구성요소로 분할합니다.
- 주요 특이 벡터에서 어댑터 행렬 A와 B를 초기화합니다: A = U[:r] diag(S[:r]^{1/2}), B = diag(S[:r]^{1/2}) V[:r]^T.
- 나머지 특이 삼투( Triplets )로부터 잔여 행렬 W^{res}를 구성하고 파인튜닝 동안 이를 고정합니다.
- W를 W^{res} + AB로 표현하고 W^{res}를 고정한 채로 AB를 학습합니다.
- 초기화를 빠르게 하기 위해 빠른 SVD를 활용하는 옵션이 있으며, 성능은 유지됩니다.

실험 결과
연구 질문
- RQ1PiSSA가 다양한 모델과 작업에서 LoRA 및 전체 미세 조정보다 우수한가요?
- RQ2양자화 기반 PEFT(QLoRA, LoftQ 등)와 PiSSA의 상호 작용은 양자화 오차 및 최종 성능에 어떤 영향을 미치나요?
- RQ3다른 어댑터 랑크가 수렴 속도와 일반화에 어떤 영향을 미치나요?
- RQ4Fast SVD가 초기화 속도를 크게 개선하면서 성능에 해를 끼치지 않는가요?
주요 결과
- PiSSA는 테스트된 모든 모델(LLaMA 2-7B, Mistral-7B-v0.1, Gemma-7B)과 작업에서 일관되게 LoRA를 능가합니다.
- GSM8K에서 Mistral-7B로 PiSSA는 72.86% 정확도였으며 LoRA의 67.70%보다(5.16포인트 높음) 높습니다.
- PiSSA는 동일한 학습 가능한 매개변수 예산에서 여러 모델에 대해 GSM8K/MATH에서 강력한 성능을 달성하며, 자주 전체 미세 조정보다 우수한 성능을 보입니다.
- 4비트 LLaMA 2-7B에서 양자화 인지 파인튜닝과 함께 사용 시 양자화 오차를 18.97% 감소시켜 다운스트림 미세 조정 성능을 향상시킵니다.
- 랭크 제거 연구에서 PiSSA는 더 적은 학습 가능한 매개변수로 전체 매개변수 미세 조정 성능에 도달하거나 이를 능가하며 LoRA보다 더 빨리 수렴합니다.
- 초정확 SVD를 사용한 초기화는 초기화 시간을 크게 줄이면서도 경쟁력 있는 성능을 유지합니다.

이 논문 읽기
누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.
누빈트에서 이 논문 읽기이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.