提出三粒度记忆框架,让大模型长期对话更懂细节、会推理。
Rethinking How to Remember: Beyond Atomic Facts in Lifelong LLM Agent Memory

- 用原始对话段、原子事实、合成画像三类表示共存,兼顾存储与推理
- 在多个数据集上显著优于现有记忆方法,性能提升达12.3%以上
- 无需更新参数,通过反馈自动优化提示词,适合长期运行的智能体
为实现可靠的长期交互,大语言模型代理需要能忠实存储、高效检索并深度推理历史对话的记忆系统。现有方法多采用提取事实的范式:通过手工设计的静态提示将原始对话压缩为原子事实,再进行存储、匹配和注入下游推理。然而,这种以事实为中心的设计不可避免地丢失原始对话中的细粒度信息,难以对分散的事实进行深度推理。此外,静态提示无法在不同对话风格间保持一致的提取粒度。为此,我们提出TriMem,维持三种共存的表示粒度:基于源标识符锚定的原始对话段(保障存储保真度)、提取的原子事实(支持高效检索)、聚合分散事实的合成画像(支持深度推理)。我们进一步采用TextGrad-based提示优化,通过响应质量反馈迭代改进提取与建模提示,实现无需参数更新的持续进化。在LoCoMo和PerLTQA上的大量实验表明,TriMem在多种大模型架构下均显著优于强基线。代码已开源:https://TMLR-TriMem.github.io。
原文摘要 · Abstract (English)
To enable reliable long-term interaction, LLM agents require a memory system that can faithfully store, efficiently retrieve, and deeply reason over accumulated dialogue history. Most existing methods adopt an extracted fact based paradigm: handcrafted static prompts compress raw dialogues into atomic facts, which are then stored, matched, and injected into downstream reasoning. Nevertheless, such fact-centric designs inevitably discard fine-grained details in original dialogues and fail to support deep reasoning over scattered isolated facts. Moreover, static prompts cannot maintain consistent extraction granularity across diverse dialogue styles. To address these limitations, we propose TriMem, which maintains three coexisting representation granularities, including raw dialogue segments anchored by source identifiers for storage fidelity, extracted atomic facts for efficient memory retrieval, synthesized profiles that aggregate dispersed facts into holistic semantic understanding for deep reasoning. We further adopt TextGrad-based prompt optimization, which iteratively refines extraction and profiling prompts via response quality feedback, achieving lifelong evolution without any parameter updating. Extensive experiments on LoCoMo and PerLTQA across multiple LLM backbones demonstrate that TriMem consistently outperforms strong memory baselines. The code is available at https://TMLR-TriMem.github.io .
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。