通过对抗迭代优化测试与补丁,提升代码修复可靠性。
InfCode: Adversarial Iterative Refinement of Tests and Patches for Reliable Software Issue Resolution
- 双生成器对抗迭代优化测试和补丁,提升修复质量。
- 在SWE-bench Verified上达79.4%准确率,创新高。
- 适合关注自动化修复可靠性的研究人员与开发者。
大语言模型虽推动了软件工程自动化,但真实问题修复仍因需全局仓库推理、精准诊断和强验证信号而困难。现有基于代理和流水线的方法常依赖不足的测试,导致修补程序满足验证却未修复根本缺陷。本文提出InfCode,一种用于自动化仓库级问题修复的对抗多智能体框架。InfCode通过测试补丁生成器与代码补丁生成器之间的对抗交互,迭代优化测试与补丁,同时由选择器智能体识别最可靠的修复方案。框架运行于容器化环境,支持真实的仓库检查、修改与验证。在SWE-bench Lite和SWE-bench Verified上的实验表明,使用DeepSeek-V3和Claude 4.5 Sonnet等模型时,InfCode持续优于强基线,在SWE-bench Verified上达到79.4%的性能,建立新基准。项目已开源:https://github.com/Tokfinity/InfCode。
原文摘要 · Abstract (English)
Large language models have advanced software engineering automation, yet resolving real-world software issues remains difficult because it requires repository-level reasoning, accurate diagnostics, and strong verification signals. Existing agent-based and pipeline-based methods often rely on insufficient tests, which can lead to patches that satisfy verification but fail to fix the underlying defect. We present InfCode, an adversarial multi-agent framework for automated repository-level issue resolution. InfCode iteratively refines both tests and patches through adversarial interaction between a Test Patch Generator and a Code Patch Generator, while a Selector agent identifies the most reliable fix. The framework runs inside a containerized environment that supports realistic repository inspection, modification, and validation. Experiments on SWE-bench Lite and SWE-bench Verified using models such as DeepSeek-V3 and Claude 4.5 Sonnet show that InfCode consistently outperforms strong baselines. It achieves 79.4% performance on SWE-bench Verified, establishing a new state-of-the-art. We have released InfCode as an open-source project at https://github.com/Tokfinity/InfCode.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。