Bi-LoRA: Efficient Sharpness-Aware Minimization for Fine-Tuning Large-Scale Models

Yuhang Liu, Tao Li, Zhehao Huang, Zuopeng Yang, Xiaolin Huang

TL;DR

Bi-LoRA introduces a novel dual-module framework that brings the generalization benefits of Sharpness-Aware Minimization (SAM) to low-rank adaptation without the typical 2x computational overhead. By decoupling task adaptation and adversarial perturbation into parallel primary and auxiliary LoRA modules, it achieves flatter loss landscapes and superior performance across diverse large language and diffusion models.

What Problem Does This Paper Address?

Fine-tuning large-scale pre-trained models using Low-Rank Adaptation (LoRA) is highly parameter-efficient but prone to overfitting when training data is scarce. Sharpness-Aware Minimization (SAM) mitigates this by searching for "flat minima" in the loss landscape, which correlates strongly with better generalization.

However, vanilla SAM requires two sequential forward/backward passes per step (one to find the adversarial perturbation, and one to update the weights), which doubles training time. Simply applying SAM directly to LoRA parameters (LoRA-SAM) fails to solve this efficiency bottleneck and introduces a new issue: subspace collapse. The adversarial perturbations quickly become trapped within a highly restricted subspace defined by the low-rank matrices, severely limiting the algorithm's ability to find truly flat minima across the full parameter space.

Methods

The authors propose Bi-directional Low-Rank Adaptation (Bi-LoRA) to decouple sharpness optimization from task adaptation. Instead of a single LoRA module, Bi-LoRA introduces an auxiliary adversarial module during training:

  1. Primary Module ($B_1A_1$): Optimized via conventional gradient descent for task-specific adaptation.
  2. Auxiliary Module ($B_2A_2$): Performs gradient ascent to explore the loss landscape and simulate adversarial perturbations.
Figure 1: Overview of our proposed Bi-LoRA. During fine-tuning (Left), Bi-LoRA utilizes two opposing LoRA modules: the primary module (B1A1) is optimized by conventional gradient descent for task-specific adaptation, while the auxiliary module (B2A2) performs gradient ascent for sharpness optimization. These two modules are decoupled and simultaneously optimized. During inference (Right), only (B1A1) is retained and merged with the pretrained weights.

Because these two modules are independent, their updates can be parallelized within a single forward and backward pass, effectively cutting SAM's doubled training time in half. To keep the perturbations stable, a global Frobenius norm clipping mechanism is applied across all auxiliary modules. Crucially, the auxiliary module is completely discarded during inference, meaning Bi-LoRA introduces zero additional computational or memory overhead at deployment time.

Datasets

The authors evaluated Bi-LoRA across a wide variety of models and benchmarks:

  • Natural Language Understanding (NLU): GLUE (MNLI, SST2, CoLA, QNLI, MRPC) and SuperGLUE (BoolQ, CB, COPA, RTE, WiC) benchmarks using T5-base.
  • Mathematical Reasoning: MetaMathQA (evaluated on GSM8K) using Llama 2-7B.
  • Code Generation: Code-Feedback (evaluated on HumanEval) using Llama 2-7B.
  • Dialogue & Instruction Following: WizardLM (evaluated on MT-Bench) and Cleaned Alpaca (evaluated on InstructEval: MMLU, DROP, HEval, BBH) using Llama 3.1-8B and Qwen 2.5-14B.
  • Text-to-Image Generation: 3D Icons dataset using SDXL via DreamBooth.

Key Insights and Ideas

  • Subspace Collapse Uncovered: In standard LoRA-SAM, the perturbation space is restricted to the column space of $B$ and the row space of $A$. Because these low-rank matrices converge rapidly during training, the perturbation space shrinks prematurely, failing to capture sharpness across the full parameter space.
  • Asynchronous Convergence Benefits Exploration: In Bi-LoRA, the auxiliary perturbation module converges significantly slower than the primary module. This independent trajectory keeps the perturbation space flexible, allowing it to explore a much broader area of the full parameter landscape.
  • Connection to Ky Fan Norms: Mathematically, the authors prove that solving the inner maximization with Bi-LoRA's low-rank auxiliary module is equivalent to equipping standard LoRA with an explicit gradient-norm regularizer based on the Ky Fan $r$-norm (the sum of the top-$r$ singular values).

Key Results

  • Drastic Time Savings: Bi-LoRA slashes the training time overhead of SAM-based fine-tuning. While LoRA-SAM takes 215% of vanilla LoRA's training time, Bi-LoRA takes just 109%, with a negligible memory increase (<0.7 GB).
  • Consistent Performance Gains: On Llama 2-7B, Bi-LoRA improves accuracy over vanilla LoRA by 2.11% on GSM8K and 2.45% on HumanEval, even outperforming full fine-tuning on certain tasks.
  • Seamless Integration: Bi-LoRA is highly versatile; it delivers consistent gains across diverse architectures (Llama, Qwen, T5, SDXL) and can be combined with other advanced LoRA variants (like DoRA, PiSSA, and LoRA-GA) to further boost their baseline performance.

Limitations and Future Work

To maintain high efficiency, Bi-LoRA performs only a single inner optimization step per training iteration. While empirically successful, this creates a theoretical gap between the practical implementation and ideal mathematical convergence analysis (which assumes the inner maximization problem is solved to absolute optimality). The authors note that future work could focus on deeper theoretical explorations of this gap or investigate dynamic rank allocation between the primary and auxiliary modules.

Summary updated

BibTeX
@inproceedings{liu2026bi,
  author = {Yuhang Liu and Tao Li and Zhehao Huang and Zuopeng Yang and Xiaolin Huang},
  title = {{Bi-LoRA: Efficient Sharpness-Aware Minimization for Fine-Tuning Large-Scale Models}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=zoYPlgX1bH},
}
Figure