语言模型非事实性幻觉的机制性理解与缓解
Mechanistic Understanding and Mitigation of Language Model Non-Factual Hallucinations
AI总结:
本文通过诊断数据集和可解释性方法揭示 Llama-2、Pythia、GPT-J 中非事实性幻觉的两类内部机制,并据此提出恢复事实回忆流水线的缓解方法,效果优于基线。
摘要:
最先进的语言模型(LMs)有时会生成与世界知识不一致的非事实性幻觉。为探究这些幻觉的机制性成因,我们构建了包含主体-关系查询的诊断数据集,并调整可解释性方法,以通过模型内部表征追踪幻觉。我们发现了跨语言模型(Llama-2、Pythia、GPT-J)共有的两类普遍且不同的幻觉机制性成因:1)知识丰富幻觉:较低层 MLP 中的主体属性知识不足;2)答案提取幻觉:较高层注意力头未能选择正确的客体属性。我们还发现,这两种内部幻觉机制成因会反映在外部表现上。基于机制分析的洞见,我们提出了一种新型幻觉缓解方法,通过有针对性地恢复语言模型内部的事实回忆流水线,证明其性能优于基线方法。
英文摘要:
State-of-the-art language models (LMs) sometimes generate non-factual hallucinations that misalign with world knowledge. To explore the mechanistic causes of these hallucinations, we create diagnostic datasets with subject-relation queries and adapt interpretability methods to trace hallucinations through internal model representations. We discover two general and distinct mechanistic causes of hallucinations shared across LMs (Llama-2, Pythia, GPT-J): 1) knowledge enrichment hallucinations: insufficient subject attribute knowledge in lower layer MLPs, and 2) answer extraction hallucinations: failure to select the correct object attribute in upper layer attention heads. We also found these two internal mechanistic causes of hallucinations are reflected in external manifestations. Based on insights from our mechanistic analysis, we propose a novel hallucination mitigation method through targeted restoration of the LM's internal fact recall pipeline, demonstrating superior performance compared to baselines.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。