Better Call SAUL : Fluent and Consistent Language Model Editing with Generation Regularization (2024)

Abstract: To ensure large language models contain up-to-date knowledge, they need to be updated regularly. However, model editing is challenging as it might also affect knowledge that is unrelated to the new data. State-of-the-art methods identify parameters associated with specific knowledge and then modify them via direct weight updates. However, these locate-and-edit methods suffer from heavy computational overhead and lack theoretical validation. In contrast, directly fine-tuning the model on requested edits affects the model’s behavior on unrelated knowledge, and significantly damages the model’s generation fluency and consistency. To address these challenges, we propose SAUL, a streamlined model editing method that uses sentence concatenation with augmented random facts for generation regularization. Evaluations on three model editing benchmarks show that is a practical and reliable solution for model editing outperforming state-of-the-art methods while maintaining generation quality and reducing computational overhead.

## introduction large language model (llms) have been shown to implicitly store factual knowledge in their parameters @xcite . however, since our world is changing, facts can become obsolete or incorrect. thus, there is the need for model editing, i.e., updating or fixing incorrect knowledge stored in llms without disrupting their overall functionality, in particular, leaving unrelated knowledge unchanged and keeping their generation quality on a high level. the state-of-the-art model editing strategy is locate-and-edit @xcite . it first identifies the location of knowledge inside the llms, and then directly modifies the weights it identified. while effective in practice, it requires significant computational overhead @xcite , and relies on an the locality hypothesis of factual knowledge @xcite . in contrast, finetuning on requested edits is straightforward and agnostic to model architectures. however, naive fine-tuning has been shown to adversely affect the model's behavior on unrelated facts and impair the fluency and consistency of the model's generation @xcite @xcite . to overcome these challenges, we propose saul, a novel fine-tuning approach that uses sentence concatenation with augmented random facts for generation regularization. augmenting random facts effectively preserves the model's knowledge of unrelated facts. in addition, concatenating the target factual sentence with a random factual sentence prevents the overfitting on the target token(s). this effectively avoids the generation of disfluent sentences -as shown in figure 1 . we evaluate our approach on three model editing benchmarks. the results demonstrate that saul not only outperforms existing state-of-the-art meth-ods in terms of model editing performance but also effectively preserves the fluency and consistency of the model's outputs. this makes our method both simple and efficient, providing a viable solution for practical and reliable model editing in llms. ## related work model editing is a targeted approach to updating the knowledge stored in llms. existing works can be categorized as follows: (1) fine-tuning is a simple and straightforward way to update model's knowledge. however, it often affects model's behavior on unrelated knowledge and can degrade the model's generation quality. (2) memory-based methods introduce an external memory unit for requested edits and employ a retriever to extract the most relevant facts for model editing @xcite @xcite . recent work @xcite proposes a straightforward fine-tuning-based model editing method with data augmentation, showing competitive performance, but leading to unexpected generation failures. in contrast, we propose generation regularization, combined with data augmentation, which achieves state-of-the-art model editing performance while preserving the model's generation quality. our method ensures that the edited model retains its ability to generate coherent and fluent text, making it broadly applicable in real-world applications. ## method we propose saul, a novel model editing method that regularizes the model's generation via sentence concatenation with augmented random facts. model editing problem definition. llms have been shown to memorize factual knowledge @xcite @xcite . we consider a fact to be a sentence x i that describes a subject-relation-object triple (s i , r i , o i ) in natural language. a model f θ should recall the object o i given given a natural language prompt pr @xmath0, r i ) consisting the subject s i and relation r i . we focus on mass-editing, i.e., editing a set of multiple facts at once. given the set of requested edits @xmath1, r i , o i )} n @xmath2, model editing aims to alter the model's behavior for facts within the editing scope x e , which encompasses e along with its equivalence neighborhood n (e), while leaving its knowledge for out-of-scope examples, i.e. (s i , r i , o i ) / ∈ x e , unchanged. naive fine-tuning for model editing. for a set of edits e, fine-tuning-based methods optimize the conditional likelihood of the target object given subject s i and relation r i of the fact formulated as a natural language prompt pr i : ## experimental setup datasets and baselines. we evaluate saul and related methods on three datasets: counterfact @xcite , zsre @xcite , and wikirecent @xcite . 3 we include the following baselines: mend @xcite ) -a hypernetwork-based method; rome @xcite and memit @xcite ) -locate-and-edit methods; ft and ft+r+p @xcite -fine-tuning without and with data augmentation, respectively. 4 please refer to appendix a.3 for 3 details of these dataset are provided in appendix a.1 4 r: random augmentation, p: paraphrase augmentation. a comparison between these gradient-based methods and the parameter-free in-context knowledge editing method (ike) @xcite . training details. we follow the mass-editing setting as in @xcite ; @xcite . for each edit, we augment n r unrelated true facts provided by @xcite for sentence concatenation. we fine-tune all model layers of gpt-j 6b @xcite and compare different fine-tuning paradigms in section 5. ## results and analysis overall results. as shown in in ablation study: fine-tuning paradigms. we compare naive fine-tuning (no augmentation) and saul on different layers of gpt-j and using lora for parameter-efficient fine-tuning. our selection of fine-tuning layers is based on conclu-sions from previous locate-and-edit works: meng et al. (2022a) find that fine-tuning the 21st layer of gpt-j yields the best performance, while @xcite identify layers 3 to 8 as the most critical layers for factual recall. the experimental results in ## conclusion in this work, we proposed saul, a novel finetuning method to address the challenges of preserving unrelated knowledge in llms and maintaining high generation quality during model editing. to achieve this, saul regularizes the generation process through sentence concatenation with augmented random facts. our evaluation on three benchmark datasets demonstrated that saul outperforms state-of-the-art methods while maintaining generation quality and reducing computational overhead. consequently, saul offers an efficient and practical solution for model editing in llms.