针对智能体记忆冗余问题,提出分步解耦聚合的内存结构提升检索效率。
Beyond RAG for Agent Memory: Retrieval by Decoupling and Aggregation
- 先拆解历史为可复用片段,再聚类生成高层组别
- 在多个数据集上提升答案质量与推理效率
- 适合需要高效记忆管理的对话与推理系统
标准检索增强生成(RAG)不适用于智能体记忆。与大规模异构语料不同,智能体记忆是有限且连贯的交互流,其中许多片段高度相关或近乎重复。因此,传统的扁平 top-k 相似性检索常返回冗余上下文,而以摘要为中心的层次结构又可能模糊区分候选项的细微差异。我们提出‘先解耦后聚合’原则:系统应先从相似历史中分离出可复用事实、更新信息和区分细节,再组织为高效检索结构。基于此,我们提出 xMemory,从原始消息逐步构建可修订的层次化记忆结构,包括段落、记忆组件和组别。xMemory 将交互历史划分为局部事件,将每个段落解耦为记忆组件,通过稀疏性-语义忠实度目标聚合相关组件形成高层组别,并随记忆演化持续维护该结构。推理时采用自顶向下检索:先选取互补的紧凑组别与组件作为主干,仅在证据不足时扩展至段落和原始消息。在 LoCoMo 与 PerLTQA 数据集上,对多种开源与闭源大模型的实验显示,该方法在答案质量与推理令牌效率上均取得稳定提升,冗余度降低,证据密度与覆盖率提高。
原文摘要 · Abstract (English)
Standard Retrieval Augmented Generation (RAG) is poorly matched to agent memory. Unlike large heterogeneous corpora, agent memory forms a bounded and coherent interaction stream in which many spans are highly correlated or near duplicates. As a result, flat top-$k$ similarity retrieval often returns redundant context, while summary-centric hierarchies can blur the subtle details that distinguish one candidate from another. We argue that agent memory should follow the principle of decoupling before aggregation: the system should first isolate reusable facts, updates, and distinguishing details from similar histories, and only then organise them for efficient retrieval. Based on this principle, we propose xMemory, which constructs a revisable hierarchical memory structure from original messages to segments, memory components, and groups. xMemory segments interaction history into local events, decouples each segment into memory components, aggregates related components into high-level groups using a sparsity--semantic faithfulness objective, and maintains this structure incrementally as memory evolves. At inference time, xMemory retrieves top-down, first selecting a compact backbone of complementary groups and components, and then expanding to segments and raw messages only when additional evidence reduces the reader's uncertainty. Experiments on LoCoMo and PerLTQA across diverse open source and closed source LLMs show consistent gains in answer quality and inference token efficiency, supported by analyses of redundancy, evidence density, and coverage.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。