English

MemAgent: Reshaping Long-Context LLM with Multi-Conv RL-based Memory Agent

Computation and Language 2025-07-04 v1 Artificial Intelligence Machine Learning

Abstract

Despite improvements by length extrapolation, efficient attention and memory modules, handling infinitely long documents with linear complexity without performance degradation during extrapolation remains the ultimate challenge in long-text processing. We directly optimize for long-text tasks in an end-to-end fashion and introduce a novel agent workflow, MemAgent, which reads text in segments and updates the memory using an overwrite strategy. We extend the DAPO algorithm to facilitate training via independent-context multi-conversation generation. MemAgent has demonstrated superb long-context capabilities, being able to extrapolate from an 8K context trained on 32K text to a 3.5M QA task with performance loss < 5% and achieves 95%+ in 512K RULER test.

Keywords

Cite

@article{arxiv.2507.02259,
  title  = {MemAgent: Reshaping Long-Context LLM with Multi-Conv RL-based Memory Agent},
  author = {Hongli Yu and Tinghong Chen and Jiangtao Feng and Jiangjie Chen and Weinan Dai and Qiying Yu and Ya-Qin Zhang and Wei-Ying Ma and Jingjing Liu and Mingxuan Wang and Hao Zhou},
  journal= {arXiv preprint arXiv:2507.02259},
  year   = {2025}
}

Comments

Project Page: https://memagent-sialab.github.io/

R2 v1 2026-07-01T03:44:13.467Z