Memory is Reconstructed, Not Retrieved: Graph Memory for LLM Agents
MRAgent introduces active memory reconstruction — a graph-based architecture that outperforms LangMem, A-Mem, Mem0, and RAG-based systems on the LoCoMo and LongMemEval benchmarks. The headline result: a 27.6× reduction in prompt tokens versus LangMem, with up to 23% higher accuracy on long-horizon tasks.
Read full paper on arXiv →The Core Problem with Passive Retrieval
LangMem, Mem0, and conventional RAG share the same fundamental architecture: retrieve memory entries by semantic similarity to the current query, inject the results into the LLM's context window, and stop. The paper names this passive retrieval — a stateless policy that selects all memory units upfront, based solely on the query, with no adaptation during inference.
The paper documents three resulting failure modes: the retrieval strategy cannot be revised mid-reasoning; fixed similarity scores return surface-level matches that flood the context window with irrelevant noise; and static relevance functions cannot scale across unpredictable, long-horizon interactions.
For any retrieval budget T ≥ 2, the passive hypothesis class is strictly contained in the active hypothesis class. LMs with active retrieval can learn any function that LMs with passive retrieval can — but not vice versa.
The Cognitive Neuroscience Shift
The researchers root their alternative in cognitive neuroscience, which does not model memory as passive read-out of stored content. Instead, retrieval is an active and associative reconstruction process: initiated by contextual cues, propagating through intermediate representations, progressively reconstructing coherent memory experiences from partial evidence.
This shifts the engineering question from "what is semantically similar to this query?" to "what evidence do I need to reconstruct next, given what I've accumulated so far?" The first is a lookup. The second is a reasoning loop. The paper proves the two are not equivalent — and shows which wins.
The Cue–Tag–Content Graph
MRAgent organizes memory as a heterogeneous graph. Cues are fine-grained keywords — entities, attributes, contextual keywords. Contents store the actual memory items. Tags connect them, encoding associative relations between cues and content units. Three memory layers organize the graph:
Episodic
Event-specific memories with temporal ordering, retrievable through fine-grained cues — entities, actions, contextual keywords.
Semantic
Stable knowledge: personal attributes, preferences, extracted facts. Anchored to entity-level cues via aspect-level tags.
Abstraction
Topic nodes summarizing recurring patterns across episodes. Enables efficient top-down traversal from topic → episode.
Memory is populated automatically. The authors designed an ingestion pipeline that uses LLMs to process raw interaction histories and populate the graph — developers orchestrate the pipeline, not the labeling.
The Reconstruction Loop
Benchmark Results
Tested on LoCoMo and LongMemEval — benchmarks that evaluate agents on long-horizon tasks spanning dozens of sessions and hundreds of dialogue turns. Backbone models: Gemini 2.5 Flash and Claude Sonnet 4.5. MRAgent outperformed every baseline across both models and all question types.
What this means for the architecture
MRAgent's Cue–Tag–Content graph with Episodic / Semantic / Abstraction layers maps directly onto Context Lattice's P1 CanonStore / P2 LatticeMem / P3 Drop Corpus tiering. Both architectures separate exact-match structured facts (Episodic/P1) from graph-RAG associative retrieval (Semantic/P2) from unstructured vector similarity (Abstraction/P3).
The "active reconstruction" loop is the formal description of what distinguishes a real memory architecture from a glorified RAG wrapper. Context Lattice's LatticeEngine implements this — reasoning-integrated retrieval where intermediate evidence constrains the next retrieval step, rather than a one-shot vector lookup injected at context assembly time.
The 27× token efficiency delta over LangMem has direct enterprise implications. At scale, the difference between 118k and 3.26M tokens per agent interaction is not a benchmark footnote — it determines whether long-horizon agentic workflows are commercially viable at all.