Bayesian-LoRA: Probabilistic Low-Rank Adaptation of Large Language Models
Abstract
Lay Summary
Large language models can sound very confident even when they are wrong. This overconfidence becomes dangerous when models are used in high-stakes settings, like medical diagnosis or autonomous driving, where knowing \emph{when the model might be wrong} matters as much as the answer itself. In this paper, we propose Bayesian-LoRA, a framework that can capture the inherent uncertainty of model outputs. It builds upon Low-Rank Adaptation (LoRA), a method for fine-tuning Large Language Models from a base model to specific downstream tasks. We establish a mathematical connection between LoRA and a well-established statistical framework called Sparse Gaussian Processes (SGP), which allows us to turn LoRA's fixed update into a probabilistic one and powers the model's capability to express how confident the answer is. For almost no extra cost (~20% more training time and just 0.42M added parameters), our method makes models far better at knowing what they don't know. It reduces calibration error by up to 84% while keeping accuracy competitive. It gains the largest benefits when the model faces unfamiliar, out-of-distribution data, exactly where overconfidence is most dangerous. By making confidence scores more trustworthy, Bayesian-LoRA helps users know when to rely on a model's answer and when to seek further verification.