让大模型自动为每项任务生成专属记忆系统。
M$^\star$: Every Task Deserves Its Own Memory Harness

- 用可执行代码演化方法自动优化记忆结构
- 在4个任务上性能超越固定记忆基线
- 适合需要个性化记忆的智能体研究者
大型语言模型代理依赖专用记忆系统,在长期交互中积累和复用知识。现有架构通常采用针对特定领域优化的固定记忆设计,如对话中的语义检索或编码中的技能复用。然而,为某一任务优化的记忆系统往往难以迁移至其他任务。为此,我们提出M$\star$,一种通过可执行程序演化的自动发现任务适配记忆机制的方法。具体而言,将代理记忆系统建模为用Python编写的记忆程序,包含数据结构、存储逻辑与代理工作流指令。利用基于种群的搜索策略并分析评估失败,联合优化这些组件。我们在涵盖对话、具身规划和专家推理的四个基准上评估M$\star$,结果表明其在所有任务上均显著优于现有固定记忆基线。此外,进化出的记忆程序在不同领域展现出结构各异的处理机制,说明针对特定任务定制记忆机制可探索更广的设计空间,相比通用记忆范式更具优势。
原文摘要 · Abstract (English)
Large language model agents rely on specialized memory systems to accumulate and reuse knowledge during extended interactions. Recent architectures typically adopt a fixed memory design tailored to specific domains, such as semantic retrieval for conversations or skills reused for coding. However, a memory system optimized for one purpose frequently fails to transfer to others. To address this limitation, we introduce M$^\star$, a method that automatically discovers task-optimized memory harnesses through executable program evolution. Specifically, M$^\star$ models an agent memory system as a memory program written in Python. This program encapsulates the data Schema, the storage Logic, and the agent workflow Instructions. We optimize these components jointly using a reflective code evolution method; this approach employs a population-based search strategy and analyzes evaluation failures to iteratively refine the candidate programs. We evaluate M$^\star$ on four distinct benchmarks spanning conversation, embodied planning, and expert reasoning. Our results demonstrate that M$^\star$ improves performance over existing fixed-memory baselines robustly across all evaluated tasks. Furthermore, the evolved memory programs exhibit structurally distinct processing mechanisms for each domain. This finding indicates that specializing the memory mechanism for a given task explores a broad design space and provides a superior solution compared to general-purpose memory paradigms.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。