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

利用注意力图谱特征进行大语言模型幻觉检测

Hallucination Detection in LLMs Using Spectral Features of Attention Maps

Wroclaw University of Science and Technology(沃拉日-克拉夫大学科学与技术学院);University of Technology Sydney(悉尼技术大学)

Jakub Binkowski, Denis Janiak, Albert Sawczyn, Bogdan Gabrys, Tomasz Kajdanowicz

AI总结:

本文针对大语言模型幻觉检测问题,将注意力图视为图邻接矩阵,提出用拉普拉斯矩阵 top-k 特征值作为检测特征的 LapEigvals 方法,并证明其在基于注意力的方法中达到最优性能。

摘要:

大语言模型(LLM)已在多种任务中展现出卓越性能,但仍容易产生幻觉。检测幻觉对于安全关键应用至关重要;近期方法利用注意力图属性来实现这一目标,但其有效性仍然有限。在本工作中,我们通过将注意力图解释为图结构的邻接矩阵,研究其谱特征。我们提出 LapEigvals 方法,该方法利用由注意力图导出的拉普拉斯矩阵的 top-k 特征值,作为幻觉检测探针的输入。实证评估表明,我们的方法在基于注意力的方法中取得了最先进的幻觉检测性能。大量消融研究进一步突显了 LapEigvals 的稳健性和泛化能力,为幻觉检测领域未来的进展铺平了道路。

英文摘要:

Large Language Models (LLMs) have demonstrated remarkable performance across various tasks but remain prone to hallucinations. Detecting hallucinations is essential for safety-critical applications, and recent methods leverage attention map properties to this end, though their effectiveness remains limited. In this work, we investigate the spectral features of attention maps by interpreting them as adjacency matrices of graph structures. We propose the $\text{LapEigvals}$ method, which utilises the top-$k$ eigenvalues of the Laplacian matrix derived from the attention maps as an input to hallucination detection probes. Empirical evaluations demonstrate that our approach achieves state-of-the-art hallucination detection performance among attention-based methods. Extensive ablation studies further highlight the robustness and generalisation of $\text{LapEigvals}$, paving the way for future advancements in the hallucination detection domain.

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

↑