arXiv:2610.35457cs.LGOct 2026

Manuscript Offprint

arXiv:2610.35457

Prior Predictive Matching for Bayesian LoRA

Tomasz Kuśmierczyk, Eliezer de Souza da Silva, Marcin Sendera

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Bayesian variants of Low-Rank Adaptation (LoRA) provide principled uncertainty estimation when fine-tuning large foundation models, but require specifying the prior over the low-rank weight updates. We address this hyperparameter selection problem by introducing a closed-form prior-predictive estimator that operates before fine-tuning.

We analyze a second-order expansion of the network and quantify how the low-rank prior drives function-space deviations from the pretrained outputs. We also show that these prior-predictive quantities depend on the prior only through the product of the adaptation rank and the fourth power of the prior scale. Because the training targets share a single draw of the latent weight update, we can leverage the covariance between example residuals to derive a moment-matching estimator. Furthermore, our theoretical analysis establishes that the optimal prior precision scales as r−1/2r^{-1/2} with the rank r, allowing a single estimate to generalize across all ranks.

Controlled experiments across regression and classification tasks validate our approximation and show that our estimator recovers the true prior scale. On RoBERTa-large, our approach improves predictive negative log-likelihood (NLL) and calibration over both MAP and marginal-likelihood selection without requiring validation data, while achieving competitive out-of-distribution detection.

1 INTRODUCTION

Fine-tuning large pretrained models with Low-Rank Adaptation (LoRA) (Hu et al., 2022) restricts parameter updates to a low-dimensional subspace. For a selected weight matrix W0W_0, LoRA replaces W0W_0 by W0+ΔWW_0 + \Delta W, where ΔW\Delta W is constrained to have a low-rank factorization. Bayesian extensions of LoRA (e.g., Yang et al., 2024) place a prior over this low-rank update, typically through Gaussian priors on its factors, and use the resulting posterior to quantify uncertainty. This introduces two modeling choices: the rank of the update and the scale of its prior, σ\sigma (or equivalently its precision λ=σ−2\lambda = \sigma^{-2}). Together, these quantities determine the magnitude and complexity of parameter changes regarded as plausible before observing the fine-tuning data and can therefore have a substantial effect on the resulting posterior.

In existing approaches, these hyperparameters are typically selected either by validation search over the trained models or by maximizing an approximation to the marginal likelihood. Both strategies require fitting the model before the prior hyperparameters can be assessed. This creates a mismatch between the role of the prior and the way it is specified: a quantity intended to encode plausible adaptations before fine-tuning is chosen using the outcome of fine-tuning itself.

For Bayesian matrix factorization (BMF), this mismatch is avoided by prior-predictive matching, which sets the hyperparameters by matching moments of the prior predictive distribution to the data (da Silva et al., 2023). LoRA decomposes the update as ΔW=UV\Delta W = UV and can therefore be viewed as a matrix factorization in parameter space. However, extending prior-predictive matching to LoRA is not immediate. In BMF, the observations are entries of the random matrix generated by the latent factors. In Bayesian LoRA, the observations are input-label pairs (x,y)(x, y), and the latent update affects them only through the nonlinear network. The resulting prior-predictive distribution exhibits entirely different characteristics. Consequently, Bayesian LoRA requires a fundamentally different treatment from standard BMF.

In this paper, we study the prior predictive distribution of Bayesian LoRA and analyze its moments. Our estimators allow the prior hyperparameters to be selected in closed form. They need only the pretrained model and the fine-tuning data, and require neither LoRA optimization nor validation data (Table 1 compares the approaches). We effectively turn the prior specification from a model-selection problem after fine-tuning into a statistical estimation problem before fine-tuning.

Our contributions are as follows:

  1. We develop a prior-predictive analysis of Bayesian LoRA that explicitly relates the LoRA prior scale and rank to moments of the induced changes in network outputs.

  2. We derive a closed-form prior-predictive estimator for the Bayesian LoRA prior scale that can be computed before fine-tuning, does not require validation over trained models or post-hoc evidence optimization, and separates shared parameter-induced variation from independent observation noise.

  3. We evaluate the resulting calibration procedure across controlled and pretrained-model experiments, testing whether prior-predictive calibration recovers appropriate prior scales and whether these scales provide competitive uncertainty quantification and predictive performance after Bayesian LoRA fine-tuning.

The code is available here. The appendices contain the proofs, additional estimators, the details of the experiments, and a further study of fine-tuning under the estimated prior (Appendix I).

References (45)