K-文化的一切——从回归到 K-美妆,发送到您的邮箱订阅邮件

METAL MEDIA

SkillForge: Self-Distilling Agents for Project-Specific Issue Resolution

arXiv:2608.189332026-08-18

让AI修bug代理在遇到真实问题前先给自己出'模拟考题'练手,从而提前吃透某个项目的特殊习惯

SkillForge让基于大模型的软件修复代理主动学习特定代码仓库的项目特性:它利用仓库自身的测试代码,让AI在看不到原始实现的情况下重写关键功能,从而制造出逼真的模拟bug并自己解决,再从解决过程中提炼出可复用的'技能'。以往的方法要么依赖大量历史issue记录,要么每次遇到新问题都要花费高昂代价临场探索。在SWE-bench Verified和SWE-bench Pro两个基准测试上,SkillForge的表现持续超过基于历史记录和基于在线探索的现有方法。

METAL MEDIA 解读图

让AI修bug代理在遇到真实问题前先给自己出'模拟考题'练手,从而提前吃透某个项目的特殊习惯

  1. 01找到仓库中真正被测试执行到的核心代码区域,让大模型在不看原始实现的情况下重新实现这部分功能,从而自然产生逼真的实现错误,并把由此导致的测试失败包装成模拟issue
  2. 02让一个软件修复代理去解决这些模拟issue,再从成功和失败的尝试中分别提炼出两类知识:关联到具体代码实体的全局诊断技能(该从哪里入手排查、涉及哪些相关API)和局部修改技能(该怎么改、要避开哪些项目特有的坑)
  3. 03真实issue到来时,先根据issue描述用BM25检索相关的全局诊断技能预先注入上下文,再在代理实际访问到对应文件或函数的那一刻,实时插入对应的局部修改建议
  4. 04在Mini-SWE-Agent上实现并用DeepSeek-V3.2和GPT-5-mini测试,SkillForge在SWE-bench Verified上的Pass@1相比基线分别提升5.8和5.6个百分点,在SWE-bench Pro上分别提升5.8和4.1个百分点,超过了所有对比的历史驱动和在线探索类方法
这是 METAL MEDIA 制作的解读图,并非论文作者提供的原图。

他们做了什么

  1. 找到仓库中真正被测试执行到的核心代码区域,让大模型在不看原始实现的情况下重新实现这部分功能,从而自然产生逼真的实现错误,并把由此导致的测试失败包装成模拟issue
  2. 让一个软件修复代理去解决这些模拟issue,再从成功和失败的尝试中分别提炼出两类知识:关联到具体代码实体的全局诊断技能(该从哪里入手排查、涉及哪些相关API)和局部修改技能(该怎么改、要避开哪些项目特有的坑)
  3. 真实issue到来时,先根据issue描述用BM25检索相关的全局诊断技能预先注入上下文,再在代理实际访问到对应文件或函数的那一刻,实时插入对应的局部修改建议
  4. 在Mini-SWE-Agent上实现并用DeepSeek-V3.2和GPT-5-mini测试,SkillForge在SWE-bench Verified上的Pass@1相比基线分别提升5.8和5.6个百分点,在SWE-bench Pro上分别提升5.8和4.1个百分点,超过了所有对比的历史驱动和在线探索类方法
