SWE-Ladder:通过渐进式特权自蒸馏学习代码定位、复现与修复
SWE-Ladder: Learning to Localize, Reproduce, and Patch via Progressive Privileged Self-Distillation
SWE-Ladder将每个训练实例的已验证修复拆分为阶段专属证据:定位用改动文件与行、复现用fail-to-pass测试、修复用diff,由规则路由器按工具调用为端到端rollout的每一步分配阶段,冻结教师只看对应证据,并按修复顺序蒸馏各阶段,同时用GRPO优化完整轨迹。
arXiv:2610.33667v2 Announce Type: replace Abstract: Resolving a repository-level issue typically requires a software-engineering (SWE) agent to localize the faulty code, reproduce the failure, and patch the code. Reinforcement learning trains such agents from a single test result on the final patch, while on-policy self-distillation (OPSD) adds token-level supervision from a teacher with privileged evidence, exposing the full reference patch at every step. Neither provides stage-specific guidance for localization or reproduction. We propose SWE-Ladder, which turns the verified repair of each training instance into stage-specific evidence: the changed files and lines for localization, the fail-to-pass tests for reproduction, and the diff for patching. A rule-based router assigns each step of an end-to-end rollout to a stage based on its tool call, a frozen teacher sees only the matching evidence, and the stages are distilled in repair order while GRPO optimizes the full trajectory. With Qwen3-4B-Instruct-2507 on SWE-bench Verified under the R2E-Gym scaffold, SWE-Ladder improves pass@1 from 9.6% to 16.4%, compared with 10.4% for GRPO and 12.4% for OPSD with the full patch. Under the OpenHands scaffold, it improves pass@1 from 13.0% to 17.6%. Reversing the stage order under R2E-Gym reduces pass@1 to 11.4%.
来源:arXiv (AI + Vision + Imaging) · arxiv.org