Curated summary
Introducing SWE-bench Verified
OpenAI found that SWE-bench, a popular benchmark for AI coding agents, underestimates model capabilities because many of its tasks are underspecified, have overly narrow unit tests, or have unreliable environments that reject valid solutions. To fix this, they worked with the benchmark's authors and 93 Python developers to manually screen samples and released SWE-bench Verified, a 500-sample subset. GPT-4o's best score more than doubled on the new benchmark, from 16% to 33.2%, which supports the view that the original scores were too low.
How SWE-bench Works
- Each sample comes from a resolved GitHub issue in one of 12 open-source Python repositories and is tied to a pull request.
- FAIL_TO_PASS tests fail before the PR's code is added and pass after, confirming the issue is fixed.
- PASS_TO_PASS tests pass both before and after, checking that unrelated functionality still works.
- Agents see only the issue text and the codebase, not the tests, and must produce a patch that passes both sets.
Three Sources of Underestimation
- Overly specific tests: Unit tests sometimes check details unrelated to the issue, rejecting correct solutions.
- Underspecified issues: Some issue descriptions leave the problem or the expected fix ambiguous.
- Unreliable environments: Some development setups cause tests to fail regardless of the solution.
- Example (scikit-learn-14520): The issue reports that the
copyparameter inTfidfVectorizeris ignored. The test requires a specificDeprecationWarningwith an exact message that was agreed on in PR discussion and never appears in the issue, so the task is nearly impossible to solve.
Building SWE-bench Verified
- Annotators labeled 1,699 random test samples on two criteria: whether the issue description is underspecified and whether the FAIL_TO_PASS tests unfairly reject valid solutions.
- Each criterion uses a 0–3 severity scale. Scores of 2 or 3 mean the sample should be discarded.
- Each sample was labeled by three annotators, and the highest severity was kept. This is conservative and removes some valid samples, but it raises confidence in the remaining ones.
- Annotators also estimated fix difficulty and could flag other major problems in free text.
- Samples were removed if they had a severe label or any flagged issue. About 38.3% were flagged for underspecification, 61.1% for unfair tests, and 68.3% were filtered out overall.
- The final 500 samples favor longer tasks (1–4 hours and over 4 hours), and the rest were sampled randomly.
- The release includes all annotations, which allow slicing by difficulty: 196 "easy" tasks under 15 minutes and 45 "hard" tasks over an hour.
- A new Docker-based evaluation harness makes runs more reproducible.
Performance Results
- GPT-4o (gpt-4o-2024-05-13) with the best open-source scaffold, Agentless, scored 33.2% on SWE-bench Verified, versus 16% on the original.
- Scores rose within each difficulty bucket, not just because the dataset shifted toward easier tasks. This suggests impossible samples were removed while genuinely hard ones stayed. The effect was clearest in the two easiest buckets, which hold the most samples.
- The gain from SWE-bench Lite was smaller because Lite was already subsampled to be easier.
Implications for Preparedness Evaluations
- Scrutinize benchmarks: Evaluations used for risk tracking must be validated, since SWE-bench underestimated capability.
- Account for scaffolding: GPT-4's score on SWE-bench Lite ranged from 2.7% with an early RAG scaffold to 28.3% with CodeR. Evaluations should run continually, including after training and when models are connected to external systems.
- Recognize limits: The benchmark is a static dataset built from public GitHub scrapes, so pre-trained models may have seen the tasks. It also covers only a narrow part of the Medium autonomy risk level and needs supplementing with other evaluations.
Related reading
Continue with another curated summary.