종단 간 강화 학습을 통한 압축 메모리 기반 동적 장문맥 추론
Dynamic Long Context Reasoning over Compressed Memory via End-to-End Reinforcement Learning
February 9, 2026
저자: Zhuoen Chen, Dongfang Li, Meishan Zhang, Baotian Hu, Min Zhang
cs.AI
초록
대규모 언어 모델(LLM)은 2차 계산 비용, 정보 망각, 검색 증강 생성(RAG)의 고질적인 문맥 단편화 문제 등 장문맥 처리에 있어 상당한 어려움을 겪고 있습니다. 본 연구에서는 모든 원본 토큰을 처리하는 대신 청크 단위 압축과 선택적 기억 회상을 기반으로 한 인지 과학에서 영감을 받은 효율적인 장문맥 추론 프레임워크를 제안합니다. 해당 프레임워크는 장문 입력을 청크로 분할하고 학습된 압축기를 사용해 각 청크를 압축된 메모리 표현으로 인코딩합니다. 게이팅 모듈은 관련 메모리 블록을 동적으로 선택하며, 선택된 블록은 하위 작업을 해결하기 위해 진화하는 작업 메모리를 갖춘 추론 모듈에 의해 반복적으로 처리됩니다. 압축기와 추론기는 종단간 강화 학습을 통해 공동 최적화되는 반면, 게이팅 모듈은 분류기로 별도 학습됩니다. 실험 결과, 제안 방법은 RULER-HQA와 같은 다중 홉 추론 벤치마크에서 경쟁력 있는 정확도를 달성했으며, 문맥 길이를 7K 토큰에서 1.75M 토큰으로 외삽할 수 있었고, 강력한 장문맥 베이스라인 대비 유리한 정확도-효율성 트레이드오프를 제공합니다. 특히 MemAgent 대비 최대 2배의 GPU 최대 메모리 사용량 감소와 6배의 추론 속도 향상을 달성했습니다.
English
Large Language Models (LLMs) face significant challenges in long-context processing, including quadratic computational costs, information forgetting, and the context fragmentation inherent in retrieval-augmented generation (RAG). We propose a cognitively inspired framework for efficient long-context inference based on chunk-wise compression and selective memory recall, rather than processing all raw tokens. The framework segments long inputs into chunks and encodes each chunk into compressed memory representations using a learned compressor. A gating module dynamically selects relevant memory blocks, which are then iteratively processed by a reasoning module with an evolving working memory to solve downstream tasks. The compressor and reasoner are jointly optimized via end-to-end reinforcement learning, while the gating module is trained separately as a classifier. Experimental results show that the proposed method achieves competitive accuracy on multi-hop reasoning benchmarks such as RULER-HQA, extrapolates context length from 7K to 1.75M tokens, and offers a favorable accuracy-efficiency trade-off compared to strong long-context baselines. In particular, it achieves up to a 2 times reduction in peak GPU memory usage and a 6 times inference speedup over MemAgent.