[논문 리뷰] Parameter-Efficient Fine-Tuning with Discrete Fourier Transform
FourierFT는 역 이산 푸리에 변환(inverse discrete Fourier transform)을 통해 얻은 가중치 변화 행렬의 희소 스펙트럴 계수만 업데이트하여 대형 기초 모델을 미세조정하고, NLP와 CV 과제 전반에서 LoRA보다 훨씬 적은 학습 가능한 매개변수로 비슷하거나 더 나은 성능을 달성한다.
Low-rank adaptation~(LoRA) has recently gained much interest in fine-tuning foundation models. It effectively reduces the number of trainable parameters by incorporating low-rank matrices $A$ and $B$ to represent the weight change, i.e., $ΔW=BA$. Despite LoRA's progress, it faces storage challenges when handling extensive customization adaptations or larger base models. In this work, we aim to further compress trainable parameters by enjoying the powerful expressiveness of the Fourier transform. Specifically, we introduce FourierFT, which treats $ΔW$ as a matrix in the spatial domain and learns only a small fraction of its spectral coefficients. With the trained spectral coefficients, we implement the inverse discrete Fourier transform to recover $ΔW$. Empirically, our FourierFT method shows comparable or better performance with fewer parameters than LoRA on various tasks, including natural language understanding, natural language generation, instruction tuning, and image classification. For example, when performing instruction tuning on the LLaMA2-7B model, FourierFT surpasses LoRA with only 0.064M trainable parameters, compared to LoRA's 33.5M. Our code is released at \url{https://github.com/Chaos96/fourierft}.
연구 동기 및 목표
- 확장되는 커스터마이제이션 필요성 속에서 대형 기초 모델(LFMs)의 미세조정을 위한 저장 공간 감소를 촉진한다.
- 레이어당 한 번 학습되는 희소 스펙트럴 계수로 가중치 변화를 표현하기 위해 FourierFT를 도입한다.
- 스펙트럼 기반 매개변수화가 NLP 및 CV 벤치마크에서 LoRA보다 훨씬 적은 학습 가능한 매개변수로도 경쟁력 있는 정확도를 달성함을 보인다.
제안 방법
- 가중치 변화 Delta W를 공간 도메인의 행렬로 취급한다.
- 레이어 간에 공유되며 무작위로 선택된 엔트리에 위치한 소수의 스펙트럴 계수를 학습한다.
- 고정된 엔트리 행렬 E와 학습 가능한 계수 c로 밀집 스펙트럴 행렬을 구성한 뒤, 역 이산 푸리에 변환(inverse discrete Fourier transform)을 통해 Delta W를 계산하고 실수부를 취한다.
- 추론 지연을 피하기 위해 순전파 중에 Delta W를 사전 학습된 가중치 W0와 합친다.
- 회복된 Delta W의 영향을 조절하기 위해 스케일링 계수 alpha를 사용한다.
- FourierFT 모듈에 대한 PyTorch 스타일 의사코드를 제공하고, 스펙트럼 엔트리에 대한 주파수 바이어스 초기화 옵션을 논의한다.
실험 결과
연구 질문
- RQ1매우 희소한 스펙트럴 계수만으로도 LFMs의 미세조정을 위한 유익한 가중치 업데이트를 포착할 수 있는가?
- RQ2자연어 처리(NLP) 및 컴퓨터 비전(CV) 과제에서 성능 및 매개변수 효율성 측면에서 FourierFT는 LoRA 및 전체 미세조정과 어떻게 비교되는가?
- RQ3스펙트럴 엔트리 선택 바이어스(주파수 바이어스)가 성능에 미치는 영향은 무엇인가?
- RQ4전통적인 PEFT 방법과 비교할 때 모델 크기와 레이어 깊이에 따라 FourierFT의 확장성은 어떠한가?
주요 결과
- FourierFT는 NLP 및 CV 과제 전반에서 LoRA보다 훨씬 적은 학습 가능한 매개변수로도 유사하거나 더 나은 성능을 달성한다.
- LLaMA-계열 모델의 인스트럭션 튜닝에서 FourierFT는 LoRA의 33.5M에 비해 겨우 0.064M의 학습 가능한 매개변수로 LoRA를 능가할 수 있다.
- 일부 설정에서 FourierFT는 0.128M 매개변수만으로 전체 미세조정(Full Fine-tuning)과 비슷한 점수를 달성한다.
- ViT Base의 경우 LoRA 매개변수 대비 12.4%, ViT Large의 경우 9.2% 수준의 매개변수 비율로 경쟁력 있는 정확도를 달성하며, 더 높은 비율의 LoRA 매개변수를 사용할 때 LoRA를 능가하기도 한다.
- GLUE, E2E, instruction tuning 및 CV 벤치마크에서 FourierFT는 학습 가능한 매개변수를 훨씬 적게 사용하면서 동등하거나 우수한 결과를 일관되게 달성한다.
이 논문 읽기
누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.
누빈트에서 이 논문 읽기이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.