Towards a Principled Evaluation of Knowledge Editors (2025)

Abstract: Model editing has been gaining increasing attention over the past few years. For Knowledge Editing in particular, more challenging evaluation datasets have recently been released. These datasets use different methodologies to score the success of editors. Yet, it remains under-explored how robust these methodologies are and whether they unfairly favor some editors. Moreover, the disruptive impact of these editors on overall model capabilities remains a constant blind spot.We address both of these problems and show that choosing different metrics and evaluation methodologies as well as different edit batch sizes can lead to a different ranking of knowledge editors. Crucially we demonstrate this effect also on general language understanding tasks evaluated alongside the knowledge editing tasks. Further we include a manual assessment of the string matching based evaluation method for knowledge editing that is favored by recently released datasets, revealing a tendency to produce false positive matches.

## introduction pre-trained language models have been demonstrated to perform well on a wide variety of nlp tasks and applications even without the need for specific fine-tuning @xcite . nonetheless, researchers have sought to adjust models to their specific needs even outside of the fine-tuning paradigm. continual learning focuses on the need to update models beyond their training cutoff date or to adapt them to new domains without the need for full re-training @xcite . retrieval-augmented generation (rag) is being used to improve performance on domain-specific or knowledge-intensive tasks or to reduce the number of "hallucinations" language models produce @xcite . building on these techniques, model editing has emerged as an independent research direction. in principle, model editing is agnostic to the specific method used to adjust model behavior. it defines targeted local changes to the desired model outputs, such as correcting specific errors, updating individual pieces of knowledge or the sentiment towards specific entities @xcite @xcite . the techniques used to effectuate these desired changes include the training of hyper-networks @xcite , explicitly calculated parameter updates @xcite , and in-context learning @xcite . the latter is closely related to rag since in in-context learning, natural language expressions of the knowledge are prepended to the model prompts. these injected sentences may, in turn, be retrieved from some external knowledge store. knowledge editing, where new knowledge (often given by relation triplets ⟨subject, relation, ob-ject⟩) is injected into the model, is the most common but not the only variant of model editing. any targeted and local updates to model behavior could be subsumed under model editing, including, for example also such topics as unlearning, where specific pieces of private or harmful information should not be produced by the model @xcite . research gaps and our objectives. our experiments are primarily focused on knowledge editing. previous work has established four datasets for the evaluation of knowledge editors: zsre @xcite , counterfact @xcite , mquake @xcite , and rippleedits @xcite . these datasets include different types of queries to test for the efficacy and locality of edits as well as the ability of models to draw inferences from edited knowledge. but they also use different methods and metrics to score whether edited models are successful at effecting the desired edits. specifically, zsre classifies token by token, whether greedy decoding produces the desired output, counterfact uses a ranking of alternative answers by sequence log likelihoods, and mquake and rippleedits test if target strings match within text generated in answer to query prompts. so far, the impact of these evaluation methods has not been analysed. our experiments show that one of the editors we tested, memit @xcite , does better than other editors, specifically when it is evaluated based on the ranking of alternative sequence log likelihoods. while the evaluation by matching expected answers in generated query responses is favored by more recently released datasets, the validity of this method and where it fails also remains under-explored. secondly, it seems evident that the more edits an editor has to inject into a model, the more difficult this task becomes and the more disruptive the editing is for the overall model performance. while some editors are designed specifically to inject a large number of edits, including the aforementioned memit editor, the relationship between the number of edits and the changes in model performance deserve a more systematic study. in particular, where it concerns not only the knowledge editing performance, but also the retention of overall model capabilities. we demonstrate this gap by evaluating editors on a wide range of edit batch sizes and by integrating knowledge editing datasets with lm evaluation harness @xcite to run general language understanding tasks on edited models alongside the knowledge editing evaluation. contributions. in this study, we aim to demonstrate the influence of possible design choices on the outcomes of knowledge editing benchmarks (and evaluation setups). we focus on making the effects of these choices more explicit over evaluating the exact ranking of specific model editing methods. we hope our findings may support more informed evaluation practices and encourage further research in this area. together with our research, we also release the evaluation framework used in our experiments as open source. it combines the four mentioned existing knowledge editing datasets into a unified framework, integrates with lm evaluation harness to allow for the evaluation of edited models on its tasks, and can easily be extended with support for additional models, evaluation datasets, and model editors. foot_0 ## background while the framework we use for our experiments can be used for different types of model editing, our experiments are focused on the evaluation of knowledge editing methods. exact formalisms vary, but generally, knowledge editing is defined along the following lines: assuming a model @xmath0, θ) with trained parameters θ, we are given a set of revisions ⟨x, y, a⟩ ∈ d, where x is some model input, y is the output preferred by f (x, θ) and a is the post-edit output we would like the model to prefer instead. additionally, for evaluation, a revision ⟨x, x, y, a⟩ may contain a set x of inputs x ′ , x ′′ , ... that are semantically equivalent to @xcite . knowledge editors were originally evaluated on three metrics @xcite . assuming an edit ⟨x 1 , x 1 , y 1 , a 1 ⟩ ∈ d: reliability: the post edit model predicts the output a 1 given input x 1 . locality: for unrelated entries ⟨x i , y i , a i ⟩ ∈ d the model continues to predict y i given input x i . generalizability: the model also predicts a 1 given a semantically equivalent input x ′ 1 ∈ x 1 . ## scoring and metrics the datasets mentioned in section 2.1 do not only use different types of test queries to test for reliability, locality, generalizability, multi-hop reasoning, and other types of inferences, they also use different methods to score whether a model produces the correct post-edit output. argmax: in zsre, each test case comes with a prompt and a desired target string. in evaluation, it is then tested, token by token, whether each token of the target string is assigned the highest probability, i.e., if it would be produced by greedy decoding. the score for the test case is the average over this binary decision, i.e., an accuracy score of 0.75, if 3 out of 4 target tokens are assigned maximum logits. mc: in counterfact, each test case prompt has an original and a new post-edit target because each edit fact is counterfactual, replacing a true target by a supposed new edit target. test cases are then treated as a multiple choice task. the likelihood of the entire sequence is scored both with the original and the new target and a test case is counted as a success if the new target sequence is scored as more likely by the edited language model. generate: mquake and rippleedits provide original as well as new targets only for edit facts but not for test cases. instead, each fact and test case also has a number of aliases for the post edit target. test cases are scored by generating a fixed number of tokens for each test case prompt and by checking if any of the new target aliases are contained in the generated text. firstly, while argmax and generate can be used with all four datasets, only counterfact consistently contains the answer alternatives required for a multiple choice evaluation. however, so far, it remains unclear if these different evaluation methods produce the same results or if it would be feasible to use the same method for all datasets. secondly, with the length of the generated text, the generate method includes a critical hyperparameter that has to be tuned appropriately. conceivably, in some cases, a model may require more tokens to produce an answer containing the target string. but equally, a longer generated answer may increase the rate of false positive matches. ## conclusion our first set of inquiries concerned the choice of evaluation methods and metrics for comparing different model editors. our experiments show that one has to be mindful of the chosen methods as the multiple choice evaluation on counterfact, for example, appears to favor memit over other editors. testing whether post-edit models generate the desired outputs with exact string matching has perhaps the highest intrinsic validity. where lan-guage models are deployed to generate text, model editors have to bring the models to generate the post-edit content. while it may also be useful to explore approximative string matching methods, at least in our evaluation, the false negative rate for exact string matching was very low. however, as the length of generated text increases beyond 30 tokens, the false positive rate does start to increase. using an llm-as-a-judge approach may be a better alternative in such cases. recent work has highlighted the strength of incontext learning as a technique for model editing, in particular for multi-hop reasoning and more challenging editing tasks @xcite . however, the side effects of these editors remain under-explored. catastrophic forgetting is a risk not only in continual learning but also in model editing. our experiments show that the tasks lambada and hellaswag can be useful for controlling the performance on knowledge editing datasets. in particular, for large numbers of edits, memit showed itself to be competitive on knowledge editing datasets while being less disruptive on our control tasks. though on smaller numbers of edits and when evaluated with the generate method, it was outperformed by in context learning based editors. an even wider evaluation of the general performance of post-edit models still seems desirable. lastly, the relationship between the edit batch size and the performance on knowledge editing and control tasks appears to be mostly monotonous, with the exception of the performance increase for the context-retriever on large edit batch sizes. it seems to suffice to test a few edit batch sizes, though future work should consider even larger edit batch sizes to determine if the trends we observed continue.