Long-running language-model agents keep two kinds of memory. The first is a log of what actually happened, such as each dialogue turn or observation with its timestamp; this is called episodic memory. The second is a compact store of general facts distilled from that log, such as "the user is vegetarian" or "the locker is open"; this is called semantic memory. Today the distillation step is an unchecked language-model rewrite. Whatever the model misreads, overstates or invents while summarizing becomes a permanent "fact." The original episodes are often thrown away, so the error can never be traced or undone. We propose a different design. Semantic memory becomes a derived cache over a lossless episodic log. Every distilled fact carries pointers to the specific episodes that support or contradict it, and a numeric support score computed by counting verified evidence rather than by asking a model to summarize. Facts with weak or contested support are never served as facts. The agent answers from the raw episodes instead. When an episode is later found to be wrong, only the facts that depend on it are recomputed.
The opportunity comes from a real contradiction in the literature. One careful study finds that storing raw chunks and retrieving them well beats every form of write-time summarization, because summarization is lossy (Diagnosing Retrieval vs. Utilization Bottlenecks in LLM Agent Memory). Another finds that raw context beyond a modest budget distracts the model and causes errors, so compact distilled knowledge wins (PlugMem). Both can be right if distillation is kept but made checkable and reversible. That is the bet of this proposal.
Core Claim
Hallucinations that enter through long-term memory are mostly unsupported distillations: semantic entries whose evidence in the episode log is thin, contradicted, or comes from a single source repeated many times. If each semantic entry stores its provenance and a support score computed from entailment checks against those episodes, then gating what is served on that score should do three things. It should keep the token efficiency of distilled memory. It should recover the accuracy of lossless raw retrieval on questions where distillation would have dropped details. It should also sharply reduce two error types: stale answers, and contamination that persists after a source is retracted. Systems that either summarize blindly or never consolidate fail on these two error types.
The support score turns the "semantic fact as a sum over episodes" idea from episodic knowledge-graph theory into a concrete operator (Embedding models for episodic knowledge graphs; The Tensor Brain). Those works formalize semantic memory as time-marginalized episodic events but never apply that operator to language-model agent memory. For a candidate fact $f$, we compute
$$s(f) = \sum_{g \in G(f)} w(t_g)\, \max_{e \in g} v(e, f), \qquad v(e,f) \in \{-1, 0, +1\}.$$
Here $G(f)$ groups the episodes linked to $f$ by their independent source, such as a distinct speaker or session. $v(e,f)$ is a verifier's judgment that episode $e$ contradicts, is silent on, or entails $f$. $w(t_g)$ is a recency weight. It is flat for enduring facts and decaying for state-like facts such as a door's status. The time stamp is the time the event happened, not the time it was mentioned, following Beyond Dialogue Time.
Counting by independent source rather than by episode is deliberate. Repetition is exactly what produces collective false memories in multi-agent settings. Role-played consensus pushes error rates from 25.48% to 74.75% (When Agents "Misremember" Collectively). A naive episode count would amplify that effect rather than resist it.
How This Differs from the Closest Work
Four systems sit closest. AriGraph links timestamped episodic vertices to semantic triplets and prunes stale triplets. Its extractor is unverified, and the links are not used to score or gate what is served. We reuse its two-layer structure and add verification and support-based serving. ChronoMem shows that prompting a model to "ignore" retracted content performs near chance, and that physically rolling back memory is required. Its rollback truncates all history after the target point. Provenance links let us remove one episode and recompute only the facts that depend on it. Adaptive Memory Admission Control gates raw candidates on a word-overlap confidence signal and an expensive model-judged utility score. It does nothing once content is admitted and later distilled. Our check sits at the distillation step instead. TRAC gives calibrated coverage guarantees, but only at final answering. We use its calibration idea as a later extension for setting the serving threshold on $s(f)$.
Two papers constrain the design. The medical summarization study finds that model synthesis turns tentative findings into definitive claims and that more context can increase errors (Evaluating large language models on medical evidence summarization). This is why the verifier judges entailment of each candidate fact against single episodes, rather than letting the model write a narrative across many. The reference-hallucination study shows that indirect, open-ended queries detect fabrication better than direct yes/no questions (Do Language Models Know When They're Hallucinating References?). We test whether the same holds for the verifier $v$.
Research Program
We build the system on the open LightMem codebase. Its offline "sleep-time" consolidation already separates cheap online appends from heavy batch work (LightMem). This matters because verification is expensive. Running it offline avoids the write-time latency that dominates admission control, where the model call accounts for over 97% of the time.
The episodic log stores raw three-turn chunks losslessly, the write strategy that performed best in the diagnostic study. During sleep, a model proposes candidate facts. For each candidate, the system retrieves linked and nearby episodes with hybrid lexical-plus-dense search, scores each with the verifier, groups the scores by source, and computes $s(f)$.
At query time, the system retrieves semantic entries first. Entries above a threshold $\tau$ are served compactly. Entries that are below $\tau$, have both positive and negative evidence, or have only one source are replaced by their linked raw episodes, within a fixed token budget.
Retraction works through the provenance graph. Deleting or flagging an episode decrements the scores of exactly the facts that cite it. Facts that fall below $\tau$ are demoted. Any facts derived from those facts are re-verified.
The analysis question running through all of this is the tipping point the literature leaves open: at what history length and token budget does raw retrieval stop beating distilled memory? We answer it by sweeping the budget and history length and plotting both curves alongside the gated hybrid.
Baselines
The naive reference point is full-context ingestion, run with the same backbone model. It requires no memory machinery. It shows what an agent loses or gains by doing nothing, and it serves as the token-cost ceiling.
The strongest existing competitor on clean recall is lossless Basic RAG with hybrid BM25-plus-dense retrieval and model reranking, as in Diagnosing Retrieval vs. Utilization Bottlenecks. It reports 81.1% accuracy on LoCoMo, and retrieval precision there correlates with accuracy at $r=0.98$. It is the strongest baseline because it never loses information, which is exactly our selling point. We run it with the same chunking, the same retriever and reranker, the same backbone and the same top-$k$ budget. We claim to beat it only where it is predicted to fail: stale or updated facts, retracted sources, and accuracy at tight token budgets. On clean LoCoMo, matching it within noise counts as success.
On compact distilled memory, the strongest competitor is PlugMem. It reports 82.8% on LongMemEval using 233.9 tokens on average, against a 74.1% baseline using over 5,800 tokens. Beating it means matching its accuracy at a comparable token budget while lowering the rate of unsupported answers. We also include Beyond Dialogue Time (TSM), reported at 74.80% on LongMemEval_S and 76.69% on LoCoMo, and unmodified LightMem, since our system is built on it. For retraction, the baseline is ChronoMem, which gains roughly 10 points of QA F1 over non-versioned memory after rollback. We give it oracle version selection so that its weak 20.5% Recall@1 on LoCoMo does not decide the comparison. That way the test is about truncation versus surgical recomputation, not about finding the right version.
All systems get the same backbone, the same per-query token budget and the same total model-call budget across writing and sleep. Tuning budgets for thresholds and buffer sizes are matched on a held-out conversation split.
Three ablations isolate the key ingredient. The first keeps provenance links but removes gating, so every distilled fact is served. The second gates on raw episode counts instead of source-grouped verified support. The third removes the fallback to raw episodes, so low-support facts are simply dropped. If the first ablation matches the full system, the support score is doing nothing and the claim fails.
Why not just…?
Why not just use Basic RAG with hybrid reranking and delete bad chunks when needed? This is the real threat. On clean, non-adversarial LoCoMo it may well tie us, and deleting a raw chunk is a trivial form of selective retraction. Its expected weakness is different. When an earlier chunk says "the locker is closed" and a later one says "open," both are retrieved, and the model must guess which holds. AriGraph's pruning was motivated by exactly this failure. At long horizons, raw chunks also exhaust the token budget, which pushes the model into the region where extra context hurts, as PlugMem describes. The budget sweep and the state-update subset settle this directly. If raw RAG matches us there too, we will report that distillation is unnecessary at these scales.
Why not just store both summaries and raw chunks and retrieve from both indexes? This is cheap, and it addresses the lossy-compression trap. However, it serves unverified summaries side by side with the evidence that may contradict them, which reproduces the "more is less" pattern in Evaluating large language models on medical evidence summarization. The no-gating ablation is precisely this system, so the comparison is built in.
Why not just verify at answer time, as TRAC does? Checking the final answer is valuable, but it cannot tell a well-supported memory from a fact repeated by one persuasive source. It also pays verification cost on every query instead of once per fact. Most importantly, it gives no way to undo downstream facts after a retraction. We will run an answer-time self-consistency check, combining direct and indirect queries, on top of the strongest baseline. The aim is to see whether it recovers the gains on the contamination tasks.
Why not just prompt the model to ignore retracted content? ChronoMem already shows that prompt-only approaches perform near chance on post-exposure questions. We include the prompt-only condition only as a sanity check.
Proposed Experiments and Decisive Checks
The first experiment uses LoCoMo and LongMemEval_S for clean recall. We report accuracy, tokens served per query and total model calls. We also report the unsupported-answer rate: answers asserting content absent from the log, labeled with the diagnostic study's failure-mode probes, which reached 92% agreement with human judges.
The second experiment uses the post-exposure rollback protocol on LoCoMo and MemoryAgentBench, from ChronoMem. We measure leakage, meaning the fraction of answers that still use retracted content, together with retained accuracy on facts from sessions after the retraction point. Global truncation should lose those later facts and selective recomputation should keep them. This is the cleanest test of provenance.
The third experiment adapts MANBENCH questions to a multi-session memory setting. Role-based agents inject a false claim repeatedly. We compare the error rate of source-grouped support with episode-count support and with Basic RAG, against the reported 25.48% clean and 74.75% role-influenced rates. If source grouping gives no protection, that part of the claim is wrong.
The fourth experiment is the tipping-point sweep over token budget and history length for raw RAG, PlugMem-style distillation and the gated hybrid.
Two outcomes would make the idea worth pursuing. The first is parity with Basic RAG plus hybrid reranking on clean LoCoMo together with a clear win on leakage and update questions. The second is PlugMem-level accuracy on LongMemEval at a few hundred tokens with fewer unsupported answers. If neither appears, the proposal fails.
References
- Diagnosing Retrieval vs. Utilization Bottlenecks in LLM Agent Memory
- PlugMem: A Task-Agnostic Plugin Memory Module for LLM Agents
- Embedding models for episodic knowledge graphs
- The Tensor Brain: A Unified Theory of Perception, Memory and Semantic Decoding
- Beyond Dialogue Time: Temporal Semantic Memory for Personalized LLM Agents
- When Agents “Misremember” Collectively: Exploring the Mandela Effect in LLM-based Multi-Agent Systems
- AriGraph: Learning Knowledge Graph World Models with Episodic Memory for LLM Agents
- ChronoMem: Version Control and Semantic Rollback for Large Language Model Agent Memory
- Adaptive Memory Admission Control For LLM Agents
- TRAC: Trustworthy Retrieval Augmented Chatbot
- Evaluating large language models on medical evidence summarization
- Do Language Models Know When They're Hallucinating References?
- LightMem: Lightweight and Efficient Memory-Augmented Generation