Larimar: Large Language Models with Episodic Memory Control

Payel Das,Subhajit Chaudhury,Elliot Nelson,Igor Melnyk,Sarath Swaminathan,Sihui Dai,Aurélie Lozano,Georgios Kollias,Vijil Chenthamarakshan,Jiří,Navrátil,Soham Dan,Pin-Yu Chen
2024-08-22
Abstract:Efficient and accurate updating of knowledge stored in Large Language Models (LLMs) is one of the most pressing research challenges today. This paper presents Larimar - a novel, brain-inspired architecture for enhancing LLMs with a distributed episodic memory. Larimar's memory allows for dynamic, one-shot updates of knowledge without the need for computationally expensive re-training or fine-tuning. Experimental results on multiple fact editing benchmarks demonstrate that Larimar attains accuracy comparable to most competitive baselines, even in the challenging sequential editing setup, but also excels in speed - yielding speed-ups of 8-10x depending on the base LLM - as well as flexibility due to the proposed architecture being simple, LLM-agnostic, and hence general. We further provide mechanisms for selective fact forgetting, information leakage prevention, and input context length generalization with Larimar and show their effectiveness. Our code is available at <a class="link-external link-https" href="https://github.com/IBM/larimar" rel="external noopener nofollow">this https URL</a>
Machine Learning,Artificial Intelligence
What problem does this paper attempt to address?
### What problems does this paper attempt to solve? This paper aims to solve the key challenge of how large - language models (LLMs) can efficiently and accurately update their stored knowledge after deployment. Specifically, the authors propose Larimar - a new brain - inspired architecture that enhances the capabilities of LLMs by introducing distributed episodic memory. #### Main problems: 1. **Efficiency and accuracy of knowledge update**: - Current LLMs need to be continuously updated after deployment to maintain factual relevance, safety, and ethics. - Traditional fine - tuning methods carry the risks of over - fitting and catastrophic forgetting, and are computationally expensive. 2. **Rapid editing and adaptation to new information**: - Efficient mechanisms need to be developed to rapidly update LLMs so that they can protect privacy, eliminate biases and hallucinations, and keep up with new facts. - Existing editing methods face problems of scalability and speed when dealing with sequential editing tasks. 3. **Selective forgetting and prevention of information leakage**: - It is necessary to achieve selective fact - forgetting and prevent information leakage within the same framework, which is difficult for the current state - of - the - art editing methods. 4. **Generalization of input context length**: - The ability to handle longer input context instances outside the training distribution, which is crucial for learning rare long - context instances from datasets. #### Solutions: Larimar solves these problems by introducing an external episodic memory controller. Specifically: - **Dynamic single - update**: Larimar allows for dynamic, single - update of knowledge without the need for costly retraining or fine - tuning. - **Efficient memory operations**: It utilizes a hierarchical memory model for efficient read - write operations, achieving an 8 - to - 10 - fold speed increase. - **Selective forgetting and prevention of information leakage**: It provides a method for selective fact - forgetting and prevention of information leakage based on a single - memory - update mechanism. - **Long - context generalization**: Through a recursive search method, Larimar's memory can be generalized to longer input contexts. Through these improvements, Larimar not only demonstrates accuracy comparable to existing baseline methods in multiple benchmark tests, but also significantly improves editing speed and flexibility.