NUS's MRAgent Beats Every Memory Baseline by Reasoning While It Retrieves
MRAgent replaces static memory retrieval with an iterative graph-traversal loop, cutting token costs by 5x while beating all baselines by up to 23% on long-conversation benchmarks.
Takeaways
- MRAgent replaces one-shot memory retrieval with an iterative LLM-guided graph traversal loop, letting the agent update its search strategy based on evidence found mid-query.
- Memory is stored as a Cue-Tag-Content graph with two layers: episodic (concrete events) and semantic (stable personal facts), connected via short associative tags that guide traversal.
- On LoCoMo, MRAgent scores 84.21 vs. 68.31 for the best baseline (Mem0) -- a 23.3% relative gain; on LongMemEval, a 32% relative improvement.
- Token cost is 5x lower than the closest graph-based competitor (118k vs. 632k tokens per sample on LongMemEval), with faster runtime than most baselines.
- The paper includes a formal proof that active retrieval policies are strictly more expressive than passive ones for any retrieval budget of two or more steps.
- Code is open-source on GitHub; the framework is model-agnostic and was tested with Gemini-2.5-Flash and Claude-Sonnet-4.5 backbones.
Every serious LLM agent eventually hits the same wall: the conversation grows long, the relevant facts are buried dozens of turns back, and a single similarity search just doesn't cut it. A new paper from the National University of Singapore, accepted at ICLR 2026, argues the whole retrieval paradigm is wrong -- and proposes a fundamentally different model inspired by how human memory actually works.
The paper introduces MRAgent (Memory Reasoning Agent), a framework that treats memory access as an active, iterative reconstruction process rather than a one-shot lookup. The core claim: memory is never simply retrieved -- it is rebuilt, piece by piece, guided by what you've already found.
The retrieve-then-reason trap
Despite recent progress, LLM agents still struggle with reasoning over long interaction histories. Current memory-augmented agents rely on a static "retrieve-then-reason" paradigm, and this rigid pipeline design prevents them from dynamically adapting memory access to intermediate evidence discovered during inference.
The two dominant approaches both fail in predictable ways:
- Similarity-based retrieval (RAG): Embeds the query, pulls the top-k most similar chunks. Works for simple lookups, but for a question like "What was Caroline doing when Nate won his third video game tournament?" it floods the context with every "video game" mention and misses the actual answer entirely.
- Graph-based retrieval (A-Mem, Zep): Seeds from a similarity match, then expands N-hop neighbors. Better for relational queries, but the expansion is fixed and blind -- it pulls in irrelevant neighbors and still can't infer new retrieval cues from what it's already found.
The fundamental flaw in both is that retrieval decisions are locked in before any evidence is seen. By integrating LLM reasoning directly into memory access, active reconstruction enables the agent to infer new retrieval cues and adapt traversal strategies based on accumulated evidence -- intermediate findings can be explicitly transformed into new retrieval constraints, allowing the agent to recover evidence that is unreachable under passive policies.

The Cue-Tag-Content graph
MRAgent organizes all memory into a heterogeneous graph with three node types. Think of it as a two-level index that separates "what to look for" from "what was actually said."
- Cues: Fine-grained keywords -- entities, actions, attributes -- extracted from dialogue. These are the entry points into the graph.
- Tags: Short semantic labels (at most two words) that summarize the associative relationship between a cue and a memory. Tags are the critical middle layer: they let the LLM decide whether a retrieval path is worth following before paying the cost of loading the full memory content.
- Contents: The actual memory units, split into two types: episodic (concrete events with timestamps) and semantic (stable facts like preferences and personal attributes).
MRAgent combines an associative memory graph with an active reconstruction mechanism, representing memory as a Cue-Tag-Content graph where associative tags serve as semantic bridges connecting fine-grained cues to memory contents. The graph is built from raw dialogue using an LLM pipeline that resolves pronouns, normalizes timestamps, segments episodes, and extracts semantic facts -- all in a preprocessing step.

