WISE: Rethinking the Knowledge Memory for Lifelong Model Editing of Large Language Models

Large language models (LLMs) need knowledge updates to meet the ever-growing world facts and correct the hallucinated responses, facilitating the methods of lifelong model editing. Where the updated knowledge resides in memories is a fundamental question for model editing. In this paper, we find that editing either long-term memory (direct model parameters) or working memory (non-parametric knowledge of neural network activations/representations by retrieval) will result in an impossible triangle -- reliability, generalization, and locality can not be realized together in the lifelong editing settings. For long-term memory, directly editing the parameters will cause conflicts with irrelevant pretrained knowledge or previous edits (poor reliability and locality). For working memory, retrieval-based activations can hardly make the model understand the edits and generalize (poor generalization). Therefore, we propose WISE to bridge the gap between memories. In WISE, we design a dual parametric memory scheme, which consists of the main memory for the pretrained knowledge and a side memory for the edited knowledge. We only edit the knowledge in the side memory and train a router to decide which memory to go through when given a query. For continual editing, we devise a knowledge-sharding mechanism where different sets of edits reside in distinct subspaces of parameters, and are subsequently merged into a shared memory without conflicts. Extensive experiments show that WISE can outperform previous model editing methods and overcome the impossible triangle under lifelong model editing of question answering, hallucination, and out-of-distribution settings across trending LLM architectures, e.g., GPT, LLaMA, and Mistral. Code is available at https://github.com/zjunlp/EasyEdit.

Paper

References (100)

Scroll for more · 38 remaining

Similar papers

Peer review

Reviewer fviW7/10 · confidence 4/52024-07-11

Summary

Introduces a new technique, WISE, to edit/insert facts in a autoregressive language model. The proposed approach gives a balanced performance in terms of reliability, generalization, and locality; improving upon the existing methods. WISE edits facts in a side-memory that is equivalent to one of the MLP down projection layers. A router is trained to decide if a specific query should be routed to the side-memory or the corresponding layer in the main LM.

Strengths

* WISE is a novel approach that balances reliability, generalization, and locality while editing facts in a LM. * Clear motivation and solid technical contributions.

Weaknesses

Needs more clarity on some of the technical details. See the questions below.

Questions

1. The activation $\textbf{a}$ used in routing correspond to which token in the prompt? Is it the subject last token like ROME/MEMIT or the last token of the prompt like GRACE? * One of the reason GRACE achieves poor generalization is because it edits the last token of the prompt and thus very sensitive to the prompt paraphrases. The notation used in the paper suggests that WISE also uses the last token of the prompt (clarify this if I am wrong). However WISE seems to achieve an impressive generalization. Is that because the parameters of $\mathbf{W}_{v'}$ are directly edited for better routing? Also, does WISE use only one prompt $x_e$ to edit a specific fact, or does it use multiple paraphrases of $x_e$ during the training phase? 2. Parameter Overlap: Theoren 2.1 seems to counts parameter overlap as the number of parameters that are common between *all* the $k$ side-memories as $\rho^k|\mathbf{W}|$. But if a parameter is common between only two side-memories, it is also a overlap, right? And, in that case, the number overlaps would be $\Big(\binom{k}{2}\rho^2 - \binom{k}{3}\rho^3 + \binom{k}{4}\rho^4 \cdots \Big) \cdot |\mathbf{W}|= \sum_{i=2}^k (-1)^i \binom{k}{i}\rho^i \cdot |\mathbf{W}_{v'}|$. * I also didn't follow the point on the overlapping playing the role of "*anchors*" for knowledge merging, even after refering to Appendix B.5, which just restates the same point. Can you please clarify this? * I also didn't follow the claim made in line 191-192 => *"different shards of edits have different random masks, and due to the (sub)orthogonality of random masks, different shards will not conflict with each other"*. 3. Although WISE claims to be sequential (line 222), it doesn't seem to be the case, as you expect access to $n$ edits to distribute among $k$ shards (line 179-180). Or, is the loss $L_{edit}$ optimized for each of the edits sequentially? Also, how do you perform the merging if you don't have access to all the edits beforehand? If WISE was truly not done sequentially, then it should only be compared with methods that permit parallel/batch edits. 4. As you increase the number of edits $T$, do you also increase the number of sharts $k$? Or, do you always keep $k = 2$ reported in Table 9? Also since the title of the paper focuses on *Lifelong* model editing, I wonder if it is reasonable to increase $k$ rather than choosing a fixed $k$.

Rating

7

Confidence

4

Soundness

3

Presentation

3

Contribution

3

Limitations

Limitations have been adequately addressed in the paper.

Reviewer pT3T7/10 · confidence 3/52024-07-12

Summary

