arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2407.04485cs.CLcs.LG
收藏

利用图结构检测大型语言模型中的幻觉

Leveraging Graph Structures to Detect Hallucinations in Large Language Models

University of Amsterdam(阿姆斯特丹大学)

Noa Nonkes, Sergei Agaronian, Evangelos Kanoulas, Roxana Petcu

AI总结:

本文提出利用潜在空间图结构和图注意力网络检测大语言模型幻觉,并通过对比学习提升鲁棒性,在证据基准上达到与搜索方法相近的性能。

摘要:

大型语言模型被广泛应用于客户支持、内容创作、教育辅导和提供金融指导等众多任务。然而,一个众所周知的缺点是它们倾向于生成幻觉。这损害了这些模型所提供信息的可信度,影响决策和用户信心。我们提出一种通过观察潜在空间的结构并寻找幻觉生成与非幻觉生成之间的关联来检测幻觉的方法。我们构建一个图结构,将嵌入空间中位置相近的生成连接起来。此外,我们采用图注意力网络,利用消息传递聚合来自邻近节点的信息,并根据每个邻居的相关性为其分配不同程度的重要性。我们的研究结果表明:1)潜在空间中存在一种结构,能够区分幻觉生成与非幻觉生成;2)图注意力网络可以学习这种结构并将其泛化到未见过的生成上;3)当结合对比学习时,我们方法的鲁棒性得到增强。在基于证据的基准上评估时,我们的模型在不使用基于搜索的方法的情况下表现相似。

英文摘要:

Large language models are extensively applied across a wide range of tasks, such as customer support, content creation, educational tutoring, and providing financial guidance. However, a well-known drawback is their predisposition to generate hallucinations. This damages the trustworthiness of the information these models provide, impacting decision-making and user confidence. We propose a method to detect hallucinations by looking at the structure of the latent space and finding associations within hallucinated and non-hallucinated generations. We create a graph structure that connects generations that lie closely in the embedding space. Moreover, we employ a Graph Attention Network which utilizes message passing to aggregate information from neighboring nodes and assigns varying degrees of importance to each neighbor based on their relevance. Our findings show that 1) there exists a structure in the latent space that differentiates between hallucinated and non-hallucinated generations, 2) Graph Attention Networks can learn this structure and generalize it to unseen generations, and 3) the robustness of our method is enhanced when incorporating contrastive learning. When evaluated against evidence-based benchmarks, our model performs similarly without access to search-based methods.

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

↑