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以零资源方式运行,适用于开源和闭源大语言模型,使其成为面向新模型与新任务的“即用型”解决方案。具体而言,为有效建模语义空间,我们首先提出一种自适应稀疏化有向语义图构建算法,该算法在捕捉方向性语义依赖的同时,自动剪枝引入负面干扰的不必要连接。随后,我们通过层次抽象利用潜在语义结构信息:SeSE被定义为最优语义编码树的结构熵,形式化表征语义空间经最优压缩后的内在不确定性。更高的SeSE值对应更大的不确定性,表明大语言模型极有可能产生幻觉。此外,为增强长文本生成中的细粒度不确定性量化,我们将SeSE扩展至通过建模随机语义交互来量化单个主张的不确定性,从而提供理论可解释的幻觉检测。在29个模型-数据集组合上的大量实验表明,SeSE显著优于先进的不确定性量化基线方法。

0
下载
关闭预览

相关内容

国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
VIP会员
相关基金
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员