Research map / Large language models / Retrieval and knowledge
Larimar: Large Language Models with Episodic Memory Control
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Larimar augments LLMs (GPT-2 Large and GPT-J-6B decoders) with a hierarchical, Kanerva-machine-style episodic memory that is updated in one shot via pseudo-inverse least-squares writes, enabling fast training-free knowledge editing, selective forgetting, leakage prevention, and long-context recall.
Problem
Efficiently and accurately updating factual knowledge in LLMs without expensive retraining or fine-tuning, while supporting sequential editing, forgetting, and long-context generalization.
Approach
Couple a fast-writing, distributed generative episodic memory (Generative Pseudo-inverse Memory / Kanerva Machine style) to an LLM decoder via a learned projection into a KV cache; edits are written in one shot by least-squares pseudo-inverse updates, with no gradient steps on edits, and forgetting is done by writing with negative weight.
Key results
- On CounterFact with GPT-J, Larimar-6B reaches 99.6 edit success and 88.4 paraphrase, comparable to ROME (99.9 / 99.1), with about 8-10x faster editing.
- On ZsRE sequential editing, Larimar-1.3B achieves edit retention rate 0.97 versus GRACE's 0.93.
- Larimar-6B with two rephrases in memory raises CounterFact paraphrase accuracy from 88.4 to 93.6, while the Larimar memory handles 512 batch edits near 100% rewrite accuracy.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Add 2 rephrases to memory (ablation) | Larimar-6B · CounterFact single fact editing | Paraphrase S: 88.4 to 93.6 | Helped |
| Remove the scope detector (ablation) | Larimar-6B · CounterFact single fact editing | Neighborhood: 80.4 -> 13.7 | Hurt |
| Remove the memory module (ablation) | Larimar-6B · CounterFact single fact editing | Edit Success S: 99.6 -> 15.8 | Hurt |
| Add 2 rephrases to memory (ablation) | Larimar-6B · ZsRE single fact editing | Paraphrase: 70.4% to 82.2% | Helped |
| Use Larimar rather than GRACE | sequential editing · ZsRE | Edit Retention Rate: 0.93 -> 0.97 | Helped |
| Use Larimar rather than SERAC | sequential editing · sequential fact editing | ERR: ERR=0.31; ERR=0.98 | Helped |
| Increase batch edits from 512 to 1024 | Larimar-6B · CounterFact batch editing | rewrite accuracy: near 100% ... 82% | Hurt |
| Write additional paraphrases to memory (ablation) | Larimar · CounterFact single fact editing | Paraphrase S: 88.4 to 93.6 | Helped |
| Use Larimar-1.3B instead of Mistral-7B (3-shot) | long-context fact recall · FastFacts, 256 facts | recall rate: 0.42 -> 0.86 | Helped |
| Use the scope detector (ablation) | Larimar-6B · CounterFact single fact editing | Neighborhood: 13.7 -> 80.4 | Helped |
Surprising findings
- Without a scope detector, Larimar's neighborhood specificity collapses (e.g., 80.4 to 13.7 on CounterFact), showing reliance on the scope mechanism.
- Forgetting a fact from N=K memory slots leaves recall of other facts lower (0.86 to 0.95 retained) and fails entirely at N=2K (retained recall 0.5-0.79).
Limitations
- Can only handle shorter facts; training limited to sentence completion tasks.
- Generalization to unseen paraphrases remains weaker than ROME and IKE on some metrics.
- Neighborhood specificity depends on a scope detector; without it, unrelated prompts are heavily affected.
Experimental setup
Datasets: WikiText CounterFact ZsRE CNN Fast Facts EasyEdit
Benchmarks: CounterFact ZsRE FastFacts
Metrics: edit success paraphrase accuracy neighborhood specificity edit retention rate F1 wall clock time recall attack success rate
Baselines: ROME MEMIT MEND GRACE IKE FT SERAC Supersizing Transformer
Builds on: Kanerva Machine Generative Pseudo-inverse Memory ROME GRACE
Closest papers by meaning
- MEMOIR: Lifelong Model Editing with Minimal Overwrite and Informed Retention for LLMs (NeurIPS 2025 · similarity 0.89)
- WISE: Rethinking the Knowledge Memory for Lifelong Model Editing of Large Language Models (NeurIPS 2024 · similarity 0.89)
- Peripheral Memory for LLMs: Integration of Sequential Memory Banks with Adaptive Querying (ICML 2025 · similarity 0.88)
- PaceLLM: Brain-Inspired Large Language Models for Long-Context Understanding (NeurIPS 2025 · similarity 0.88)
- From Static to Dynamic: Knowledge Metabolism for Large Language Models (AAAI 2024 · similarity 0.88)
- MEMORYLLM: Towards Self-Updatable Large Language Models (ICML 2024 · similarity 0.87)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