How reconstruction actually works
At query time, MRAgent runs an iterative loop. Each turn has three stages:
- LLM Reasoning + Action Selection: Given the query and everything accumulated so far, the LLM picks which traversal actions to fire next -- e.g., "expand from this cue to its tags" or "given this cue+tag pair, retrieve the associated episodes."
- Controlled Memory Traversal: The selected actions execute against the graph, generating a candidate set of new nodes. This is a deterministic graph operation -- fast and cheap.
- LLM Routing + State Update: The LLM inspects the candidates, keeps the relevant ones, prunes the rest, and decides whether enough evidence has been gathered to answer or whether another turn is needed.
The loop runs for at most 8 turns, with up to 10 tool calls per turn. The active reconstruction mechanism allows the agent to iteratively explore and prune retrieval paths based on accumulated evidence, ensuring that memory retrieval is dynamically adapted to the reasoning context while avoiding combinatorial explosion caused by unconstrained expansion.
Here's a simplified view of the core algorithm:
cues = extract_cues(query)
active_set = initialize(cues, memory_graph)
context = []
for turn in range(max_turns):
actions = llm_select_actions(query, context, active_set)
candidates = [traverse(a, active_set) for a in actions]
active_set = llm_route(query, context, candidates) # prune irrelevant
context += active_set
if llm_stop(query, context):
break
return llm_answer(query, context)
The paper also provides a formal theoretical result: active retrieval policies are strictly more expressive than passive retrieval -- proven via a binary-tree needle-in-a-haystack construction where passive retrieval incurs irreducible error while active retrieval achieves zero error with the same budget.
The numbers
MRAgent was evaluated on two standard long-memory benchmarks against five baselines (RAG, LangMem, A-Mem, MemoryOS, Mem0), using both Gemini-2.5-Flash and Claude-Sonnet-4.5 as backbones.
LoCoMo evaluates extremely long-term conversational memory in LLM agents, constructed via a machine-human hybrid pipeline where two LLM-powered agents carry multi-session dialogues grounded on persona profiles. Each conversation spans up to approximately 32 sessions and contains on the order of 600 turns and ~16K tokens on average, supporting single-hop, multi-hop, temporal, and open-domain memory reasoning. LongMemEval is a benchmark for assessing long-term memory in user-assistant interactions, compiling a coherent yet length-configurable chat history for each question, with a standard setting where each problem is paired with an interaction history of approximately 115k tokens.
Performance on LoCoMo (LLM-Judge score, Gemini backbone):
| Method | Multi-hop | Temporal | Open Domain | Overall |
|---|---|---|---|---|
| RAG | 58.16 | 49.22 | 41.67 | 61.30 |
| Mem0 (best baseline) | 68.79 | 61.68 | 41.66 | 68.31 |
| MRAgent | 75.17 | 80.37 | 68.75 | 84.21 |
That's a 23.3% relative gain over the best baseline on LoCoMo, and a 32% relative improvement on LongMemEval. The gains are largest on the hardest question types: temporal reasoning and multi-hop queries, where passive retrieval struggles most.
The efficiency story is equally compelling. Extensive experiments demonstrate that MRAgent outperforms strong baselines with significantly improved token and runtime efficiency. On LongMemEval, MRAgent uses only 118k tokens per sample, compared to 632k for A-Mem and 3,268k for LangMem -- a 5x reduction versus the closest graph-based competitor. Runtime is also competitive at 586 seconds per sample, faster than MemoryOS (3,135s) and LangMem (1,209s).
An ablation study confirms that both components matter independently. Removing the active multi-step reasoning (keeping only the graph structure) causes a large drop in multi-hop recall. Removing the semantic memory layer (keeping only episodic memory) also degrades performance, because some questions require stable personal facts that aren't tied to specific events.
Where it falls short
The current implementation has a few acknowledged limitations worth knowing before you reach for it:
- Simple memory construction: The paper explicitly notes that the memory construction phase is kept lightweight -- there's no sophisticated update or forgetting mechanism. As memories accumulate over very long interactions, the graph may grow stale or noisy.
- Multi-turn latency: Each reconstruction loop makes multiple LLM calls. For simple single-hop questions, this overhead is unnecessary -- though the agent does terminate early when evidence is sufficient.
- Graph construction cost: Building the Cue-Tag-Content graph from raw dialogue requires an upfront LLM pass for pronoun resolution, tagging, and semantic extraction. This is a one-time cost per conversation, but it adds complexity to deployment.
- Breadth vs. depth tradeoff: The paper shows that increasing parallel tool calls per turn (retrieval breadth) quickly saturates, while adding more reasoning turns (depth) keeps improving accuracy. This means the compute budget is better spent on sequential depth than parallel width.
What this unlocks
The practical use cases are anywhere an agent needs to reason over a long interaction history with multi-hop or temporal dependencies:
- Long-running personal assistants that need to connect facts from months of prior conversations
- Customer support agents that must trace a user's issue history across many sessions
- Research or coding assistants operating over extended project timelines
- Any agent where the answer to a question depends on combining two or more facts from different parts of the history
The deeper significance is the theoretical result: passive retrieval is provably less expressive than active retrieval for any budget of two or more steps. This isn't just an empirical finding -- it's a formal argument that the entire retrieve-then-reason pipeline architecture has a fundamental ceiling that no amount of better embeddings or graph construction can overcome. The only fix is to let the model reason while it retrieves.
The code is available on GitHub, and the paper was accepted at ICLR 2026. Evaluations used Gemini-2.5-Flash and Claude-Sonnet-4.5 as backbones, so the framework is model-agnostic and should plug into existing agent stacks without requiring fine-tuning.