As Large Language Models (LLMs) become increasingly integrated into critical workflows, the "hallucination" problem—where models confidently state falsehoods—remains a major hurdle. To build trust in these systems, we need reliable confidence estimation: a way to determine if a model’s specific answer is likely correct.
Most existing methods for estimating confidence require "white-box" access, meaning they need to analyze the model's internal probability distributions (logits). However, many of the most powerful models are only accessible via APIs that hide these internals. While some "black-box" methods exist, they often rely on simple consistency checks. This paper introduces a simple, interpretable framework for estimating how much we should trust an LLM's response using only black-box access. By engineering sophisticated features from prompt manipulations, the authors train a logistic regression model that not only outperforms existing state-of-the-art methods but also generalizes "zero-shot" across different LLMs.
Methodology
The researchers propose an extensible framework that treats confidence estimation as a supervised learning problem.
Their approach follows three main steps:
- Prompt Perturbation: The system applies six different strategies to elicit variable behavior from the LLM:
- Stochastic Decoding (SD): Generating multiple responses using different sampling settings.
- Paraphrasing (PP): Re-writing the prompt using back-translation (e.g., English to French and back).
- Sentence Permutation (SP): Randomly reordering sentences in the context.
- Entity Frequency Amplification (EFA): Repeating sentences containing key named entities.
- Stopword Removal (SR): Stripping out common words like "the" or "and."
- Split Response Consistency (SRC): Checking if different parts of a long response contradict each other.
- Feature Extraction: For each perturbation, the framework calculates "Semantic Set" sizes (how many unique meanings are present across the answers) and "Lexical Similarity" (how much the text overlaps, measured via ROUGE scores).
- Surrogate Modeling: A Logistic Regression model is trained on these extracted features. Because this surrogate model is simple, it is highly interpretable, allowing researchers to see exactly which perturbation strategy drives the final confidence score.
Experimental Setup
The framework was evaluated across two primary tasks:
- Question Answering (Q&A): Using TriviaQA, SQuAD, CoQA, and Natural Questions (NQ). These cover a range of styles, from short-fact retrieval to context-based reading comprehension.
- Summarization: Using CNN Daily Mail and XSUM.
The authors tested their method on a diverse fleet of models, including GPT-4, Llama-2-13b, Mistral-7B, Flan-ul2, Pegasus, and BART.
Key Insights and Results
- Superior Performance: The proposed method consistently outperformed state-of-the-art baselines (such as spectral clustering-based methods) across almost all datasets. In some cases, the improvement in AUROC (a measure of how well the model distinguishes correct from incorrect answers) exceeded 10%. For example, on the SQuAD dataset using Mistral, the method beat the next best competitor by 14 percentage points.
- The "Universal" Confidence Model: Perhaps the most surprising finding is that a confidence model trained on one LLM (e.g., Llama) generalizes remarkably well to others (e.g., GPT-4) on the same dataset. This suggests that LLMs, regardless of their underlying architecture, tend to fail in similar ways when faced with specific types of prompt noise.
- Task-Specific Sensitivity: The importance of features varies by task. For context-heavy tasks like SQuAD, "Sentence Permutation" was a top predictor of confidence. For open-domain Q&A like TriviaQA, "Paraphrasing" and "Stochastic Decoding" were more telling.
- Sample Efficiency: The confidence model requires relatively little data to train. The authors demonstrated that it remains highly performant even when trained on only 250–500 examples.
Limitations and Future Work
While highly effective, the approach has a few limitations. First, training the surrogate model requires a small set of labeled examples where the "correctness" is known. The authors used ROUGE scores against ground truth, which can sometimes be a noisy proxy for actual factual correctness. Second, generating multiple responses for every single query to calculate consistency increases API costs and latency. Future work could look into optimizing the number of required perturbations.
Finally, the paper notes that "reasoning" models (like those using Chain-of-Thought) might require different types of perturbations, as they can "overthink" or produce incorrect intermediate steps that still lead to a correct final answer. Exploring how these features apply to "thinking" models is a promising next step.
Summary updated