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の有効性と効率性が実証され、推論速度が最大400%向上しつつ、一般的に従来のMemAgentを上回る性能を示した。
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