arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2405.20003cs.LGcs.AIcs.CL

核语言熵:基于语义相似度的大语言模型细粒度不确定性量化

Kernel Language Entropy: Fine-grained Uncertainty Quantification for LLMs from Semantic Similarities

Aalto University(阿尔托大学);University of Oxford(牛津大学)

Alexander Nikitin, Jannik Kossen, Yarin Gal, Pekka Marttinen

AI总结:

提出核语言熵(KLE)方法,通过半正定单位迹核编码语义相似度并利用von Neumann熵量化大语言模型的不确定性,相比语义熵考虑了成对语义依赖,在多个数据集和架构上提升了不确定性量化性能。

摘要:

大语言模型(LLMs)中的不确定性量化对于安全性和可靠性至关重要的应用具有重要意义。具体而言,不确定性可用于检测事实错误的模型响应(通常称为幻觉),从而提高LLMs的可信度。关键在于,应寻求捕获模型的语义不确定性,即对LLM输出含义的不确定性,而非对不影响答案正确性的词汇或句法变化的不确定性。为解决此问题,我们提出了核语言熵(KLE),一种用于白盒和黑盒LLM不确定性估计的新方法。KLE定义半正定单位迹核来编码LLM输出的语义相似度,并使用von Neumann熵量化不确定性。它考虑答案(或语义簇)之间的成对语义依赖关系,比以往基于答案硬聚类的方法提供更细粒度的不确定性估计。我们在理论上证明KLE推广了先前最先进的方法语义熵,并实证表明它在多个自然语言生成数据集和LLM架构上提升了不确定性量化性能。

英文摘要:

Uncertainty quantification in Large Language Models (LLMs) is crucial for applications where safety and reliability are important. In particular, uncertainty can be used to improve the trustworthiness of LLMs by detecting factually incorrect model responses, commonly called hallucinations. Critically, one should seek to capture the model's semantic uncertainty, i.e., the uncertainty over the meanings of LLM outputs, rather than uncertainty over lexical or syntactic variations that do not affect answer correctness. To address this problem, we propose Kernel Language Entropy (KLE), a novel method for uncertainty estimation in white- and black-box LLMs. KLE defines positive semidefinite unit trace kernels to encode the semantic similarities of LLM outputs and quantifies uncertainty using the von Neumann entropy. It considers pairwise semantic dependencies between answers (or semantic clusters), providing more fine-grained uncertainty estimates than previous methods based on hard clustering of answers. We theoretically prove that KLE generalizes the previous state-of-the-art method called semantic entropy and empirically demonstrate that it improves uncertainty quantification performance across multiple natural language generation datasets and LLM architectures.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