Introduction
Large Language Models (LLMs) are notoriously prone to "hallucinating" incorrect answers with high confidence. To safely deploy these models in high-stakes applications, we need robust Uncertainty Quantification (UQ)—mechanisms that allow a model to reliably indicate when it is unsure.
Historically, researchers have relied on two primary strategies for UQ:
- Information-based methods: These rely on the internal probabilities the model assigns to generated tokens. However, this approach struggles with semantic equivalence. For instance, a model might distribute its probability mass across "Romeo and Juliet," "Romeo & Juliet," and "romeo and juliet," artificially lowering the confidence of the correct answer despite all variations meaning the exact same thing.
- Consistency-based methods: These methods sample the model multiple times and measure how often the generated answers semantically agree. While this better captures true meaning, it ignores the model's internal confidence signals and is computationally expensive, requiring many generations per query.
While previous attempts to hybridize these approaches exist, they often fail to consistently outperform simpler baselines due to a lack of theoretical grounding. Enter CoCoA (Confidence and Consistency-based Approaches), a new framework that unifies these paradigms through the lens of Minimum Bayes Risk (MBR) decoding.
The CoCoA Framework
The authors revisit uncertainty estimation by framing it as an MBR decoding problem. In MBR, the optimal answer is the one that minimizes expected risk (or maximizes expected similarity to other possible valid answers). Uncertainty is thus defined as the smallest achievable risk in this decision-making process.
Building on this theory, the CoCoA framework calculates a unified uncertainty score by multiplying a model-based confidence score ($u$) by a consistency-based score ($U_{cons}$):
$$U_{CoCoA}(y_* | x) = u(y_* | x) \cdot U_{cons}(y_* | x)$$
This multiplicative approach ensures that uncertainty is appropriately amplified when a model is both internally "unsure" (low token probability) and semantically inconsistent with other sampled outputs. It captures the nuanced interaction where one signal can validate or discredit the other, proving significantly more effective than simply adding the scores together.
CoCoA Light: Efficiency Without Sampling
To address the computational bottleneck of generating multiple samples for consistency checks, the authors introduce CoCoA Light. This variant trains a small auxiliary neural network (an MLP) to predict the consistency score directly from the LLM's internal hidden states (embeddings). Because the model's internal embeddings already encode whether a prompt is likely to yield inconsistent outputs, CoCoA Light achieves high-quality uncertainty estimation using only a single "greedy" generation at inference time.
Experimental Evaluation
The framework was rigorously tested across a diverse battery of benchmarks, including:
- Short-form QA: TriviaQA, MMLU, and GSM8k.
- Long-form/Conversational QA: CoQA.
- Machine Translation: WMT14 (French-English) and WMT19 (German-English).
- Summarization: XSUM.
Evaluations were conducted on prominent open-weight models, including LLaMA 3.1 8B, Mistral 7B, Falcon 3 7B, and Gemma 3 12B.
Key Findings
Performance was primarily measured using the Prediction-Rejection Ratio (PRR), a metric that evaluates how effectively an uncertainty score allows a system to reject incorrect answers while retaining correct ones.
- State-of-the-Art Performance: CoCoA methods consistently outperformed heavyweights like Semantic Entropy and SAR across almost all tasks and models. By deriving scores from MBR theory rather than heuristics, CoCoA avoids the need for task-specific tuning coefficients.
- The Value of Semantic Agreement: Combining perplexity with consistency (
CoCoA_PPL) consistently beat standard perplexity baselines, proving that semantic agreement provides vital information that token-level probabilities miss. - CoCoA Light is a "Free Lunch": CoCoA Light achieved nearly the same performance as the full sampling-based CoCoA framework but eliminated the 10x-20x computational overhead associated with repeated sampling.
Limitations and Future Directions
While highly effective, CoCoA relies on a similarity function (like a Cross-Encoder) to determine if two sentences share the same meaning. In highly specialized domains, such as legal or medical text, generic similarity metrics might overlook subtle but critical factual errors. Furthermore, highly complex or creative prompts might still require a larger sample size to accurately map the model's uncertainty.
Future work may explore adaptive sampling—where the model only generates additional samples if the initial CoCoA Light score indicates high uncertainty—and the refinement of domain-specific similarity functions for tasks like code generation.
Summary updated