Lune

ICLR2023Top-tier venue

Transformer-Patcher: One Mistake Worth One Neuron

Zeyu Huang, Yikang Shen, Xiaofeng Zhang, Jie Zhou, Wenge Rong, Zhang Xiong

Abstract

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 .

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

107 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Aging with GRACE: Lifelong Model Editing with Discrete Key-Value Adaptors cites Memory-Based Model Editing at Scale
  • Aging with GRACE: Lifelong Model Editing with Discrete Key-Value Adaptors cites Fast Model Editing at Scale
  • Aging with GRACE: Lifelong Model Editing with Discrete Key-Value Adaptors cites Language Models are Few-Shot Learners
  • MELO: Enhancing Model Editing with Neuron-Indexed Dynamic LoRA cites Aging with GRACE: Lifelong Model Editing with Discrete Key-Value Adaptors
  • MELO: Enhancing Model Editing with Neuron-Indexed Dynamic LoRA cites Editing Large Language Models: Problems, Methods, and Opportunities
  • Memory-Based Model Editing at Scale cites Language Models are Few-Shot Learners
  • Fast Model Editing at Scale cites Language Models are Few-Shot Learners
  • Editing Large Language Models: Problems, Methods, and Opportunities cites Aging with GRACE: Lifelong Model Editing with Discrete Key-Value Adaptors
  • Editing Large Language Models: Problems, Methods, and Opportunities cites Language Models are Few-Shot Learners
  • WISE: Rethinking the Knowledge Memory for Lifelong Model Editing of Large Language Models cites Aging with GRACE: Lifelong Model Editing with Discrete Key-Value Adaptors
  • WISE: Rethinking the Knowledge Memory for Lifelong Model Editing of Large Language Models cites Memory-Based Model Editing at Scale
  • WISE: Rethinking the Knowledge Memory for Lifelong Model Editing of Large Language Models cites Fast Model Editing at Scale
  • WISE: Rethinking the Knowledge Memory for Lifelong Model Editing of Large Language Models cites Language Models are Few-Shot Learners
  • WISE: Rethinking the Knowledge Memory for Lifelong Model Editing of Large Language Models cites Editing Large Language Models: Problems, Methods, and Opportunities
  • BadEdit: Backdooring Large Language Models by Model Editing cites Aging with GRACE: Lifelong Model Editing with Discrete Key-Value Adaptors
  • BadEdit: Backdooring Large Language Models by Model Editing cites Memory-Based Model Editing at Scale
  • BadEdit: Backdooring Large Language Models by Model Editing cites Fast Model Editing at Scale
  • BadEdit: Backdooring Large Language Models by Model Editing cites Language Models are Few-Shot Learners
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers107

  1. Aging with GRACE: Lifelong Model Editing with Discrete Key-Value AdaptorsTom Hartvigsen, Swami Sankaranarayanan, Hamid Palangi, Yoon Kim et al.NeurIPS 2023 · 349 citations
  2. WISE: Rethinking the Knowledge Memory for Lifelong Model Editing of Large Language ModelsPeng Wang, Zexi Li, Ningyu Zhang, Ziwen Xu et al.NeurIPS 2024 · 125 citations
  3. BadEdit: Backdooring Large Language Models by Model EditingYanzhou Li, Tianlin Li, Kangjie Chen, Jian Zhang et al.ICLR 2024 · 116 citations
  4. MELO: Enhancing Model Editing with Neuron-Indexed Dynamic LoRALang Yu, Qin Chen, Jie Zhou, Liang HeAAAI 2024 · 96 citations
  5. Editing Large Language Models: Problems, Methods, and OpportunitiesYunzhi Yao, Peng Wang, Bozhong Tian, Siyuan Cheng et al.EMNLP 2023 · 83 citations

Builds on10

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and ComprehensionMike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad et al.ACL 2020 · 1,224 citations
  3. Fast Model Editing at ScaleEric Mitchell, Charles Lin, Antoine Bosselut, Chelsea Finn et al.ICLR 2022 · 527 citations
  4. Memory-Based Model Editing at ScaleEric Mitchell, Charles Lin, Antoine Bosselut, Christopher D. Manning et al.ICML 2022 · 520 citations
  5. Supermasks in SuperpositionMitchell Wortsman, Vivek Ramanujan, Rosanne Liu, Aniruddha Kembhavi et al.NeurIPS 2020 · 364 citations

Related papers

  1. QueueEDIT: Structural Self-Correction for Sequential Model Editing in LLMsTaolin Zhang, Haidong Kang, Dongyang Li, Qizhou Chen et al.ACL Findings 2026
  2. Improving Sequential Model Editing with Fact RetrievalXiaoqi Han, Ru Li, Hongye Tan, Yuanlong Wang et al.EMNLP Findings 2023 · 2 citations
  3. Neuron-Level Sequential Editing for Large Language ModelsHoucheng Jiang, Junfeng Fang, Tianyu Zhang, Baolong Bi et al.ACL 2025
  4. Editable Neural NetworksAnton Sinitsin, Vsevolod Plokhotnyuk, Dmitry V. Pyrkin, Sergei Popov et al.ICLR 2020 · 210 citations
  5. Learning Where to Edit Vision TransformersYunqiao Yang, Long-Kai Huang, Shengzhuang Chen, Kede Ma et al.NeurIPS 2024 · 6 citations
Dusk over the sea between two cliffs drawn in fine vertical lines