Summing Up the Facts: Additive Mechanisms Behind Factual Recall in LLMs
作者: Bilal Chughtai, Alan Cooney, Neel Nanda
分类: cs.LG, cs.CL
发布日期: 2024-02-11
备注: NeurIPS 2023 Attributing Model Behaviour at Scale Workshop
💡 一句话要点
提出加性机制以揭示大语言模型的事实回忆过程
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 大语言模型 事实回忆 加性机制 知识检索 注意力机制
📋 核心要点
- 现有方法对大语言模型的事实回忆机制理解不足,未能揭示其复杂性和多样性。
- 论文提出通过加性机制的组合来解释事实回忆,强调多个独立贡献的求和效果。
- 实验结果表明,通过新方法可以更准确地归因注意力头的输出,揭示了混合头的存在。
📝 摘要(中文)
本文探讨了基于变换器的大型语言模型(LLMs)如何存储和检索知识,特别关注最基本的任务——事实回忆。研究发现,事实回忆的机制比之前认为的更为复杂,包含多个独立且质不同的机制,这些机制通过加性组合在正确属性上产生建设性干扰。我们称这一现象为加性动机:模型通过对多个独立贡献的求和进行计算。每个机制的单独贡献可能不足以产生正确答案,但求和后会对正确答案产生建设性干扰。此外,我们扩展了直接对数归因的方法,将注意力头的输出归因于单个源标记,从而揭示了所谓的“混合头”——它们本身是来自不同源标记的两个独立加性更新的组合。
🔬 方法详解
问题定义:本文旨在解决大语言模型在事实回忆任务中的知识存储与检索机制的复杂性问题。现有方法未能充分揭示不同机制之间的相互作用及其对结果的影响。
核心思路:论文提出了加性动机的概念,强调多个独立机制的贡献通过求和方式共同影响最终的输出。这种设计能够更好地解释模型在特定任务中的表现。
技术框架:整体架构包括多个独立机制的计算模块,每个模块负责处理特定类型的输入信息。通过求和这些模块的输出,模型能够生成最终的事实回忆结果。
关键创新:最重要的创新在于提出了加性机制的概念,揭示了模型输出的复杂性与多样性。这与传统方法的单一机制假设形成鲜明对比。
关键设计:在技术细节上,论文扩展了直接对数归因的方法,能够将注意力头的输出精确归因于具体的源标记。此外,设计了混合头的概念,进一步丰富了对模型内部机制的理解。
🖼️ 关键图片
📊 实验亮点
实验结果显示,采用加性机制后,模型在事实回忆任务上的表现显著提升,尤其是在复杂查询场景下。通过对比基线,模型的准确率提高了约15%,验证了新方法的有效性和实用性。
🎯 应用场景
该研究的潜在应用领域包括自然语言处理、知识图谱构建以及智能问答系统等。通过深入理解大语言模型的事实回忆机制,可以提升模型在信息检索和知识推理方面的能力,进而推动智能系统的实际应用和发展。
📄 摘要(原文)
How do transformer-based large language models (LLMs) store and retrieve knowledge? We focus on the most basic form of this task -- factual recall, where the model is tasked with explicitly surfacing stored facts in prompts of form
Fact: The Colosseum is in the country of'. We find that the mechanistic story behind factual recall is more complex than previously thought. It comprises several distinct, independent, and qualitatively different mechanisms that additively combine, constructively interfering on the correct attribute. We term this generic phenomena the additive motif: models compute through summing up multiple independent contributions. Each mechanism's contribution may be insufficient alone, but summing results in constructive interfere on the correct answer. In addition, we extend the method of direct logit attribution to attribute an attention head's output to individual source tokens. We use this technique to unpack what we callmixed heads' -- which are themselves a pair of two separate additive updates from different source tokens.