Transformer 中的表征碎裂:一项结合知识编辑的合成研究
Representation Shattering in Transformers: A Synthetic Study with Knowledge Editing
AI总结:
本文构建结构化知识图谱合成任务,揭示知识编辑会引发“表征碎裂”,扭曲目标外实体表征并损害事实回忆与推理,且在 Llama、Mamba 上得到验证。
摘要:
知识编辑(Knowledge Editing,KE)算法通过改变模型权重,对不正确、过时或其他不希望存在的事实关联进行有针对性的更新。然而,近期研究表明,应用 KE 可能会不利地影响模型更广泛的事实回忆准确性,并削弱其推理能力。尽管这些研究通过例如在基准上的性能评估,揭示了 KE 算法的潜在危害,但人们对于此类破坏性失败为何发生仍知之甚少。受此启发,我们定义了一个新颖的合成任务:在该任务中,一个 Transformer 从零开始训练,以内化一个“结构化”知识图谱。该结构强制规定图谱实体之间的关系,因此编辑一个事实关联会对其他实体产生“涓流效应”(例如,将“X 的父/母是 Y”改为 Z,会影响 X 的兄弟姐妹的父/母是谁)。通过在该任务上评估被编辑的模型,我们表明 KE 会在无意中影响目标实体之外的实体表征,扭曲使模型能够推断关于某实体未见知识的相关结构。我们将这种现象称为表征碎裂,并证明它会降低模型的事实回忆和推理性能。我们还在自然场景中使用预训练的 Llama 和 Mamba 模型进一步证实了这些发现。总体而言,我们的工作提出了一个精确的机制性假设,用以解释 KE 为何会对模型能力产生不利影响。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。