BiLoRA: A Bi-level Optimization Framework for Overfitting-Resilient Low-Rank Adaptation of Large Pre-trained Models

Rushi Qiang, Ruiyi Zhang, Pengtao XiearXiv 2024

Abstract

Low-rank adaptation (LoRA) is a popular method for fine-tuning large-scale pre-trained models in downstream tasks by learning low-rank incremental matrices. Though LoRA and its variants effectively reduce the number of trainable parameters compared to full fine-tuning methods, they often overfit training data, resulting in sub-optimal generalization on test data. To address this problem, we introduce BiLoRA, an overfitting-alleviating fine-tuning approach based on bi-level optimization (BLO). BiLoRA employs pseudo singular value decomposition to parameterize low-rank incremental matrices and splits the training of pseudo singular vectors and values across two different subsets of training data. This division, embedded within separate levels of the BLO framework, mitigates the risk of overfitting to a single dataset. Tested on ten datasets covering natural language understanding and generation tasks and applied to various well-known large pre-trained models, BiLoRA significantly outperforms LoRA methods and other fine-tuning approaches, with similar amounts of trainable parameters.

Introduction

Low-Rank Adaptation (LoRA) has become the standard for Parameter-Efficient Fine-Tuning (PEFT) of Large Language Models (LLMs). Instead of updating billions of parameters, LoRA learns small, low-rank incremental matrices. However, a significant "hidden" flaw exists: LoRA and its variants (like AdaLoRA) are highly prone to overfitting on downstream datasets. As fine-tuning progresses, the gap between training and test loss often widens significantly; eventually, test loss begins to rise even as training loss continues to fall. This suggests that the model is memorizing the specific noise of the training set rather than learning generalizable features. The challenge is to maintain the parameter efficiency of LoRA while forcing the model to learn more robust representations.

Methodology: Bi-level Optimization

The core innovation of BiLoRA is the application of Bi-level Optimization (BLO) to the LoRA framework, inspired by Differentiable Architecture Search (DARTS).

The BiLoRA framework splits the training of singular vectors and values into lower and upper levels using different data subsets.

Pseudo-SVD Parameterization

BiLoRA parameterizes the weight update matrix as $\Delta W = P\Lambda Q$, mimicking a Singular Value Decomposition (SVD). Here, $P$ and $Q$ represent pseudo left/right singular vectors, and $\Lambda$ is a diagonal matrix of pseudo singular values.

The Bi-level Split

The training data $D$ is split into two non-overlapping subsets, $D_1$ and $D_2$.

  • Lower Level: The model trains the singular vectors ($P$ and $Q$) on subset $D_1$ while keeping the singular values ($\Lambda$) fixed.
  • Upper Level: The model then evaluates the performance of those vectors on subset $D_2$ and updates the singular values ($\Lambda$) to minimize the validation loss.

By separating the "features" (vectors) from the "importance weights" (values) across different data, the model is prevented from assigning high importance to features that only exist in a single subset of the data. This approach treats singular values as "architecture" variables and singular vectors as "operation" weights, preventing the low-rank update from collapsing into overfitted noise.

Experimental Results

The authors evaluated BiLoRA across a comprehensive suite of benchmarks, including GLUE (MNLI, SST-2, MRPC, etc.) and NLG tasks (E2E, WebNLG, DART), using models like RoBERTa, DeBERTa, and GPT-2.

Overfitting Resilience and Convergence

A key advantage of BiLoRA is its resilience to overfitting. Standard LoRA methods show a massive divergence between training and test loss as training steps increase. In contrast, BiLoRA maintains a much tighter coupling between these losses.

Comparison of training and test loss curves for LoRA, AdaLoRA, and BiLoRA, demonstrating BiLoRA's resilience to overfitting.

While bi-level optimization is computationally more expensive per step due to hypergradient calculations, BiLoRA often converges in significantly fewer total steps than LoRA. In many cases, the total wall-clock training time was actually lower than the baseline.

Performance Benchmarks

BiLoRA consistently outperformed LoRA and AdaLoRA on the GLUE benchmark. For example, on RoBERTa-Large, it achieved an average score of 89.8 compared to LoRA's 89.0. On NLG tasks, BiLoRA achieved higher BLEU, NIST, and ROUGE-L scores than all other PEFT baselines for both GPT-2 Medium and Large. Furthermore, the method scales effectively to 1.5B parameter models (DeBERTa-XXL), where it outperformed full fine-tuning and standard LoRA on MNLI and MRPC.

Conclusion

BiLoRA addresses the overfitting problem in low-rank adaptation by introducing a bi-level optimization framework. By partitioning the learning of singular vectors and values across different data subsets, it forces the model to learn more generalizable features. Future work may explore automated data partitioning ratios and extending the framework to support fully dynamic rank selection across layers.

Summary updated

BibTeX
@misc{qiang2024bilora,
  author = {Rushi Qiang and Ruiyi Zhang and Pengtao Xie},
  title = {{BiLoRA: A Bi-level Optimization Framework for Overfitting-Resilient Low-Rank Adaptation of Large Pre-trained Models}},
  year = {2024},
  eprint = {2403.13037},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2403.13037},
}
Figure