SWE-sweep:智能体能否自主发现并修复Bug?
SWE-sweep: Can Agents Autonomously Find and Fix Bugs?
AI总结:
本文推出开放式软件工程基准SWE-sweep,含100个代码库的4068个跨语言Bug,评估7种大语言模型发现最佳智能体仅解决4.7%的Bug,凸显自主发现Bug的挑战及两类任务的差距。
摘要:
大多数现有的软件工程基准通过提供代码库和用户报告的待解决问题,在具体、明确的任务上评估编码智能体。然而,随着用户将越来越广泛的任务委托给编码智能体,自然的下一步是让智能体不仅能执行有用的工作,还能确定需要完成哪些有用的工作。被委托管理代码库的智能体应能在问题被报告前,判断出什么已损坏、哪些问题重要以及如何解决它们。我们推出SWE-sweep,这一针对这种开放式场景的基准。给定一个包含多个并发Bug、且无其性质或位置信息的代码库,智能体必须自主发现并修复尽可能多的Bug。对于每个代码库,我们收集真实的GitHub问题-拉取请求对,然后识别出存在最多Bug的单个提交。每个修复会根据对应拉取请求的隐藏测试以及现有测试套件进行评估,以检查是否出现回归。成功要求智能体在长期工作中探索并理解大型代码库,修复Bug且不引入回归,并管理非独立修复之间的交互。SWE-sweep涵盖了100个代码库、22种编程语言中的4068个Bug,包括NumPy(Python)、OpenCV(C++)和Lean 4(Lean)。我们评估了7种大语言模型(LM),发现最佳智能体仅解决了4.7%的所有Bug,该挑战通常在于发现Bug而非修复它们。我们进一步研究了简单的测试时缩放方法,发现它们有效但收益递减。SWE-sweep揭示了解决报告问题与自主维护软件之间存在巨大差距。
英文摘要:
Most existing software engineering benchmarks evaluate coding agents on concrete, well-specified tasks, commonly by providing a codebase together with a user-reported issue to resolve. However, as users delegate increasingly broad outcomes to coding agents, the natural next step is for agents to determine not only how to perform useful work, but also what useful work needs to be done. An agent entrusted with a repository should be able to decide what is broken, which problems matter, and how to solve them before they are reported. We introduce SWE-sweep, a benchmark for this open-ended setting. Given a codebase containing many concurrent bugs and no information about their nature or location, an agent must autonomously discover and fix as many bugs as possible. For each repository, we collect real GitHub issue-pull request pairs, then identify a single commit where the maximum number of bugs are present at the same time. Each repair is evaluated against hidden tests from the corresponding pull request, along with the existing test suite to check for regressions. Success requires agents to explore and understand a large codebase over long-horizon work, repair bugs without introducing regressions, and manage interactions among fixes that are not independent. SWE-sweep encompasses 4,068 bugs across 22 programming languages and 100 repositories, including NumPy (Python), OpenCV (C++), and Lean 4 (Lean). We evaluate 7 LMs and find that the best agent resolves only 4.7 percent of all bugs, with the challenge generally lying in discovering bugs rather than repairing them. We further study simple test-time scaling approaches and find that they are effective but yield diminishing returns. SWE-sweep exposes a substantial gap between resolving reported issues and autonomously maintaining software.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。