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":
- 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.
- 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.
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.
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.
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.
Summary updated