arXiv:2410.17194cs.LG2024-10ICML被引 21

揭示知识编辑导致模型表征破碎的机制。

Representation Shattering in Transformers: A Synthetic Study with Knowledge Editing

  • 设计结构化知识图训练Transformer,模拟编辑扩散效应。
  • 编辑一个事实会破坏相关实体的表征结构,影响推理能力。
  • 在Llama和Mamba上验证,适用于关注模型稳定性的研究者。

知识编辑(KE)算法通过修改模型权重来修正错误或过时的事实关联,但近期研究发现其可能损害模型的泛化事实召回率与推理能力。然而,对这类负面效应的内在机制仍缺乏理解。为此,我们设计了一项新型合成任务:从头训练Transformer以内化具有结构化的知识图谱,该结构强制实体间关系耦合,使得编辑某一事实(如将X的父节点从Y改为Z)会引发连锁反应,影响其他实体的关联关系。通过在该任务中评估编辑后的模型,我们发现KE会无意中破坏目标实体以外的表征结构,扭曲模型推断未知信息所需的知识结构。我们称此现象为‘表征破碎’,并证明其导致事实召回与推理性能下降。进一步在预训练的Llama与Mamba模型上复现了类似结果。本研究提出了一个精确的机制性假说,解释了为何KE会削弱模型能力。

原文摘要 · Abstract (English)

Knowledge Editing (KE) algorithms alter models' weights to perform targeted updates to incorrect, outdated, or otherwise unwanted factual associations. However, recent work has shown that applying KE can adversely affect models' broader factual recall accuracy and diminish their reasoning abilities. Although these studies give insights into the potential harms of KE algorithms, e.g., performance evaluations on benchmarks, little is understood about why such destructive failures occur. Motivated by this, we define a novel synthetic task in which a Transformer is trained from scratch to internalize a "structured" knowledge graph. The structure enforces relationships between entities of the graph, such that editing a factual association has "trickling effects" on other entities (e.g., altering X's parent is Y to Z affects who X's siblings' parent is). Through evaluations of edited models on this task, we show that KE inadvertently affects representations of entities beyond the targeted one, distorting relevant structures that allow a model to infer unseen knowledge about an entity. We call this phenomenon representation shattering and demonstrate that it degrades models' factual recall and reasoning performance. We further corroborate our findings in naturalistic settings with pre-trained Llama and Mamba models as well. Overall, our work yields a precise mechanistic hypothesis to explain why KE has adverse effects on model abilities.

知识编辑表征破碎大模型机制

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