让智能体主动管理长文档记忆,提升复杂推理准确率。
InfMem: Learning System-2 Memory Control for Long-Context Agent
- 采用预思考-检索-写入协议,主动控制记忆更新
- 在32k~1M tokens长文本上准确率提升8.23~11.84点
- 支持自适应提前停止,推理速度最高快5.1倍
超长文档推理需在严格内存限制下整合分散的稀疏证据。尽管流式代理可扩展处理,其被动记忆更新常丢失多跳推理所需的低显著性连接证据。我们提出InfMem,一种以控制为中心的代理,通过预思考-检索-写入协议实现类似系统2的控制机制。InfMem主动监测证据充分性,执行目标明确的文档内检索,并应用证据感知联合压缩更新有限记忆。为确保可靠控制,我们设计了从监督微调到强化学习的训练方案,使检索、写入与停止决策与最终任务正确性对齐。在跨度32k至1M token的超长问答基准上,InfMem在不同主干模型上均优于MemAgent。具体而言,在Qwen3-1.7B、Qwen3-4B和Qwen2.5-7B上,平均绝对准确率分别提升10.17、11.84和8.23点,平均推理时间减少3.9倍,通过自适应提前停止最多提速5.1倍。代码已开源:https://github.com/UCMP13753/InfMem。
原文摘要 · Abstract (English)
Reasoning over ultra-long documents requires synthesizing sparse evidence scattered across distant segments under strict memory constraints. While streaming agents enable scalable processing, their passive memory update strategy often fails to preserve low-salience bridging evidence required for multi-hop reasoning. We propose InfMem, a control-centric agent that instantiates System-2-style control via a PreThink-Retrieve-Write protocol. InfMem actively monitors evidence sufficiency, performs targeted in-document retrieval, and applies evidence-aware joint compression to update a bounded memory. To ensure reliable control, we introduce a practical SFT-to-RL training recipe that aligns retrieval, writing, and stopping decisions with end-task correctness. On ultra-long QA benchmarks ranging from 32k to 1M tokens, InfMem consistently outperforms MemAgent across backbones. Specifically, InfMem improves average absolute accuracy by 10.17, 11.84, and 8.23 points on Qwen3-1.7B, Qwen3-4B, and Qwen2.5-7B, respectively, while reducing inference time by 3.9x on average and by up to 5.1x through adaptive early stopping. Code is available at https://github.com/UCMP13753/InfMem.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。