ChatPaper.aiChatPaper

기억 시점과 중단 시점: 장문맥 추론을 위한 게이트 순환 메모리

When to Memorize and When to Stop: Gated Recurrent Memory for Long-Context Reasoning

February 11, 2026
저자: Leheng Sheng, Yongtao Zhang, Wenchang Ma, Yaorui Shi, Ting Huang, Xiang Wang, An Zhang, Ke Shen, Tat-Seng Chua
cs.AI

초록

긴 문맥에 대한 추론은 다양한 실제 애플리케이션에 있어 핵심적이지만, 문맥 길이가 증가함에 따라 성능이 저하되는 대규모 언어 모델(LLM)에게는 여전히 어려운 과제로 남아 있습니다. 최근 연구인 MemAgent는 RNN과 유사한 루프에서 문맥을 청크 단위로 처리하고 최종 응답을 위한 텍스트 메모리를 업데이트하는 방식으로 이 문제를 해결하려고 시도했습니다. 그러나 이러한 단순한 순환 메모리 업데이트 방식은 두 가지 중요한 단점을 가지고 있습니다: (i) 증거가 없는 청크에서도 무분별하게 업데이트가 이루어져 메모리가 급격히 증가할 수 있으며, (ii) 루프에 종료 메커니즘이 부재하여 충분한 증거가 수집된 후에도 불필요한 계산이 발생합니다. 이러한 문제를 해결하기 위해 우리는 보다 안정적이고 효율적인 장문맥 추론을 위한 두 개의 텍스트 제어 게이트를 도입한 GRU-Mem을 제안합니다. 구체적으로, GRU-Mem에서는 업데이트 게이트가 열렸을 때만 메모리가 업데이트되며, 종료 게이트가 열리면 순환 루프가 즉시 종료됩니다. 모델에 이러한 능력을 부여하기 위해 엔드투엔드 강화 학습 내에 두 가지 보상 신호 r^{update}와 r^{exit}를 도입하여 각각 올바른 업데이트 및 종료 행동을 보상합니다. 다양한 장문맥 추론 작업에 대한 실험을 통해 GRU-Mem의 효과성과 효율성을 입증하였으며, 이는 기존 MemAgent 대비 최대 400%의 추론 속도 가속화와 함께 일반적으로 더 나은 성능을 보였습니다.
English
While reasoning over long context is crucial for various real-world applications, it remains challenging for large language models (LLMs) as they suffer from performance degradation as the context length grows. Recent work MemAgent has tried to tackle this by processing context chunk-by-chunk in an RNN-like loop and updating a textual memory for final answering. However, this naive recurrent memory update faces two crucial drawbacks: (i) memory can quickly explode because it can update indiscriminately, even on evidence-free chunks; and (ii) the loop lacks an exit mechanism, leading to unnecessary computation after even sufficient evidence is collected. To address these issues, we propose GRU-Mem, which incorporates two text-controlled gates for more stable and efficient long-context reasoning. Specifically, in GRU-Mem, the memory only updates when the update gate is open and the recurrent loop will exit immediately once the exit gate is open. To endow the model with such capabilities, we introduce two reward signals r^{update} and r^{exit} within end-to-end RL, rewarding the correct updating and exiting behaviors respectively. Experiments on various long-context reasoning tasks demonstrate the effectiveness and efficiency of GRU-Mem, which generally outperforms the vanilla MemAgent with up to 400\% times inference speed acceleration.
PDF230February 13, 2026