统一框架让记忆增强型智能体训练更简单高效
MemFactory: Unified Inference & Training Framework for Agent Memory
- 将记忆操作拆成可拼接组件,像乐高一样搭建智能体
- 在多个任务上平均提升14.8%,最高达14.8%相对增益
- 适合研究记忆机制、强化学习与智能体的开发者
记忆增强的大语言模型是构建具备长期能力的智能体的关键。近期将强化学习用于优化记忆的提取、更新和检索等操作,成为极具前景的研究方向。然而现有方法高度碎片化且任务特定,缺乏统一的基础设施来简化复杂流程的集成、训练与评估。为此,我们提出MemFactory,首个专为记忆增强型智能体设计的统一训练与推理框架。受LLaMA-Factory成功启发,MemFactory将记忆生命周期抽象为原子化、可插拔组件,支持研究人员通过“乐高式”架构无缝构建定制化记忆智能体。框架原生集成组相对策略优化(GRPO),以多维环境奖励驱动内部记忆管理策略的微调。MemFactory开箱即用支持最新前沿范式,包括Memory-R1、RMM和MemAgent。我们在开源的MemAgent架构上使用其公开数据集进行实证验证。在多个评测集上,相比基线模型,MemFactory平均性能提升,相对增益最高达14.8%。该框架提供标准化、可扩展且易用的基础设施,显著降低研究门槛,推动记忆驱动型智能体的未来发展。
原文摘要 · Abstract (English)
Memory-augmented Large Language Models (LLMs) are essential for developing capable, long-term AI agents. Recently, applying Reinforcement Learning (RL) to optimize memory operations, such as extraction, updating, and retrieval, has emerged as a highly promising research direction. However, existing implementations remain highly fragmented and task-specific, lacking a unified infrastructure to streamline the integration, training, and evaluation of these complex pipelines. To address this gap, we present MemFactory, the first unified, highly modular training and inference framework specifically designed for memory-augmented agents. Inspired by the success of unified fine-tuning frameworks like LLaMA-Factory, MemFactory abstracts the memory lifecycle into atomic, plug-and-play components, enabling researchers to seamlessly construct custom memory agents via a "Lego-like" architecture. Furthermore, the framework natively integrates Group Relative Policy Optimization (GRPO) to fine-tune internal memory management policies driven by multi-dimensional environmental rewards. MemFactory provides out-of-the-box support for recent cutting-edge paradigms, including Memory-R1, RMM, and MemAgent. We empirically validate MemFactory on the open-source MemAgent architecture using its publicly available training and evaluation data. Across the evaluation sets, MemFactory improves performance over the corresponding base models on average, with relative gains of up to 14.8%. By providing a standardized, extensible, and easy-to-use infrastructure, MemFactory significantly lowers the barrier to entry, paving the way for future innovations in memory-driven AI agents.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。