Manuscript Offprint

arXiv:2610.19928

MemDuet: Learning Dual-Process Memory for Long-Context Reasoning

Jiangcheng Song, Haodong Jing, Yulin Mu, Lesong Tao, Jixin Wang, Jin Cui, Tianjing Ren, Runxuan Xie, Yongqiang Ma, Nanning Zheng

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Reasoning over infinitely long documents is becoming a reality with recurrent memory agents. However, increasing context length exacerbates the trade-off between reasoning performance and inference efficiency. Inspired by Kahneman's account of fast and slow thinking, we propose MemDuet 1^{1}, a dual-process memory framework that learns to coordinate a small language model for fast, parallel evidence selection from raw context chunks (System 1) with a large language model for memory-update verification and memory updates in document order (System 2). We train MemDuet in three stages: supervised fine-tuning of System 1 for evidence selection, Group Relative Policy Optimization (GRPO) of System 2 for verification and memory rewriting, and joint optimization of both policies to coordinate selection and updating for long-context reasoning. Experiments on diverse long-context reasoning benchmarks (RULER-HQA, LongBench v2, and 2WikiMultiHopQA) demonstrate a favorable accuracy–efficiency trade-off as context length grows. Averaged across evaluation settings on the three datasets, MemDuet achieves an end-to-end inference speedup of 9.74×9.74\times and an output-token reduction of 73.91% relative to RL-MemAgent.

1 Introduction

Long-context reasoning is essential for large language models (LLMs) to synthesize evidence across documents, understand lengthy reports, and resolve repository-level dependencies in code (Bai et al., 2024; Zhang et al., 2023). Existing work primarily extends long-context capability through

Figure

Figure 1: Accuracy–efficiency trade-off on RULER-HQA. Accuracy, inference time, and output tokens are equally averaged over the nine shared length settings (7K–1.75M). Qwen and DS-Distill use the available settings. Circle areas use a square-root-compressed scale for mean output tokens per question; circle labels give actual output-token ratios to MemDuet (1×).

larger context windows, sparse or linear attention, and retrieval-augmented generation (RAG) (Chen et al., 2023b; Beltagy et al., 2020; Katharopoulos et al., 2020; Yuan et al., 2025; Lewis et al., 2020). However, these approaches remain bounded by the amount of context that can be directly represented or retrieved, leaving reasoning over unbounded documents unresolved.

MemAgent instead streams documents through a bounded recurrent memory, enabling reasoning over infinitely long documents with a fixed active context (Yu et al., 2026). Building on this paradigm, InfMem and GRU-Mem learn when to retrieve, update, or stop, while LycheeMemory compresses

∗^{*}Corresponding author: nnzheng@xjtu.edu.cn.

1^{1}Project page: jiangchengsong.github.io/MemDuet/.

each chunk and invokes the reasoner only for selected memory blocks (Wang et al., 2026; Sheng et al., 2026; Chen et al., 2026). These advances make recurrent memory increasingly selective, but expose a common bottleneck: control decisions either remain inside the sequential recurrent loop or operate on representations in which the original evidence has already been compressed. Consequently, as context grows, reasoning performance and inference efficiency remain tightly coupled.

Human reading and memory suggest a different principle: memory formation begins with selective attention. Readers first focus on goal-relevant information and then integrate the attended evidence with prior knowledge into a coherent memory representation (Craik et al., 1996; Kintsch, 1988; Aly and Turk-Browne, 2016). This process naturally maps onto the dual-process account of cognition: System 1 rapidly identifies potentially useful evidence, whereas System 2 deliberately assesses and consolidates it (Kahneman, 2011; Evans and Stanovich, 2013). Based on this insight, we propose MemDuet, a dual-process recurrent memory framework. A small language model (System 1) scans raw context in parallel to select candidate chunks for memory updating. A large language model (System 2) verifies whether each selected chunk warrants a memory update under the current memory, then rewrites memory. By combining small-model selective attention over raw chunks with large-model verification and memory updating, MemDuet balances reasoning performance and inference efficiency as context grows.

A key challenge is how to train the two systems to cooperate. We develop a progressive three-stage training strategy. First, we supervise System 1 to identify context chunks that are likely to trigger useful memory updates. Next, with System 1 fixed, we optimize System 2 using Group Relative Policy Optimization (GRPO; Shao et al., 2024), training it to verify memory-update decisions and rewrite memory toward successful downstream reasoning. Finally, we jointly optimize both systems with task-level rewards, allowing evidence selection and memory updating to co-adapt.

We evaluate MemDuet on RULER-HQA, LongBench v2, and long-context 2WikiMulti-hopQA. Results show that MemDuet improves the performance–efficiency trade-off over full-update recurrent memory agents, scaling to 3.5M-token contexts while achieving higher reasoning accuracy with substantially lower inference cost.

Our contributions are summarized as follows:

  1. We propose MemDuet, a cognitively inspired dual-process memory framework for long-context reasoning, which instantiates System 1 as fast, parallel evidence selection with a small language model and System 2 as memory-update verification and memory rewriting with a large language model.

  2. We develop a three-stage training strategy that first establishes the selection and memory-updating capabilities of the two systems through SFT and GRPO, respectively, and then jointly optimizes their cooperation under a shared downstream reasoning objective.

  3. Extensive experiments on long-context reasoning benchmarks demonstrate that MemDuet achieves a favorable balance between reasoning performance and inference efficiency.

References (53)