MemAgent: Reshaping Long-Context LLM with Multi-Conv RL-based Memory Agent
Hongli Yu, Tinghong Chen, Jiangtao Feng, Jiangjie Chen, Weinan Dai, Qiying Yu, Ya-Qin Zhang, Wei-Ying Ma, Jingjing Liu, Mingxuan Wang, Hao Zhou
Abstract
Despite improvements by length extrapolation, efficient attention and memory modules, handling infinitely long documents without performance degradation during extrapolation remains the ultimate challenge in long-text processing. To solve this problem, We introduce a novel agent workflow, , which processes text in segments and updates memory through an overwrite strategy, addressing the challenge of long-context task through enhanced memory management. We further extend the DAPO algorithm to directly optimize memory ability in an end-to-end fashion, facilitating training via independent-context multi-conversation generation. Experimental results demonstrate that MemAgent has superb long-context capabilities, being able to extrapolate from an 8K context to a 3.5M QA task with a performance loss of less than 10% and achieving over 95% on the 512K NIAH test.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 0f65637b-7279-4b98-9fe7-64c44511329aCited by top-tier papers19
- Explore with Long-term Memory: A Benchmark and Multimodal LLM-based Reinforcement Learning Framework for Embodied ExplorationSen Wang, Bangwei Liu, Zhenkun Gao, Lizhuang Ma et al.CVPR 2026 · 14 citations
- MemOCR: Layout-Aware Visual Memory for Efficient Long-Horizon ReasoningYaorui Shi, Shugui Liu, Yu Yang, Wenyu Mao et al.ICML 2026 · 13 citations
- Beyond Trajectory-Level Attribution: Graph-Based Credit Assignment for Agentic Reinforcement LearningCheng Xin, Shuo He, Lang Feng, Haiyang Xu et al.ICML 2026 · 6 citations
- Gated Differentiable Working Memory for Long-Context Language ModelingLingrui Mei, Shenghua Liu, Yiwei Wang, Yuyao Ge et al.ACL 2026 · 4 citations
- MemWeaver: A Hierarchical Memory from Textual Interactive Behaviors for Personalized GenerationShuo Yu, Mingyue Cheng, Daoyu Wang, Qi Liu et al.WWW 2026 · 3 citations
Builds on18
- Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida et al.NeurIPS 2022 · 24,707 citations
- Efficiently Modeling Long Sequences with Structured State SpacesAlbert Gu, Karan Goel, Christopher RéICLR 2022 · 3,482 citations
- DAPO: An Open-Source LLM Reinforcement Learning System at ScaleQiying Yu, Zheng Zhang, Ruofei Zhu, Yufeng Yuan et al.NeurIPS 2025 · 2,828 citations
- Transformers are RNNs: Fast Autoregressive Transformers with Linear AttentionAngelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, François FleuretICML 2020 · 2,665 citations
- Efficient Streaming Language Models with Attention SinksGuangxuan Xiao, Yuandong Tian, Beidi Chen, Song Han et al.ICLR 2024 · 1,714 citations
Related papers
- A Human-Inspired Reading Agent with Gist Memory of Very Long ContextsKuang-Huei Lee, Xinyun Chen, Hiroki Furuta, John F. Canny et al.ICML 2024 · 106 citations
- Dynamic Long Context Reasoning over Compressed Memory via End-to-End Reinforcement LearningZhuoen Chen, Dongfang Li, Meishan Zhang, Baotian Hu et al.ACL 2026 · 2 citations
- MEM1: Learning to Synergize Memory and Reasoning for Efficient Long-Horizon AgentsZijian Zhou, Ao Qu, Zhaoxuan Wu, Sunghwan Kim et al.ICLR 2026 · 223 citations
- When to Memorize and When to Stop: Gated Recurrent Memory for Long-Context ReasoningLeheng Sheng, Yongtao Zhang, Wenchang Ma, Yaorui Shi et al.ICML 2026 · 4 citations
- CoMem: Context Management with A Decoupled Long-Context ModelYuwei Zhang, Chengyu Dong, Shuowei Jin, Changlong Yu et al.ICML 2026
