arXiv:2606.28434cs.SEcs.AI2026-06被引 10

让编程智能体自主决定何时何地压缩记忆,提升长程任务效率。

SWE-MeM: Learning Adaptive Memory Management for Long-Horizon Coding Agents

论文配图:SWE-MeM: Learning Adaptive Memory Management for Long-Horizon Coding Agents
图 1 · 摘自论文原文
  • 基于任务进展和上下文预算动态决定记忆压缩时机与方式。
  • 4B和30B模型在SWE-Bench Verified上分别达43.4%和60.2%解决率。
  • 联合优化记忆管理与问题解决,减少令牌消耗且性能更优。

长程软件工程智能体常需在有限上下文预算下处理冗长嘈杂的交互历史。现有记忆管理方法多依赖静态压缩流程或刚性约束压缩时机与粒度,且未能联合优化记忆管理与问题求解能力。本文提出SWE-MeM,一种面向软件工程智能体的主动式、按需记忆管理训练框架。SWE-MeM提供灵活的记忆工具,使智能体可根据轨迹状态、任务进度和剩余上下文预算自主决定何时、如何及压缩什么内容。通过合成的主动记忆管理轨迹与记忆感知的GRPO训练,实现记忆管理与问题求解的联合优化,采用记忆感知的轨迹分割与步级信用分配。在SWE-Bench Verified上,使用4B和30B模型时,分别取得43.4%和60.2%的解决率,显著优于现有基线,在性能与效率上均表现更优。

原文摘要 · Abstract (English)

Long-horizon software engineering agents often need to manage lengthy and noisy interaction histories under limited context budgets. Existing memory management methods typically rely on static compression workflows or impose rigid constraints on compression timing and granularity. Moreover, these approaches fail to jointly optimize memory management and issue resolution capabilities to improve performance while reducing token usage. We present SWE-MeM, a training framework for proactive and on-demand memory management in software engineering agents. SWE-MeM provides a flexible memory tool that lets agents decide when, what, and how to compress based on trajectory state, task progress, and remaining context budget. We train agents with synthesized proactive memory-management trajectories and Memory-aware GRPO, which jointly optimizes memory management and issue resolution through memory-aware trajectory splitting and step-level credit assignment. On SWE-Bench Verified, SWE-MeM achieves 43.4% and 60.2% resolve rate with 4B and 30B models, respectively, outperforming existing memory management baselines in both performance and efficiency.

编程智能体记忆管理长程任务强化学习

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。