Introduction
Large Language Models (LLMs) are inherently stochastic, often producing different responses to the same prompt across multiple iterations. While this variability can be a source of creativity, it is also a primary indicator of potential hallucinations. Traditionally, researchers have measured this "uncertainty" at the sequence level, treating an entire paragraph or sentence as a single unit. However, this approach suffers from information entanglement: a model might be highly certain about one fact in a sentence while completely hallucinating another. Sequence-level metrics produce a single, blurred score that fails to pinpoint which specific ideas are unreliable.
To address this, we present CLUE (Concept-Level Uncertainty Estimation), a framework designed to untangle these information threads by evaluating uncertainty at the level of individual concepts or facts.
The CLUE Framework
CLUE operates as a multi-step, black-box pipeline that does not require access to a model's internal probability distributions. Instead, it relies on the text outputs generated by the LLM.
The Pipeline Steps:
- Concept Extraction: An LLM is used to decompose a generated sequence into high-level, atomic concepts (e.g., "Apple's founding date").
- Concept Consolidation: Because different samples may express the same idea using different wording, a Natural Language Inference (NLI) classifier groups semantically similar concepts into a unified "concept pool."
- Concept Scoring: For every generated output, the NLI classifier calculates an "entailment score," determining the degree to which a specific output supports a specific concept in the pool.
- Uncertainty Calculation: The final uncertainty for a concept is derived from the average negative logarithm of these entailment scores across multiple samples. Concepts that appear consistently across samples have low uncertainty, while sporadic or contradictory concepts receive high uncertainty scores.
Concept-Level vs. Sequence-Level Uncertainty
The primary advantage of CLUE is its interpretability. While sequence-level metrics like SelfCheckGPT provide a general sense of reliability, they cannot tell a user why a response is considered uncertain.
As shown in the example above, sequence-level metrics might assign similar scores to various outputs. In contrast, CLUE breaks down the response into specific facts—such as the location of Apple's establishment or Ronald Wayne’s stake sale—and assigns individual uncertainty values. This allows users to see that while the model is certain about the founders' names, it is highly uncertain about specific biographical details regarding Ronald Wayne.
Experimental Evaluation
The framework was evaluated across three distinct Question-Answering (QA) datasets: ELI5-Category (long-form answers), WikiQA (single-sentence answers), and QNLI (NLI-formatted QA). Additionally, a custom dataset of 1,000 stories was used to test CLUE's utility as a diversity metric.
Key Results
- Hallucination Detection: CLUE demonstrated a 21% improvement in macro AUROC over baseline methods when identifying hallucinations in QA tasks. This suggests that concept-level analysis is significantly more effective at catching subtle factual errors than sequence-level analysis.
- Human Alignment: In a study involving human evaluators, CLUE’s uncertainty predictions were 33% more accurate at predicting human judgments of relevance compared to sequence-level methods like SelfCheckGPT-NLI.
- Diversity Tracking: Beyond error detection, CLUE serves as a robust metric for creative diversity. In story generation tasks, it successfully identified the "ground truth" tone of a story. For instance, when prompted for a happy story, the "Happy tone" concept showed a very low uncertainty (0.037), while the "Sad tone" concept showed extremely high uncertainty (7.216).
Discussion and Future Work
CLUE represents a shift toward more transparent and interpretable AI evaluation. By leveraging NLI rather than simple keyword matching, the system can recognize semantic equivalence (e.g., "Steve Jobs started Apple" vs. "Apple was founded by Jobs"), making it robust against variations in phrasing.
However, the framework currently relies on an LLM for the initial concept extraction phase, which introduces potential biases or omissions from the "extractor" model. Future research will explore "white-box" extraction methods to reduce this dependency. Additionally, while CLUE is highly effective, the requirement for multiple samples and NLI classification steps increases computational overhead compared to simpler metrics.
Conclusion
CLUE provides a granular, fact-based lens through which to view LLM outputs. By pinpointing the specific concepts that drive uncertainty, it offers a dual-purpose tool for both detecting hallucinations in factual contexts and measuring conceptual diversity in creative ones.
Summary updated