Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

AlphaEdit: Null-Space Constrained Knowledge Editing for Language Models

About

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.7% with a single line of additional code for projection solely. Our code is available at: https://github.com/jianghoucheng/AlphaEdit.

Junfeng Fang, Houcheng Jiang, Kun Wang, Yunshan Ma, Shi Jie, Xiang Wang, Xiangnan He, Tat-seng Chua• 2024

Related benchmarks

TaskDatasetResultRank
Lifelong Free-text Knowledge EditingMRLF-Bench
BLEU39.53
140
Question AnsweringSQuAD
F150.1
127
Knowledge EditingzsRE
Generality97.36
110
Knowledge EditingCounterFact
Efficacy8.76e+3
91
Logical reasoningLogiQA
Accuracy21.8
84
Knowledge InsertionWikiData recent
Edit Success Rate96.22
43
Machine UnlearningRWKU Llama 3.1 8B (Forget Set)
FB Score64.6
39
General Knowledge AssessmentC-Eval
Accuracy23
37
Sequential Knowledge EditingCounterFact sequential editing 10,000 Samples
Efficacy Success96.51
33
Sequential Knowledge EditingZsRE sequential editing 10,000 Samples
Efficacy Success (Eff)90.57
33
Showing 10 of 28 rows

Other info

Follow for update