Fast Model Editing at Scale
By Eric Mitchell, Charles Lin, Antoine Bosselut, Chelsea Finn, Christopher D. Manning. 2021
580 citations recorded by the source corpus.
While large pre-trained models have enabled impressive results on a variety of downstream tasks, the largest existing models still make errors, and even accurate predictions may become outdated over time. Because detecting all such failures at training time is impossible, enabling both developers and end users of such models to correct inaccurate outputs while leaving the model otherwise intact is desirable. However, the distributed, black-box nature of the representations learned by large neural networks makes producing such targeted edits difficult. If presented with only a single problematic input and new desired output, fine-tuning approaches tend to overfit; other editing algorithms are either computationally infeasible or simply ineffective when applied to very large models. To enable easy post-hoc editing at scale, we propose Model Editor Networks using Gradient Decomposition (MEND), a collection of small auxiliary editing networks that use a single desired input-output pair to make fast, local edits to a pre-trained model's behavior. MEND learns to transform the gradient obtained by standard fine-tuning, using a low-rank decomposition of the gradient to make the parameterization of this transformation tractable. MEND can be trained on a single GPU in less than a day even for 10 billion+ parameter models; once trained MEND enables rapid application of new edits to the pre-trained model. Our experiments with T5, GPT, BERT, and BART models show that MEND is the only approach to model editing that effectively edits the behavior of models with more than 10 billion parameters. Code and data available at https://sites.google.com/view/mend-editing.
Subfields: Artificial Intelligence, Computer Vision and Pattern Recognition, Large Language Models
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
In Artificial Intelligence
- Mohit Bansal
- Luke S. Zettlemoyer
- Percy Liang
- Jianfeng Gao
- Yejin Choi
- Hannaneh Hajishirzi
- Graham Neubig
- Noah A. Smith
In Computer Vision and Pattern Recognition
- Luc Van Gool
- Dacheng Tao
- Mohit Bansal
- Trevor Darrell
- Ming-Hsuan Yang
- Jitendra Malik
- Xiaogang Wang
- Andrew Zisserman
In Large Language Models
- Luke S. Zettlemoyer
- Yonatan Belinkov
- Yejin Choi
- Mohit Bansal
- David Bau
- Danqi Chen
- Alex Andonian
- Kevin Meng
Citations in the corpus
- Language Generation Models Can Cause Harm: So What Can We Do About It? An Actionable Survey (2022, methodology): “In a similar vein, De Cao et al. (2021); Mitchell et al. (2022) systematically edit model parameters by adding KBs to LMs trained without them, in order to revise facts memorized by the model.”
- Language Models that Seek for Knowledge: Modular Search & Generation for Dialogue and Prompt Completion (2022, methodology): “Some recent methods have also attempted to adapt knowledge through editing and tuning of language model variants (De Cao et al., 2021; Mitchell et al., 2022).”
- Memory-assisted prompt editing to improve GPT-3 after deployment (2022, background): “However, model editing approaches have to date only been demonstrated in a limited context (e.g., correcting a single error), and even then can lead to uncontrollable out-of-scope changes (Mitchell et al., 2021).”
- Locating and Editing Factual Associations in GPT (2022, methodology): “We also test two hypernetworks: Knowledge Editor (KE) (De Cao et al., 2021) and MEND (Mitchell et al., 2021), both of which learn auxiliary models to predict weight changes to G .”
- Mass-Editing Memory in a Transformer (2022, methodology): “Similarly, MEND performs well at n = 1 but rapidly declines at n = 6 , losing all efficacy before n = 1 , 000 and, curiously, having negligible effect on the model at n = 10 , 000 (the high specificity score is achieved by leaving the model nearly unchanged).”
- Do Language Models Have Beliefs? Methods for Detecting, Updating, and Visualizing Model Beliefs (2021, methodology): “Past work has focused primarily on consistency under paraphrase (Elazar et al., 2021; De Cao et al., 2021; Mitchell et al., 2021).”
- Quark: Controllable Text Generation with Reinforced Unlearning (2022, neutral): “Unlearning behavior in language models is similar to model-editing [22, 44], but for rewards rather than datapoints.”
- VQGAN-CLIP: Open Domain Image Generation and Editing with Natural Language Guidance (2022, background): “The bulk of the existing literature on this topic focuses on editing or updating existing (typically unimodal) models in both computer vision [3] and natural language processing [8, 31, 28].”
- Memory-Based Model Editing at Scale (2022, methodology): “Similarly to past work (De Cao et al., 2021; Mitchell et al., 2021; Hase et al., 2021 (2) The counterfactual model h ψ considers an edit z e and a corresponding example ( x in , y in ) ∼ I ( z e ; D e ) , and is trained to minimize the negative log likelihood of y in given z e and x in on average…”
- Ablating Concepts in Text-to-Image Diffusion Models (2023, background): “Similarly, model editing [5, 70, 19, 69, 45, 38, 40, 39] aims to modify specific model weights based on users’ instructions to incorporate new computational rules or new visual effects.”
- Can Foundation Models Wrangle Your Data? (2022, background): “Excitingly, newmethods have demonstrated that it is possible to selectively update knowledge in FMs, further demonstrating that making targeted changes to model knowledge is feasible [61].”
- Continual Learning of Large Language Models: A Comprehensive Survey (2024, unknown): “To overcome these challenges, MR is proposed to rectify the model’s errors while preserving its performance on other inputs, with only moderate computing resources [47, 74, 76, 92, 163, 164, 215].”
- Erasing Concepts from Diffusion Models (2023, background): “In text generators, a model’s knowledge of facts can be edited based on a single statement of the fact by modifying specific neurons [7] or layers [23], or by using hypernetworks [8, 24].”
- The Reversal Curse: LLMs trained on "A is B" fail to learn "B is A" (2023, methodology): “Other techniques for knowledge editing include closed-form weight updates (Meng et al., 2023; Mitchell et al., 2021; Yao et al., 2022) and hyper-networks (De Cao et al., 2021; Hase et al., 2023).”
- Improving Alignment and Robustness with Circuit Breakers (2024, unknown): “This includes research ranging from uncovering emergent interpretable structures in intermediate representations [77, 46, 10], to the identification and modification of embedded knowledge [48, 42, 43], as well as steering model outputs [66, 7, 33, 24, 65].”
- Prompting GPT-3 To Be Reliable (2022, methodology): “To assess model behavior on this front, we adopt an evaluation setup closer to recent knowledge updating literature (Cao et al., 2021; Mitchell et al., 2021).”
- Locating and Editing Factual Knowledge in GPT (2022, methodology): “Mitchell et al. (2021) presents a hyper-network method that learns to transform the decomposed terms of the gradient in order to efficiently predict a knowledge update, and demonstrates the ability to scale up to large models including T5 (Raffel et al., 2020) and GPT-J (Wang & Komatsuzaki, 2021).”
- Dissecting Recall of Factual Associations in Auto-Regressive Language Models (2023, background): “, 2022) that store factual information, which often informs editing approaches (De Cao et al., 2021; Mitchell et al., 2022; Meng et al., 2022b).”