Skip to main content
QUICK 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 Science被引用数 3
ひとこと要約

WISEは、事前学習済み知識(メインメモリ)と編集済み知識(サイドメモリ)を分離する二重パラメトリックメモリ機構を提案する。ルーターを用いてクエリを適切なメモリにルーティングする。知識のシャーディングと編集間でのパラメータマージを活用することで、信頼性、局所性、一般化性の向上を実現し、「不可能な三角形」を克服し、LLaMA、GPT、Mistralモデルにおいて先行手法を上回る性能を発揮する。

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.

研究の動機と目的

  • 効果的な継続的モデル編集のため、更新された知識が記憶されるべきメモリ領域の根本的課題に取り組む。
  • 大規模言語モデルの継続的編集における信頼性、局所性、一般化性の「不可能な三角形」を克服する。
  • 事前学習済み知識を保持しつつ、複数回の編集において効率的かつ干渉のない更新が可能なメモリ機構を設計する。
  • 構造的なメモリ階層におけるパラメトリック知識を活用することで、記憶済みのクエリ-ターゲットペアを超えた一般化を実現する。
  • アーキテクチャの変更なしに、多様なLLMアーキテクチャにおける継続的編集をサポートする。

提案手法

  • WISEは、事前学習済み知識を扱うメインメモリと、編集済み知識を扱うサイドメモリからなる二重パラメトリックメモリを導入し、更新はサイドメモリのみが対象となる。
  • ルーターネットワークを訓練して、意味的類似性と編集の関連性に基づき、入力クエリを適切なメモリに動的にルーティングする。
  • 継続的編集のため、各編集をパラメータの別々の部分空間に分離する知識シャーディング機構を採用し、干渉を防ぐ。
  • 編集後、TIES-Mergingを模倣した手法を用いて部分空間を統合し、モデルの整合性と性能を維持する。
  • サイドメモリは編集固有のデータによる微調整で学習され、ルーターはメインモデルと共同最適化され、正確なルーティングを保証する。
  • 本手法はメインモデルのパラメータを直接編集しないため、事前学習済み知識が保持され、高い局所性が実現される。

実験結果

リサーチクエスチョン

  • RQ1事前学習済み知識と編集済み知識を分離する二重メモリアーキテクチャが、長期記憶または作業記憶のみに編集を適用する制限を克服できるか?
  • RQ2継続的モデル編集が信頼性、局所性、一般化性を同時に維持できるか?
  • RQ3知識シャーディングとパラメータマージにより、複数回の編集において干渉のない継続的編集が可能になるか?
  • RQ4ルーターに基づくメモリルーティング機構が、記憶済みの編集を超えた一般化を向上させるか?
  • RQ5本手法がGPT、LLaMA、Mistralなどの多様なLLMアーキテクチャに、アーキテクチャの変更なしに適用可能か?

主な発見

  • WISEは、ZsREベンチマークにおける100回の継続的編集において、信頼性、局所性、一般化性の3つの指標すべてで、R和平、FT-EWC、GRACE、DEFERといった先行手法を上回る性能を発揮した。
  • LLaMA-2-7Bでは、3つの指標すべてで最高の性能を達成し、継続的編集における「不可能な三角形」の解決を示した。
  • ルーターに基づくルーティング機構により、メインメモリとサイドメモリ間の正確かつ動的な選択が可能となり、編集の局所性が向上し、干渉が低減された。
  • 知識シャーディングにより、編集間の干渉が防止され、複数の編集が性能劣化なしに保存・統合可能となった。
  • 本手法は記憶済みのクエリ-ターゲットペアを超えて一般化し、分布外や言い換えられたクエリに対しても優れた性能を示した。
  • 広範な実験により、GPT、LLaMA、Mistralなどの複数のLLMアーキテクチャにおいて、最小限のアーキテクチャ変更でWISEの有効性が確認された。

この論文を読む

Nubintのビューアで原文を開き、読みながら気になる箇所をすぐに質問できます。

Nubintでこの論文を読む

このレビューはAIが論文の原文をもとに作成しました。引用する前に原文をご確認ください。