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.

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.

Parallel selection, verified updates, and bounded recurrent memory.
Explore the three-stage training curriculum

Supervised evidence selection for System 1, reinforcement learning for System 2, and joint optimization of the two policies.

Accuracy with selective computation.

Current manuscript figure. Bubble labels compare mean output tokens with MemDuet.

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.

RULER-HQA accuracy (sub-EM, %)
ContextMemDuetRL-MemAgent
7K87.5081.25
112K87.5079.69
448K82.8176.56
1.75M79.6977.34
See how computation scales with context length

Read, reproduce, build on.

Paper & appendix

Published preprint with references and appendices.

Open arXiv

Code & quickstart

Inference code, vLLM serving, checkpoint export, and evaluation instructions.

Get code

System 1 · 2B

Qwen3.5-2B · Main evidence-selection model.

Hugging Face

System 1 · 0.5B

Qwen2.5-0.5B · Evaluated evidence-selection variant.

Hugging Face

System 1 · 1.5B

Qwen2.5-1.5B · Evaluated evidence-selection variant.

Hugging Face

System 1 · 0.8B

Qwen3.5-0.8B · Evaluated evidence-selection variant.

Hugging Face

System 2 · 7B

MemDuet-S2-7B · Evidence verification, memory updates, and answer generation.

Hugging Face

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.

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

Press Escape to close.