PI-Mem: Pushing Long-Context Reasoning to 3.6M Tokens with Parallel-Iterative Memory
Dawei Liu, Haixu Song, Shuang Cheng, Shijie Wang, Haozheng Hou, Kaifeng Liu, Ermo Hua, Zhonghang Yuan, Zhijie Zhong, Yuchen Fan, Biqing Qi, Bowen Zhou
cs.CL, cs.AI
Submitted: 2026-08-04
Code: https://github.com/JetAstra/PI-Mem
License: http://creativecommons.org/licenses/by/4.0/
The gist: Long-context reasoning remains a critical bottleneck for large language models, as recent recurrent-memory approaches face two inherent challenges: sequential chunk-wise updates can overwrite early
Terminology
Abstract
Long-context reasoning remains a critical bottleneck for large language models, as recent recurrent-memory approaches face two inherent challenges: sequential chunk-wise updates can overwrite early critical evidence with later irrelevant content, and serial inter-chunk dependencies limit parallelism and cause latency to increase with context length. To address these issues, we propose PI-Mem (Parallel-Iterative Memory), a mechanism that processes all chunks in parallel and iteratively refines a shared memory over a bounded number of turns. In each turn, PI-Mem reads all chunks in parallel conditioned on the current memory, selects new or complementary evidence from each chunk, and merges the selected evidence into a compact shared memory for the next turn. To discourage redundant turns, we optimize the workflow through reinforcement learning with an auxiliary turn-efficiency reward, enabling the model to adaptively exit once sufficient evidence has been accumulated. We evaluate PI-Mem with Qwen3.5-35B-A3B and Qwen2.5-7B on the HotpotQA benchmark across context lengths up to 3.6 million tokens and find that it outperforms the recurrent-memory baseline by +6.25 and +7.81 absolute points while achieving 6.1 times and 2.1 times inference speedups, respectively. These results demonstrate that PI-Mem breaks the accuracy--efficiency trade-off in long-context reasoning and provides a scalable approach to complex multi-hop question answering over extremely long documents.
Sources
- Agent S: An Open Agentic Framework that Uses Computers Like a Human
- LongBench v2: Towards Deeper Understanding and Reasoning on Realistic Long-context Multitasks
- IterResearch: Rethinking Long-Horizon Agents with Interaction Scaling
- LongRLVR: Long-Context Reinforcement Learning Requires Verifiable Context Rewards
- Extending Context Window of Large Language Models via Positional Interpolation
- Dynamic Long Context Reasoning over Compressed Memory via End-to-End Reinforcement Learning
- Mem0: Building Production-Ready AI Agents with Scalable Long-Term Memory
- Context Length Alone Hurts LLM Performance Despite Perfect Retrieval
- AgentSwing: Adaptive Parallel Context Management Routing for Long-Horizon Web Agents
- Gemini 2.5: Pushing the Frontier with Advanced Reasoning, Multimodality, Long Context, and Next Generation Agentic Capabilities
- RULER: What's the Real Context Size of Your Long-Context Language Models?
- Qwen2.5-Coder Technical Report
- Kimi K2.5: Visual Agentic Intelligence
- Hello Again! LLM-powered Personalized Agent for Long-term Dialogue
- A Comprehensive Survey on Long Context Language Modeling
- Understanding R1-Zero-Like Training: A Critical Perspective
- MoBA: Mixture of Block Attention for Long-Context LLMs
- MemGPT: Towards LLMs as Operating Systems
- DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models
- QwenLong-L1.5: Post-Training Recipe for Long-Context Reasoning and Memory Management
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