Robust and Efficient Fine-tuning of LLMs with Bayesian Reparameterization of Low-Rank Adaptation

Ayan Sengupta, Vaibhav Seth, Arinjay Pathak, Aastha Verma, Natraj Raman, Sriram Gopalakrishnan, Niladri Chatterjee, Tanmoy Chakraborty

TL;DR

Fine-tuning Large Language Models (LLMs) using Low-Rank Adaptation (LoRA) is highly efficient but notoriously sensitive to hyperparameter choices like learning rate and batch size. This paper introduces MonteCLoRA, a Bayesian alternative that treats low-rank parameters as a mixture of Gaussians and uses Monte Carlo estimation to drastically stabilize training. It achieves superior robustness and tighter performance spreads across Natural Language Understanding (NLU) and Generation (NLG) tasks with negligible parameter overhead.

What Problem Does This Paper Address?

Parameter-Efficient Fine-Tuning (PEFT) methods, particularly LoRA, have made adapting LLMs computationally feasible by freezing base weights and training low-rank matrices. However, LoRA suffers from high sensitivity to hyperparameter configurations. Minor changes in learning rate or batch size can cause massive swings in downstream task performance or even lead to training divergence.

Because grid-searching hyperparameters for multi-billion parameter models is prohibitively expensive, there is a critical need for a fine-tuning method that is inherently robust to these marginal variations. The authors address this instability by moving away from standard frequentist point-estimates of low-rank weights and embracing a robust Bayesian framework.

Methods

The authors propose MonteCLoRA (Monte Carlo-enhanced Low-Rank Adaptation). Instead of learning static point estimates for the low-rank matrices, MonteCLoRA applies a Bayesian framework to the LoRA $A$ matrix:

  • Gaussian Factorization: It models the column vectors of the low-rank $A$ matrix as independently drawn from a multivariate Gaussian distribution.
  • Mixture of Gaussians with Hyperpriors: To avoid a simple unimodal distribution collapsing into a single point estimate, it draws multiple samples from the Gaussian and computes a convex combination. The covariance matrix is sampled from a Wishart prior (with a learnable diagonal scale matrix), and the mixture weights are drawn from a Dirichlet prior.
  • Monte Carlo Estimation: During the forward pass, it uses a two-layer Monte Carlo approach to approximate the intractable posterior distribution.
  • Cooperative Loss: The training objective combines standard language modeling loss with Kullback-Leibler divergence (KLD) regularization losses and a novel cooperative loss that minimizes the entropy of the mixture weights, preventing any single mixture component from dominating.
  • Buffered Pre-sampling: To eliminate runtime sampling latency, the authors introduce a caching mechanism that stores samples in a fixed-size buffer, keeping lookups at $O(1)$ time during training.
Overview of MonteCLoRA for Bayesian Estimation of LoRA Parameters

Datasets

The authors evaluated MonteCLoRA across a diverse set of tasks and models:

  • Natural Language Understanding (NLU): Tested on 9 tasks from the GLUE and SuperGLUE benchmarks (including MRPC, CoLA, RTE, WiC, BoolQ, SST2, MNLI, QQP, and QNLI) using a pre-trained RoBERTa-base model.
  • Commonsense Natural Language Generation (NLG): Evaluated on 6 tasks (PiQA, SocialIQA, WinoGrande, ARC-easy, ARC-challenge, OpenBookQA) via the Commonsense15K instruction-tuning dataset using LLaMA-1-7B.
  • Mathematical Reasoning & Code Generation: Evaluated on GSM8k (using strict-match and flexible-extract metrics) and HumanEval (pass@2 and pass@4 metrics) using LLaMA-3.2-3B-Instruct.

Key Insights and Ideas

  • Noise as a Smooth Landscape Stabilizer: Injecting parameterized Gaussian noise into the weights smooths the loss landscape. Mathematically, the authors prove that this bounds the maximum eigenvalue of the expected Hessian, reducing the Lipschitz constant and allowing the model to converge stably across a wider range of learning rates.
  • The Power of Cooperation: Minimizing the cooperative loss directly minimizes the entropy of the mixture of Gaussians. This forces the model to utilize all mixture components, preventing mode collapse and ensuring robust exploration of the parameter space.
  • Zero-Shot Robustness: Bayesian marginalization acts as an implicit regularizer. This proves especially powerful when evaluating on out-of-distribution test sets in a zero-shot manner, preventing the overconfident but incorrect predictions typical of frequentist PEFT methods.

