重新思考如何记忆:超越原子事实的终身LLM代理记忆
Rethinking How to Remember: Beyond Atomic Facts in Lifelong LLM Agent Memory
AI总结:
本文提出TriMem,一种能够维护三种共存表示粒度的内存系统,通过保留原始对话片段、提取原子事实以及合成轮廓来实现对积累对话历史的忠实存储、高效检索和深度推理,从而克服现有方法在细节丢失和推理能力不足的问题。
摘要:
为了实现可靠的长期交互,LLM代理需要一种能够忠实存储、高效检索并深入推理积累对话历史的内存系统。大多数现有方法采用提取事实的范式:手工编写的静态提示将原始对话压缩成原子事实,然后存储、匹配并注入到下游推理中。然而,这种以事实为中心的设计不可避免地丢弃了原始对话中的细粒度细节,并且无法支持对分散孤立事实的深度推理。此外,静态提示无法在不同的对话风格中保持一致的提取粒度。为了解决这些限制,我们提出了TriMem,它维护三种共存的表示粒度,包括由源标识符锚定的原始对话片段以保证存储的准确性,提取的原子事实用于高效的内存检索,以及合成的轮廓,将分散的事实聚合为整体语义理解以支持深度推理。我们进一步采用基于TextGrad的提示优化,通过响应质量反馈迭代优化提取和轮廓提示,实现终身进化而无需任何参数更新。在LoCoMo和PerLTQA多个LLM基础架构上的广泛实验表明,TriMem在强内存基线中表现一致。代码可在https://TMLR-TriMem.github.io获取。
英文摘要:
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 .
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。