The paper studies the problem of editing (updating) knowledge of LLMs in a lifelong learning scenario. Authors design WISE, a multi-level memory system designed to store updates to the model. The proposed design contains of the main memory and a number of side-memories, with a mixture-of-expert-like router to choose between them. Authors also propose a procedure for merging the main (mid-term) memory into side-memories effectively committing it to the long-term memory. Authors evaluate the proposed technique on small variants of popular LLMs, achieving good average performance on ZsRE and a number of other datasets (SelfCheckGPT, Temporal). The paper also contains several side-analyses such as visualizing the router behavior, scaling to 3K edits, and speed benchmarks.

Strengths

- The problem of updating LLM parameters is important and a practical improvement in this direction can reduce the total cost of using LLMs (both economic and environmental) - The paper contains a variety of experimental configurations and baselines, including several models of different capability (and creation date), different datasets, and numerous baseline algorithms. This would normally be expected of a NeurIPS submission, but sadly, often not the case. The only possibly unexplored dimension is model size: testing with 6-7B models may not reveal some caveats that arise only in larger ones. - As a minor but helpful touch, the provided code contains clear instructions on running the code and well-defined dependency versions. This helps future researchers reproduce and build on top of this work. The paper is also generally well written and reasonably well structured, though I got the impression that authors tried to squeeze a lot of information into few pages. If this paper ends up accepted, I respectfully ask that authors reduce the total negative (vertical) space used in formatting by exiling some of the less important analyses to appendix or, if all else fails, by using the extra content page granted for the final version.

Weaknesses

I have two main concerns, though they are not significant ones. First WISE is a rather complicated system with a lot of moving parts: router type, merging strategy, main/side memory sizes, where to introduce this module into an LLM, and how many times, how best to allocate the memory size between components. Authors provide some ablation analysis (e.g. Appendix B.2 and below), but many of these ablations are missing. My second (very minor) concern is that authors experiment only with small LLMs (sic), which leaves out the possibility that WISE behaves unexpectedly with larger and higher-capability ones (at the minute of writing this, Llama-3-70B, Qwen-2-72B, Nemotron et al.).

Questions

I do not have any insightful questions, so I will instead use this section for minor comments. ### Typos, missing citations, minor concerns > L389 Malicious users may attempt to edit LLMs to propagate hate, highlighting the need … There are numerous other scenarios for a potential misuse of this technology. To name a few: censorship, particularly for non-democratic state actors misinformation, of a non-hate-inducing kind For the record: i do NOT mean that the paper requires an ethical review. Most of these attack vectors are already possible with prior work. It would be unrealistic to expect a full sister study on ethics. Fortunately, we have AI ethics researchers. > L34 should satisfy the following properties [ 14 , 15, 11 ] I believe this terminology were originally introduced earlier in Sinitsyn et al (2020) [ https://openreview.net/forum?id=HJedXaEtvS ] and De Cao et al (2021) [ https://aclanthology.org/2021.emnlp-main.522/ ], including for language models. Though the term “LLM” specifically did not exist back then. > L25 parameters, computes, and data While using “compute” as a noun is not yet well studied, I have seen it mostly used as an uncountable noun (like “data” instead of “datas”). Please use your own judgment though. > L98 (definition formula for D_edit) To the best of my knowledge, using | for nested definition of Xe,Ye is rarely used (or understood) by ML practitioners. Consider defining them separately Overall, if this paper ends up accepted, I respectfully ask that authors reduce the total negative (vertical) space used in formatting by exiling some of the less important analyses to appendix or, if all else fails, by using the extra content page granted for the final version.

Rating

7

Confidence

3

Soundness

3

Presentation

2

Contribution

3

Limitations

To the best of my knowledge, authors have sufficiently addressed the limitations of their work.

Reviewer pT3T2024-08-14

Response

I apologize for responding late and thank authors for a detailed response. Authors have answered my questions in full and suggested reasonable updates to the final version of the paper. I am keeping my score as is (7), which is to say, I recommend that the paper gets accepted.

Reviewer 5h8i6/10 · confidence 4/52024-07-14

Summary

This paper proposes WISE which uses a side memory and some model merging techniques to perform lifelong knowledge editing.

Strengths

1. The paper is well-written and easy to follow. 2. The experiments are somewhat comprehensive. 3. The paper is working on the continual editing problem, which is important.

Weaknesses

1. **Ever-expanding memory**: As mentioned in line 212-213, "One single side memory has its limited knowledge capacity". Thus, to perform lifelong knowledge editing, it seems that infinite side memories would be needed. In this sense, lifelong knowledge editing is still not solved as with limited side memories, only a limited number of edits can be performed. As the ever-expanding external memory is needed, why do we need to store all this knowledge in the memory instead of just storing the knowledge in the form of raw text and performing knowledge retrieval from this knowledge base? 2. **Experimental Results**: In the paper MEMIT [1], they scale the batch editing to 10000 examples. There are around 20000 examples in zsRE dataset. However, in the main table (Table 2) only up to 1000 edits are studied. 3. **Sequential Editing Cases**: Two possible scenarios in sequential editing are: (1) There would be conflicting knowledge overtime. For example, The president of some country may continue changing every a few years. How does WISE perform in this case compared to others? (2) Multi-hop edits as discussed in [2]. However, it seems that both of these situations are not discussed in the paper. [1] MASS-EDITING MEMORY IN A TRANSFORMER. [2] MQuAKE: Assessing Knowledge Editing in Language Models via Multi-Hop Questions.

