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 is a novel fine-tuning framework that brings the generalization benefits of Sharpness-Aware Minimization (SAM) to large-scale models without the typical 2x speed penalty. By utilizing an auxiliary "adversarial" LoRA module to explore the loss landscape in parallel with main task adaptation, Bi-LoRA achieves flatter minima and superior performance across Large Language Models (LLMs) and diffusion models.

The Challenge: Generalization vs. Efficiency

Fine-tuning massive pre-trained models is standardly performed using Low-Rank Adaptation (LoRA), which updates only a tiny fraction of the model's weights. While highly efficient, LoRA can struggle with generalization—especially when training data is scarce—often leading the model to overfit into sharp, non-robust minima in the loss landscape.

To mitigate this, researchers frequently turn to Sharpness-Aware Minimization (SAM). SAM explicitly searches for "flat" regions where the loss remains stable even if weights are slightly perturbed, a strong indicator of good generalization. However, applying SAM to large models introduces two major bottlenecks:

  1. Efficiency: Standard SAM requires two forward and backward passes per step, effectively doubling training time.
  2. Subspace Collapse: When applied to LoRA, SAM's perturbations are restricted to the same tiny low-rank subspace as the weight updates. This subspace collapses quickly during training, preventing SAM from accurately assessing the sharpness of the full model.

Methods: The Bi-LoRA Approach

To solve these issues, the authors propose Bi-directional LoRA (Bi-LoRA). This framework introduces two separate LoRA modules:

  • Primary Module ($B_1A_1$): Performs standard gradient descent to learn the target task.
  • Auxiliary Module ($B_2A_2$): Acts as an "adversary," performing gradient ascent to find nearby regions of high loss (sharpness).
Bi-LoRA Architecture

The "Bi-directional" Advantage: Instead of the sequential "perturb-then-update" approach of standard SAM, Bi-LoRA updates both modules simultaneously in a single pass. The auxiliary module provides a gradient-driven perturbation that guides the primary module toward flatter regions.

Crucially, because the auxiliary module is decoupled from the primary one, it avoids subspace collapse. It converges much more slowly, allowing it to continuously explore the broader loss landscape even after the primary module begins to settle. After training, the auxiliary module is simply discarded, leaving the model with zero extra parameters or latency during inference.

Key Insights

  • Breaking the Subspace Prison: A significant theoretical contribution of the paper is proving that standard LoRA-SAM is mathematically confined to a restricted subspace defined by the current weights. Bi-LoRA’s decoupled adversary effectively broadens the search space, capturing sharpness that LoRA-SAM misses.
  • Parallelism via Decoupling: By maintaining an explicit adversarial state via the auxiliary LoRA, the researchers transformed a sequential optimization problem into a parallel one. This effectively solves the latency problem of applying SAM in the LoRA era.
  • Regularization View: Bi-LoRA can be viewed as LoRA equipped with an explicit low-rank gradient-norm regularizer. It essentially provides the benefits of training on a smoothed version of the loss landscape "for free."

Experimental Results

The researchers evaluated Bi-LoRA across a massive range of benchmarks, including LLM reasoning (GSM8K, HumanEval), instruction following (MMLU, DROP), natural language understanding (GLUE), and text-to-image personalization (Stable Diffusion XL).

  • Superior Generalization: On Llama 2-7B, Bi-LoRA outperformed standard LoRA by 2.11% on GSM8K and 2.45% on HumanEval, consistently beating standard LoRA-SAM.
  • Massive Speedup: Bi-LoRA requires only ~110% of the training time of standard LoRA per step, whereas LoRA-SAM takes ~215%. This efficiency makes it highly practical for training very large models like Qwen 2.5-14B.
  • Flatter Landscapes: Visualizations of the loss landscapes confirm that Bi-LoRA produces significantly flatter minima in the full parameter space compared to both LoRA and LoRA-SAM.
  • Enhanced Image Generation: In SDXL fine-tuning, Bi-LoRA demonstrated superior personalization, successfully integrating new concepts into specific styles without losing core identity traits.

Limitations and Future Work

To maintain its high efficiency, Bi-LoRA relies on a single-step update approximation for the adversary. While empirically effective, there remains a theoretical gap between this practical implementation and a perfectly solved inner maximization. Additionally, the method introduces hyperparameters like the neighborhood radius ($\rho$) and auxiliary rank ($r_2$), though $r_2=8$ serves as a strong task-agnostic default. Future work may explore how Bi-LoRA interacts with other Parameter-Efficient Fine-Tuning (PEFT) methods or its adaptation for full-parameter fine-tuning in smaller architectures.

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