通过基础技能训练提升代码大模型的通用能力
Scaling Coding Agents via Atomic Skills
- 将编程任务拆解为定位、编辑、测试生成等五类基础技能
- 联合强化学习使五项基础技能平均提升18.7%,泛化到未见任务
- 适合想提升代码生成与修复通用性的研究者和开发者
当前大语言模型编程代理主要在复合基准(如缺陷修复)上训练,易导致任务过拟合且泛化能力差。为此,我们提出一种新规模范式,从任务级优化转向基础技能掌握。我们形式化了五种核心基础技能:代码定位、代码编辑、单元测试生成、问题复现和代码评审,这些技能可作为复杂软件工程任务的基础向量。相比复合任务,基础技能更具通用性和可组合性。我们通过联合强化学习对基础技能进行训练,实现各技能持续提升且无负干扰或权衡。值得注意的是,基础技能的提升能有效泛化至未见过的复合任务,如缺陷修复、代码重构、机器学习工程和代码安全。实验表明,该方法在5项基础技能和5个复合任务上平均性能提升18.7%。这一发现推动了以基础技能训练为核心的代码代理新规模范。
原文摘要 · Abstract (English)
Current LLM coding agents are predominantly trained on composite benchmarks (e.g., bug fixing), which often leads to task-specific overfitting and limited generalization. To address this, we propose a novel scaling paradigm that shifts the focus from task-level optimization to atomic skill mastery. We first formalize five fundamental atomic skills, code localization, code editing, unit-test generation, issue reproduction, and code review, that serve as the basis vectors for complex software engineering tasks. Compared with composite coding tasks, these atomic skills are more generalizable and composable. Then, we scale coding agents by performing joint RL over atomic skills. In this manner, atomic skills are consistently improved without negative interference or trade-offs between them. Notably, we observe that improvements in these atomic skills generalize well to other unseen composite coding tasks, such as bug-fixing, code refactoring, machine learning engineering, and code security. The observation motivates a new scaling paradigm for coding agents by training with atomic skills. Extensive experiments demonstrate the effectiveness of our proposed paradigm. Notably, our joint RL improves average performance by 18.7% on 5 atomic skills and 5 composite tasks.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。