arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2503.01917cs.LGcs.AIcs.CL
收藏

引导LLM潜在空间用于幻觉检测

Steer LLM Latents for Hallucination Detection

Zhejiang University(浙江大学)

Seongheon Park, Xuefeng Du, Min-Hsuan Yeh, Haobo Wang, Yixuan Li

AI总结:

本文提出真值分离向量(TSV),通过引导LLM潜在空间增强真实与幻觉输出的分离,实现高效幻觉检测,无需修改模型参数,在少量标注数据下达到最优性能。

摘要:

大型语言模型(LLM)中的幻觉对其在现实应用中的安全部署构成了重大担忧。近期方法利用LLM的潜在空间进行幻觉检测,但其嵌入向量针对语言连贯性而非事实准确性进行优化,往往无法清晰区分真实与幻觉内容。为此,我们提出真值分离向量(TSV),一种轻量且灵活的引导向量,在推理期间重塑LLM的表示空间,以增强真实与幻觉输出之间的分离,且不修改模型参数。我们的两阶段框架首先在少量带标签的示例上训练TSV,形成紧凑且分离良好的簇。然后,它利用未标记的LLM生成扩充示例集,采用基于最优传输的算法进行伪标签分配,并结合基于置信度的过滤过程。大量实验表明,TSV在极少标注数据下实现了最先进的性能,展现出跨数据集的强泛化能力,为现实世界的LLM应用提供了实用解决方案。

英文摘要:

Hallucinations in LLMs pose a significant concern to their safe deployment in real-world applications. Recent approaches have leveraged the latent space of LLMs for hallucination detection, but their embeddings, optimized for linguistic coherence rather than factual accuracy, often fail to clearly separate truthful and hallucinated content. To this end, we propose the Truthfulness Separator Vector (TSV), a lightweight and flexible steering vector that reshapes the LLM's representation space during inference to enhance the separation between truthful and hallucinated outputs, without altering model parameters. Our two-stage framework first trains TSV on a small set of labeled exemplars to form compact and well-separated clusters. It then augments the exemplar set with unlabeled LLM generations, employing an optimal transport-based algorithm for pseudo-labeling combined with a confidence-based filtering process. Extensive experiments demonstrate that TSV achieves state-of-the-art performance with minimal labeled data, exhibiting strong generalization across datasets and providing a practical solution for real-world LLM applications.

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

↑