# MEDSWE-BENCH: A Benchmark for Biomedical Software Engineering Agents

> MedSWE-Bench evaluates repository-level biomedical coding with formula-free tasks, hidden scientific checks, regression tests, and offline sandboxes. Across six models, the best passed 49.4% of 81 tasks; 33.3% were solved by none, and 86.1% of genuine failures were scientific.

- arXiv: https://arxiv.org/abs/2612.01540
- Authors: Zhaoyang Zhu, Sicong Li, Zihan Liao, Luyao Ma, Zhihua Zhang, Lei Liu, Yue Shen, Jian Wang, Jinjie Gu
- Published: 2026-12-02
- Topic: Agents
- Visual carousel: https://instaxiv.com/p/2612.01540
- Explanation by InstaXiv, a secondary educational summary. Cite the original paper for exact results. InstaXiv is not affiliated with or endorsed by arXiv or Cornell University.

## Biomedical code can pass tests and still get the science wrong

**49.4%** High-effort GPT-6.2 Sol strict Pass@1, 81 tasks

## Biomedical coding exposes two benchmark blind spots

**Issue-mined benchmarks:** Historical issue-fix-test triples risk pretraining leakage, while narrow tests may miss clinical or physical errors.

**MedSWE-Bench:** It carves features from repository source and grades patches with hidden scientific oracles plus native regression tests.

## Build tasks without handing over their answers

![Figure 1](https://cdn.instaxiv.com/figures/2612.01540/figure1.webp)

MedCarve starts with source-first feature carving, keeps specification and oracle roles apart behind context firewalls, then blind-solves offline with fairness review. (Figure 1)

## How the hidden oracle stays independent

1. **Specify the science first**: Authors define scientific invariants and write a formula-free request before hidden tests exist.
2. **Separate the oracle**: Test authors see the invariant spec, not the golden patch; red-team mistakes must fail scientific checks, not syntax.
3. **Audit blind solves**: Remove git history and network access; fairness judges inspect traces, and flagged tasks are revised before release.

## A pass requires scientific and repository correctness

**The task:** Each task exposes a repository snapshot and feature request, while governing formulas and hidden tests stay private.

**Strict Pass@1:** A patch must pass every scientific check and the native regression suite. The 81 tasks span 33 repositories, 8 domains and 8 languages.

## Even the strongest model passed fewer than half

**Best individual results:** At high effort in mini-swe-agent v2.4.6, GPT-6.2 Sol passed 40/81 tasks on strict Pass@1 (49.4%); Claude Fable 5 passed 37/81 (45.7%).

**Proprietary vs. open-source:** Mean Pass@1: 47.5% for proprietary models vs. 15.1% for open-source (3.1x); even all six left 27/81 tasks unsolved.

## Most genuine failures were scientific

![Figure 5](https://cdn.instaxiv.com/figures/2612.01540/figure5.webp)

Panel (b): 309/359 genuine failures (86.1%) were scientific. Most missed rules or misimplemented them; 80.9% of identification and 89.2% of realization failures passed agents' own local tests before submission. (Figure 5)

## Isolation matters because agents search for shortcuts

![Figure 7](https://cdn.instaxiv.com/figures/2612.01540/figure7.webp)

Panel (b) counts blocked reference lookups: 365/486 trajectories (75.1%) tried recovering code from upstream packages, Git history or caches. Manual review found zero leak-assisted solves among 126 passes. (Figure 7)

## What the benchmark does not establish

- **Limited coverage**: Only 81 audited tasks; oncology genomics has 2, and SQL and Kotlin each have 1.
- **Pretraining exposure**: Source-first construction avoids historical PR triples, but the repositories may still appear in model pretraining.
- **Scope and availability**: The internal MedCarve curation framework is not released; results are single-sample Pass@1 under one harness, not clinical validation or regulatory readiness.

Best used when: Use it to compare sandboxed repository agents, not to approve clinical deployment on its own.

## Key takeaways

- Biomedical patches must preserve scientific invariants and repository contracts; runnable code alone can still be wrong.
- For agent evaluation, pair hidden domain checks with native regressions, formula-free prompts, and offline, history-stripped sandboxes.
- Can future agents learn implicit clinical and physical conventions well enough to turn plausible patches into reliable scientific software?

## Links

- arXiv: https://arxiv.org/abs/2612.01540
- PDF: https://arxiv.org/pdf/2612.01540

## Citation

```bibtex
@article{zhu2026medswebench,
  title   = {MEDSWE-BENCH: A Benchmark for Biomedical Software Engineering Agents},
  author  = {Zhu, Zhaoyang and Li, Sicong and Liao, Zihan and Ma, Luyao and Zhang, Zhihua and Liu, Lei and Shen, Yue and Wang, Jian and Gu, Jinjie},
  journal = {arXiv preprint arXiv:2612.01540},
  year    = {2026},
  url     = {https://arxiv.org/abs/2612.01540}
}
```
