arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.03197cs.CL
收藏

MemTrain:自监督上下文记忆训练

MemTrain: Self-Supervised Context Memory Training

State Key Laboratory of General Artificial Intelligence, School of Intelligence Science and Technology, Peking University(通用人工智能国家重点实验室,智能科学与技术学院,北京大学);Samsung Research, Beijing, China(三星研究院,北京,中国)

Ziheng Li, Xingrun Xing, Haoqing Wang, Zhi-Hong Deng, Yehui Tang

AI总结:

提出自监督框架MemTrain,通过两个耦合代理任务(端到端掩码重建和中间记忆召回)利用无标签维基百科语料增强LLM代理的上下文记忆能力,显著提升下游长文本推理性能。

摘要:

记忆是长时程LLM代理不可或缺的能力,使其能够保留和利用跨扩展交互积累的信息。现有的记忆代理方法通常在下游任务上通过强化学习进行端到端训练。然而,为记忆密集型场景收集高质量标注问题成本高昂,且所得训练数据往往缺乏足够的多样性以覆盖通用记忆行为。在这项工作中,我们提出MemTrain,一种自监督训练框架,用于普遍增强LLM代理的上下文记忆能力,以实现更有效的下游后训练。MemTrain在无标签维基百科语料上引入两个耦合代理任务:(1)端到端掩码重建目标,要求模型在多轮记忆更新后恢复掩码实体,从而从最终结果角度鼓励记忆维持;(2)中间记忆召回目标,要求模型利用中间记忆状态重建掩码历史信息,鼓励整个交互过程中的忠实压缩和记忆完整性。两个目标通过GRPO联合优化。在长文本QA和基于搜索的QA基准上的大量实验表明,MemTrain在不同模型上持续改善下游记忆密集型推理性能,相比直接的任务特定后训练,提升高达17.67个点。

英文摘要:

Memory is an indispensable capability for long-horizon LLM agents, enabling them to preserve and utilize information accumulated across extended interactions. Existing memory-agent approaches are typically trained end-to-end with reinforcement learning on downstream tasks. However, collecting high-quality annotated problems for memory-intensive scenarios is costly, and the resulting training data often lack sufficient diversity to cover general memory behaviors. In this work, we propose MemTrain, a self-supervised training framework for generally enhancing the context-memory capability of LLM agents for more effective downstream post-training. MemTrain introduces two coupled proxy tasks over unlabeled Wikipedia corpora: (1) an end-to-end masked reconstruction objective, which requires the model to recover masked entities after multiple rounds of memory updates, thereby encouraging memory maintenance from the final outcome perspective; and (2) an intermediate memory recall objective, which requires the model to reconstruct masked historical information using intermediate memory states, encouraging faithful compression and memory completeness throughout the interaction process. The two objectives are jointly optimized using GRPO. Extensive experiments on long-text QA and search-based QA benchmarks demonstrate that MemTrain consistently improves downstream memory-intensive reasoning performance across different models, achieving gains of up to 17.67 points over direct task-specific post-training.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