TL;DR
The paper introduces SWE-bench Science, a new repository-level benchmark designed to evaluate AI coding agents on complex software engineering tasks across 20 scientific domains. The evaluation reveals that even the most advanced coding agents fail more than half the time, with the top-performing model topping out at a 47.90% success rate. Surprisingly, the study also finds that providing explicit scientific context doesn't always help; poorly aligned guidance can actually cause models to "anchor" on incorrect assumptions and perform worse.
What Problem Does This Paper Address?
In modern research, software is more than just a tool—it is a core component of the scientific instrument. Code runs simulations, processes experimental data, and helps prove scientific claims. Consequently, a bug in scientific software doesn't just cause a crash; it can quietly corrupt the evidence underlying an entire scientific conclusion.
While AI coding agents have shown promise on general software engineering tasks, existing benchmarks primarily focus on standalone function synthesis or aggregate task success. They fail to evaluate how agents handle large, repository-level codebases across diverse scientific disciplines, and they offer little insight into why agents fail when dealing with complex scientific logic. This paper bridges that gap by introducing a rigorous, cross-domain testbed to analyze the capabilities and failure modes of AI agents in scientific computing.
Methods
The authors established a unified Chain-of-Evidence Protocol to construct the benchmark through a four-stage process: source sampling and screening, snapshot freezing/reproduction, public-material abstraction, and hidden oracle validation.
To capture the diverse requirements of maintaining scientific software, they structured the benchmark into three distinct task paradigms:
- Issue-driven: Focuses on localized bug fixes based on historical defects.
- Expert-exploratory: Simulates real scientific exploration where the agent must autonomously reason about unknown root causes of an anomaly (e.g., abnormal convergence).
- Engineering-integration: Evaluates an agent's ability to understand cross-file system architecture and connect multi-module capability chains.
Additionally, the authors designed a paired ablation framework that isolates the impact of Scientific Auxiliary Information (like equations, paper excerpts, and expert guidance) while keeping the underlying codebase and executable engineering context completely identical.
Datasets
The paper introduces the SWE-bench Science dataset, which consists of:
- 119 tasks meticulously curated from 98 unique GitHub repositories.
- Coverage across 20 scientific domains, with Chemistry, Materials Science, Biology, Biomedical Engineering, and Physics making up the largest shares.
- Massive scale: The input codebases average 80,600 non-empty lines of code, stretching up to over 2 million lines, requiring true repository-level navigation.
Key Insights and Ideas
- Scientific knowledge is a double-edged sword: You might assume that feeding an LLM more scientific background would inherently improve its performance. However, the paired ablation study revealed that while well-grounded information constrains the search space and improves token efficiency, poorly aligned guidance induces anchoring. Agents can become overly reliant on the provided text explanation rather than independently validating the code through execution.
- Four distinct failure mechanisms: Through manual audit reports, the authors categorized why agents fail on scientific code:
- Scientific-knowledge or abstraction deficits: Basing repairs on incorrect mathematical or domain definitions.
- Misguided exploration or surface-level repair: Patching a visible symptom or public metric without fixing the underlying scientific logic.
- Incomplete repair coverage or system integration: Fixing one module while breaking shared invariants or data flows in interacting components.
- Failure to generalize: Writing a patch that fixes the immediate test case but fails on unseen equivalent representations or boundary regimes.
Key Results
The authors evaluated eight frontier agent configurations. The overarching takeaway is that scientific software engineering remains an open challenge for AI:
- Claude Code with Claude-Opus-5 (max) achieved the highest overall success rate, but still only managed a 47.90% Pass@1.
- DeepSeek-V4-Pro (max) proved to be the strongest at system-wide architecture tasks, leading the Engineering-integration paradigm with a 44.44% success rate.
- In the scientific information ablation study, adding domain-specific context had highly model-dependent results. For DeepSeek-V4-flash, the extra information boosted Pass@1 from 16.48% to 23.08%. Conversely, for GPT-5.6-sol, it actually dragged performance down from 36.26% to 31.87% due to anchoring effects.
Limitations and Future Work
The authors note that while the benchmark spans 20 domains, the number of tasks within each individual domain is still relatively limited, which could affect the reliability of cross-domain comparisons. Furthermore, their analysis of how agents interact with domain knowledge is preliminary. Future work will need to explore deeper agentic architectures that can more effectively ground abstract scientific principles into executable, test-validated code.
Summary updated