atlas

Research map / Architectures and efficiency / Attention and transformers

M+: Extending MemoryLLM with Scalable Long-Term Memory

ICML 2025 · Architectures and efficiency › Attention and transformers · approach: Sparse attention for long-context LLMs · 1 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.

Extends MemoryLLM with a CPU-offloaded long-term hidden-state memory and a co-trained query/key retriever, retaining knowledge from under 20k to over 160k tokens at similar GPU memory.

Problem

Latent-space memory models like MemoryLLM lose information injected beyond roughly 20k tokens, limiting long-term knowledge retention and long-context understanding.

Approach

Dropped memory tokens are moved into a per-layer long-term memory (stored on CPU) instead of being discarded, and a small co-trained retriever (query/key projectors) selects a fixed number of them per layer at generation time, so retrieval happens once per layer rather than per head as in KV-cache methods.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
add long-document training in Stage 2 (4k–64k examples) (ablation)MemoryLLM-8B · LongBench (8k)QA-F1 Avg: 26.55 -> 31.29Helped
add long-term memory in Stage 3 (ablation)MemoryLLM-8B-Long · LongBench (8k)QA-F1 Avg: 31.29 -> 31.00No clear effect
add long-term memory in Stage 3 (ablation)MemoryLLM-8B-Long · SQuAD and NaturalQA knowledge retentionknowledge retentionHelped
use the co-trained retriever instead of attention-score retrieval (ablation)M+ · SQuAD and NaturalQAknowledge retentionHelped
offload memory vectors to CPU (ablation)M+ · Inference across both datasetsGPU memory cost (MB): 21177.76 -> 17973.34Helped
add long-term memory and co-trained retrievalM+ · LongBook-QA and LongBook Event QAQA-F1 / accuracyHelped
use SnapKV attention-score selection instead of the original 16k contextLlama-3.1-8B · LongBook-QAQA-F1Hurt
use M+ memory compression and retrieval instead of full-context processingLlama-3.1-8B · LongBench (8k), AvgQA-F1: 33.39 -> 31.00Hurt
use M+ memory compression and retrieval instead of full-context processingLlama-3.1-8B · LongBench (16k), AvgQA-F1: 35.81 -> 32.78Hurt
add memory augmentationLlama-3.1-8B · FineWeb-edu documents capped at 2,048 tokensperplexity: 1.9734 -> 1.9828No clear effect

Surprising findings

Limitations

Experimental setup

Datasets: fineweb-edu SlimPajama SQuAD NaturalQuestions LongBench InfiniteBench LongBook-QA

Benchmarks: InfiniteBench LongBook-QA LongBook Event QA SQuAD knowledge retention NaturalQA knowledge retention LongBench

Metrics: QA-F1 accuracy validation loss perplexity GPU memory latency FLOPs

Baselines: MemoryLLM-7B Llama-3.1-8B-16k Llama-3.1-8B-SnapKV Llama-3.2-3B-128k Llama-3.1-8B-BM25 M+-Attn

Builds on: MemoryLLM SnapKV H2O T5

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