Drawing on Memory: Dual-Trace Encoding Improves Cross-Session Recall in LLM Agents
TLDR
A new dual-trace memory encoding method significantly improves LLM agents' cross-session recall, especially for temporal and multi-session tasks.
Key contributions
- Introduces dual-trace memory encoding, pairing facts with contextual "scene traces" for richer recall.
- Achieves a +20.2% accuracy gain (73.7% vs 53.5%) on the LongMemEval-S benchmark.
- Significantly improves temporal reasoning (+40pp), knowledge-update (+25pp), and multi-session aggregation (+30pp).
- Provides these memory gains with no additional token cost during encoding.
Why it matters
Current LLM agents struggle with contextual memory over time. This paper introduces a novel memory encoding method that dramatically improves an agent's ability to recall information across sessions, track changes, and perform temporal reasoning. This advancement is crucial for developing more robust and intelligent long-lived AI agents.
Original Abstract
LLM agents with persistent memory store information as flat factual records, providing little context for temporal reasoning, change tracking, or cross-session aggregation. Inspired by the drawing effect [3], we introduce dual-trace memory encoding. In this method, each stored fact is paired with a concrete scene trace, a narrative reconstruction of the moment and context in which the information was learned. The agent is forced to commit to specific contextual details during encoding, creating richer, more distinctive memory traces. Using the LongMemEval-S benchmark (4,575 sessions, 100 recall questions), we compare dual-trace encoding against a fact-only control with matched coverage and format over 99 shared questions. Dual-trace achieves 73.7% overall accuracy versus 53.5%, a +20.2 percentage point (pp) gain (95% CI: [+12.1, +29.3], bootstrap p < 0.0001). Gains concentrate in temporal reasoning (+40pp), knowledge-update tracking (+25pp), and multi-session aggregation (+30pp), with no benefit for single-session retrieval, consistent with encoding specificity theory [8]. Token analysis shows dual-trace encoding achieves this gain at no additional cost. We additionally sketch an architectural design for adapting dual-trace encoding to coding agents, with preliminary pilot validation.
📬 Weekly AI Paper Digest
Get the top 10 AI/ML arXiv papers from the week — summarized, scored, and delivered to your inbox every Monday.