arXiv:2509.25252cs.AI2025-09

让大模型不再胡说,直接在注意力机制里注入真实知识

Fact Grounded Attention: Eliminating Hallucination in Large Language Models Through Attention Level Knowledge Integration

  • 将可验证知识注入注意力分数,从底层阻止幻觉
  • 在1107个技术问题上准确率从6.3%提升至99.7%
  • 知识更新<1秒,无需重新训练,适合高精度场景

大型语言模型虽掌握自然语言,却受限于其概率本质,常自信地生成从未知晓的虚假信息。我们提出事实锚定注意力(Fact Grounded Attention, FGA),一种新型架构修改,在Transformer的核心——预归一化注意力分数中直接注入可验证知识,使模型在知识库存在事实时无法产生幻觉。与事后修复或前置检索文本的现有方法不同,FGA从数学层面干预注意力机制,实现确定性精准。在涵盖智能手机、笔记本电脑和电动汽车的1107个技术查询上,原始Llama 3.2的准确率为6.3%,使用FGA后提升至99.7%。更关键的是,知识更新耗时不足1秒,远快于需数小时的参数编辑方法。FGA不仅大幅减少幻觉,更对可验证事实实现彻底消除,标志着神经语言生成从概率近似到确定性精确的根本转变。

原文摘要 · Abstract (English)

"The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge." Large Language Models have conquered natural language but remain prisoners of their own probabilistic nature--confidently hallucinating facts they never truly knew. We present Fact Grounded Attention (FGA), a novel architectural modification that transforms unreliable language models into deterministic truth tellers by injecting verifiable knowledge directly into the attention mechanism. Unlike existing approaches that patch hallucinations after generation or prepend retrieved text, FGA intervenes at the mathematical heart of the transformer--the pre-softmax attention scores--creating a model that cannot hallucinate when facts exist in its knowledge base. Our experiments across 1,107 technical queries spanning smartphones, laptops, and electric vehicles demonstrate a transformation from 6.3% accuracy in vanilla Llama 3.2 to 99.7% accuracy with FGA. More critically, knowledge updates occur in under one second without retraining, compared to hours for parameter editing approaches. FGA doesn't just reduce hallucination--it eliminates it entirely for verifiable facts, marking a fundamental shift from probabilistic approximation to deterministic precision in neural language generation.

大模型幻觉消除注意力机制知识注入

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。