Lifelong Knowledge Editing requires Better Regularization (2025)

Abstract: Knowledge editing is a promising way to improve factuality in large language models, but recent studies have shown significant model degradation during sequential editing. In this paper, we formalize the popular locate-then-edit methods as a two-step fine-tuning process, allowing us to precisely identify the root cause of this degradation. We show that model degradation occurs due to (1) over-optimization of internal activations and (2) continuous norm-growth of edited matrices. To mitigate these issues, we introduce two regularization techniques: (1) Most-Probable Early Stopping (MPES) and (2) explicit Frobenius norm-constraint. We demonstrate that applying these simple yet effective regularization techniques at key points in the editing process can substantially mitigate model degradation. Combining these regularization methods enables scaling locate-then-edit methods to 10,000 edits while reducing editing time by 42-61%. These results show that targeted regularization is essential for lifelong knowledge editing.

## introduction knowledge editing entails editing specific facts that a language model has learned during pre-training in a data and computate efficient manner @xcite . the most popular editors follow a "locate-then-edit" approach, where the methods aim to locate and update small subsets of a model's parameters that recall target facts @xcite @xcite . although these methods have shown strong results when performing singular or small-scale edits, they suffer substantial degradation when applied at scale @xcite @xcite , leaving the problem of lifelong knowledge editing largely unsolved. in this work, we systematically investigate the factors that cause model degradations and propose appropriate regularization methods to mitigate them, enabling large-scale sequential knowledge editing without sacrificing downstream performance. we begin by first formalizing locate-thenedit methods as a two-step fine-tuning process (section 4), where the first step uses gradient-descent for activation optimization, and the second step performs weight-update via a least-squares update rule. this explicit structure allows us to precisely diagnose the causes of loss of downstream performance and allows us to choose appropriate interventions. ## methods, models, and evaluation we adopt the experimental setting of alphaedit @xcite , a recent locate-then-edit method that is able to perform sequential editing for up to 3,000 facts. following their setting, we perform sequential edits in batches of 100 facts. this means that 100 facts are edited into the model with each weight update, and multiple such updates are performed sequentially. we evaluate all algorithms on three representative models -gpt2-xl @xcite , llama2-7b @xcite and llama3-8b @xcite . all experiments are performed on the counterfact @xcite and zsre @xcite datasets, which are standard knowledge editing datasets. we present the results for llama2-7b and llama3-8b on the counterfact dataset in the main paper and present the remaining results in the appendix due to space constraints. in this paper, we evaluate the editing algorithms along two dimensions -editing performance and downstream performance. the editing performance evaluates the success of the knowledge editing algorithm in making successful edits, while downstream performance evaluates the extent of model degradation following prior work @xcite @xcite . ## knowledge editing as a two-step fine-tuning process the exact layer to be edited is found via causal tracing @xcite or an empirical sweep across the model layers @xcite . only the second mlp matrix in the ffn module of the editing layer is updated @xcite , forming the first part of the editing address. meng et al. (2022a) also showed that using the output representation of the last subject token produces the best editing results, providing the second part of the address. the entire editing process is presented in figure 2 . we explain this with an example. given a fact to be edited, for example -"the capital of malaysia is singapore", the query phrase for the editing process is "the capital of malaysia is" and the target phrase is "singapore". the first part of the editing address, the exact layer whose second mlp matrix gets edited, is decided before the editing begins. the second part of the editing address is the token index of the last subject token, which in this case would be the last subword-token in "malaysia". the intermediate hidden representation of this last subject token is used to make the edit. once the editing address has been decided, instead of updating the chosen mlp weight matrix directly using gradient-descent, locate-then-edit knowledge editing proceeds in two steps. the loss function used to update the mlp weight matrix is formulated using least-squares in the form of a preservation-memorization objective @xcite : specifically, w 0 represents the initial weights of the second mlp matrix, which is being edited to ŵ . k 0 represent input to the mlp matrix for information we want to preserve from the original model, and k e is input activation vectors representing facts we want to insert into the model. v e is the target activation vector found in step 1 of editing using gradient-descent. since the above objective is linear in the argument, we do not need to use gradient-descent for optimization. thus, locate-then-edit methods can be seen as a unique type of 2-step fine-tuning method. instead of updating the mlp matrix directly using gradient-descent on the desired data, the weight update happens in two steps using two different types of objective functions for each step. the first step uses gradient-descent whereas the second step uses a closed-form solution. ## over-optimization of target activations the gradient-descent step for finding target activations as described in section 4 minimizes average cross-entropy loss for predicting the target fact for the query phrase augmented by 'n ' random prefixes. the random prefixes are supposed to represent different contexts in which the edited fact can be recalled, thus aiming to create a more general query representation @xcite . let p represent the query-phrase input to the model, o * represent the target fact to be edited into the model and x j represent random prefixes added to the query phrase. then, the gradient-descent step minimizes the following loss function: we observe that when the gradient-descent step stops in these algorithms, the intermediate target representations become over-optimized, assigning unusually high probabilities to edited facts. more specifically, the average target probability at which the gradient-descent step stops for all locate-then-end algorithms lies between 95-100%. when this target representation is used to update the the edited matrix using equation 1, the resultant edits are predicted with abnormally high probabilities. this can be seen in ## norm growth during sequential knowledge editing previous studies show that sequential knowledge editing increases the norm of the edited matrix @xcite @xcite . figure 1 illustrates this issue, highlighting the extreme norm growth in edited layers of llama3-8b using memit. here, the norms of the edited layers increase by more than 10 times, while the unedited layer remains unchanged (figure 1(b) ). furthermore, norm growth persists continuously during editing, as shown in figure 1 , for not even one edit does the norm remain constant or decrease. while the anomalous norm-growth was observed in prior work, they do not explain how it affects the general ability of the model. we answer this question by analyzing the residual stream of the model during large-scale knowledge editing. ## conclusion in this paper, we show that existing knowledge editing methods require appropriate regularization when scaled sequentially to a large number of edits. specifically, we diagnose and address two core failure modes in large-scale knowledge editing, (1) over-optimization of intermediate activations and (2) uncontrolled norm growth of edited matrices. to mitigate these, we introduce stage-specific regularization techniques in the form of "most-probable earlys stopping" (mpes) and frobenius norm-constraint, which generalize to multiple knowledge editing methods. with the combination of both these regularization methods, we are able to make 10,000 sequential edits while consistently maintaining the downstream performance levels of 22660 the unedited model.