NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

AInsteinBench: Benchmarking Coding Agents on Scientific Repositories

Titouan Duston, Shuo Xin, Yang Sun, Daoguang Zan, Aoyan Li, Shulin Xin, Kai Shen, Yixiao Chen, Qiming Sun, Ge Zhang, Jiashuo Liu, Huan Zhou, Jingkai Liu, Zhichen Pu, Yuanheng Wang, Bo-Xuan Ge, Xin Tong, Fei Ye, Zhi-Chao Zhao, Wen-Biao Han, Zhoujian Cao, Yueran Zhao, Weiluo Ren, Qingshen Long, Yuxiao Liu, Anni Huang, Yidi Du, Yuanyuan Rong, Jiahao PengarXiv 2025 · DOI

Abstract

AInsteinBench is a large-scale benchmark designed to evaluate the capability of Large Language Model (LLM) agents to serve as research assistants in computational science. Unlike traditional benchmarks that focus on abstract reasoning or generic software engineering, AInsteinBench requires agents to navigate production-grade scientific codebases, respecting physical laws and mathematical invariants. We evaluate several state-of-the-art models on 244 expertly curated tasks across six diverse scientific domains, finding that while models are proficient at file localization, synthesizing scientifically correct patches remains a significant challenge.

Introduction

Modern scientific discovery is increasingly driven by massive, complex computational systems. To be truly useful, AI agents must do more than solve graduate-level physics problems or fix web-development bugs; they must act as genuine research assistants capable of maintaining and extending scientific software. This requires a unique intersection of domain-specific mathematical knowledge and software engineering proficiency.

Existing benchmarks typically separate these concerns. Scientific reasoning benchmarks like GPQA test conceptual knowledge, while software engineering benchmarks like SWE-bench focus on general-purpose Python repositories. AInsteinBench bridges this gap by evaluating end-to-end patch synthesis within real-world scientific software ecosystems, where code must not only compile but also preserve physical invariants such as energy conservation and numerical stability.

Methodology and Dataset

AInsteinBench comprises 244 tasks derived from six major, production-grade scientific repositories: PySCF (Quantum Chemistry), Qiskit (Quantum Computing), Einstein Toolkit (Numerical Relativity), AMReX (Fluid Dynamics), OpenMM (Molecular Dynamics), and RDKit (Cheminformatics).

Overview of the AInsteinBench framework and the scientific repositories involved.

The benchmark pipeline involves four key stages:

  1. Repository & PR Selection: Crawling historical pull requests and filtering for scientifically significant issues.
  2. Environment Reconstruction: Building isolated Docker environments to handle complex dependencies like MPI and domain-specific compilers.
  3. Expert Verification: PhD-level domain experts manually verified each task to ensure they required genuine scientific reasoning and to prevent false positives or negatives in the test suites.
  4. Agent Evaluation: Models were evaluated using the CodeAct Agent framework, allowing for iterative exploration and testing.

Key Results

The evaluation results highlight a clear performance hierarchy among current LLMs. Claude 4.5 Opus achieved the highest overall resolution rate at 44.0%, followed by Gemini 3 Pro at 42.8% and DeepSeek V3.2 at 37.0%.

Model performance across different difficulty levels in AInsteinBench.

Performance was strongly correlated with task difficulty. For instance, Claude 4.5 Opus solved 59.3% of "Easy" tasks, but its success rate dropped to 30.2% for "Hard" tasks. Furthermore, domain-specific performance varied significantly. Models excelled in Quantum Computing (Qiskit) with solve rates up to 67.6%, but struggled in Cheminformatics (RDKit), where the maximum solve rate was only 19.6%. This discrepancy suggests that current models struggle with tasks requiring 3D spatial reasoning and geometric constraints.

Discussion and Insights

Our analysis revealed that the primary bottleneck for AI agents is synthesis, not search. While top models are effective at identifying the correct files to modify (localization scores > 0.70), they often fail to produce patches that respect global scientific constraints.

Common failure modes included "scientific correctness" errors, where code passed basic unit tests but violated underlying physical laws, such as electron-number conservation or spatial symmetry. We also observed that increasing the number of agent iterations rarely corrected a fundamentally flawed physical understanding; if an agent did not grasp the core scientific constraints early in its trajectory, it typically failed to recover.

Conclusion and Future Work

AInsteinBench demonstrates that while LLMs are becoming capable coders, their ability to reason about complex scientific invariants remains limited. Future work should focus on developing domain-aware agents that natively understand physical laws and 3D geometry. Additionally, improving the robustness of scientific test suites and expanding the benchmark to include more diverse or legacy codebases will be essential for creating AI assistants that can truly accelerate computational research.

Summary updated

BibTeX
@misc{duston2025ainsteinbench,
  author = {Titouan Duston and Shuo Xin and Yang Sun and Daoguang Zan and Aoyan Li and Shulin Xin and Kai Shen and Yixiao Chen and Qiming Sun and Ge Zhang and Jiashuo Liu and Huan Zhou and Jingkai Liu and Zhichen Pu and Yuanheng Wang and Bo-Xuan Ge and Xin Tong and Fei Ye and Zhi-Chao Zhao and Wen-Biao Han and Zhoujian Cao and Yueran Zhao and Weiluo Ren and Qingshen Long and Yuxiao Liu and Anni Huang and Yidi Du and Yuanyuan Rong and Jiahao Peng},
  title = {{AInsteinBench: Benchmarking Coding Agents on Scientific Repositories}},
  year = {2025},
  eprint = {2512.21373},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2512.21373},
}
Figure