LLM Uncertainty Quantification through Directional Entailment Graph and Claim Level Response Augmentation

Longchao Da, Tiejin Chen, Lu Cheng, Hua WeiarXiv 2024 · DOI

Abstract

Large Language Models (LLMs) often exhibit uncertainty in their outputs, which can lead to hallucinations. Traditional uncertainty quantification (UQ) methods typically rely on symmetric similarity measures, failing to account for the directional nature of logical entailment. This paper introduces D-UE, a framework that utilizes Directional Entailment Graphs and claim-level response augmentation to provide a more robust measure of LLM certainty. By capturing the one-way flow of logic and resolving response vagueness, D-UE significantly improves the detection of model hallucinations across various benchmarks.

The Problem: Symmetry Bias and Vagueness

When an LLM is prompted multiple times, it may produce varying responses. If these responses are semantically consistent, the model is likely certain; if they contradict, it is uncertain. However, existing "black-box" UQ methods face two major hurdles:

  1. Symmetry Bias: Most methods assume that if Response A is similar to Response B, then B is equally similar to A. In logic, this is often false. For example, "I interned at Google" entails "I had a job," but the reverse is not necessarily true. Treating these as symmetric loses critical structural information about the model's reasoning.
  2. Response Vagueness: LLMs frequently provide abbreviated answers (e.g., "Three" instead of "Three students became heroes"). These fragments are difficult to compare logically to more detailed responses, often resulting in "false" uncertainty scores.

Methodology

The authors propose a two-pronged solution to refine uncertainty estimation.

1. Directional Uncertainty Evaluation (D-UE)

Instead of a standard similarity matrix, D-UE constructs a Directional Entailment Graph.

  • NLI Scoring: A Natural Language Inference (NLI) model (DeBERTa-v3-large) calculates the probability that one response entails another, creating an asymmetric adjacency matrix.
  • Random Walk Laplacian: To analyze this directed graph, the authors apply a Random Walk Laplacian. This approach treats responses as nodes in a network where transitions represent logical flow.
  • Eigenvalue Aggregation: Eigenvalues derived from this process indicate the dispersion of the model's logic. Significant deviation from 1 suggests high uncertainty.

2. Claim-Level Response Augmentation

To address vagueness, a secondary LLM (Llama-3) is used to:

  • Extract and Extend Claims: Break responses into atomic factual claims and use the original question context to turn fragments into full, self-contained sentences.
  • Reconstruct: These augmented claims are then processed by the D-UE framework, ensuring logical comparisons are accurate and context-aware.
Overview of the D-UE framework and claim-level response augmentation pipeline.

Experimental Results

The researchers evaluated D-UE on three diverse datasets: Coqa (conversational), TriviaQA (reading comprehension), and NLQuAD (complex, long-form answers). The framework was tested against 12 baseline methods, including Semantic Entropy and NumSet.

Key Findings

  • Consistent Improvement: D-UE aggregated with semantic uncertainty consistently outperformed all baselines in both AUROC (Area Under the Receiver Operating Characteristic) and AUARC (Area Under Accuracy Rejection Curve).
  • Resolving Vagueness: On the Coqa dataset using GPT-3.5, the NumSet baseline improved from an AUROC of 0.5095 to 0.6660 when integrated with the D-UE framework and augmentation.
  • Model Agnostic: The method proved effective across different backbones, including Llama-2-13b and GPT-3.5-turbo, demonstrating its utility for both open-source and proprietary models.
Comparison of AUROC values between baseline uncertainty measures and the proposed D-UE method across various metrics.

Discussion and Insights

  • Logic as a Vector: The core insight is that entailment is directional. By capturing this "one-way" nature, D-UE distinguishes between a model narrowing down a specific fact and one wandering across contradictory claims.
  • Contextual Recovery: Brief outputs are often a stylistic choice rather than a lack of knowledge. "Inflating" these responses allows for a truer assessment of the model's internal state.
  • Black-Box Compatibility: D-UE requires no access to internal model weights or token probabilities, making it an ideal layer for commercial AI systems.

Limitations and Future Work

While effective, the augmentation step adds computational overhead due to the extra LLM call and the $N^2$ comparisons required for NLI scoring. Future research will focus on optimizing these processes for real-time applications and exploring more theoretically orthogonal ways to merge directional and semantic uncertainty information.

Summary updated

BibTeX
@misc{da2024llm,
  author = {Longchao Da and Tiejin Chen and Lu Cheng and Hua Wei},
  title = {{LLM Uncertainty Quantification through Directional Entailment Graph and Claim Level Response Augmentation}},
  year = {2024},
  eprint = {2407.00994},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2407.00994},
}
Figure