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

关于大型语言模型在已知事实上的幻觉问题

On Large Language Models' Hallucination with Regard to Known Facts

Pattern Recognition Center, WeChat AI, Tencent Inc(腾讯微信AI模式识别中心);Department of Electronic Engineering, Tsinghua University(清华大学电子工程系)

Che Jiang, Biqing Qi, Xiangyu Hong, Dayuan Fu, Yang Cheng, Fandong Meng, Mo Yu, Bowen Zhou, Jie Zhou

AI总结:

本文从推理动力学角度分析LLM已知事实却幻觉的问题,通过同知识不同答案问题对比与残差流到词汇空间的映射提取层深度概率曲线特征,并构建分类器以88%准确率检测幻觉。

摘要:

大型语言模型在回答事实性问题方面取得了成功,但也容易产生幻觉。我们从推理动力学的角度研究了LLM虽具备正确答案知识却仍产生幻觉的现象,这是以往幻觉研究未曾覆盖的领域。我们能够通过两个关键思路开展这一分析。首先,我们识别出查询相同三元组知识但产生不同答案的事实性问题。因此,模型在正确输出与错误输出上的行为差异,揭示了幻觉发生时的模式。其次,为度量该模式,我们利用从残差流到词汇空间的映射。我们揭示了正确情形与幻觉情形之间,输出token概率沿网络层深度的不同动力学。在幻觉情形中,输出token的信息在模型后期阶段很少表现出突增和持续优势。利用该动力学曲线作为特征,我们构建了一个分类器,能够以88%的成功率准确检测幻觉预测。本研究有助于理解LLM在其已知事实上产生幻觉的原因,更重要的是,有助于准确预测它们何时正在产生幻觉。

英文摘要:

Large language models are successful in answering factoid questions but are also prone to hallucination. We investigate the phenomenon of LLMs possessing correct answer knowledge yet still hallucinating from the perspective of inference dynamics, an area not previously covered in studies on hallucinations. We are able to conduct this analysis via two key ideas. First, we identify the factual questions that query the same triplet knowledge but result in different answers. The difference between the model behaviors on the correct and incorrect outputs hence suggests the patterns when hallucinations happen. Second, to measure the pattern, we utilize mappings from the residual streams to vocabulary space. We reveal the different dynamics of the output token probabilities along the depths of layers between the correct and hallucinated cases. In hallucinated cases, the output token's information rarely demonstrates abrupt increases and consistent superiority in the later stages of the model. Leveraging the dynamic curve as a feature, we build a classifier capable of accurately detecting hallucinatory predictions with an 88\% success rate. Our study shed light on understanding the reasons for LLMs' hallucinations on their known facts, and more importantly, on accurately predicting when they are hallucinating.

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

↑