Revealing and Mitigating Over-Attention in Knowledge Editing

Pinzheng Wang, Zecheng Tang, Keyan Zhou, Juntao Li, Qiaoming Zhu +1 more
2/1/2025
10 citations
transformer-attention

Official code: PinzhengWang322/Reveal_Attention_Drift (0 stars, Python, MIT, last commit 2025-02-21).

Abstract

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

MIT
00Python, Jupyter NotebookFeb 12, 20251 years agoMIT

Similar Papers

Cite this paper

@article{wang2025revealing,
  title  = {Revealing and Mitigating Over-Attention in Knowledge Editing},
  author = {Pinzheng Wang and Zecheng Tang and Keyan Zhou and Juntao Li and Qiaoming Zhu and Min Zhang},
  year   = {2025},
  eprint = {2502.14838},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2502.14838},
  journal = {ICLR 2025 2025}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2502.14838.svg)](https://codeofpaper.com/paper/2502.14838)

Discussion