Table of Contents
Fetching ...

SeSE: A Structural Information-Guided Uncertainty Quantification Framework for Hallucination Detection in LLMs

Xingtao Zhao, Hao Peng, Dingli Su, Xianghua Zeng, Chunyang Liu, Jinzhi Liao, Philip S. Yu

TL;DR

SeSE introduces Semantic Structural Entropy, a zero-resource uncertainty quantification framework that detects LLM hallucinations by capturing directional semantic structure through an adaptively sparsified directed semantic graph and a hierarchical encoding tree. It extends to long-form generation by constructing a response-claim bipartite graph and quantifying claim-level uncertainty. Across 29 model-dataset configurations, SeSE outperforms strong baselines in both sentence-length and long-form hallucination detection, with robust generalization and stability analyses. The approach is model-agnostic, cost-efficient, and provides interpretable uncertainty via hierarchical semantic structure, offering practical utility for deploying LLMs in safety-critical contexts.

Abstract

Reliable uncertainty quantification (UQ) is essential for deploying large language models (LLMs) in safety-critical scenarios, as it enables them to abstain from responding when uncertain, thereby avoiding ``hallucinating'' falsehoods. However, state-of-the-art UQ methods primarily rely on semantic probability distributions or pairwise distances, overlooking latent semantic structural information that could enable more precise uncertainty estimates. This paper presents Semantic Structural Entropy (SeSE), a principled UQ framework that quantifies the inherent semantic uncertainty of LLMs from a structural information perspective for hallucination detection. SeSE operates in a zero-resource manner and is applicable to both open- and closed-source LLMs, making it an ``off-the-shelf" solution for new models and tasks. Specifically, to effectively model semantic spaces, we first develop an adaptively sparsified directed semantic graph construction algorithm that captures directional semantic dependencies while automatically pruning unnecessary connections that introduce negative interference. We then exploit latent semantic structural information through hierarchical abstraction: SeSE is defined as the structural entropy of the optimal semantic encoding tree, formalizing intrinsic uncertainty within semantic spaces after optimal compression. A higher SeSE value corresponds to greater uncertainty, indicating that LLMs are highly likely to generate hallucinations. In addition, to enhance fine-grained UQ in long-form generation, we extend SeSE to quantify the uncertainty of individual claims by modeling their random semantic interactions, providing theoretically explicable hallucination detection. Extensive experiments across 29 model-dataset combinations show that SeSE significantly outperforms advanced UQ baselines.

SeSE: A Structural Information-Guided Uncertainty Quantification Framework for Hallucination Detection in LLMs

TL;DR

SeSE introduces Semantic Structural Entropy, a zero-resource uncertainty quantification framework that detects LLM hallucinations by capturing directional semantic structure through an adaptively sparsified directed semantic graph and a hierarchical encoding tree. It extends to long-form generation by constructing a response-claim bipartite graph and quantifying claim-level uncertainty. Across 29 model-dataset configurations, SeSE outperforms strong baselines in both sentence-length and long-form hallucination detection, with robust generalization and stability analyses. The approach is model-agnostic, cost-efficient, and provides interpretable uncertainty via hierarchical semantic structure, offering practical utility for deploying LLMs in safety-critical contexts.

Abstract

Reliable uncertainty quantification (UQ) is essential for deploying large language models (LLMs) in safety-critical scenarios, as it enables them to abstain from responding when uncertain, thereby avoiding ``hallucinating'' falsehoods. However, state-of-the-art UQ methods primarily rely on semantic probability distributions or pairwise distances, overlooking latent semantic structural information that could enable more precise uncertainty estimates. This paper presents Semantic Structural Entropy (SeSE), a principled UQ framework that quantifies the inherent semantic uncertainty of LLMs from a structural information perspective for hallucination detection. SeSE operates in a zero-resource manner and is applicable to both open- and closed-source LLMs, making it an ``off-the-shelf" solution for new models and tasks. Specifically, to effectively model semantic spaces, we first develop an adaptively sparsified directed semantic graph construction algorithm that captures directional semantic dependencies while automatically pruning unnecessary connections that introduce negative interference. We then exploit latent semantic structural information through hierarchical abstraction: SeSE is defined as the structural entropy of the optimal semantic encoding tree, formalizing intrinsic uncertainty within semantic spaces after optimal compression. A higher SeSE value corresponds to greater uncertainty, indicating that LLMs are highly likely to generate hallucinations. In addition, to enhance fine-grained UQ in long-form generation, we extend SeSE to quantify the uncertainty of individual claims by modeling their random semantic interactions, providing theoretically explicable hallucination detection. Extensive experiments across 29 model-dataset combinations show that SeSE significantly outperforms advanced UQ baselines.

Paper Structure

This paper contains 56 sections, 2 theorems, 25 equations, 16 figures, 8 tables, 3 algorithms.

Key Result

Theorem 1

Given a directed graph $G_{dir}$ with non-negative edge weights and its corresponding matrix $A$, if $A$ is an irreducible stochastic matrix, then $G_{dir}$ possesses a unique stationary distribution $\pi^\top$ satisfying $\pi^\top A = \pi^\top$. This distribution corresponds to the unique eigenvect

Figures (16)

  • Figure 1: Illustration of LLM UQ for avoiding hallucinating.
  • Figure 2: Overview of SeSE in sentence-length generation. For the sake of the example, we assume that the probabilities of each semantic cluster in (b) are equal, i.e., $p(c_i |\text{input}) = p(c_i^{'} |\text{input}), \forall c \in C$. Although the semantic structure of $\text{LLM}_1$ is more regular and its uncertainty should be lower (i.e., $\text{LLM}_1$ is quite certain that "urban greening" is a good answer), the semantic entropy fails to distinguish the differences and yields identical uncertainty scores due to their initially similar semantic spaces. In contrast, SeSE explicitly considers structural information via constructed semantic graphs, where concept "A" comprises two 3-level substructures "A.1" and "A.2", thus correctly identifying that $\text{LLM}_1$ should be assigned lower uncertainty.
  • Figure 3: Overview of SeSE in long-form generation. We decompose the generated long-form response into atomic claims. SeSE quantifies the uncertainty of individual claims by modeling their random semantic interactions, and hallucination is indicated by a high SeSE value associated with that claim in the constructed bipartite response-claim graph.
  • Figure 4: RQ2: Hallucination rate of used LLMs in different domains and performance comparison in OOD datasets.
  • Figure 5: RQ3: Pairwise win rates across 25 model-dataset scenarios. White value with asterisks ($*$) indicates the binomial statistical significance level $p < 0.05$ according.
  • ...and 11 more figures

Theorems & Definitions (7)

  • Definition 1: Encoding tree
  • Definition 2: One-dimensional structural entropy
  • Definition 3: Structural Entropy of the Encoding Tree $\mathcal{T}$
  • Definition 4: Graph Model of a Semantic Space
  • Definition 5: Algebraic Model of a Semantic Space
  • Theorem 1
  • Lemma 1: Perron–Frobenius Theorem