NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Scalable Bayesian Low-Rank Adaptation of Large Language Models via Stochastic Variational Subspace Inference

Colin Samplawski, Adam D. Cobb, Manoj Acharya, Ramneet Kaur, Susmit Jha

TL;DR

ScalaBL makes Bayesian uncertainty quantification practical for massive large language models (LLMs) by running stochastic variational inference in an ultra-compact $r$-dimensional subspace (where $r$ is the LoRA rank). By repurposing LoRA’s low-rank matrices as projection matrices, ScalaBL matches or outperforms state-of-the-art Bayesian fine-tuning methods while adding ~2,000× fewer variational parameters—enabling uncertainty quantification on models up to 32 billion parameters.

What Problem Does This Paper Address?

LLMs are notorious for hallucinating and producing overconfident, poorly calibrated predictions. While Bayesian deep learning (BDL) provides a principled way to estimate predictive uncertainty by learning distributions over model weights, running Bayesian inference over billions of parameters is computationally intractable.

Recent methods like Bayesian LoRA by Backprop (BLoB) place a variational distribution over LoRA’s down-projection matrix $A \in \mathbb{R}^{r \times d}$. However, because the variance parameter set scales with the model’s embedding dimension $d$ (requiring $r \times d$ parameters per layer), BLoB inflates trainable parameter counts by ~40% (millions of extra parameters). Alternative approaches like Laplace approximations require expensive Hessian approximations and test-time backpropagation, which crash on large models. The challenge: how can we perform Bayesian parameter-efficient fine-tuning (PEFT) without scaling up memory and parameter costs as models grow?

Methods

ScalaBL introduces Stochastic Variational Subspace Inference directly inside the low-rank adaptation pathway:

  • Subspace Formulation via SVD Intuition: Taking the singular value decomposition (SVD) of a rank-$r$ update matrix $A = U \operatorname{diag}(s) V$, the authors observe that absorption of the left singular vectors $U$ into LoRA matrix $B$ preserves expressivity. This allows rewriting the adapted weights as: $$W = W_0 + B \operatorname{diag}(s) A$$ Here, $A \in \mathbb{R}^{r \times d}$ and $B \in \mathbb{R}^{n \times r}$ act as learnable projection matrices, framing an $r$-dimensional subspace governed by vector $s \in \mathbb{R}^r$.

  • Variational Subspace Inference: Instead of putting variational distributions over full weight matrices, ScalaBL models an $r$-dimensional diagonal Gaussian posterior over the subspace vector: $q_\theta(s) = \mathcal{N}(s \mid s_\mu, \operatorname{diag}(s_\sigma))$.

  • Parameter Efficiency: ScalaBL introduces only $2r$ additional variational parameters ($s_\mu, s_\sigma$) per adapted layer, strictly independent of the embedding dimension $d$.
  • Training & Inference: The network is trained end-to-end by sampling $s$ via the reparameterization trick and maximizing the Evidence Lower Bound (ELBO). At test time, predictions are computed using Monte Carlo Bayesian Model Averaging (BMA) over $N=10$ samples.
LoRA:     W = W0 + B · A
BLoB:     W = W0 + B · (A_μ + A_σ ⊙ ε)         [O(r · d) extra params]
ScalaBL:  W = W0 + B · diag(s_μ + s_σ ⊙ ε) · A  [O(r) extra params]

Datasets

The authors evaluated in-distribution and out-of-distribution (OOD) performance on standard multiple-choice commonsense reasoning benchmarks:

  • In-Distribution: Winogrande-Small (WG-S), Winogrande-Medium (WG-M), ARC-Easy (ARC-E), ARC-Challenge (ARC-C), OpenBookQA (OBQA), and BoolQ.
  • Out-of-Distribution: Models fine-tuned on OBQA were evaluated under small shift (ARC-E, ARC-C) and large shift (MMLU-Chemistry and MMLU-Physics).
  • Base LLMs: Qwen2.5-7B, Qwen2.5-32B, and Llama-2-7B.

Key Insights and Ideas

  • Subspace Dimension Doesn't Need to Scale with $d$: Placing uncertainty over an $r$-dimensional latent vector $s$ rather than an $(r \times d)$ matrix is sufficient to achieve strong calibration. On Qwen2.5-7B ($r=8$), ScalaBL needs only 912 additional variational parameters over standard LoRA, compared to ~1.6 million for BLoB (~1,792× fewer).
  • Extreme Parameter Independence Unlocks 32B+ Models: On Qwen2.5-32B, BLoB requires ~5.2 million extra parameters due to increased layer count and hidden dimension ($d=5120$). ScalaBL requires only 2,064 extra parameters (a 2,560× advantage), making it the first Bayesian LoRA method demonstrated on a 32B model.
  • Robustness to Rank Increases: In BLoB, increasing $r$ degrades test accuracy and calibration across multiple benchmarks due to the curse of dimensionality over variational parameters. In contrast, ScalaBL maintains stability and slightly improves accuracy as $r$ increases.
  • Diagonal vs. Full-Rank Covariance: Testing a full-rank covariance $\Sigma \in \mathbb{R}^{r \times r}$ via eigendecomposition offered no tangible benefit over a diagonal covariance, reinforcing the efficiency of diagonal variational approximations in the subspace.

Key Results

  • In-Distribution (Qwen2.5-7B): ScalaBL matches BLoB’s classification accuracy and expected calibration error (ECE) across benchmarks, achieving top ECE on Winogrande-Medium (3.64% vs. BLoB’s 5.08% and MLE’s 16.10%).
  • Out-of-Distribution Calibration: Under distribution shift (OBQA $\rightarrow$ MMLU), ScalaBL achieves competitive or better ECE and negative log likelihood (NLL) compared to BLoB (e.g., ECE of 16.29% vs. 16.93% on MMLU-Physics; NLL of 1.26 vs. 1.32 on MMLU-Chemistry).
  • Scalability to 32B: While Laplace approximation runs out of memory (OOM) on an 80GB A100 even with 8-bit quantization and a batch size of 1, ScalaBL smoothly trains on Qwen2.5-32B, training faster (2,560s vs. 2,740s) and using less peak memory (72.36 GB vs. 74.04 GB) than BLoB.

Limitations and Future Work

  • Inference Runtime Cost: While ScalaBL dramatically reduces parameter count and memory during training, calculating the Bayesian model average at inference time still requires drawing $N$ forward passes, carrying the same inference compute overhead as BLoB.
  • Restricted to Multiple-Choice Tasks: Evaluations were conducted strictly on classification/multiple-choice formats using softmax distributions over candidate tokens; testing open-ended free-form generation remains an open challenge.

Summary updated

BibTeX
@inproceedings{samplawski2025scalable,
  author = {Colin Samplawski and Adam D. Cobb and Manoj Acharya and Ramneet Kaur and Susmit Jha},
  title = {{Scalable Bayesian Low-Rank Adaptation of Large Language Models via Stochastic Variational Subspace Inference}},
  booktitle = {Conference on Uncertainty in Artificial Intelligence},
  year = {2025},
  url = {https://openreview.net/forum?id=4knKZwzfEp},
}

Loading related content...

Figure