Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

C-LoRA: Contextual Low-Rank Adaptation for Uncertainty Estimation in Large Language Models

About

Low-Rank Adaptation (LoRA) offers a cost-effective solution for fine-tuning large language models (LLMs), but it often produces overconfident predictions in data-scarce few-shot settings. To address this issue, several classical statistical learning approaches have been repurposed for scalable uncertainty-aware LoRA fine-tuning. However, these approaches neglect how input characteristics affect the predictive uncertainty estimates. To address this limitation, we propose Contextual Low-Rank Adaptation (C-LoRA) as a novel uncertainty-aware and parameter efficient fine-tuning approach, by developing new lightweight LoRA modules contextualized to each input data sample to dynamically adapt uncertainty estimates. Incorporating data-driven contexts into the parameter posteriors, C-LoRA mitigates overfitting, achieves well-calibrated uncertainties, and yields robust predictions. Extensive experiments on LLaMA2-7B models demonstrate that C-LoRA consistently outperforms the state-of-the-art uncertainty-aware LoRA methods in both uncertainty quantification and model generalization. Ablation studies further confirm the critical role of our contextual modules in capturing sample-specific uncertainties. C-LoRA sets a new standard for robust, uncertainty-aware LLM fine-tuning in few-shot regimes. Although our experiments are limited to 7B models, our method is architecture-agnostic and, in principle, applies beyond this scale; studying its scaling to larger models remains an open problem. Our code is available at https://github.com/ahra99/c_lora.

Amir Hossein Rahmati, Sanket Jantre, Weifeng Zhang, Yucheng Wang, Byung-Jun Yoon, Nathan M. Urban, Xiaoning Qian• 2025

Related benchmarks

TaskDatasetResultRank
Commonsense ReasoningARC-C
Accuracy78.95
172
Commonsense ReasoningARC-E
Accuracy90.4
106
Common Sense ReasoningWinoGrande S In-Distribution Llama-3.1-8B (train test)
Accuracy77.16
15
Uncertainty QuantificationARC-E
Training Memory (MB)1.83e+4
14
Common Sense ReasoningARC-C OOD Small Shift
Accuracy80.07
14
Common Sense ReasoningChem OOD Large Shift
Accuracy47.67
14
Common Sense ReasoningBoolQ In-Distribution
Accuracy88.26
12
Common Sense ReasoningWG-S (In-Distribution)
Accuracy (ACC)77.16
12
Common Sense ReasoningOBQA In-Distribution
Accuracy86.83
12
Common Sense ReasoningARC-E OOD Small Shift
Accuracy85.04
12
Showing 10 of 12 rows

Other info

Follow for update