Coupling Planning with Episodic Memory in LLM Agents for Software Issue Resolution

📄 arXiv: 2608.06811v1 📥 PDF

作者: Jiahao Zhang, Yifan Zhang, Yu Huang

分类: cs.SE, cs.AI

发布日期: 2026-08-07

备注: 12 pages, 5 figures


💡 一句话要点

提出PMCoder以结合规划与记忆解决软件问题

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 软件问题解决 大型语言模型 规划与记忆 深度学习 智能代理

📋 核心要点

  1. 现有方法在软件问题解决中往往忽视规划与记忆的结合,导致长时间轨迹中的证据过时和重复失败。
  2. PMCoder通过将分层阶段规划与情节记忆相结合,增强了代理的记忆检索与规划能力,提升了问题解决效率。
  3. 实验表明,PMCoder在多个基准测试中显著提高了解决案例的数量,尤其是在重现门未触发的情况下,依然表现出色。

📝 摘要(中文)

使用大型语言模型(LLM)代理解决真实软件问题的过程通常涉及多个阶段,包括探索、假设、实施和验证。成功依赖于基础模型的局部推理能力以及代理在各个阶段中维护演变计划和记忆观察的能力。现有的代理方法往往在规划或记忆上各自强化,导致长时间轨迹容易受到过时证据、重复失败编辑和自我报告的验证影响。本文提出的PMCoder结合了分层阶段规划与情节记忆,双向耦合:当前计划阶段条件下的记忆检索,同时记忆衍生的轨迹统计信息用于检测卡住和重新规划。实验结果表明,PMCoder在SWE-bench Verified上平均解决了25个额外案例,且在多个评估中表现出持续的性能提升。

🔬 方法详解

问题定义:本文旨在解决现有软件问题解决代理在长时间轨迹中因规划与记忆分离而导致的效率低下和错误累积问题。现有方法往往无法有效利用历史信息,导致重复失败和验证不准确。

核心思路:PMCoder的核心思路是通过双向耦合的方式,将分层阶段规划与情节记忆结合,使得当前的计划阶段能够影响记忆的检索,同时利用记忆中的统计信息来优化规划过程。这样设计的目的是为了提高代理在复杂问题解决中的灵活性和准确性。

技术框架:PMCoder的整体架构包括分层阶段规划模块和情节记忆模块。分层阶段规划负责制定解决方案的步骤,而情节记忆则存储和检索在不同阶段获得的观察信息。两者通过反馈机制相互影响,形成闭环。

关键创新:PMCoder的主要创新在于其双向耦合的规划与记忆机制,这与现有方法的单一强化策略形成鲜明对比。通过这种创新,PMCoder能够有效减少重复失败的操作和上下文窗口的耗尽。

关键设计:在设计上,PMCoder采用了特定的参数设置以优化记忆检索效率,并通过损失函数的调整来平衡规划与记忆的贡献。此外,网络结构方面,PMCoder结合了深度学习技术以增强模型的推理能力。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

在SWE-bench Verified上,PMCoder平均解决了25个额外案例,相较于基线提升了5.0个百分点。即使在重现门未触发的情况下,PMCoder依然展现出显著的性能提升。此外,Verified-500评估显示,PMCoder在多个模型上均有至少14个额外解决案例的提升,证明了其方法的有效性和普适性。

🎯 应用场景

PMCoder的研究成果在软件开发和维护领域具有广泛的应用潜力。通过提高软件问题解决的效率和准确性,PMCoder能够帮助开发团队更快地定位和修复问题,从而提升软件质量和用户满意度。此外,该方法的框架也可扩展至其他需要复杂决策和记忆管理的领域,如机器人控制和智能助手。

📄 摘要(原文)

Resolving a real software issue with a large language model (LLM) agent is a long repair episode, often tens to hundreds of steps spanning exploration, hypothesis, implementation, and verification. Success depends on both the base model's local reasoning and the agent's ability to maintain an evolving plan and remember observations across phases. Existing repository-level agents typically strengthen planning or memory in isolation, leaving long trajectories vulnerable to stale evidence, repeated failed edits, and verification inferred from the agent's own claims instead of execution evidence. We present PMCoder, an issue-resolution agent that couples a hierarchical phase planner with episodic memory. The coupling is bidirectional: the current plan phase conditions memory retrieval, while memory-derived trajectory statistics inform stuck detection and replanning. When available, issue-reproduction verdicts ground verification progress in execution evidence rather than self-reported completion. On SWE-bench Verified, PMCoder resolves an average of $25$ more cases ($+5.0$pp) than a harness-matched baseline, with gains persisting even where the reproduction gate never fires. Further Verified-500 evaluations show the same positive direction across Claude Haiku 4.5, DeepSeek-V4-Flash, and an OpenHands port, with at least $14$ additional resolved cases ($+2.8$pp). Separately, evaluation on TerminalWorld's official sample suggests that the plan-memory substrate transfers beyond issue reports. Ablation and trajectory analyses show where the gains come from: coupling planning and memory outperforms either component alone and reduces repeated failed actions, empty-patch exits, and context-window exhaustion.