MemDuet
Learning Dual-Process Memory
for Long-Context Reasoning
1 State Key Laboratory of Human-Machine Hybrid Augmented Intelligence, Institute of Artificial Intelligence and Robotics, Xi'an Jiaotong University
2 Faculty of Electronic and Information Engineering, Xi'an Jiaotong University
3 Imperial College London
* Corresponding author: Nanning Zheng · nnzheng@xjtu.edu.cn
Jiangcheng Song · enone@stu.xjtu.edu.cn
- 84.20%
- Mean RULER-HQA accuracy
- 9.74×
- Mean inference speedup
- 73.91%
- Output-token savings
Accuracy averages nine RULER-HQA context lengths. Speedup and token savings average evaluation settings across RULER-HQA, LongBench v2, and 2WikiMultiHopQA, relative to RL-MemAgent.
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.74× and an output-token reduction of 73.91% relative to RL-MemAgent.
Method
Two systems. One memory.
System 1 · Select
A small language model scans raw context chunks in parallel, selecting evidence that may warrant a memory update.
System 2 · Verify & update
A large language model verifies selected candidates against the current memory, then commits updates in document order.
Explore the three-stage training curriculum
Supervised evidence selection for System 1, reinforcement learning for System 2, and joint optimization of the two policies.
Results
Accuracy with selective computation.
We evaluate long-context reasoning on RULER-HQA. Across the nine shared lengths from 7K to 1.75M tokens, MemDuet achieves 84.20% mean accuracy.
The figure summarizes the accuracy–latency trade-off. Each bubble represents a method; its label gives output-token use relative to MemDuet.
Timing uses workload-specific A100-equivalent estimates. Accuracy and efficiency cohorts are not necessarily matched; this is a descriptive comparison.
| Context | MemDuet | RL-MemAgent |
|---|---|---|
| 7K | 87.50 | 81.25 |
| 14K | 83.59 | 81.25 |
| 28K | 89.06 | 82.03 |
| 56K | 79.69 | 80.47 |
| 112K | 87.50 | 79.69 |
| 224K | 85.94 | 75.78 |
| 448K | 82.81 | 76.56 |
| 896K | 82.03 | 74.22 |
| 1.75M | 79.69 | 77.34 |
| 3.5M * | 75.78 | 71.88 |
* The 3.5M result is reported separately and is excluded from the nine-length mean.
See how computation scales with context length
Resources
Read, reproduce, build on.
Code & quickstart
Inference code, vLLM serving, checkpoint export, and evaluation instructions.
Get codeSystem 2 · 7B
MemDuet-S2-7B · Evidence verification, memory updates, and answer generation.
All four System 1 models and MemDuet-S2-7B are available on Hugging Face. Pair the main Qwen3.5-2B selector with the 7B verifier and memory updater. See the code quickstart for download, setup, prompts, and inference instructions.
Citation
Reference this work.
@misc{song2026memduet,
title = {MemDuet: Learning Dual-Process Memory for Long-Context Reasoning},
author = {Song, Jiangcheng and Jing, Haodong and Mu, Yulin and
Tao, Lesong and Wang, Jixin and Cui, Jin and Ren, Tianjing and
Xie, Runxuan and Ma, Yongqiang and Zheng, Nanning},
year = {2026},
eprint = {2610.19928},
archivePrefix = {arXiv},
primaryClass = {cs.CL},
url = {https://arxiv.org/abs/2610.19928}
}
Available as arXiv:2610.19928 [cs.CL].
Download BibTeX

