SciCode: A Research Coding Benchmark Curated by Scientists

Minyang Tian, Luyu Gao, Shizhuo Dylan Zhang, Xinan Chen, Cunwei Fan, Xuefei Guo, Roland Haas, Pan Ji, Kittithat Krongchon, Yao Li, Shengyan Liu, Di Luo, Yutao Ma, Hao Tong, Kha Trinh, Chenyu Tian, Zihan Wang, Bohao Wu, Shengzhu Yin, Minhui Zhu, Kilian Lieret, Yanxin Lu, Genglin Liu, Yufeng Du, Tianhua Tao, Ofir Press, Jamie Callan, Eliu A. Huerta, Hao Peng

Introduction

SciCode is a new, expert-curated benchmark designed to evaluate Large Language Models (LLMs) on their ability to solve complex, multi-step scientific research problems through code. The results provide a reality check for the "AI scientist" narrative: even the most advanced models, like OpenAI’s o1-preview, solve fewer than 8% of the main problems in realistic research settings.

The Challenge of Scientific Coding

While LLMs have become remarkably proficient at general-purpose coding—such as writing Python scripts for data cleaning or web scraping—they often hit a wall when faced with frontier scientific research. Existing benchmarks like HumanEval or MBPP are becoming saturated; models are scoring so high that these tests no longer distinguish between a good coder and a great one.

More importantly, scientific coding isn't just about syntax. It requires a deep "knowledge-reasoning-synthesis" loop. A researcher doesn't just write an isolated function; they derive a Hamiltonian, discretize a Brillouin zone, and then implement a numerical solver. Current benchmarks fail to capture this multi-layered complexity, leading to a discrepancy between how capable models appear on paper and how useful they actually are in a laboratory setting.

Methodology: Expert Curation and Problem Decomposition

To address this gap, the authors introduced SciCode, a benchmark consisting of 80 complex "main problems" broken down into 338 "subproblems."

Example of a SciCode problem decomposed into a main problem and multiple subproblems.

The methodology stands out due to its rigorous expert curation:

  • Decomposition: Problems are structured as a chain. To solve a main problem, a model must successfully complete a sequence of sub-functions and then integrate them.
  • Scientific Background: The authors provide optional "background" descriptions—the kind of context a principal investigator might give a graduate student—to see if models can follow scientific logic even if they don't have the specific theory memorized.
  • Rigorous Evaluation: Instead of just checking if the code runs without syntax errors, SciCode uses two types of tests: standard numerical input-output pairs, and domain-specific test cases that verify if the code accurately represents the underlying science (e.g., checking if a simulation correctly identifies a known physical phase transition).

The SciCode Dataset

The primary contribution is the SciCode dataset itself, which spans 16 sub-fields across Physics, Mathematics, Chemistry, Biology, and Materials Science.

Distribution of scientific domains in the SciCode benchmark.

As shown above, Physics makes up the largest portion (nearly 50%), covering advanced areas like Condensed Matter and Quantum Information. The problems are sourced directly from scientists' everyday research scripts and influential papers, ensuring they reflect real-world utility rather than simple textbook exercises. Furthermore, the authors specifically curated the data to have zero overlap with publicly available datasets, minimizing the risk of data contamination where a model might succeed simply because it memorized the answer during training.

Key Insights and Results

The benchmark was tested against a gauntlet of state-of-the-art models, including GPT-4o, Claude 3.5 Sonnet, and various Llama iterations. The results highlight several critical bottlenecks in current AI capabilities:

  • The Integration Tax: Models are significantly better at solving isolated subproblems (~28% success for o1-preview) than they are at completing a full research workflow (7.7%). This suggests that long-horizon reasoning and error accumulation are primary hurdles.
  • Background Knowledge is a Force Multiplier: Providing scientific context (formulas, constants, and derivations) consistently boosts performance across all models. This indicates that models often possess the necessary coding skills but lack the domain recall to apply them correctly from scratch.
  • The "Standard" Setting is Brutal: In the most realistic scenario—where a model is given no background help and must build on its own previously generated (and potentially buggy) code—most models fail completely. OpenAI’s o1-preview led the pack but still only achieved a 7.7% pass rate on main problems. Claude 3.5 Sonnet followed at 4.6%, while the best open-source model, DeepSeek-Coder-v2, managed only 3.1%.

Limitations and Future Work

The authors acknowledge that SciCode is exceptionally difficult; the low overall success rates mean the benchmark might be too challenging for many current-generation models to provide a granular performance signal.

Future work will involve expanding the benchmark to more diverse scientific fields and exploring how different prompting strategies—such as Chain-of-Thought or multi-agent systems—might bridge the performance gap. For now, SciCode serves as a sobering reminder: while AI is a powerful tool, we are still a long way from an autonomous "AI Scientist" capable of handling the rigors of original, multi-step research.

Summary updated

BibTeX
@inproceedings{tian2024scicode,
  author = {Minyang Tian and Luyu Gao and Shizhuo Dylan Zhang and Xinan Chen and Cunwei Fan and Xuefei Guo and Roland Haas and Pan Ji and Kittithat Krongchon and Yao Li and Shengyan Liu and Di Luo and Yutao Ma and Hao Tong and Kha Trinh and Chenyu Tian and Zihan Wang and Bohao Wu and Shengzhu Yin and Minhui Zhu and Kilian Lieret and Yanxin Lu and Genglin Liu and Yufeng Du and Tianhua Tao and Ofir Press and Jamie Callan and Eliu A. Huerta and Hao Peng},
  title = {{SciCode: A Research Coding Benchmark Curated by Scientists}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
}
Figure