基于注意力图拓扑分歧的LLM幻觉检测
Hallucination Detection in LLMs with Topological Divergence on Attention Graphs
AI总结:
本文提出TOHA方法,通过分析注意力矩阵的拓扑结构来检测LLM中的幻觉现象,实验表明该方法在多个基准测试中表现优异,且对标注数据和计算资源需求较低。
摘要:
幻觉,即生成事实性错误内容,仍然是大型语言模型(LLMs)面临的关键挑战。我们介绍了TOHA,一种基于拓扑的幻觉检测器,在RAG设置中,该方法利用拓扑分歧度度量来量化由注意力矩阵诱导的图的结构特性。检查提示与响应子图之间的拓扑分歧揭示了一致的模式:特定注意力头中较高的分歧值与幻觉输出相关,且与数据集无关。广泛的实验,包括问题回答和摘要任务的评估,表明我们的方法在多个基准测试中实现了最先进的或具有竞争力的结果,同时需要最少的标注数据和计算资源。我们的发现表明,分析注意力矩阵的拓扑结构可以作为LLMs事实可靠性的一种高效且稳健的指标。
英文摘要:
Hallucination, i.e., generating factually incorrect content, remains a critical challenge for large language models (LLMs). We introduce TOHA, a TOpology-based HAllucination detector in the RAG setting, which leverages a topological divergence metric to quantify the structural properties of graphs induced by attention matrices. Examining the topological divergence between prompt and response subgraphs reveals consistent patterns: higher divergence values in specific attention heads correlate with hallucinated outputs, independent of the dataset. Extensive experiments - including evaluation on question answering and summarization tasks - show that our approach achieves state-of-the-art or competitive results on several benchmarks while requiring minimal annotated data and computational resources. Our findings suggest that analyzing the topological structure of attention matrices can serve as an efficient and robust indicator of factual reliability in LLMs.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。