# MemoryBank: Enhancing Large Language Models with Long-Term Memory

**Authors:** Wanjun Zhong, Lianghong Guo, Qiqi Gao, He Ye, Yanlin Wang  
**arXiv:** [2305.10250](https://arxiv.org/abs/2305.10250)  
**Date:** 2023-05-17  
**Summary page:** https://www.summarizepaper.com/en/paper/2305.10250v3/

## Key points

- Revolutionary advancements in Large Language Models (LLMs) have transformed interactions with AI systems
- Limitation of absence of long-term memory mechanism in LLMs, particularly evident in sustained engagement scenarios
- MemoryBank proposed as a memory mechanism enhancement for LLMs by Wanjun Zhong, Lianghong Guo, Qiqi Gao, He Ye, and Yanlin Wang
- MemoryBank enables access to relevant memories, continuous evolution through ongoing updates, understanding user personalities, and mimicking anthropomorphic behaviors
- Incorporates memory updating mechanism inspired by Ebbinghaus Forgetting Curve theory for selective forgetting or reinforcement of memories
- Versatile to accommodate both closed-source models like ChatGPT and open-source models like ChatGLM
- Practical application demonstrated through SiliconFriend chatbot development for long-term AI Companion scenario with heightened empathy in interactions
- Research methodology includes qualitative analysis using real-world user dialogs and quantitative analysis involving simulated dialogs showcasing empathetic responses, memory recall, and understanding user personalities

## Summary

In the realm of artificial intelligence, revolutionary advancements in Large Language Models (LLMs) have significantly transformed our interactions with AI systems. However, a notable limitation persists - the absence of a long-term memory mechanism within these models. This deficiency becomes particularly apparent in scenarios that require sustained engagement, such as personal companion systems and psychological counseling. To address this gap, a team of researchers led by Wanjun Zhong, Lianghong Guo, Qiqi Gao, He Ye, and Yanlin Wang has proposed MemoryBank: a groundbreaking memory mechanism specifically designed for LLMs. MemoryBank serves as a pivotal enhancement for LLMs by enabling them to access relevant memories, continuously evolve through ongoing memory updates, understand user personalities by synthesizing information from past interactions and mimic anthropomorphic behaviors. One key feature of MemoryBank is its incorporation of a memory updating mechanism inspired by the Ebbinghaus Forgetting Curve theory. This mechanism allows the AI to selectively forget or reinforce memories based on factors such as time elapsed and the significance of the memory itself, thereby creating a more human-like memory system. Moreover, MemoryBank exhibits versatility in accommodating both closed-source models like ChatGPT and open-source models like ChatGLM. The researchers demonstrate the practical application of MemoryBank through the development of an LLM-based chatbot named SiliconFriend in a long-term AI Companion scenario. By fine-tuning SiliconFriend with psychological dialogs, the chatbot displays heightened empathy in its interactions. The research methodology includes qualitative analysis using real-world user dialogs and quantitative analysis involving simulated dialogs where ChatGPT simulates users with diverse characteristics to generate long-term dialog contexts covering various topics. The results of these analyses showcase that SiliconFriend equipped with MemoryBank excels in providing empathetic responses, recalling relevant memories, and understanding user personalities. Overall, this study underscores the significant impact of incorporating long-term memory mechanisms like MemoryBank into LLMs to enhance their capabilities for sustained interaction and companionship in AI systems.
