提出新方法同时检测大模型的内外部不确定性,提升生成可靠性。
Semantic Volume: Quantifying and Detecting both External and Internal Uncertainty in LLMs
- 通过扰动输入输出并计算语义空间中嵌入向量的格拉姆矩阵行列式,量化不确定性。
- 在内外部不确定性检测任务上均优于现有基线方法,且无需访问模型内部。
- 理论关联微分熵,为大模型可信生成提供可解释的可靠性评估工具。
大型语言模型(LLMs)在多项任务中表现出色,但常因幻觉生成错误信息,通常伴随高不确定性。现有方法主要关注模型内部不确定性(由知识缺失或冲突引起),但未考虑外部不确定性(用户查询模糊导致多义性)。本文提出「语义体积」(Semantic Volume),一种新的数学度量,用于同时量化内外部不确定性。该方法通过扰动查询与响应,将其嵌入语义空间,计算嵌入向量的格拉姆矩阵行列式,以表征其分散程度作为不确定性指标。该框架为通用、无监督的不确定性检测方法,无需访问模型内部。我们在内外部不确定性检测上进行了广泛实验,结果表明该方法在两项任务中均持续优于现有基线。此外,我们提供了理论分析,将该度量与微分熵联系起来,统一并扩展了以往基于采样的语义熵等方法。语义体积被证明是一种稳健且可解释的方法,可系统性地提升大模型在用户查询与模型响应中的可靠性。
原文摘要 · Abstract (English)
Large language models (LLMs) have demonstrated remarkable performance across diverse tasks by encoding vast amounts of factual knowledge. However, they are still prone to hallucinations, generating incorrect or misleading information, often accompanied by high uncertainty. Existing methods for hallucination detection primarily focus on quantifying internal uncertainty, which arises from missing or conflicting knowledge within the model. However, hallucinations can also stem from external uncertainty, where ambiguous user queries lead to multiple possible interpretations. In this work, we introduce Semantic Volume, a novel mathematical measure for quantifying both external and internal uncertainty in LLMs. Our approach perturbs queries and responses, embeds them in a semantic space, and computes the Gram matrix determinant of the embedding vectors, capturing their dispersion as a measure of uncertainty. Our framework provides a generalizable and unsupervised uncertainty detection method without requiring internal access to LLMs. We conduct extensive experiments on both external and internal uncertainty detections, demonstrating that our Semantic Volume method consistently outperforms existing baselines in both tasks. Additionally, we provide theoretical insights linking our measure to differential entropy, unifying and extending previous sampling-based uncertainty measures such as the semantic entropy. Semantic Volume is shown to be a robust and interpretable approach to improving the reliability of LLMs by systematically detecting uncertainty in both user queries and model responses.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。