MemDuet: Learning Dual-Process Memory for Long-Context Reasoning
cs.CL
Submitted: 2026-10-14
Updated: 2026-10-14
License: http://creativecommons.org/licenses/by/4.0/
The gist: Reasoning over infinitely long documents is becoming a reality with recurrent memory agents.
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, 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.74x and an output-token reduction of 73.91% relative to RL-MemAgent.
Sources
- Longformer: The Long-Document Transformer
- Accelerating Large Language Model Decoding with Speculative Sampling
- Extending Context Window of Large Language Models via Positional Interpolation
- DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning
- Search-R1: Training LLMs to Reason and Leverage Search Engines with Reinforcement Learning
- DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models
- QwenLong-L1.5: Post-Training Recipe for Long-Context Reasoning and Memory Management
- Look Back to Reason Forward: Revisitable Memory for Long-Context LLM Agents
- QwenLong-L1: Towards Long-Context Large Reasoning Models with Reinforcement Learning
- InfMem: Learning System-2 Memory Control for Long-Context Agent
- System 2 Attention (is something you might need too)
- Qwen2.5 Technical Report
- Qwen2.5-1M Technical Report
Related papers
- Exploring Solution Divergence and Its Effect on Large Language Model Problem Solving
- Ishigaki-IDS-Bench: A Benchmark for Generating Information Delivery Specification from BIM Information Requirements
- Subliminal Steering: Stronger Encoding of Hidden Signals
- MedStruct-S: A Benchmark for Key Discovery, Key-Conditioned QA and Semi-Structured Extraction from OCR Clinical Reports
- The End of Transformers? On Challenging Attention and the Rise of Sub-Quadratic Architectures
- Untangling the Mechanisms of Misleading Context in Medical Question Answering