Reproduce “Memory-R1: Enhancing Large Language Model Agents to Manage and Utilize Memories via Reinforcement Learning” on OpenResearch

Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Sikuan Yan, Xiufeng Yang, Zuchao Huang, Ercong Nie, Zifeng Ding, Zonggen Li, Xiaowen Ma, Jinhe Bi and 5 more

Memory-R1 trains two agents to manage conversational memory: the Memory Manager adds, updates, deletes, or leaves facts unchanged, while the Answer Agent filters retrieved memories before answering. The agents learn from downstream answer outcomes and are trained separately. On LoCoMo, using LLaMA-3.1-8B-Instruct, GRPO achieves overall F1 45.02, BLEU-1 37.51, and Judge 62.74, versus MemoryOS’s 35.04, 27.99, and 48.20. Evaluation is dialogue-focused.

Key insights

  • Reinforcement learning, using outcome-driven rewards (e.g., exact match in QA), effectively trains LLM agents for complex memory operations without explicit supervision on each action.
  • A specialized Memory Manager agent, optimized with RL, can adaptively maintain an evolving memory bank, overcoming limitations of heuristic-based approaches.
  • Learned Memory Distillation significantly enhances reasoning by allowing the Answer Agent to focus on pertinent information from broadly retrieved memories.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.