MemForest通过分事件树压缩记忆,实现存储减半、检索提速两倍。
MemForest: Efficient Agent Memory Management via EventTree Partitioning and Progressive Merging

- 按语义和时间将记忆切分为事件单元,构建最大生成树(EventTree)
- 通过高权重边逐步合并冗余节点,压缩50%记忆,保留97.1%性能
- 锚点传播检索提升准确性,适合长期对话与多模态智能体使用
智能体记忆系统在长期对话、个性化助手和视频理解中展现出巨大潜力,但持续积累的记忆带来了巨大的存储与推理开销。为此,我们提出通用的记忆压缩框架 MemForest,可适配多种智能体记忆系统。MemForest 利用全局语义相似性与局部时间连续性,将历史记忆划分为事件中心的单元,为每个单元构建最大生成树(EventTree),并通过选择高权重边逐步合并冗余记忆节点,降低存储开销。此外,引入锚点引导的传播检索机制,从关键节点的时间邻域中召回相关记忆节点,提升检索精度。大量实验表明,该方法效果显著:在单模态 Mem0 框架下,压缩 50% 历史记忆的同时保留 97.1% 的原始性能,在三个基准(LoCoMo、LongMemEval、PersonaMem)上实现 1.89 倍检索加速;在多模态 M3-Agent 框架下,保持 99.7% 性能,压缩率同样为 50%,在两个基准(M3-Bench-robot、M3-Bench-web)上实现 2.24 倍加速。
原文摘要 · Abstract (English)
Agent memory systems have demonstrated significant potential in long-term dialogue, personalized assistants, and video understanding. However, continuously accumulated memory introduces substantial storage and retrieval costs during inference. To address this issue, we propose \textbf{MemForest}, a general memory compression framework adaptable to various agent memory systems. Specifically, MemForest partitions historical memory into event-centric units by leveraging global semantic similarity and local temporal continuity. For each unit, it constructs a maximum spanning tree, termed an EventTree, and progressively merges redundant memory nodes by selecting high-weight edges, reducing storage overhead. Furthermore, we introduce an anchor-guided propagation retrieval mechanism that retrieves relevant memory nodes from the temporal neighborhoods of key nodes, improving retrieval accuracy. Extensive experiments demonstrate the effectiveness of MemForest. Under the unimodal Mem0 framework, MemForest retains \textbf{97.1%} of the original performance while compressing \textbf{50%} of historical memory across three benchmarks (LoCoMo, LongMemEval, and PersonaMem), achieving a \textbf{1.89x} retrieval speedup. Under the multimodal M3-Agent framework, it preserves \textbf{99.7%} of the original performance with a \textbf{50%} compression ratio across two benchmarks (M3-Bench-robot and M3-Bench-web), achieving a \textbf{2.24x} retrieval speedup. \textcolor{RoyalBlue}{\textit{Our code is available at [https://github.com/Celina-love-sweet/MemForest.}}](https://github.com/Celina-love-sweet/MemForest.}})
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。