Skip to main content
QUICK REVIEW

[논문 리뷰] MemoryBank: Enhancing Large Language Models with Long-Term Memory

Wanjun Zhong, Lianghong Guo|arXiv (Cornell University)|2023. 05. 17.
AI in Service Interactions인용 수 15
한 줄 요약

MemoryBank는 LLM을 위한 장기 기억 메커니즘을 도입하여 기억 저장, 검색 및 업데이트를 가능하게 하며, 에빙하우스 망각 곡선에서 영감을 얻었습니다. 과거 상호작용을 기억하고 사용자 성격에 적응하는 AI 동반자 SiliconFriend를 통해 개방형/폐쇄형 모델에서 시연됩니다.

ABSTRACT

Revolutionary advancements in Large Language Models have drastically reshaped our interactions with artificial intelligence systems. Despite this, a notable hindrance remains-the deficiency of a long-term memory mechanism within these models. This shortfall becomes increasingly evident in situations demanding sustained interaction, such as personal companion systems and psychological counseling. Therefore, we propose MemoryBank, a novel memory mechanism tailored for LLMs. MemoryBank enables the models to summon relevant memories, continually evolve through continuous memory updates, comprehend, and adapt to a user personality by synthesizing information from past interactions. To mimic anthropomorphic behaviors and selectively preserve memory, MemoryBank incorporates a memory updating mechanism, inspired by the Ebbinghaus Forgetting Curve theory, which permits the AI to forget and reinforce memory based on time elapsed and the relative significance of the memory, thereby offering a human-like memory mechanism. MemoryBank is versatile in accommodating both closed-source models like ChatGPT and open-source models like ChatGLM. We exemplify application of MemoryBank through the creation of an LLM-based chatbot named SiliconFriend in a long-term AI Companion scenario. Further tuned with psychological dialogs, SiliconFriend displays heightened empathy in its interactions. Experiment involves both qualitative analysis with real-world user dialogs and quantitative analysis with simulated dialogs. In the latter, ChatGPT acts as users with diverse characteristics and generates long-term dialog contexts covering a wide array of topics. The results of our analysis reveal that SiliconFriend, equipped with MemoryBank, exhibits a strong capability for long-term companionship as it can provide emphatic response, recall relevant memories and understand user personality.

연구 동기 및 목표

  • 현 LLM의 장기 기억 부족 문제를 해결하고 AI 동반자 및 개인 비서와 같은 지속적인 상호작용을 개선한다.
  • 메모리를 저장, 검색, 업데이트하고 사용자 프로필을 구축하는 기억 증강 프레임워크를 제공한다.
  • 오픈소스와 클로즈드소스 LLM 모두에서 일반화 가능성과 영어/중국어 이중 언어 능력을 입증한다.
  • 심리적 대화 데이터를 활용하여 공감 능력과 기억 회고를 향상시키는 실용적 구현(실리콘프렌드)을 보여준다.

제안 방법

  • MemoryBank를 기억 저장, 기억 검색기, 기억 업데이트기로 구성된 형태로 제안한다.
  • FAISS를 이용한 이중-타워 밀집 인출 구조를 사용하여 인코딩된 기억 항목으로부터 효율적으로 기억을 검색한다.
  • 에빙하우스 유래의 망각 곡선을 따른 기억 업데이트 모델링에서 기억 강도 S는 이산적이고 기억 소멸 t는 회상 시 재설정된다.
  • 상세한 다회 대화, 일일 사건 요약, 진화하는 사용자 성격을 계층적 기억 구조에 저장한다.
  • 일일/전역 이벤트 요약과 성격 인사이트 생성을 위한 프롬프트를 활용해 사용자 프로필을 형성한다.
  • 오픈 소스 모델(ChatGLM, BELLE)과 클로즈드 소스 모델(ChatGPT) 간의 통합을 시연하고, 오픈 모델에서 LoRA를 사용한 매개변수 효율적 튜닝을 적용한다.

실험 결과

연구 질문

  • RQ1LLM에 지속 가능한 기억을 부여하여 장기 상호작용을 지원할 수 있는가?
  • RQ2기억 저장/검색/업데이트 파이프라인이 AI 동반자의 회상, 일관성 및 개인화를 향상시킬 수 있는가?
  • RQ3MemoryBank가 오픈소스와 클로즈드 소스 LLM 및 이중 언어 설정과 호환되는가?
  • RQ4심리 대화 데이터를 활용한 튜닝이 공감적이고 지지적인 응답을 향상시키는가?

주요 결과

LanguageModelRetrieval Acc.CorrectnessCoherenceRanking
EnglishSiliconFriend ChatGLM0.8090.4380.680.498
EnglishSiliconFriend BELLE0.8140.4790.5820.517
EnglishSiliconFriend ChatGPT0.7630.7160.9120.818
ChineseSiliconFriend ChatGLM0.840.4180.4280.51
ChineseSiliconFriend BELLE0.8560.6030.5620.565
ChineseSiliconFriend ChatGPT0.7110.6550.6750.758
  • MemoryBank와 함께한 SiliconFriend는 기억 회상과 공감적 응답을 포함한 강력한 장기적 동반능력을 보인다.
  • 메모리 검색 정확도와 일관성은 SiliconFriend 변형에서 향상되며, 영어 및 중국어 맥락에서 ChatGPT가 최상의 결과를 보인다.
  • 15명의 가상 사용자를 대상으로 10일 간의 시뮬레이션 대화를 통한 정량 분석에서 과거 제안 및 사건(예: 힙 정렬 예시)을 기억 탐침 중에 회상하는 것을 시연한다.
  • SiliconFriend 변형은 영어 및 중국어 데이터에서 높은 검색 정확도와 강한 모델 랭킹을 보이며, 언어에 따른 성능 차이가 존재한다.
  • 프레임워크는 오픈소스(ChatGLM, BELLE) 및 클로즈드 소스(ChatGPT) 모델 모두에서 작동하여 일반화 가능성을 보여준다.

더 나은 연구,지금 바로 시작하세요

연구 설계부터 논문 작성까지, 연구 시간을 획기적으로 줄여보세요.

카드 등록 없음 · 무료 플랜 제공

이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.