arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.28434cs.SEcs.AI
收藏

SWE-MeM:面向长周期编码代理的自适应内存管理学习

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

The Chinese University of Hong Kong, China(香港中文大学);Shanghai Jiao Tong University, China(上海交通大学);Tsinghua University, China(清华大学);ByteDance, China(字节跳动)

Shuzheng Gao, Wenhao Zeng, Zhaojian Yu, Jianqiao Wangni, Chaozheng Wang, Kai Cai, Shilin He, Michael R. Lyu

AI总结:

提出SWE-MeM训练框架,通过灵活的内存工具和Memory-aware GRPO优化,让代理在有限上下文预算下自主决定压缩时机、内容和方式,在SWE-Bench Verified上以4B和30B模型分别达到43.4%和60.2%的解决率,优于现有方法。

摘要:

长周期软件工程代理通常需要在有限的上下文预算下管理冗长且嘈杂的交互历史。现有的内存管理方法通常依赖静态压缩工作流,或对压缩时机和粒度施加严格约束。此外,这些方法未能联合优化内存管理和问题解决能力,以在减少令牌使用的同时提升性能。我们提出SWE-MeM,一个用于软件工程代理的主动和按需内存管理训练框架。SWE-MeM提供了一个灵活的内存工具,让代理能够基于轨迹状态、任务进度和剩余上下文预算决定何时、什么以及如何压缩。我们使用合成的主动内存管理轨迹和Memory-aware GRPO训练代理,该方法通过内存感知轨迹分割和步骤级信用分配联合优化内存管理和问题解决。在SWE-Bench Verified上,SWE-MeM在4B和30B模型上分别实现了43.4%和60.2%的解决率,在性能和效率上均优于现有的内存管理基线。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