Drawing on Memory: Dual-Trace Encoding Improves Cross-Session Recall in LLM Agents
AI 摘要
提出双追踪记忆编码,显著提升LLM Agent跨会话记忆和推理能力。
主要贡献
- 提出双追踪记忆编码方法,提升LLM Agent记忆效果
- 构建LongMemEval-S基准测试,评估跨会话记忆能力
- 实验证明双追踪编码在时间推理、知识更新和多会话聚合方面显著优于传统方法
方法论
引入双追踪记忆编码,将事实与学习场景叙述关联,增强记忆的上下文信息,通过LongMemEval-S评估。
原文摘要
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.