[论文解读] A-MEM: Agentic Memory for LLM Agents
tldr: A-Mem 引入一个具有主体性、动态进化的记忆系统,面向受 Zettelkasten 启发的 LLM 代理,能够自主创建笔记、建立链接以及记忆演化,以提升长期任务性能。在 LoCoMo 的六个基础模型上的评估显示结果具有竞争力甚至优于其他方法,尤其在多跳推理方面,同时具备更低的 token 开销。
While large language model (LLM) agents can effectively use external tools for complex real-world tasks, they require memory systems to leverage historical experiences. Current memory systems enable basic storage and retrieval but lack sophisticated memory organization, despite recent attempts to incorporate graph databases. Moreover, these systems' fixed operations and structures limit their adaptability across diverse tasks. To address this limitation, this paper proposes a novel agentic memory system for LLM agents that can dynamically organize memories in an agentic way. Following the basic principles of the Zettelkasten method, we designed our memory system to create interconnected knowledge networks through dynamic indexing and linking. When a new memory is added, we generate a comprehensive note containing multiple structured attributes, including contextual descriptions, keywords, and tags. The system then analyzes historical memories to identify relevant connections, establishing links where meaningful similarities exist. Additionally, this process enables memory evolution - as new memories are integrated, they can trigger updates to the contextual representations and attributes of existing historical memories, allowing the memory network to continuously refine its understanding. Our approach combines the structured organization principles of Zettelkasten with the flexibility of agent-driven decision making, allowing for more adaptive and context-aware memory management. Empirical experiments on six foundation models show superior improvement against existing SOTA baselines. The source code for evaluating performance is available at https://github.com/WujiangXu/A-mem, while the source code of the agentic memory system is available at https://github.com/WujiangXu/A-mem-sys.
研究动机与目标
- 推动面向 LLM 代理的灵活、通用记忆,超越固定的模式和预定义的记忆操作。
- 设计一个主体性记忆系统,使其能够自主构建具有属性和嵌入向量的丰富记忆笔记。
- 实现记忆的动态链接与演化,形成自组织的知识网络。
- 在跨多种基础模型的长期对话任务上展示出色的性能。
提出的方法
- 采用受 Zettelkasten 启发的原子笔记,具有丰富属性(内容、时间戳、关键词、标签、上下文描述)并使用密集嵌入进行相似性匹配。
- 计算笔记嵌入并使用前 k 个余弦相似度来筛选近似记忆以生成链接。
- 在添加新记忆时,调用 LLM 生成上下文描述、链接以及不断演化的属性。
- 通过针对新经验更新周边记忆的上下文、关键词和标签来实现记忆的演化。
- 通过对查询进行嵌入并在记忆网络上执行余弦相似度检索,检索与给定查询相关的记忆。
实验结果
研究问题
- RQ1一个主体性记忆系统是否能够在没有预定义操作的情况下自主地结构化和演化记忆?
- RQ2动态链接和记忆演化是否能在多会话任务中提升长期推理能力?
- RQ3在长期对话基准上,A-Mem 相较于现有记忆基线在多样的基础模型上表现如何?
主要发现
- A-Mem 在 LoCoMo 上对六个基础模型实现了与之竞争甚至优于的 F1 和 BLEU-1 分数,在多跳任务上尤有提升。
- 在 top-k 设置下的记忆检索在上下文丰富性与处理效率之间取得平衡,k 越大边际收益递减。
- 消融研究表明链接生成和记忆演化均对性能有贡献,完整的 A-Mem 的表现优于变体。
- t-SNE 可视化表明使用 A-Mem 时记忆聚类更为内聚,反映出更强的记忆组织性。
- A-Mem 保持的 token 长度显著较低(大约 1,200–2,500),相较于某些基线(约 16,900)。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。