← Latest papers
🤖 AI

SciCodePile: A 128GB Corpus and Executable Benchmark for Challenging Scientific Code Generation

This paper introduces SciCodePile, a massive 128GB scientific code corpus and an executable benchmark of 200 tasks, to demonstrate that current large language models struggle significantly with scientific code generation while showing that training on this dataset substantially improves their performance.

Original authors: Weifeng Sun, Ye Fan, Yuchen Chen, Gou Tan, Jieke Shi, Yuan Yidi, Swee Liang Wong, Jonathan Pan, David Lo

Published 2026-07-22
📖 4 min read☕ Coffee break read

Original authors: Weifeng Sun, Ye Fan, Yuchen Chen, Gou Tan, Jieke Shi, Yuan Yidi, Swee Liang Wong, Jonathan Pan, David Lo

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you're trying to teach a super-smart robot how to write code. You've already taught it the basics: how to build a simple website, how to make a calculator, or how to organize a playlist. It's pretty good at these "general" tasks because it's read millions of books and websites about them. But now, you want to see if this robot can handle the really hard stuff: writing code for scientists. We're talking about code that simulates how a virus spreads, calculates the folding of a protein, or models the behavior of atoms in a new drug. This is "scientific code." It's different from regular code because it's not just about making the computer do something; it's about making sure the computer's math and logic match the real, messy, complex laws of nature. If the robot gets the syntax right but the science wrong, the result isn't just a bug—it's a failed experiment or a dangerous miscalculation. The big question is: Can our current AI robots, which are great at writing standard code, actually do the heavy lifting for scientists?

Enter SCICODEPILE, a massive new project that acts like a giant, specialized training ground and a rigorous final exam for these AI robots. The researchers behind this paper decided that to really test if AI can handle scientific coding, they needed two things: a huge library of real-world scientific code to study, and a strict test where the code actually has to run and work, not just look good on paper.

First, they built the library. They didn't just grab random code; they went hunting through 37,737 public code repositories on the internet, specifically looking for projects related to chemistry, biology, physics, and other sciences. They filtered out the junk and ended up with a massive collection of 128GB of scientific code. Think of this as a library containing every instruction manual, every blueprint, and every piece of code from thousands of real scientific labs. They organized this library in four different ways: raw code files, summaries of what the projects do, instructions for specific functions, and problem-and-solution pairs. It's like taking a messy garage full of car parts and organizing them into a perfectly labeled museum where you can see the engine, the manual, and a diagram of how the parts fit together all at once.

Next, they built the exam. They created a benchmark of 200 tasks. But here's the kicker: they didn't just ask the AI to write code and check if it looked similar to a human's answer. They put the AI's code in a "sandbox"—a safe, isolated digital playground—and ran it. If the code crashed, gave the wrong number, or failed a test, it was a fail. It was a pass/fail test based on whether the code actually worked.

So, how did the robots do? The results were a bit of a reality check. Even the smartest AI models, the ones that usually ace coding tests, struggled mightily with the scientific stuff. On the "fill-in-the-blank" style tasks, the best models only got about 38% of the way to a perfect score. But on the "make it work" exam, the numbers were even starker. The very best model managed to pass only 12.30% of the time. That means for every 100 scientific coding problems, the AI got 88 of them wrong. It suggests that while AI is getting good at writing code that looks right, it's still a long way from writing code that is scientifically reliable.

The researchers also showed that this new library is actually useful for teaching the robots. When they took a smaller AI model and let it study their 128GB library, its performance jumped significantly. It's like giving a student a stack of textbooks instead of just a few flashcards; suddenly, they understand the material much better.

In short, SCICODEPILE is a massive new tool that says, "Hey, AI, you're good at coding, but you're not ready to be a scientist yet." It provides the resources to train them better and the strict tests to see if they've actually learned. It's a wake-up call that while we're making great progress, there's still a huge gap between a robot that can write code and a robot that can do real science.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →