One email each morning — yesterday's AI, sortedGet it in your inbox

METAL LAB

SWE-bench Science: Can Coding Agents Resolve Engineering Tasks in Science?

arXiv:2608.197992026-08-21

AI coding agents were tested on fixing real scientific software, and even the best one failed more than half the time

Researchers built a new test called SWE-bench Science, made of 119 repair tasks pulled from 98 real GitHub repositories across 20 scientific fields like chemistry, biology, and physics. Even the top-performing AI coding agent, Claude Code paired with Opus-5, solved fewer than half the tasks correctly under strict private testing. The team also found that feeding agents extra scientific background information doesn't always help, and can sometimes hurt accuracy.

What they did

  1. Unlike older coding benchmarks that test writing short functions or fixing generic software bugs, this one tests whether AI agents can repair real scientific research code, like simulations or instrument data pipelines, while preserving scientific correctness
  2. Tasks are split into three types: Issue-driven (fix a known bug), Expert-exploratory (figure out an unknown root cause like a scientist would), and Engineering-integration (connect multiple modules into a working pipeline)
  3. Eight AI agent setups were tested, including GPT-5.6-sol, Claude-Opus-5, and DeepSeek-V4-Pro; they scored well over 90% on visible public checks but their success rate dropped sharply on hidden, stricter private tests
  4. Failures were grouped into four recurring patterns: lacking scientific knowledge, shallow fixes that only patch symptoms, incomplete fixes that miss system-wide effects, and failing to generalize a scientific principle beyond the exact case shown
  5. In a follow-up test, giving agents extra scientific explanations helped one model (DeepSeek-V4-flash) but actually lowered the exact-success rate of another (GPT-5.6-sol), showing that more information doesn't automatically mean better repairs
SWE-bench Science: Can Coding Agents Resolve Engineering Tasks in Science? figure 0
Table 4 Distribution of the 119 SWE-bench Science tasks across 20 scientific domains.
Scientific domainTasks
Chemistry24
Materials Science and Engineering16
Biology13
Biomedical Engineering12
Physics11
Mathematics7
Astronomy7
Atmospheric Science5
Civil Engineering5
Surveying and Mapping Science and Technology3
Geophysics3
Mechanics3
Electrical Engineering2
Marine Science2
Geography1
Aeronautical and Astronautical Science and Technology1
Nuclear Science and Technology1
Computer Science and Technology1
Statistics1
Information and Communication Engineering1
Total119
Figure 1 Pass@1 comparison of coding agents on SWE-bench Science.
Figure 1 Pass@1 comparison of coding agents on SWE-bench Science.

Why it matters

As AI increasingly writes and fixes the code behind scientific results, a broken patch can quietly corrupt the evidence behind a published finding, not just crash a program. This work gives concrete evidence that current AI agents often pass surface-level checks while missing deeper scientific correctness, which matters for anyone building or relying on AI coding tools in research.

Figure 3 Evaluation pipeline in SWE-bench Science for an example task. The diagram shows the frozen agent-visible inputs, the agent-driven coding loop, and the clean evaluation phase with separate public diagnostics and private scientific cases.
Figure 3 Evaluation pipeline in SWE-bench Science for an example task. The diagram shows the frozen agent-visible inputs, the agent-driven coding loop, and the clean evaluation phase with separate public diagnostics and private scientific cases.

Terms in this paper

  • pass@1 · a strict success score counting a task solved only if every hidden private test passes on the first try
  • Issue-driven task · a task built from an actual reported bug that the agent must fix
  • Expert-exploratory task · a task where the agent must independently investigate an unknown cause, like a scientist debugging a puzzling result
  • Engineering-integration task · a task requiring the agent to connect multiple files and modules into a complete working feature
  • public/private tests · public tests are visible to the agent for debugging, private tests are hidden and only run after submission to judge true success
Figure 4 Combined overview of raw-task construction and class-specific task re-design.
Figure 4 Combined overview of raw-task construction and class-specific task re-design.

Figures we cannot republish

  • Figure 1
See the figures in the original paper →

Original abstract (English)

Software increasingly functions as part of the scientific instrument itself, making failures in scientific code capable of compromising not only program behavior but also the evidence underlying scientific conclusions. Yet existing evaluations of coding agents largely emphasize aggregate task success, providing limited insight into why agents fail when repairing scientific software. We introduce \textbf{SWE-bench Science}, a repository-level benchmark for scientific software engineering comprising 119 tasks from 98 GitHub repositories across 20 scientific domains. Each task is organized into one of three paradigms: Issue-driven, Expert-exploratory, and Engineering-integration. Even the best-performing agent, \textbf{Claude Code with Opus-5 (max), achieves a pass@1 below 50\%}, highlighting the substantial challenges posed by scientific software engineering. We identify four recurring failure mechanisms: deficits in scientific knowledge or abstraction, misguided exploration or surface-level repair, incomplete repair coverage or system integration, and failures to generalize scientific knowledge beyond observed cases in our analysis. We further conduct a paired ablation that removes explicit scientific guidance while preserving the repository and executable engineering context. The results show that scientific knowledge is not uniformly beneficial: well-grounded information can constrain repair and improve average performance and token efficiency, whereas poorly aligned guidance can induce anchoring and does not necessarily improve exact repair success. Together, SWE-bench Science provides a broad testbed for studying both the capabilities and failure mechanisms of coding agents in scientific software engineering.

Authors · Zhipeng Xu, Jiahao Lu, Yining Zheng, Yuxin Wang, Xipeng Qiu

Read on arXiv

Latest papers

All papers →

Latest from METAL LAB

Figures: Zhipeng Xu et al., arXiv:2608.19799, CC BY 4.0