AlphaEdit: Null-Space Constrained Knowledge Editing for Language Models

๐Ÿ“… 2024-10-03
๐Ÿ›๏ธ arXiv.org
๐Ÿ“ˆ Citations: 16
โœจ Influential: 3
๐Ÿ“„ PDF
๐Ÿค– AI Summary
Existing localization-based editing methods suffer from catastrophic forgetting during sequential knowledge updates. To address this, we propose Null-Space Projection Knowledge Editing (ZS-Edit): prior to gradient perturbation, the parameter update direction is orthogonally projected onto the null space of the Jacobian w.r.t. preserved knowledgeโ€”thereby guaranteeing strict invariance of original model outputs under theoretical rigor. ZS-Edit is the first method to introduce null-space projection into large language model knowledge editing, combining formal theoretical grounding with implementation simplicity (requiring only a single-line code extension). Experiments on LLaMA3, GPT2-XL, and GPT-J demonstrate that ZS-Edit improves average performance over state-of-the-art editing methods by 36.4%, while significantly enhancing edit accuracy and knowledge fidelity, and effectively mitigating catastrophic forgetting in sequential editing scenarios.

Technology Category

Application Category

๐Ÿ“ Abstract
Large language models (LLMs) often exhibit hallucinations due to incorrect or outdated knowledge. Hence, model editing methods have emerged to enable targeted knowledge updates. To achieve this, a prevailing paradigm is the locating-then-editing approach, which first locates influential parameters and then edits them by introducing a perturbation. While effective, current studies have demonstrated that this perturbation inevitably disrupt the originally preserved knowledge within LLMs, especially in sequential editing scenarios. To address this, we introduce AlphaEdit, a novel solution that projects perturbation onto the null space of the preserved knowledge before applying it to the parameters. We theoretically prove that this projection ensures the output of post-edited LLMs remains unchanged when queried about the preserved knowledge, thereby mitigating the issue of disruption. Extensive experiments on various LLMs, including LLaMA3, GPT2-XL, and GPT-J, show that AlphaEdit boosts the performance of most locating-then-editing methods by an average of 36.4% with a single line of additional code for projection solely. Our code is available at: https://github.com/jianghoucheng/AlphaEdit.
Problem

Research questions and friction points this paper is trying to address.

Addresses hallucinations in large language models due to outdated knowledge
Mitigates disruption of preserved knowledge during sequential editing
Improves editing performance with minimal additional computational cost
Innovation

Methods, ideas, or system contributions that make the work stand out.

Projects perturbation onto null space
Preserves original knowledge during edits
Boosts performance with minimal code addition
๐Ÿ”Ž Similar Papers
No similar papers found.