DU n E : Dataset for Unified Editing (2023)

Abstract: Even the most advanced language models remain susceptible to errors necessitating to modify these models without initiating a comprehensive retraining process. Model editing refers to the modification of a model’s knowledge or representations in a manner that produces the desired outcomes. Prior research primarily centered around editing factual data e.g. “Messi plays for Inter Miami” confining the definition of an edit to a knowledge triplet i.e. (subject, object, relation). However, as the applications of language models expand, so do the diverse ways in which we wish to edit and refine their outputs. In this study, we broaden the scope of the editing problem to include an array of editing cases such as debiasing and rectifying reasoning errors and define an edit as any natural language expression that solicits a change in the model’s outputs. We are introducing DUnE, an editing benchmark where edits are natural language sentences and propose that DUnE presents a challenging yet relevant task. To substantiate this claim, we conduct an extensive series of experiments testing various editing approaches to address DUnE, demonstrating their respective strengths and weaknesses. We argue that retrieval-augmented language modeling can outperform specialized editing techniques and neither set of approaches has fully solved the generalized editing problem covered by our benchmark.

## introduction amidst the rapid adoption of language modeling technologies in user-facing applications 1 , the imperative to repair and rectify the issues in model outputs appears as an emerging concern @xcite . among the issues that arise in model generations are factual errors @xcite , reasoning failures @xcite , arithmetic mistakes @xcite , unsafe outputs @xcite , hallucinations @xcite , outdated 1 https://chat.openai.com/ information @xcite and outputs that contain biased or toxic text @xcite . model editing or simply editing is the suite of approaches which alter the model such that a desired change is reflected in the outputs without affecting its representations beyond the scope of the target change. for example, after a model's knowledge is edited for the fact that 13 plus 62 is 75, the correct answer to the question "what is 13 plus 62?" is "75" and "the first basket has 13 apples and the second has 62, how many apples are there in total?" should also be "75", however "approximately, how many apples are there in 100 lbs?" should not be affected. while the humans possess the ability to com-prehend natural language feedback and enhance their performance based on that information, prior approaches to the editing problem confined its definition to editing relational information and format to semantic triplets e.g. (joe biden, president of, us) @xcite @xcite . in the era of large language models, relational triplets are no longer required to convey information to the model as these models do understand natural language feedback and instructions @xcite @xcite . therefore, we propose natural language as a unifying medium for edits; not only any semantic triplet can be expressed in natural language, many other user requests that entail changes in the model behavior can also be expressed as free-form text (e.g. 13+62=75) allowing all such use cases to be studied under the general editing problem (see fig. 1 ). however, existing benchmarks are limited to encyclopedic information, focusing solely on factual content editing @xcite @xcite or style matching @xcite . in this work, we introduce dune (dataset for unified editing), a meticulously curated dataset combining automated curation and human vetting to serve as a benchmark for evaluating editing techniques. dune encompasses a wide range of editing scenarios across four domains, namely rectifying reasoning errors, correcting arithmetic mistakes, introducing new information, and mitigating bias. each individual edit within dune is represented as a free-form text that prompts a necessary change in the model's behavior. definition 1. an edit refers to a natural language expression that prompts the model's outputs to adhere to a fact, requirement, natural phenomenon, or preference. each edit in dune is accompanied with a set of edit queries that evaluate if the given edit is correctly manifested in model outputs. dune is designed to be model-agnostic: it is not built on a set of errors that a specific model makes, instead edits contain information which helps the model perform better in answering edit queries when used effectively. definition 2. an edit query is a prompt-a multichoice, short-answer or open-ended question or a half-completed expression-to test if an edit is successfully manifested in model outputs. in this work, in addition to fine-tuning, we evaluate the existing retrieval-augmented editing techniques that can effectively operate on large language models. in order to ensure accurate comprehension of edit queries and well-formatted outputs, our analysis focuses exclusively on instructiontuned language models including bard, flan-t5 models, llama-2-chat @xcite , gpt-3.5 and gpt-4 @xcite @xcite . we argue that despite increased requirements for training and labeled data, specialized editing techniques do not consistently scale beyond simple retrieval, blurring the lines between editing and retrieval-based language modeling. we additionally find that providing groundtruth edits in the context (as instructions) does not guarantee perfect score in edit queries as language models struggle to follow them-hinting at a need for a universal editing solution that scales beyond simple instruction-following. in summary, this work: we release dune publicly. foot_0 ## related work previous model editing approaches fall into two broad categories: methods that alter model architecture including updating its parameters (intrinsic) and methods that introduce edits in the input or output spaces (extrinsic). ## dune dune embodies edit requests in natural language across four domains: scientific reasoning, arithmetic reasoning, introducing novel information about recent events and debiasing. the evaluation set is comprised of 951 unique edits and a total of 10,129 queries. dune contains two types of queries: edit queries to evaluate successful applications of edits and locality queries to ensure that an editing procedure does not damage performance beyond the scope of an edit. we also release a small set of training examples for training auxiliary modules, if needed, as part of an editing technique (see serac in section 4.1 for an example usage). statistics for evaluation and training sets are provided in ## experiments we evaluate an editing technique by comparing its performance on dune before and after applying an edit. the first lines (before-editing) in section 4.1 present the result before applying any edits. each subsequent line should be evaluated based on relative improvement over before editing. we test different editing techniques on three of the most commonly used proprietary large language models gpt-3.5 (gpt-3.5-turbo), gpt-4 (gpt-4), bard @xcite , one open-source model llama-2-7b-chat along with the flan-t5 suite of models ranging from 80m to 11b parameters. foot_2 ## discussion closing the gaps our results suggest that there are two performance gaps: (1) difference between a retrieval-based editing technique and gold edit-in-context, (2) the gap between gold edit-in-context and the perfect score of 100%. while the former can be addressed by better retrieval, it is worth noting that retrieval may become challenging as the memory of edits grows such that the edits become inconsistent. the latter gap necessitates devising editing techniques that can interpret natural language edits and manifest them in model outputs better than prepending the input, all while ensuring sustained performance in locality examples. editing with scaling considering flan-t5 models, scaling i.e. increasing the size of the model is useful in improving especially in arithmetic reasoning, but also for scientific reasoning and adding new information. on the contrary, bias increases with scale in the flan models but is typically the lowest in gpt and llama models. however, we find llama unhelpful in addressing locality queries. editing proprietary vs public models proprietary models perform better off the bat i.e. before-editing across the domains we consider. despite initial low accuracy, flan-t5-xxl is notably good at interpreting the in-context edits than llama when it comes to adding new information, arithmetic and scientific reasoning. we find flan-t5 models subpar when it comes to interpreting debiasing edits. the number of edits in retrieval we increase the number of edits we place in the context up to 16 for serac and bm25 which results in increased accuracy for both methods (see figs. 9 and 10 in appendix e). in arithmetic reasoning, serac does not benefit from increasing the edits beyond four whereas accuracy keeps rising for bm25 with diminishing gains. moreover, when learning new information, accuracy using bm25 increases for an additional 4% but accuracy using serac drops slightly with the increasing number of edits. ## conclusion in light of large language models' potential to interpret language feedback, we broaden the scope of model editing. our approach involves the release of an extensive editing dataset encompassing a wide range of editing scenarios. by adopting a holistic view of the editing problem, we demonstrate that tasks previously regarded as separate can now be addressed simultaneously. we show that retrieval-augmented language modeling can surpass the effectiveness of specific editing techniques. however, it is important to note that both techniques have yet to fully address the generalized editing problem, as outlined by our benchmark.