TL;DR
CoCoA (Confidence and Consistency-based Approaches) is a novel framework that unifies token-level model confidence and sample-based semantic consistency into a robust uncertainty quantification (UQ) method for LLMs. Grounded in Minimum Bayes Risk (MBR) decoding, CoCoA consistently outperforms state-of-the-art baselines across question answering, translation, and summarization tasks. Furthermore, its "Light" variant eliminates the computational overhead of repeated sampling by predicting semantic consistency directly from internal model embeddings.
What Problem Does This Paper Address?
How do we know when a Large Language Model (LLM) is hallucinating or just guessing? Uncertainty quantification (UQ) aims to answer this, typically split into two camps:
- Information-based methods: Look at token-level probabilities (e.g., perplexity). However, LLMs often assign wildly different probabilities to semantically identical answers just because of phrasing (e.g., "romeo and juliet" vs. "romeo & juliet"), as shown in Figure 1.
- Consistency-based methods: Sample multiple outputs and check if they mean the same thing. This captures semantic variability but throws away the model's internal probability distributions.
While hybrid approaches exist, they often fail to consistently beat simpler baselines. This paper addresses the lack of a rigorous, unified framework that properly balances raw output consistency with generation likelihood.
Methods
The authors reframe UQ through the lens of Minimum Bayes Risk (MBR) decoding, establishing a direct mathematical link between uncertainty and optimal decision-making. They introduce CoCoA, which combines model confidence and semantic consistency multiplicatively:
$$\hat{U}_{CoCoA}(y_* | x) = u(y_* | x) \cdot \hat{U}_{cons}(y_* | x)$$
Where $u(y_* | x)$ is a model-based uncertainty measure (like Sequence Probability or Perplexity) and $\hat{U}_{cons}$ measures how semantically dissimilar the evaluated sequence is from other sampled alternatives.
To solve the high computational cost of generating multiple samples at inference time, they propose CoCoA Light. This variant trains a lightweight multi-layer perceptron (MLP) on unlabeled held-out data to predict the consistency score directly from the LLM's internal hidden layer embeddings, allowing for efficient UQ during standard greedy decoding.
Datasets
The framework was evaluated across three distinct NLP tasks using several open-weight models (LLaMA 3.1 8B, Mistral 7B, Falcon 3 7B, and Gemma 3 12B):
- Question Answering (QA): TriviaQA (open-domain factual), CoQA (conversational), MMLU (multi-task knowledge), and GSM8k (grade-school math).
- Machine Translation (MT): WMT14 French-English and WMT19 German-English.
- Abstractive Summarization (SUM): XSUM.
Key Insights and Ideas
- Multiplication Beats Addition: The authors discovered that a multiplicative combination of confidence and consistency captures nuanced interactions much better than additive formulations. An additive approach tends to underemphasize the interplay between local token confidence and global semantic agreement.
- Targeted Consistency Matters: Instead of averaging the full pairwise dissimilarity matrix across all generated samples, it is significantly more effective to focus consistency metrics specifically on how the chosen sequence relates to the alternatives.
- Embeddings Intuit Consistency: CoCoA Light proves that an LLM's internal hidden states retain enough structural information to accurately approximate semantic consistency without actually needing to run expensive repeated sampling at test time.
Key Results
The primary evaluation metric used is the Prediction-Rejection Ratio (PRR), which measures how effectively an uncertainty score can identify and reject low-quality predictions (conceptually illustrated in Figure 3).
- State-of-the-Art Performance: CoCoA methods achieved the highest PRR scores across virtually all tasks and models, outperforming prominent hybrid methods like Semantic Entropy and SAR. For example, on Mistral 7B for QA, full
CoCoa_SPachieved a mean PRR of 0.509 compared to Semantic Entropy's 0.423. - CoCoA Light Efficiency: CoCoA Light closely matched the performance of the full sampling-based CoCoA framework while requiring only a single greedy generation step, making it highly practical for production environments.
Limitations and Future Work
- Task and Domain Dependency: The choice of the semantic similarity function (e.g., Cross-Encoder vs. AlignScore) heavily impacts performance depending on the task. Creative generation tasks behave differently than strict reasoning tasks.
- Sample Size Constraints: For full CoCoA, estimating true consistency still relies on a relatively small sample size ($M$) due to compute constraints, which might miss the full diversity of complex prompts.
- Future Directions: The authors suggest exploring more adaptive sampling strategies and refining domain-specific similarity functions, particularly for specialized tasks like code generation.
Summary updated