arXiv:2602.21611cs.SEcs.AI2026-02被引 11

为软件工程智能体设计细粒度记忆,提升复杂任务推理能力

Structurally Aligned Subtask-Level Memory for Software Engineering Agents

  • 按任务分解结构存储和检索记忆,而非整个任务实例
  • 在SWE-bench Verified上平均提升4.7个百分点的通过率
  • 适合需要长期规划与复杂推理的代码生成任务

大型语言模型在自主软件工程任务中展现出巨大潜力。近期研究尝试通过引入记忆机制支持长周期推理,但现有方法通常以粗粒度的任务实例为单位进行存储与检索。我们实证发现,这种粗粒度方式存在根本性粒度不匹配问题:表面相似的任务在特定阶段可能需要不同的推理逻辑,导致错误记忆调用。为此,我们提出结构对齐的子任务级记忆机制,使记忆的存储、检索与更新与智能体的功能分解保持一致。在SWE-bench Verified上的大量实验表明,该方法在多种模型架构下均优于原始模型及强基线,平均提升Pass@1达+4.7个百分点(如Gemini 2.5 Pro上提升+6.8个百分点)。性能增益随交互步数增加而扩大,表明利用历史经验能有效增强复杂软件工程任务中的长周期推理能力。

原文摘要 · Abstract (English)

Large Language Models (LLMs) have demonstrated significant potential as autonomous software engineering (SWE) agents. Recent work has further explored augmenting these agents with memory mechanisms to support long-horizon reasoning. However, these approaches typically operate at a coarse instance granularity, treating the entire problem-solving episode as the atomic unit of storage and retrieval. We empirically demonstrate that instance-level memory suffers from a fundamental granularity mismatch, resulting in misguided retrieval when tasks with similar surface descriptions require distinct reasoning logic at specific stages. To address this, we propose Structurally Aligned Subtask-Level Memory, a method that aligns memory storage, retrieval, and updating with the agent's functional decomposition. Extensive experiments on SWE-bench Verified demonstrate that our method consistently outperforms both vanilla agents and strong instance-level memory baselines across diverse backbones, improving mean Pass@1 over the vanilla agent by +4.7 pp on average (e.g., +6.8 pp on Gemini 2.5 Pro). Performance gains grow with more interaction steps, showing that leveraging past experience benefits long-horizon reasoning in complex software engineering tasks.

软件工程记忆机制长程推理

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