Skip to main content
QUICK REVIEW

[论文解读] Mem0: Building Production-Ready AI Agents with Scalable Long-Term Memory

Prateek Chhikara, Dev Khant|ArXiv.org|Apr 28, 2025
Topic ModelingComputer Science被引用 3
一句话总结

Mem0 引入以记忆为中心的 AI 代理架构,能够从对话中动态提取、整合并检索 salient 信息,Mem0^g 在其基础上新增基于图的记忆用于关系推理;在 LOCOMO 上超过基线,同时降低延迟和令牌成本。

ABSTRACT

Large Language Models (LLMs) have demonstrated remarkable prowess in generating contextually coherent responses, yet their fixed context windows pose fundamental challenges for maintaining consistency over prolonged multi-session dialogues. We introduce Mem0, a scalable memory-centric architecture that addresses this issue by dynamically extracting, consolidating, and retrieving salient information from ongoing conversations. Building on this foundation, we further propose an enhanced variant that leverages graph-based memory representations to capture complex relational structures among conversational elements. Through comprehensive evaluations on LOCOMO benchmark, we systematically compare our approaches against six baseline categories: (i) established memory-augmented systems, (ii) retrieval-augmented generation (RAG) with varying chunk sizes and k-values, (iii) a full-context approach that processes the entire conversation history, (iv) an open-source memory solution, (v) a proprietary model system, and (vi) a dedicated memory management platform. Empirical results show that our methods consistently outperform all existing memory systems across four question categories: single-hop, temporal, multi-hop, and open-domain. Notably, Mem0 achieves 26% relative improvements in the LLM-as-a-Judge metric over OpenAI, while Mem0 with graph memory achieves around 2% higher overall score than the base configuration. Beyond accuracy gains, we also markedly reduce computational overhead compared to full-context method. In particular, Mem0 attains a 91% lower p95 latency and saves more than 90% token cost, offering a compelling balance between advanced reasoning capabilities and practical deployment constraints. Our findings highlight critical role of structured, persistent memory mechanisms for long-term conversational coherence, paving the way for more reliable and efficient LLM-driven AI agents.

研究动机与目标

  • 解决维持跨多轮对话的长期连贯性,超出固定 LLM 上下文窗口的挑战。
  • 开发能够从持续对话中提取、整合并检索 salient 信息的记忆架构。
  • 在多样化问题类型上将记忆架构与基线进行比较并衡量效率。
  • 研究密集型自然语言记忆(Mem0)与基于图的记忆(Mem0^g)在关系推理中的作用。

提出的方法

  • 两种记忆架构:Mem0 采用密集自然语言记忆,Mem0^g 采用基于图的记忆表示。
  • Mem0 流程:提取阶段由 LLM 生成来自新消息对及上下文的候选记忆;更新阶段通过工具调用机制对现有记忆执行 ADD、UPDATE、DELETE 或 NOOP。
  • Mem0^g 流程:记忆存储为有向带标签的图,实体为节点,关系为边;LLM 提取实体与关系三元组,包含冲突检测和更新解析以维持时间一致性。
  • Mem0^g 的记忆检索采用双重策略:面向实体的子图检索与语义三元组匹配,支持定向与广泛查询。
  • 实现方面使用 GPT-4o-mini 做推理,使用密集嵌入进行相似性检索,并以 Neo4j 存储图结构。
  • 评估采用 LOCOMO,并使用包括 F1、BLEU-1、以及 LL M‑as‑a‑Judge(J)等多维度指标集,以及令牌消耗和延迟等部署指标。

实验结果

研究问题

  • RQ1Mem0 是否能在多会话对话中维持相对于现有记忆系统更高的一致性?
  • RQ2在密集记忆基础上加入图形记忆(Mem0^g)是否能提升关系推理与时间理解?
  • RQ3在 LOCOMO 上记忆化方法与全上下文、RAG 基线在准确性与部署效率上相比如何?
  • RQ4在生产化场景下使用 Mem0 与 Mem0^g 时的延迟与令牌成本权衡是什么?

主要发现

  • Mem0 在 LOCOMO 的单跳、开放域与时态问题上达到最先进的 F1、BLEU-1 与 LL M‑as‑a‑Judge 分数;Mem0^g 提供稳健的时态推理性能。
  • Mem0 在单跳与多跳任务中超越多项基线,Mem0^g 在时态推理方面具有主要收益。
  • 在开放域任务中,Zep 在 J 指标上略胜 Mem0 与 Mem0^g,但 Mem0^g 仍是接近的追赶者,表明图结构下的记忆检索具有鲁棒性。
  • 相较于全上下文处理(Mem0 的 p95 延迟降低 91%)和令牌成本降低超过 90%,Mem0 与 Mem0^g 提供显著的延迟下降与成本减免,便于实际部署。
  • Mem0^g 通过显式关系表示在时态一致性方面展示出显著收益,优于 Mem0 在时态问题上的表现;但图结构的开销并非在所有多跳合成任务中都带来提升。
  • 在所有评估中,Mem0 与 Mem0^g 在 LOCOMO 的四种问题类型上持续优于记忆基线和 RAG 变体。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。