atlas

Research map / Large language models / Retrieval and knowledge

MEMORYLLM: Towards Self-Updatable Large Language Models

ICML 2024 · Large language models › Retrieval and knowledge · approach: Knowledge editing in LLMs · 4 citations (OpenAlex)

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.

Introduces MemoryLLM, a Llama2-7B augmented with a ~1B-parameter fixed-size memory pool of per-layer memory tokens that is self-updated by the transformer itself with random dropping for exponential forgetting.

Problem

LLMs remain static after deployment, making it hard to inject new knowledge efficiently without catastrophic forgetting or unbounded growth of retrieval stores or contexts.

Approach

Embed a fixed-size memory pool of hidden memory tokens in every transformer layer; new text is absorbed by running the transformer over the last K memory tokens plus the new context, then replacing K randomly dropped memory tokens with the new ones, giving exponential forgetting without backprop-based editing.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Update the memory with an editing factMemoryLLM-7B · ZsREScore: 55.6 -> 79.2Helped
Update the memory with an editing factMemoryLLM-7B · CounterFactualScore: 20.7 -> 75.3Helped
Use BM25 to retrieve 4k tokens before MemoryLLM processingMemoryLLM · Long-context QA benchmarksScore: 20.64 -> 15.60; 19.57 -> 20.30; 29.56 -> 33.08; 34.03 -> 32.27; 27.22 -> 24.17; 13.47 -> 15.36Mixed
Increase memory size N while holding K fixed (ablation)MemoryLLM · NaturalQA and SQuAD knowledge-retention experimentsknowledge-retention ratioHelped
Decrease K while holding N fixed (ablation)MemoryLLM · NaturalQA and SQuAD knowledge-retention experimentsknowledge-retention ratioHelped
Use K=128 memory tokens per update (ablation)MemoryLLM · NaturalQAstep 1 accuracy: 0.34Hurt
Use K=128 memory tokens per update (ablation)MemoryLLM · SQuADstep 1 accuracy: 0.25Hurt
Augment only one transformer layer with memory tokens (ablation)MemoryLLM · Context-based evaluationaccuracyNo clear effect
Augment only the last half of layers with memory tokens (ablation)MemoryLLM · NaturalQAaccuracy: 0.46 -> 0.39Hurt
Augment only the last half of layers with memory tokens (ablation)MemoryLLM · SQuADaccuracy: 0.39 -> 0.22Hurt

Surprising findings

Limitations

Experimental setup

Datasets: C4 RedPajama SQuAD NaturalQA zsRE CounterFactual

Benchmarks: zsRE CounterFactual LongBench SQuAD NaturalQA

Metrics: harmonic mean score efficacy generalization specificity F1 accuracy

Baselines: FT FT-L IKE ROME Llama2-7B LongLLaMA-3B LongLoRA

Builds on: Llama2 ROME MemoryBank Memory Transformer

Closest papers by meaning

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.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy