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)|2024. 05. 23.
Model-Driven Software Engineering TechniquesComputer Science인용 수 3
한 줄 요약

WISE는 사전학습된 지식(메인 메모리)과 편집된 지식(사이드 메모리)를 분리하는 이중 파rametric 메모리 메커니즘을 제안한다. 라우터를 사용해 쿼리를 적절한 메모리로 라우팅한다. 지식 분할과 편집 간의 파라미터 병합을 통해 수명 주기 모델 편집의 신뢰성, 국소성, 일반화 능력을 향상시켜 '불가능한 삼각형'을 극복한다. 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는 사전학습된 지식을 위한 메인 메모리와 편집된 지식을 위한 사이드 메모리로 구성된 이중 파라미터 메모리를 도입한다. 여기서는 오직 사이드 메모리만 업데이트된다.
  • 라우터 네트워크를 학습시켜 의미적 유사도와 편집 관련성을 기반으로 입력 쿼리를 적절한 메모리로 동적으로 라우팅한다.
  • 계속되는 편집을 위해 WISE는 각 편집을 파라미터의 별도 서브공간에 고립시키는 지식 분할 기법을 사용한다. 이는 간섭을 방지한다.
  • 편집 후, TIES-Merging 기반 방법을 사용해 서브공간을 공유 메모리로 병합하여 모델의 일관성과 성능을 유지한다.
  • 사이드 메모리는 편집 전용 데이터로 미세조정을 통해 훈련되며, 라우터는 메인 모델과 함께 공동 최적화되어 정확한 라우팅을 보장한다.
  • 이 방법은 메인 모델의 직접적인 파라미터 편집을 피함으로써 사전학습된 지식을 유지하고 높은 국소성을 달성한다.

실험 결과

연구 질문

  • RQ1사전학습된 지식과 편집된 지식을 분리하는 이중 메모리 아키텍처가 장기 기억 또는 워킹 메모리만 편집하는 데서 오는 한계를 극복할 수 있는가?
  • RQ2장기적 모델 편집에서 신뢰성, 국소성, 일반화를 동시에 유지할 수 있는가?
  • RQ3지식 분할과 파라미터 병합을 통해 다수의 편집 간에 갈등 없는 계속되는 편집이 가능할 수 있는가?
  • RQ4라우터 기반의 메모리 라우팅 메커니즘이 암기된 편집을 초월한 일반화를 향상시킬 수 있는가?
  • RQ5이 방법은 아키텍처 수정 없이 GPT, LLaMA, Mistral과 같은 다양한 LLM 아키텍처에 적용될 수 있는가?

주요 결과

  • WISE는 ZsRE 벤치마크에서 100회의 계속되는 편집을 수행한 결과, ROME, FT-EWC, GRACE, DEFER를 포함한 기존 방법들보다 모든 세 가지 지표인 신뢰성, 국소성, 일반화에서 슈퍼리어한 성능을 보였다.
  • LLaMA-2-7B에서 WISE는 모든 세 가지 지표에서 최고 성능을 기록하여, 장기적 편집에서 '불가능한 삼각형' 문제의 해결책임을 입증했다.
  • 라우터 기반의 라우팅 메커니즘은 정확하고 동적일 수 있는 메인 메모리와 사이드 메모리 간의 선택을 가능하게 하여 편집의 국소성 향상과 간섭 감소를 이끌었다.
  • 지식 분할은 편집 간의 갈등을 방지하여, 성능 저하 없이 다수의 편집을 저장하고 병합할 수 있도록 했다.
  • 이 방법은 암기된 쿼리-타겟 쌍을 초월해, 분포 외부 및 약어화된 쿼리에서도 강력한 성능을 보였다.
  • 광범위한 실험을 통해 WISE는 GPT, LLaMA, Mistral 등 여러 LLM 아키텍처에서 효과적이며, 최소한의 아키텍처 수정으로도 기능함을 확인했다.

이 논문 읽기

누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.

누빈트에서 이 논문 읽기

이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.