修复大模型知识编辑时的注意力偏移问题,防止误伤原有知识。
Revealing and Mitigating Over-Attention in Knowledge Editing
- 引入注意力分布正则化,限制编辑时的注意力变化。
- 在5个主流大模型上验证,显著降低特定性失败率。
- 适合需要精准修改知识又不破坏原有能力的研究者。
大型语言模型在众多任务中表现优异,但仍因训练数据中的错误知识而产生不良错误。为解决此问题,知识编辑方法通过高效修改极小比例参数来精确修正模型知识。然而,这些方法可能导致特定性失败:当编辑内容出现在上下文时,会意外破坏其他已有知识。初步研究表明,特定性失败主要源于注意力头对编辑相关实体分配过高注意力得分,导致模型过度聚焦于上下文中的特定片段,这种现象称为注意力漂移。为此,我们提出一种简单有效的方法——选择性注意力漂移限制(SADR),在知识编辑过程中引入额外正则项,限制注意力权重分布的变化,从而避免对编辑实体的过度关注。在五个常用强语言模型上的实验表明,SADR能显著缓解多数知识编辑任务中的特定性失败问题。
原文摘要 · Abstract (English)
Large Language Models have demonstrated superior performance across a wide range of tasks, but they still exhibit undesirable errors due to incorrect knowledge learned from the training data. To avoid this, knowledge editing methods emerged to precisely edit the specific model knowledge via efficiently modifying a very small percentage of parameters. % However, those methods can lead to the problem of Specificity Failure: when the content related to the edited knowledge occurs in the context, it can inadvertently corrupt other pre-existing knowledge. However, those methods can lead to the problem of Specificity Failure, where the existing knowledge and capabilities are severely degraded due to editing. Our preliminary indicates that Specificity Failure primarily stems from the model's attention heads assigning excessive attention scores to entities related to the edited knowledge, thereby unduly focusing on specific snippets within the context, which we denote as the Attention Drift phenomenon. To mitigate such Attention Drift issue, we introduce a simple yet effective method Selective Attention Drift Restriction}(SADR), which introduces an additional regularization term during the knowledge editing process to restrict changes in the attention weight distribution, thereby preventing undue focus on the edited entity. Experiments on five frequently used strong LLMs demonstrate the effectiveness of our method, where SADR can significantly mitigate Specificity Failure in the predominant knowledge editing tasks.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。