RaMem: 面向长期智能体记忆的上下文重建
RaMem: Contextual Reinstatement for Long-term Agentic Memory
AI总结:
针对长期记忆中的上下文坍塌问题,提出RaMem框架,通过证据锚定、回忆条件归纳、有效性感知检索和上下文保留合成四个阶段,将检索到的记忆片段转化为可验证的上下文证据,在多个基准上平均F1提升超10%。
摘要:
长期记忆对于在长时间交互和不断变化的任务上下文中运行的LLM智能体变得越来越重要。最近的记忆系统使过去的经验更加持久、紧凑和可检索,但仅靠检索并不能确保记忆为当前查询提供有效证据。当经验被压缩成可重用的片段时,如果记忆涉及重复出现的实体或用户状态,来自不同情境的记忆可能看起来同样相关。我们将这种失败称为上下文坍塌:记忆失去了判断其是否为当前查询提供有效证据所需的周围上下文。为了解决这个问题,我们提出了面向智能体记忆的上下文重建(RaMem)框架,该框架将检索到的记忆片段转化为上下文可验证的证据。RaMem通过四个协调阶段运作:(i)证据锚定将每个记忆锚定在其原始情节条件中,特别是事件时间、提及时间、会话跨度以及参与者;(ii)回忆条件归纳推导出查询隐含的证据条件;(iii)有效性感知检索使用这些条件优先考虑上下文兼容的记忆,同时保留内容相关的候选作为备用证据;(iv)上下文保留合成使所选记忆的结构化上下文对生成器可用。在长期记忆基准上的实验表明,RaMem在多个骨干网络上相比强记忆基线持续提升性能,平均F1提升超过10%。
英文摘要:
Long-term memory has become increasingly important for LLM agents that operate across extended interactions and evolving task contexts. Recent memory systems have made past experiences more persistent, compact, and retrievable, but retrieval alone does not ensure that a memory provides valid evidence for the current query. When experiences are compressed into reusable fragments, memories from different situations may appear equally relevant if they involve recurring entities or user states. We refer to this failure as context collapse: memories lose the surrounding context needed to judge whether they provide valid evidence for the current query. To address this problem, we propose Contextual Reinstatement for Agentic Memory (RaMem), a framework that turns retrieved memory fragments into contextually verifiable evidence. RaMem operates through four coordinated stages: (i) evidence anchoring grounds each memory in its original episodic conditions, especially event time, mention time, session span, and participants; (ii) recall condition induction derives the evidence conditions implied by the query; (iii) validity-aware retrieval uses these conditions to prioritize context-compatible memories while retaining content-relevant candidates as fallback evidence; and (iv) context-preserved synthesis keeps the selected memories' structured context available to the generator. Experiments on long-term memory benchmarks show that RaMem consistently improves performance over strong memory baselines, with average F1 gains of more than 10% across several backbones.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。