Large Language Models (LLMs) have demonstrated impressive capabilities across a wide range of NLP tasks, but they remain fundamentally stateless, constrained by limited context windows that hinder long-horizon reasoning. Recent efforts to address this limitation often augment LLMs with an external memory bank, yet most existing pipelines are static and heuristic-driven, lacking a learned mechanism for deciding what to store, update, or retrieve. We present Memory-R1, a reinforcement learning (RL) framework that equips LLMs with the ability to actively manage and utilize external memory through two specialized agents: a Memory Manager that learns structured operations, including ADD, UPDATE, DELETE, and NOOP; and an Answer Agent that pre-selects and reasons over relevant entries. Both agents are fine-tuned with outcome-driven RL (PPO and GRPO), enabling adaptive memory management with minimal supervision. With only 152 training QA pairs, Memory-R1 outperforms strong baselines and generalizes across diverse question types, three benchmarks (LoCoMo, MSC, LongMemEval), and multiple model scales (3B-14B).


翻译:大型语言模型(LLMs)已在广泛的自然语言处理任务中展现出卓越能力,但其本质上仍是无状态的,受限于有限的上下文窗口,阻碍了长程推理。近期针对此限制的研究通常通过外部记忆库增强LLMs,然而现有流程大多为静态且依赖启发式方法,缺乏决定存储、更新或检索内容的学习机制。本文提出Memory-R1——一个强化学习框架,通过两个专用代理使LLMs具备主动管理与利用外部记忆的能力:记忆管理器学习结构化操作(包括ADD、UPDATE、DELETE和NOOP);答案代理则对相关条目进行预选与推理。两个代理均通过结果驱动的强化学习(PPO和GRPO)进行微调,实现以最小监督完成自适应记忆管理。仅使用152个训练问答对,Memory-R1即在多样化问题类型、三个基准测试(LoCoMo、MSC、LongMemEval)及多模型规模(3B-14B)上超越强基线模型并展现泛化能力。

0
下载
关闭预览

相关内容

大语言模型机器遗忘综述
专知会员服务
18+阅读 · 2025年11月2日
大语言模型中的检索与结构化增强生成综述
专知会员服务
32+阅读 · 2025年9月17日
大型语言模型推理增强外部知识:综述
专知会员服务
37+阅读 · 2025年6月2日
什么是后训练?大语言模型训练后优化方法综述,87页pdf
KnowledGPT:基于知识库的检索和存储访问增强大型语言模型
「知识增强预训练语言模型」最新研究综述
专知
18+阅读 · 2022年11月18日
自然语言处理中的语言模型预训练方法
PaperWeekly
14+阅读 · 2018年10月21日
国家自然科学基金
6+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
VIP会员
相关基金
国家自然科学基金
6+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
Top
微信扫码咨询专知VIP会员