arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.22303cs.LGcs.AI

基于样本转换成本的无训练hallucination检测器用于大型语言模型

Sample Transform Cost-Based Training-Free Hallucination Detector for Large Language Models

The Chinese University of Hong Kong, Shenzhen(香港中文大学(深圳))

Zeyang Ding, Xinglin Hu, Jicong Fan

AI总结:

本文提出基于最优传输距离的hallucination检测方法,通过计算token嵌入之间的Wasserstein距离矩阵,得到AvgWD和EigenWD两个指标,用于无训练检测大型语言模型的hallucination问题。

摘要:

大型语言模型(LLMs)中的hallucination仍然是可信部署的主要障碍,推动了准确、轻量且广泛应用的检测器的发展。由于LLM与提示定义了条件分布,我们主张分布的复杂性是hallucination的指标。然而,分布的密度未知,样本(即提示生成的响应)是离散分布,这导致了量化分布复杂性的重大挑战。我们提出计算成对样本token嵌入集之间的最优传输距离,从而得到Wasserstein距离矩阵,测量样本之间的转换成本。该Wasserstein距离矩阵提供了量化由LLM和提示定义的分布复杂性的手段。基于Wasserstein距离矩阵,我们推导出两个互补信号:AvgWD,测量平均成本,和EigenWD,测量成本复杂性。这导致了无训练的hallucination检测器。我们进一步通过可访问的教师模型扩展框架,用于黑盒LLM。实验表明,AvgWD和EigenWD与强大的不确定性基线竞争,并在模型和数据集上提供互补行为,突显分布复杂性作为LLM诚实性有效信号。

英文摘要:

Hallucinations in large language models (LLMs) remain a central obstacle to trustworthy deployment, motivating detectors that are accurate, lightweight, and broadly applicable. Since an LLM with a prompt defines a conditional distribution, we argue that the complexity of the distribution is an indicator of hallucination. However, the density of the distribution is unknown and the samples (i.e., responses generated for the prompt) are discrete distributions, which leads to a significant challenge in quantifying the complexity of the distribution. We propose to compute the optimal-transport distances between the sets of token embeddings of pairwise samples, which yields a Wasserstein distance matrix measuring the costs of transforming between the samples. This Wasserstein distance matrix provides a means to quantify the complexity of the distribution defined by the LLM with the prompt. Based on the Wasserstein distance matrix, we derive two complementary signals: AvgWD, measuring the average cost, and EigenWD, measuring the cost complexity. This leads to a training-free detector for hallucinations in LLMs. We further extend the framework to black-box LLMs via teacher forcing with an accessible teacher model. Experiments show that AvgWD and EigenWD are competitive with strong uncertainty baselines and provide complementary behavior across models and datasets, highlighting distribution complexity as an effective signal for LLM truthfulness.

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

↑