MEMOIR: A Training-Free Memory Lifecycle for Long-Horizon LLM Agents

Mayank Anand, Subham Raj, Aman Vaibhav Jha, Sriparna SahaarXiv 2026 · arXiv

TL;DR

MEMOIR introduces a training-free "lifecycle" for LLM agent memory that fixes two major flaws in current systems: the accidental destruction of useful information during compression and the tendency to retrieve "stale" memories that look relevant but aren't actually helpful. By using a closed-loop system that attributes value to memories after they are used and strictly screens them before they are merged, MEMOIR significantly boosts evidence recall while maintaining a lightning-fast, LLM-free write path.

What Problem Does This Paper Address?

Building long-horizon LLM agents—those that can assist you over weeks or months—requires a robust external memory. However, current memory systems usually treat "writing" and "retrieving" as separate, static tasks. This leads to two "failure modes":

  1. Prospective Corruption: When the system tries to save space by summarizing or merging old memories, it might accidentally delete a tiny detail that becomes crucial for a question asked ten sessions later.
  2. Retrospective Staleness: Most systems rank memories based on how much they look like the current query (semantic similarity). If a memory was judged "important" when it was first written, it stays highly ranked forever, even if it never actually helps the agent answer a question.

The authors argue that memory shouldn't be static. Like human memory, which is strengthened through "retrieval practice," an agent's memory should evolve based on what actually works.

Methods

MEMOIR (Memory Evidence via Merge-certified, Online Importance Revision) splits the memory process into two distinct phases: an Online Path for immediate interaction and an Offline "Sleep" Phase for maintenance.

Figure 1: MEMOIR architecture. The online path retrieves memories with TRACE-UCB and applies a closed-form retrospective update from observed outcomes. During periodic offline sleep, MEMOIR proposes a core MERGE or optional SUPERSEDE operation, commits it only when all screening gates pass, and preserves archived originals and provenance for rollback.

1. The Online Path: TRACE-UCB

Instead of just using cosine similarity to find memories, MEMOIR uses TRACE (Training-free Retrieval Attribution and Credit Estimation). After the agent generates an answer, TRACE looks back at the retrieved memories and asks: "Did this specific memory actually contribute to the answer?" It calculates this using simple lexical overlap (unigram recall) between the memory and the generated response.

To prevent the system from only ever retrieving the same few "popular" memories, they add a UCB (Upper Confidence Bound) exploration bonus. This encourages the agent to occasionally check "under-exposed" memories that might be the missing link for a complex query.

2. The Offline Phase: Certified Consolidation

During periodic "sleep" intervals, the system looks for redundant or contradictory memories to merge (MERGE) or update (SUPERSEDE). Crucially, this is "judge-gated." A merge only happens if it passes a "Sufficiency Certificate" consisting of three gates:

  • Faithfulness: An ensemble of LLM judges confirms no facts were lost.
  • Retrieval Coverage: A check to ensure the new merged text still contains the keywords needed to find it later.
  • Length Ratio: A hard cap to ensure the merge actually saves space.
Comparison of MEMOIR's capabilities against other agent memory systems.

Datasets

The researchers evaluated MEMOIR primarily on LoCoMo, a long-conversation benchmark featuring up to 32 sessions per dialogue. This is critical because it allows the "feedback loop" of memory importance to actually accumulate over time. They also tested on LongMemEval-S to check "cold-start" performance on fresh memory stores.

Key Insights and Ideas

  • Usefulness is Post-Hoc: You can't know how important a memory is when you first record it. Importance should be a running statistic updated every time a memory helps (or fails) to answer a query.
  • Training-Free is a Feature: Unlike systems that require training a reranker (like RMM), MEMOIR uses closed-form updates. This makes it easier to deploy and much faster.
  • Exploration is Mandatory: Without the UCB bonus, the system suffers from "feedback lock-in," where it keeps retrieving the same memories and ignores potentially better evidence that hasn't been "proven" yet.
  • Safety Over Compression: The authors prioritize "lossless" merges. They found that aggressive, uncertified pruning destroyed required evidence in over 60% of cases.

Key Results

MEMOIR achieves a rare "Pareto-efficient" result: it is both more accurate and faster than many heavy-extraction baselines.

  • Retrieval Boost: The full stack improved evidence recall@5 by 11.92 percentage points over standard cosine retrieval on LoCoMo.
  • Multi-hop Success: On complex questions requiring multiple pieces of evidence, the gains were even higher (up to 8.05 points).
  • Speed: The online write path requires zero LLM calls and has a median latency of just 6.8ms, compared to ~110ms for systems that perform extraction at write-time.
  • Safety: In an audit of 100 merges, the "Certified Merge" process resulted in zero factual losses, whereas uncertified merging lost facts 18% of the time.
Table 4: Compact lifecycle efficiency profile over 1,905 Lo- CoMo QA pairs. Full execution paths, frequencies, and P95 latency appear in Appendix F, Table 11.
Retrieval comparisons showing the significant gains of the full MEMOIR stack.

Limitations and Future Work

While powerful, MEMOIR has a few constraints:

  • Cold Starts: Because it relies on a feedback loop, it can't improve the very first query to a brand-new memory store.
  • Modest Compression: The "Certified Merge" is so conservative that it only reduced the active memory store by about 1.42% in tests. Future work could explore "reversible pruning" to save more space without permanently deleting data.
  • Lexical Sensitivity: The default TRACE-FB uses word matching, which might miss cases where the agent paraphrases the memory perfectly but uses different words. The authors suggest a more expensive "Counterfactual" (TRACE-CF) version to solve this, but it comes with a 10x latency penalty.
Correlation between attribution signals and retrieval success.

Summary updated

Abstract

Long-horizon LLM agents require memory systems that preserve useful information across sessions and retrieve it when needed. Existing systems treat these as separate problems: memories are written prospectively with static importance scores that are never revised after use. This creates two coupled failure modes: consolidation can silently destroy evidence that future queries require, while retrieval continues to favor stale memories. We propose MEMOIR (Memory Evidence via Merge-certified, Online Importance Revision), a training-free memory lifecycle that unifies judge-gated consolidation with retrospective attribution. Before compressing memory, screening gates test whether answer-relevant evidence is preserved. After each query, attribution estimates which retrieved memories supported the answer and updates their retrieval priority. A UCB-style exploration bonus additionally encourages retrieval of under-exposed memories, reducing the risk that frequently retrieved memories crowd out useful but less-seen evidence. On 1,905 deduplicated LoCoMo QA pairs, the full retrieval stack improves evidence recall@5 by 11.92 percentage points over bare cosine, with confidence-gated feedback adding 1.50 points overall without reference answers or reranker training; a deployment-unavailable oracle adds 1.84 points overall and 8.05 points on multi-hop. Judge-gated merge changes the recall of text-based evidence from 58.82% to 59.08%, reduces the active store by 1.42%, and incurs 0 observed losses in 100 independently audited merges, with a one-sided 95% upper loss-rate bound of 2.95%. Together, these results outline a practical deployment path: no additional LLM call on the online write path, with merge screening confined to periodic offline consolidation. The lifecycle reduces to one principle: attribute usefulness after use, and screen for preservation before compression.
BibTeX
@misc{anand2026memoir,
  author = {Mayank Anand and Subham Raj and Aman Vaibhav Jha and Sriparna Saha},
  title = {{MEMOIR: A Training-Free Memory Lifecycle for Long-Horizon LLM Agents}},
  year = {2026},
  eprint = {2611.07631},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.07631},
}
Figure