Abstract
Large Language Models (LLMs) often exhibit overconfidence, producing hallucinations with high softmax probabilities. This paper presents a model-agnostic framework to convert standard LLMs into uncertainty-aware systems. By quantifying aleatoric and epistemic uncertainty, these models can effectively abstain from answering when reliability is low. Evaluated on SQuAD 2.0 and TruthfulQA, the proposed approach achieves near-perfect accuracy at high confidence thresholds, significantly outperforming standard logit-based selection.
Introduction
In high-stakes domains such as medicine or law, the cost of an incorrect answer often outweighs the benefit of a correct one. Standard LLMs typically lack a reliable internal measure of their own certainty, frequently providing incorrect information with high "logit probability." This research addresses the challenge of Selective Question Answering, where the objective is to maximize the number of answered questions while adhering to a strict accuracy target. The core contribution is a framework that allows models to "know what they don't know."
Methodology
The researchers utilize the Capsa framework to implement an automatic, model-agnostic conversion process. This approach is applied to two primary architectures: Extractive LLMs (e.g., BERT) and Generative LLMs (e.g., Llama 2).
The framework distinguishes between two primary types of uncertainty:
- Aleatoric Uncertainty: Arising from inherent noise or ambiguity in the data. This is modeled using Mean and Variance Estimation (MVE).
- Epistemic Uncertainty: Arising from the model's lack of knowledge about specific data distributions. This is estimated via Monte Carlo (MC) sampling or Ensembles.
A Composed Metric integrates these estimates into a single uncertainty score ($\sigma$). The model provides an answer only if $\sigma$ falls below a predefined threshold ($\gamma$); otherwise, it abstains.
Experimental Setup
The framework was evaluated on two industry-standard benchmarks:
- SQuAD 2.0: A dataset for extractive QA containing over 100,000 questions, including unanswerable ones designed to test model overconfidence.
- TruthfulQA: A generative QA benchmark designed to test models against common human misconceptions and falsehoods.
Results and Discussion
The experimental results highlight a critical flaw in current LLM evaluation: standard logit probabilities are poor indicators of actual accuracy.
As shown in the figures, the uncertainty-aware models demonstrate a strong correlation between confidence and accuracy. For the extractive SQuAD task, the models reached 100% accuracy at the highest confidence percentiles. On TruthfulQA, utilizing epistemic uncertainty allowed Llama 2 to reach 100% accuracy at the 99th percentile, whereas standard logit probabilities yielded only ~38% accuracy at that same threshold.
Key insights include:
- Logits are Unreliable: For Llama 2 on TruthfulQA, accuracy actually decreased as logit confidence increased in certain regimes.
- Compositional Advantage: Combining aleatoric and epistemic metrics provided the most robust performance for extractive tasks.
- Efficiency: While Ensembles offer high accuracy, MVE and MC sampling provide comparable gains with significantly lower computational overhead (avoiding the 5x cost of ensembles).
Conclusion
This research demonstrates that existing LLMs can be successfully wrapped in an uncertainty-aware layer without degrading their nominal performance. By providing a reliable mechanism for selective abstention, this framework moves toward more trustworthy AI systems capable of recognizing their own limitations. Future work will focus on automated thresholding and extending these techniques to complex reasoning and long-form generation tasks.
Summary updated