MeMo: Memory as a Model — An Alternative to Vector Databases for LLM Knowledge

When an LLM application needs external knowledge, the default architecture is almost always RAG: chunk the documents, compute embeddings, store them in a vector database, and stuff the top-k chunks into the prompt at query time.

It works well until it doesn’t. As the corpus grows, retrieval noise creeps in, context windows fill up, and questions that require connecting facts across multiple documents start failing. A recent paper, MeMo: Memory as a Model, explores a different question: what if memory wasn’t an index at all, but a small, dedicated model?

Why Existing Paradigms Fall Short

Most ways of giving an LLM new knowledge fall into three buckets, each with a structural trade-off:

  • Non-parametric (RAG, In-Context Learning): Keeps the base LLM frozen and works with closed-source APIs, but struggles to synthesize relationships across many documents and degrades noticeably when distractors appear in retrieved chunks.
  • Parametric (Continual Pretraining, SFT): Internalizes knowledge directly into weights, but is expensive to re-run, risks catastrophic forgetting (including safety alignment), and is impossible when your main LLM is behind a proprietary API.
  • Latent memory (Gist tokens, ICAE, AutoCompressor): Compresses context into soft tokens, but suffers from representation coupling—the memory is tied to the exact model and tokenizer that produced it.

MeMo combines the useful parts of all three: knowledge lives in model parameters (like parametric methods), the main LLM stays completely frozen and black-box (like RAG), and the memory artifact is compact and portable.

Two Models Instead of a Vector Index

MeMo splits the system into two roles:

  1. Memory model ($M_\varphi$): A small, dedicated model (e.g. 1.5B–14B parameters) fine-tuned on a target corpus so that it internalizes the knowledge in its weights.
  2. Executive model ($M_\theta$): Your main, frozen LLM—open-weights or a proprietary API—with zero access required to its weights, gradients, or logits.

At inference time, the Executive model does not search a vector database. Instead, it queries the Memory model through a structured three-stage protocol:

  1. Grounding: The Executive decomposes the user’s question into atomic, clue-probing sub-questions and sends them independently to the Memory model.
  2. Entity identification: Using those grounding responses, the Executive narrows down candidate entities through targeted follow-ups until it converges on the target entity.
  3. Answer seeking and synthesis: Conditioned on that entity, the Executive asks for supporting facts and synthesizes the final answer from compact natural-language snippets.

Because the Memory model only returns short text responses, inference cost is independent of corpus size—whether the underlying corpus had 100 or 100,000 documents, the retrieval step runs in constant time.

The Real Trick: A 5-Step Data Synthesis Pipeline

Fine-tuning a small model directly on raw documents or naive paraphrases doesn’t work well; models tend to memorize surface phrasing rather than transferable facts. MeMo’s real leverage comes from a five-step data synthesis pipeline that distills the corpus into self-contained QA pairs (“reflections”)—with no document IDs or watermarks embedded:

  1. Fact extraction: Extracts both direct (explicitly stated) and indirect (inferred) facts from each chunk.
  2. Consolidation: Merges QA pairs that share an entity, time period, or relationship into multi-fact questions.
  3. Verification and rewriting: Ensures every QA pair is self-contained (resolving pronouns and implicit references) or discards ambiguous ones.
  4. Entity surfacing: Generates questions where the attributes are in the prompt and the entity name is the answer—mitigating the reversal curse and powering Stage 2 at inference.
  5. Cross-document synthesis: Combines facts across topically related documents via converging clues (multiple docs pointing to one entity) and parallel properties (comparing entities with shared roles).

Ablation results show Step 5 is the load-bearing beam: removing cross-document synthesis collapses accuracy on NarrativeQA from 24.00% down to 6.37%.

What the Benchmarks Show

Evaluated across BrowseComp-Plus, NarrativeQA (long books/scripts), and MuSiQue (multi-hop QA), MeMo (with a Qwen2.5-14B Memory model) outperforms BM25, dense retrieval (NV-Embed-V2), graph-based RAG (HippoRAG2), and KV-cache compression (Cartridges) on NarrativeQA and MuSiQue, while matching HippoRAG2 on BrowseComp-Plus:

Benchmark MeMo (Qwen2.5-32B exec) MeMo (Gemini-3-Flash exec) Best Retrieval Baseline
BrowseComp-Plus 54.22% 66.67% 56.11% / 66.33% (HippoRAG2)
NarrativeQA 26.85% 53.58% 20.59% / 26.62% (NV-Embed-V2)
MuSiQue 48.30% 60.20% 42.17% / 57.00% (HippoRAG2)

Three practical findings stand out:

  • Plug-and-play works: Swapping only the Executive model from Qwen2.5-32B to Gemini-3-Flash—without touching or retraining the Memory model—adds +12 to +27 percentage points across benchmarks.
  • Noise robustness: Adding 1× distractor documents drops NV-Embed-V2 and HippoRAG2 by up to 6.22%, while MeMo stays within one standard deviation of its noise-free score.
  • Incremental updates via model merging: When new corpora arrive, you can train a separate Memory model per corpus and merge task vectors with TIES merging ($\rho = 0.3$). That cuts cumulative compute by 33% at 2 corpora and 5.5× at 10 corpora compared to full retraining—with a measurable accuracy drop, yet still ahead of all retrieval baselines.

Trade-offs and When to Use Which

MeMo doesn’t replace RAG—it’s a different point in the design space:

  • Stick with RAG when your corpus changes every minute, when you need strict source provenance (exact chunk citations for legal/medical compliance), or when you can’t afford upfront data synthesis and SFT training.
  • Consider MeMo when cross-document reasoning is the bottleneck, when retrieval noise is degrading your pipeline, or when you want to pair a proprietary frontier LLM with a private corpus without shipping raw documents into every prompt.