Skip to main content
QUICK REVIEW

[Paper Review] WISE: Rethinking the Knowledge Memory for Lifelong Model Editing of Large Language Models

Peng Wang, Zexi Li|arXiv (Cornell University)|May 23, 2024
Model-Driven Software Engineering TechniquesComputer Science3 citations
TL;DR

WISE proposes a dual parametric memory mechanism that separates pretrained knowledge (main memory) from edited knowledge (side memory), using a router to route queries to the appropriate memory. It enables lifelong model editing with improved reliability, locality, and generalization—overcoming the 'impossible triangle'—by using knowledge sharding and parameter merging across edits, outperforming prior methods on LLaMA, GPT, and Mistral models.

ABSTRACT

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.

Motivation & Objective

  • To address the fundamental challenge of where updated knowledge should reside in memory for effective lifelong model editing.
  • To overcome the 'impossible triangle' of reliability, locality, and generalization in continual editing of large language models.
  • To design a memory mechanism that preserves pretrained knowledge while enabling efficient, conflict-free updates across multiple edits.
  • To enable generalization beyond memorized query-target pairs by leveraging parametric knowledge in a structured memory hierarchy.
  • To support continual editing across diverse LLM architectures without architectural modifications.

Proposed method

  • WISE introduces a dual parametric memory: a main memory for pretrained knowledge and a side memory for edited knowledge, with only the side memory being updated.
  • A router network is trained to dynamically route input queries to the appropriate memory based on semantic similarity and edit relevance.
  • For continual editing, WISE employs a knowledge-sharding mechanism that isolates each edit in a distinct subspace of parameters to prevent interference.
  • After editing, subspaces are merged into a shared memory using a TIES-Merging-inspired method to maintain model coherence and performance.
  • The side memory is trained via fine-tuning with edit-specific data, while the router is jointly optimized with the main model to ensure accurate routing.
  • The approach avoids direct parameter editing of the main model, preserving pretrained knowledge and enabling high locality.

Experimental results

Research questions

  • RQ1Can a dual memory architecture that separates pretrained and edited knowledge overcome the limitations of editing only long-term or working memory?
  • RQ2How can lifelong model editing maintain reliability, locality, and generalization simultaneously?
  • RQ3Can knowledge sharding and parameter merging enable conflict-free continual editing across multiple edits?
  • RQ4Does a router-based memory routing mechanism improve generalization beyond memorized edits?
  • RQ5Can this method be applied across diverse LLM architectures like GPT, LLaMA, and Mistral without architectural changes?

Key findings

  • WISE outperforms existing methods—including ROME, FT-EWC, GRACE, and DEFER—across all three metrics: reliability, locality, and generalization on the ZsRE benchmark with 100 continual edits.
  • On LLaMA-2-7B, WISE achieves the highest performance in all three metrics, demonstrating a solution to the 'impossible triangle' in lifelong editing.
  • The router-based routing mechanism enables accurate and dynamic selection between main and side memory, improving edit localization and reducing interference.
  • Knowledge sharding prevents conflict between edits, allowing multiple edits to be stored and merged without performance degradation.
  • The method generalizes beyond memorized query-target pairs, showing strong performance on out-of-distribution and paraphrased queries.
  • Extensive experiments confirm WISE's effectiveness across multiple LLM architectures, including GPT, LLaMA, and Mistral, with minimal architectural changes.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.