arXiv:2608.29831cs.CLcs.SE2026-08中稿 · EMNLP

让代码定位智能体学会区分有效操作,提升精准度与稳定性。

A^2Agent: Action-Aware Reinforcement Learning for Repository-Level Code Localization Agents

论文配图:A^2Agent: Action-Aware Reinforcement Learning for Repository-Level Code Localization Agents
图 1 · 摘自论文原文
  • 按每步动作设计奖励,同时鼓励发现和锁定正确代码段
  • 在SWE-Bench Verified上提升F1 1.58%,Pro上达8.55%
  • 40亿参数模型性能超8倍大的基线,适合高精度代码定位任务

定位问题相关的代码区域是自动化软件工程中的关键步骤。然而,现有方法依赖稀疏的轨迹级信号,无法识别每一步操作的有效性,常在探索中发现正确代码却未能保留。为此,我们提出一种面向动作的强化学习方法,结合每步奖励序列以同时奖励代码发现与锁定,并采用动作级优势估计,通过共享相同探索上下文的回合分组来分离各动作的贡献。大量实验表明,该方法在SWE-Bench Verified上平均F1较当前最优(SOTA)提升1.58%,在SWE-Bench Pro上提升8.55%;我们的4B模型性能超越高达8倍大的基线模型。代码已开源:https://github.com/donian00/A2Agent。

原文摘要 · Abstract (English)

Localizing issue-relevant code regions is a critical step in automated software engineering. However, due to their reliance on sparse trajectory-level signals, existing methods cannot identify which per-turn actions are effective and often discover correct code regions during exploration but fail to commit them. To address these limitations, we propose an action-aware reinforcement learning method that combines a per-turn reward sequence rewarding both the discovery and commitment of gold code regions with an action-level advantage estimation scheme that isolates each action's credit by grouping turns sharing the same exploration context. Extensive evaluations show that our method improves the average F1 over the state-of-the-art (SOTA) by 1.58% on SWE-Bench Verified and 8.55% on SWE-Bench Pro, with our 4B model outperforming baselines up to 8x larger. Our code is available at https://github.com/donian00/A2Agent.

代码定位强化学习智能体

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