Transformer-Patcher: One Mistake Worth One Neuron
Zeyu Huang, Yikang Shen, Xiaofeng Zhang, Jie Zhou, Wenge Rong, Zhang Xiong
摘要
Large Transformer-based Pretrained Language Models (PLMs) dominate almost all Natural Language Processing (NLP) tasks. Nevertheless, they still make mistakes from time to time. For a model deployed in an industrial environment, fixing these mistakes quickly and robustly is vital to improve user experiences. Previous works formalize such problems as Model Editing (ME) and mostly focus on fixing one mistake. However, the one-mistake-fixing scenario is not an accurate abstraction of the real-world challenge. In the deployment of AI services, there are ever-emerging mistakes, and the same mistake may recur if not corrected in time. Thus a preferable solution is to rectify the mistakes as soon as they appear nonstop. Therefore, we extend the existing ME into Sequential Model Editing (SME) to help develop more practical editing methods. Our study shows that most current ME methods could yield unsatisfying results in this scenario. We then introduce Transformer-Patcher, a novel model editor that can shift the behavior of transformer-based models by simply adding and training a few neurons in the last Feed-Forward Network layer. Experimental results on both classification and generation tasks show that Transformer-Patcher can successively correct up to thousands of errors (Reliability) and generalize to their equivalent inputs (Generality) while retaining the model's accuracy on irrelevant inputs (Locality). Our method outperforms previous fine-tuning and HyperNetwork-based methods and achieves state-of-the-art performance for Sequential Model Editing (SME). The code is available at https://github.com/ZeroYuHuang/Transform er-Patcher .
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 107 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Aging with GRACE: Lifelong Model Editing with Discrete Key-Value Adaptors 引用了 Memory-Based Model Editing at Scale
- Aging with GRACE: Lifelong Model Editing with Discrete Key-Value Adaptors 引用了 Fast Model Editing at Scale
- Aging with GRACE: Lifelong Model Editing with Discrete Key-Value Adaptors 引用了 Language Models are Few-Shot Learners
- MELO: Enhancing Model Editing with Neuron-Indexed Dynamic LoRA 引用了 Aging with GRACE: Lifelong Model Editing with Discrete Key-Value Adaptors
- MELO: Enhancing Model Editing with Neuron-Indexed Dynamic LoRA 引用了 Editing Large Language Models: Problems, Methods, and Opportunities
- Memory-Based Model Editing at Scale 引用了 Language Models are Few-Shot Learners
- Fast Model Editing at Scale 引用了 Language Models are Few-Shot Learners
- Editing Large Language Models: Problems, Methods, and Opportunities 引用了 Aging with GRACE: Lifelong Model Editing with Discrete Key-Value Adaptors
- Editing Large Language Models: Problems, Methods, and Opportunities 引用了 Language Models are Few-Shot Learners
- WISE: Rethinking the Knowledge Memory for Lifelong Model Editing of Large Language Models 引用了 Aging with GRACE: Lifelong Model Editing with Discrete Key-Value Adaptors
- WISE: Rethinking the Knowledge Memory for Lifelong Model Editing of Large Language Models 引用了 Memory-Based Model Editing at Scale
- WISE: Rethinking the Knowledge Memory for Lifelong Model Editing of Large Language Models 引用了 Fast Model Editing at Scale
- WISE: Rethinking the Knowledge Memory for Lifelong Model Editing of Large Language Models 引用了 Language Models are Few-Shot Learners
- WISE: Rethinking the Knowledge Memory for Lifelong Model Editing of Large Language Models 引用了 Editing Large Language Models: Problems, Methods, and Opportunities
- BadEdit: Backdooring Large Language Models by Model Editing 引用了 Aging with GRACE: Lifelong Model Editing with Discrete Key-Value Adaptors
- BadEdit: Backdooring Large Language Models by Model Editing 引用了 Memory-Based Model Editing at Scale
- BadEdit: Backdooring Large Language Models by Model Editing 引用了 Fast Model Editing at Scale
- BadEdit: Backdooring Large Language Models by Model Editing 引用了 Language Models are Few-Shot Learners
引用它的顶会 Paper107
- Aging with GRACE: Lifelong Model Editing with Discrete Key-Value AdaptorsTom Hartvigsen, Swami Sankaranarayanan, Hamid Palangi, Yoon Kim 等NeurIPS 2023 · 349 次引用
- WISE: Rethinking the Knowledge Memory for Lifelong Model Editing of Large Language ModelsPeng Wang, Zexi Li, Ningyu Zhang, Ziwen Xu 等NeurIPS 2024 · 125 次引用
- BadEdit: Backdooring Large Language Models by Model EditingYanzhou Li, Tianlin Li, Kangjie Chen, Jian Zhang 等ICLR 2024 · 116 次引用
- MELO: Enhancing Model Editing with Neuron-Indexed Dynamic LoRALang Yu, Qin Chen, Jie Zhou, Liang HeAAAI 2024 · 96 次引用
- Editing Large Language Models: Problems, Methods, and OpportunitiesYunzhi Yao, Peng Wang, Bozhong Tian, Siyuan Cheng 等EMNLP 2023 · 83 次引用
它引用的 Paper10
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and ComprehensionMike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad 等ACL 2020 · 1,224 次引用
- Fast Model Editing at ScaleEric Mitchell, Charles Lin, Antoine Bosselut, Chelsea Finn 等ICLR 2022 · 527 次引用
- Memory-Based Model Editing at ScaleEric Mitchell, Charles Lin, Antoine Bosselut, Christopher D. Manning 等ICML 2022 · 520 次引用
- Supermasks in SuperpositionMitchell Wortsman, Vivek Ramanujan, Rosanne Liu, Aniruddha Kembhavi 等NeurIPS 2020 · 364 次引用
相关 Paper
- QueueEDIT: Structural Self-Correction for Sequential Model Editing in LLMsTaolin Zhang, Haidong Kang, Dongyang Li, Qizhou Chen 等ACL Findings 2026
- Improving Sequential Model Editing with Fact RetrievalXiaoqi Han, Ru Li, Hongye Tan, Yuanlong Wang 等EMNLP Findings 2023 · 2 次引用
- Neuron-Level Sequential Editing for Large Language ModelsHoucheng Jiang, Junfeng Fang, Tianyu Zhang, Baolong Bi 等ACL 2025
- Editable Neural NetworksAnton Sinitsin, Vsevolod Plokhotnyuk, Dmitry V. Pyrkin, Sergei Popov 等ICLR 2020 · 210 次引用
- Learning Where to Edit Vision TransformersYunqiao Yang, Long-Kai Huang, Shengzhuang Chen, Kede Ma 等NeurIPS 2024 · 6 次引用