Questions

1. **Experimental Results**: In MEMIT[1], they achieve 96.7 on Efficacy and 89.7 on Paraphrase (see Table 1) with 10,000 edits, but in Table 6, MEMIT-MASS has 0.64 in Rel. and 0.58 in Gen. under 2000 edits and 0.58 in Rel., 0.53 in Gen. under 3000 edits. What happened to the model to contribute to the discrepancy between the current results and the results reported in the paper?

Rating

6

Confidence

4

Soundness

3

Presentation

3

Contribution

3

Limitations

The limitation of ever-expanding memories may need to be mentioned in the limitation section.

Reviewer KKAN7/10 · confidence 4/52024-07-20

Summary

A fundamental question in lifelong model editing of large language models (LLMs) is where the updated knowledge should reside in the model's memory. This paper identifies an inherent challenge in editing either long-term memory (direct model parameters) or working memory (non-parametric knowledge through neural network activations/representations by retrieval). It reveals that achieving reliability, generalization, and locality simultaneously in lifelong editing settings is highly challenging in existing approaches. Editing long-term memory by directly modifying parameters can lead to conflicts with irrelevant pre-trained knowledge or previous edits, compromising reliability and locality. In contrast, retrieval-based working memory edits struggle to enable the model to understand and generalize the updates effectively. To address these challenges, this paper proposes WISE, a method designed to bridge the gap between different types of memory. WISE employs a dual parametric memory scheme, comprising a main memory for pre-trained knowledge and a side memory for edited knowledge. Edits are made exclusively in the side memory, with a router trained to determine which memory to access for a given query. For continual editing, we introduce a knowledge-sharding mechanism leveraging Ties-merging, where different sets of edits are stored in distinct parameter subspaces and subsequently merged into a shared memory without conflicts.

Strengths

The paper is easy to follow and nicely clarifies the challenges in lifelong model editing of LLMs in threefold: reliability, locality, and generalization, along with sufficient observations/analyses and references. The basis for selecting later (mid-to-late) layers for side memory duplication and training sounds reasonable, and the quantitative analysis provides a reasonable demonstration of this choice. The routing idea between long-term memory and side memory also sounds reasonable, grounded by statistical analyses. The edit knowledge (sub)-isolation via sharding with random masks is interesting and seems to be effective in alleviating the inherent limitations that merging multiple models degenerates performance due to knowledge overlap. In the end, the proposed method outperforms existing (lifelong) model editing baselines with improved versatility.

Weaknesses

During the training phase, the model requires excessive memory since it requires copying multiple side memories with the same dimensionality as the original FFN weights in the model. Though it partially alleviates this issue by omitting copying side memory for earlier layers, it still needs substantial additional capacity. Gradient masks for subspace memorization are randomly generated regardless of the density of target knowledge. It would be great if the model adaptively controls \rho according to the difficulty of incoming knowledge or information quantity.

Questions

N/A

Rating

7

Confidence

4

Soundness

3

Presentation

3

Contribution

3

Limitations

The paper appropriately addressed limitations and broader societal impacts.

Reviewer KKAN2024-08-09

Thank you for your constructive rebuttal.

The reviewer is satisfied with the authors' detailed rebuttal. I have no remaining concerns and will keep the score.

Authorsrebuttal2024-08-12

Thanks for the post-rebuttal response

Many thanks for your time, effort, and questions! We greatly appreciate your recognition of our work and are pleased to hear that we have addressed your concerns.

Reviewer fviW2024-08-12

I appreciate the authors for their detailed response. I would like to bump my rating to 7. Congratulations on your fine work!

Authorsrebuttal2024-08-12

Thanks for the post-rebuttal response

We are grateful for your efforts in engaging with our work and your support in raising your score. Your assessment has been invaluable in refining our work and clarifying the key aspects of our research. We will further improve the experiments related to random prefix tokens and clarify that WISE can perform edits sequentially in the updated version of the manuscript. Thank you once again for your time and consideration.

Reviewer 5h8i2024-08-13

Response to the rebuttal

Thank the authors for the detailed responses! I think my concerns are addressed, I have raised my score accordingly. Thanks!

Authorsrebuttal2024-08-14

Thank you note to Reviewer 5h8i

We sincerely thank you for your engagement and kind acknowledgment of our efforts to address your insightful comments. We are thrilled that your questions have been answered, and we deeply appreciate the increased score.

Program Chairsdecision2024-09-25

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC