TL;DR
This paper introduces COCOA, a novel approach to uncertainty quantification (UQ) for Large Language Models (LLMs) that effectively combines token-level confidence with semantic consistency across multiple generated outputs. COCOA significantly outperforms existing UQ methods on various NLP tasks, offering a more robust and reliable measure of LLM uncertainty.
What Problem Does This Paper Address?
As Large Language Models (LLMs) become increasingly integrated into critical applications, ensuring the reliability of their outputs is paramount. Uncertainty Quantification (UQ) aims to measure how confident an LLM is in its generated text, allowing for the rejection of potentially erroneous outputs. Current UQ methods for LLMs primarily fall into two categories: information-based (relying on token probabilities) and consistency-based (assessing semantic similarity across multiple generated outputs). While hybrid approaches combining these have shown promise, they often underperform simpler baselines. This paper investigates why these advanced methods falter, attributing it to the inherent probabilistic nature of LLMs and the lack of a unified framework that simultaneously addresses both model confidence and output variability. The authors aim to bridge this gap by proposing a new method that effectively synthesizes these two crucial aspects of uncertainty.
Methods
The core of this paper is the proposed COCOA (Confidence and Consistency-based Approaches) family of UQ methods. COCOA synthesizes two key components:
- Information-based Uncertainty ($U_{info}$): This measures the model's confidence in a specific generated sequence. It can be derived from standard metrics like Maximum Sequence Probability (MSP), Perplexity (PPL), or Mean Token Entropy (MTE).
- Consistency-based Uncertainty ($U_{cons}$): This measures how semantically similar the target sequence is to a set of other sampled sequences. The authors propose a formulation that directly assesses the dissimilarity of the target sequence to sampled outputs, satisfying non-negativity and monotonicity properties.
These two components are then combined multiplicatively: $U_{COCOA} = U_{info} \cdot U_{cons}$. This multiplicative approach is argued to be more effective than additive combinations because it amplifies uncertainty when both confidence and consistency signals indicate high uncertainty, and keeps it low when both signals suggest low uncertainty. The paper also explores various similarity functions (e.g., AlignScore, RougeL, NLI, Cross-Encoder) for calculating $U_{cons}$, finding that the choice can be task-dependent.
Datasets
The authors evaluated their approach on a diverse set of datasets across several NLP tasks:
- Question Answering (QA): TriviaQA, CoQA, MMLU, GSM8k
- Machine Translation (MT): WMT14 French-English, WMT19 German-English
- Summarization: XSum
The paper notes that they followed established practices (Vashurin et al., 2024) for subset selection, prompt formatting, and few-shot examples. No new benchmarks were introduced.
Key Insights and Ideas
- LLM Probabilistic Nature is Key: The paper argues that the underperformance of some advanced UQ methods stems from the inherent characteristics of LLMs as probabilistic models, particularly the instability of token probabilities for semantically equivalent outputs (illustrated in Figure 1).
- Focus on the Target Sequence: Unlike some prior methods that average uncertainties across all samples, COCOA focuses on the uncertainty of a specific generated sequence by combining its intrinsic confidence ($U_{info}$) with its consistency relative to other samples ($U_{cons}$). This "sample-focused" approach is crucial.
- Multiplicative Combination is Superior: The authors found that a multiplicative combination of confidence and consistency signals ($U_{info} \cdot U_{cons}$) is more effective than additive combinations for capturing the nuanced interplay between these two uncertainty aspects.
- Task-Specific Similarity Matters: While the Cross-Encoder similarity function generally performed well, the paper suggests that selecting the most appropriate similarity function for a given task can further improve results.
Key Results
The COCOA approach demonstrated significant improvements across various NLP tasks and models.
- State-of-the-Art Performance: COCOA consistently outperformed existing baseline and state-of-the-art UQ methods, including Semantic Entropy and SAR, in terms of the Prediction Rejection Ratio (PRR).
- Broad Applicability: The method showed strong performance on question answering, summarization, and machine translation tasks.
- Model Agnostic: COCOA was evaluated on LLaMA 3.1 8B, Mistral 7B, and Falcon 3 7B models, showing consistent benefits across different architectures.
- Example Improvement: For instance, COCOAPPL outperformed standard Perplexity, highlighting the advantage of combining token-level confidence with semantic consistency.
Limitations and Future Work
- Task and Domain Dependency: The effectiveness of the confidence score and similarity function can vary across models, tasks, and domains. For creative generation, consistent rephrasing might inflate perceived certainty. For tasks requiring high factual/logical precision, minor reasoning deviations might not be fully captured by generic similarity measures. Future work should focus on adapting these components to specific domains.
- Computational Cost of Sampling: Generating a large number of samples for consistency estimation can be computationally expensive and increase inference latency. The current experiments used relatively small sample sets, which might not fully capture the underlying distribution for complex prompts.
- Quality Metric Limitations: The assessment of COCOA's performance relies on automatic quality metrics (e.g., COMET, Accuracy), which may not capture all nuances of textual output like coherence or factual faithfulness. Future work could involve refining or extending these metrics.
- Future Directions: The authors suggest exploring more adaptive sampling strategies, refining semantic similarity functions for domain-specific tasks, and improving calibration techniques for confidence metrics.
Summary updated