Rebuilding ROME : Resolving Model Collapse during Sequential Model Editing (2024)

Abstract: Recent work using Rank-One Model Editing (ROME), a popular model editing method, has shown that there are certain facts that the algorithm is unable to edit without breaking the model. Such edits have previously been called disabling edits. These disabling edits cause immediate model collapse and limits the use of ROME for sequential editing. In this paper, we show that disabling edits are an artifact of irregularities in the implementation of ROME. With this paper, we provide a more stable implementation ROME, which we call r-ROME and show that model collapse is no longer observed when making large scale sequential edits with r-ROME, while further improving generalization and locality of model editing compared to the original implementation of ROME. We also provide a detailed mathematical explanation of the reason behind disabling edits.

## introduction large language models (llms) are expensive to train and the knowledge contained in these models gets obsolete with time. model editing or knowledge editing @xcite has recently come out as a popular method to update knowledge in large language models (llms). in this paper, we focus on one popular parameter-modifying model editing methods called rome (rank-one model editing) @xcite . rome is not only one of the most popular model editing algorithms, but is also widely used in unlearning @xcite and model interpretability @xcite literature. while a lot of model editing approaches perform well when making singular edits, editing multiple facts in a model still remains a challenge for parameter-modifying model editing methods. one way to make multiple edits to the same model is through sequential editing @xcite ) -where we make a series of single edits to a model by modifying the parameters of the model after every edit. recent works have started studying the effects of sequential editing and found that rome @xcite was prone to a sudden model collapse by a single edit @xcite @xcite . this effect was first observed in @xcite during sequential editing. the collapse included complete loss of downstream performance, inability to recall previously editing facts and loss of the ability to even get edited. such facts were named disabling edits by @xcite and were later independently observed by @xcite ; @xcite . disabling edits are detrimental for knowledge editing at scale. while a gradual model degradation is expected as we make sequential edits to a model @xcite , disabling edits lead to a sudden model collapse irrespective of when the disabling fact is edited, making sequential editing impossible. an example of this can be seen in figure 3a , where instead of allowing gradual model degradation when doing sequential editing like in figure 4 , the presence of disabling edits lead to a sudden and immediate model collapse. in this paper, we aim to find the source of these disabling edits. we first introduce two metrics for identifying disabling edits -generation entropy and the norm of matrix update. we plot edits made by rome along these two dimensions and show new ways of identifying disabling edits even when ## background facts are usually added in rome using key-value format, where a key is the vector representation of a query-phrase and the value is the vector representation of the target object. for example, when adding a new fact -"the president of usa is john cena", the query-phrase here is "the president of usa is" and the target object is "john cena". the key-vector is defined by @xcite is the activation of the first linear layer in the mlp targeted by rome: editing in rome is done using a pair of vectors -(k e , v e ) that represent a new fact being added. k e , also called the key-vector is a vector representation of the query-phrase, and v e , or the value-vector is the vector representation of the target object. the weights of the specific layer being edited in rome are updated from w 0 to ŵ by inserting a new fact (k e , v e ) using the following equation: here k(x i ⊕ p) represents the key-vector corresponding to a prefix x i being concatenated with the original query-phrase p. examples of prefixes added in rome can be seen in evaluating model editing. model editing is usually evaluated along three metrics -reliability, generalization and locality. reliability represents if a fact was successfully added in a model and is measured using edit score (es) and edit magnitude (em) metrics. es measures the portion of cases when an edited fact is more probable than the original fact post-editing, whereas em measures the difference in the probability magnitudes of the edited and original facts. generalization represents if the edited fact is recalled through paraphrases of the prompt used to edit the fact and is measured additionally, we also evaluated the model on downstream task performance as proposed by @xcite , which becomes especially important when making sequential edits to the same model. we evaluate the edited model on four tasks from the glue @xcite benchmarksentiment analysis (sst2), paraphrase detection (mrpc), natural language inference (nli) and linguistic acceptability classification for doing downstream evaluation. ## conclusion in this paper, we show that model edits made using the original implementation of rome lead to unstable model edits eventually causing model collapse. our re-implementations of rome, called r-rome (code) prevents model collapse and leads to stable and scalable model edits, thus making sequential editing possible using rome. we believe that such an improvement to the algorithm should be available to the widespread community, especially due to the potential impact and reach of rome.