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

Hong-Li Yu, Ting Chen, Jiang-Tao Feng, Jiang-Jie Chen, Wei-Nan Dai, Qi-Ying Yu, Ya-Qin Zhang, Wei-Ying Ma, Jing-Jing Liu, Ming-Xuan Wang, Hao Zhou

arXiv:2507.02259 · 2026-11-15 공개 · arXiv · PDF

llm long-context dapo linear-complexity memagent multi-conv-rl overwrite-strategy ruler-test

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.

한국어 요약

한 줄 요약

MemAgent는 3.5M QA 작업에서 성능 저하 5% 미만으로 긴 문맥 처리를 가능하게 하는 새로운 에이전트 워크플로우다.

핵심 기여도

핵심 아이디어

MemAgent는 기존의 긴 텍스트 처리 방식에서 벗어나, 텍스트를 분할 읽고 메모리를 업데이트하는 에이전트 기반 워크플로우를 제안한다. 이는 기존의 선형 복잡도를 유지하면서도 무한히 긴 문서를 처리할 수 있는 가능성을 열어준다. 핵심은 오버라이트 전략을 통해 메모리 업데이트를 효율적으로 수행하고, DAPO 알고리즘을 확장하여 독립적인 컨텍스트를 생성함으로써 훈련의 일관성을 유지하는 데 있다.

기술적 접근법

주요 결과

의의 및 한계

MemAgent는 긴 텍스트 처리에서 성능 저하를 최소화하면서도 선형 복잡도를 유지하는 데 성공한 점에서 학술적·실용적 의의가 있다. 특히, 오버라이트 전략과 DAPO 확장은 기존의 메모리 기반 모델과 차별화된다. 그러나 3.5M 길이 이상의 텍스트 처리 성능은 명시되지 않았으며, 실제 대규모 문서 처리 환경에서의 안정성 검증이 필요하다.

실용적 활용

MemAgent는 대규모 문서 분석, 긴 텍스트 요약, QA 시스템 등에서 활용 가능하다. 특히, 긴 컨텍스트를 요구하는 법률, 의료, 학술 분야에서 유용할 것으로 기대된다.