Key Results

  • Tighter Performance Spreads: On NLU tasks, MonteCLoRA reduced the average accuracy distribution spread to just 5.40, compared to a volatile 19.44 for standard LoRA. For generative tasks with LLaMA-1-7B and LLaMA-3.2-3B-Instruct, it demonstrated 53% and 62% lower spreads, respectively, across varying hyperparameters.
Figure 1: The distribution of validation accuracy for the fine-tuned RoBERTa-base under different learning rates and batch sizes. We present the findings for two approaches: full fine-tuning (denoted as Full FT) and low-rank adaptation (denoted as LoRA). Full FT tends to be more sensitive to outliers and exhibits a wider spread (the difference between the maximum and minimum scores) compared to LoRA. However, LoRA’s median performance is lower than that of Full FT in 4 out of 5 small GLUE tasks, suggesting that Full FT offers greater robustness than LoRA when the fine-tuning data is limited. In the larger GLUE tasks, LoRA gives a better median value but the spread of accuracy is much greater for Full FT. Our proposed method, MonteCLoRA demonstrates better average spread and median performance than both Full FT and LoRA. This highlights the significance of appropriate parameterization for achieving stable low-rank adaptation in LLMs.
  • Faster and Safer Convergence: In tasks where LoRA exhibited abrasive optimization or diverged entirely (such as BoolQ), MonteCLoRA achieved smooth, steady convergence in less than half the training steps (<3000 steps vs 6000 steps for LoRA).
  • Negligible Overhead: Thanks to buffered sampling, the memory overhead remained under 1.10× for larger models like LLaMA-3.1-8B, while adding only $O(r)$ additional parameters per layer (where $r$ is the LoRA rank).

Limitations and Future Work

  • New Hyperparameters: While it successfully mitigates sensitivity to learning rate and batch size, MonteCLoRA introduces its own hyperparameters, such as the sample scaler ($\epsilon$) and KL loss weight ($\eta$), which require tuning.
  • Scale Constraints: The empirical evaluations were limited to models up to 7B parameters; its efficacy on massive scales (e.g., 70B+ parameters) remains untested.
  • Synchronous Sampling Latency: Although buffered sampling helps, synchronous sampling operations still introduce minor latency during the forward pass.
  • Future Directions: The authors point toward developing asynchronous sampling methods to decouple the sampler from the forward pass, adaptive layer-wise sample scaler scheduling, and extending the framework to vision and multimodal architectures.

Summary updated

Abstract

Large Language Models (LLMs) are highly resource-intensive to fine-tune due to their enormous size. While low-rank adaptation is a prominent parameter-efficient fine-tuning approach, it suffers from sensitivity to hyperparameter choices, leading to instability in model performance on fine-tuning downstream tasks. This paper highlights the importance of effective parameterization in low-rank fine-tuning to reduce estimator variance and enhance the stability of final model outputs. We propose MonteCLoRA, an efficient fine-tuning technique that employs Monte Carlo estimation to learn an unbiased posterior estimation of low-rank parameters with low expected variance, stabilizing fine-tuned LLMs with only O(r) additional parameters, for a given rank r. MonteCLoRA shows 0.5% and 1.6% improvements in accuracy and robustness over unregularized low-rank adaptation method on natural language understanding tasks with pre-trained RoBERTa-base. Furthermore, in generative tasks with pre-trained LLaMA-1-7B and LLaMA-3.2-3B-Instruct, MonteCLoRA demonstrates robust performance with 50% and 62% lower spreads respectively than the contemporary efficient fine-tuning methods. The theoretical and empirical results presented in the paper underscore how parameterization and hyperpriors balance exploration-exploitation in the low-rank parametric space, therefore leading to more optimal and robust parameter estimation during efficient fine-tuning.
BibTeX
@article{sengupta2025robust,
  author = {Ayan Sengupta and Vaibhav Seth and Arinjay Pathak and Aastha Verma and Natraj Raman and Sriram Gopalakrishnan and Niladri Chatterjee and Tanmoy Chakraborty},
  title = {{Robust and Efficient Fine-tuning of LLMs with Bayesian Reparameterization of Low-Rank Adaptation}},
  journal = {Accepted by TMLR},
  year = {2025},
  url = {https://openreview.net/forum?id=2HFmicB8kh},
}
Figure