Fig. 1: Overview of SkillForge.
Fig. 1: Overview of SkillForge.
TABLE I: Main results on SWE-bench Verified.
MethodModelPass@1Avg Cost
Mini-SWE-AgentDeepSeek-V3.266.4%$0.049
GPT-5-mini55.0%$0.031
History-driven project-specific knowledge acquisition
SWE-ExpDeepSeek-V3.269.0%†↑2.6%$0.090
GPT-5-mini56.6%†↑1.6%$0.065
EvoCoderDeepSeek-V3.267.0% ↑0.6%$0.064
GPT-5-mini58.4% ↑3.4%$0.052
MemGovernDeepSeek-V3.269.2%†↑2.8%
GPT-5-mini58.0%†↑3.0%
Online project-specific knowledge acquisition
SAGEDeepSeek-V3.267.2% ↑0.8%$0.081
GPT-5-mini56.0%†↑1.0%$0.052
SWE-DebateDeepSeek-V3.268.2% ↑1.8%$0.382
GPT-5-mini56.4% ↑1.4%$0.167
Live-SWE-agentDeepSeek-V3.267.0% ↑0.6%$0.050
GPT-5-mini55.6% ↑0.6%$0.042
Variants of SkillForge
SkillForge w/ SWE-SmithDeepSeek-V3.268.0% ↑1.6%$0.088
GPT-5-mini56.4%†↑1.4%$0.071
SkillForge w/ LLM SummaryDeepSeek-V3.268.7%†↑2.3%$0.069
GPT-5-mini54.4% ↓0.6%$0.065
SkillForgeDeepSeek-V3.272.2%†↑5.8%$0.074
GPT-5-mini60.6%†↑5.6%$0.066
†: p−v​a​l​u​e<0.05.
Fig. 2: Synthesize project-specific issues.
Fig. 2: Synthesize project-specific issues.
TABLE II: Main results on SWE-bench Pro.
DeepSeek-V3.2GPT-5-mini
MethodPass@1Avg CostPass@1Avg Cost
Mini-SWE-Agent28.3%$0.04747.6%$0.063
SWE-Exp29.4% ↑1.1%$0.08348.7% ↑0.9%$0.089
Live-SWE-agent32.4% ↑4.1%$0.05149.1%†↑1.5%$0.072
SkillForge34.1%†↑5.8%$0.06951.7%†↑4.1%$0.087
†: p−v​a​l​u​e<0.05.
Fig. 3: Skill distillation.
Fig. 3: Skill distillation.
TABLE III: Ablation study results.
ApproachDeepSeek-V3.2GPT-5-mini
w/o Global Diagnostic Skills68.4% (↓3.8%)57.6% (↓3.0%)
w/o Local Intervention Skills67.8% (↓4.4%)57.2% (↓3.4%)
SkillForge72.2%60.6%
Fig. 4: Hyperparameter study results on the Sphinx and Django repositories with GPT-5-mini. (a) BM25 skill retrieval count. (b) Code segment rewritten count during issue synthesis. Red stars mark the best-performing k in each setting.
Fig. 4: Hyperparameter study results on the Sphinx and Django repositories with GPT-5-mini. (a) BM25 skill retrieval count. (b) Code segment rewritten count during issue synthesis. Red stars mark the best-performing k in each setting.
TABLE IV: Cross-LLM skill transfer on SWE-bench Verified. Resolver LLM denotes the backbone used for real issue resolution, while Knowledge-source LLM denotes the backbone used to synthesize instances and distill skills.
Resolver LLMKnowledge-source LLMPass@1
GPT-5-miniGPT-5-mini60.6%
DeepSeek-V3.255.0%
DeepSeek-V3.2GPT-5-mini65.2%
DeepSeek-V3.272.2%
Fig. 5: Pass@1 performance comparison between Baseline and our method across seven repositories.
Fig. 5: Pass@1 performance comparison between Baseline and our method across seven repositories.

为什么重要

将AI修复代理部署到某个具体项目时,最大的障碍是它不了解该项目自身的编码习惯和常见陷阱,这种方法提供了一条即使历史issue数据稀缺也能提前为代理'补课'的实用途径,且不会大幅增加每个issue的处理成本。这对希望在自有代码仓库上落地自动修复代理的团队和开发者有直接参考价值。

Fig. 6: Case study for django-11206 with and without project-specifc knowledge (represented as skills).
Fig. 6: Case study for django-11206 with and without project-specifc knowledge (represented as skills).

本文术语

  • Pass@1 · 一次尝试就成功解决问题的比例,用于衡量修复成功率
  • SWE-bench · 基于真实GitHub issue评测AI编程代理修复能力的基准测试集
  • BM25 · 一种根据关键词匹配程度对文档进行排序的经典信息检索算法
  • 实体锚定(entity-grounded) · 把提炼出的知识直接关联到代码中具体的文件、函数或类,而不是笼统存放
  • 自蒸馏(self-distillation) · 从代理自己生成的经验数据中提炼可复用知识的过程

论文原文摘要(英文)

Large language model (LLM) based agents have demonstrated remarkable proficiency in automated software issue resolution, yet they often struggle to resolve issues in a specific repository because they lack project-specific knowledge. Existing self-evolving approaches acquire such knowledge from repository history or online repair trajectories, but they either depend on available historical issue-resolution signals or incur substantial per-issue test-time exploration cost. In this paper, we propose SkillForge, a self-distillation framework that proactively acquires project-specific knowledge from the repository itself. Instead of waiting for real issues to expose project-specific knowledge gaps, SkillForge synthesizes project-specific issues by re-implementing test-covered core functionalities of the repository. By resolving these synthetic issues, SkillForge distills reusable project-specific knowledge into entity-grounded skills and associates them with relevant repository entities for future issue resolution. Extensive experiments using both open-source and closed-source models show that SkillForge consistently improves issue resolution performance over strong baselines. These results demonstrate that proactively acquiring project-specific knowledge before solving real issues substantially improves downstream software issue resolution.

作者 · Silin Chen

在 arXiv 阅读

最新论文

全部论文 →

METAL MEDIA 最新报道

图片来源: Silin Chen et al., arXiv:2608.18933, CC BY 4.0