From Reproduction to Replication: Evaluating Research Agents with Progressive Code Masking

Gyeongwon James Kim, Alex Wilf, Louis-Philippe Morency, Daniel Fried
6/24/2025
cs.AI

Official code: j1mk1m/AutoExperiment (6 stars, last commit 2025-09-19).

Abstract

Recent progress in autonomous code generation has fueled excitement around AI agents capable of accelerating scientific discovery by running experiments. However, there is currently no benchmark that evaluates whether such agents can implement scientific ideas when given varied amounts of code as a starting point, interpolating between reproduction (running code) and from-scratch replication (fully re-implementing and running code). We introduce AutoExperiment, a benchmark that evaluates AI agents' ability to implement and run machine learning experiments based on natural language descriptions in research papers. In each task, agents are given a research paper, a codebase with key functions masked out, and a command to run the experiment. The goal is to generate the missing code, execute the experiment in a sandboxed environment, and reproduce the results. AutoExperiment scales in difficulty by varying the number of missing functions $n$, ranging from partial reproduction to full replication. We evaluate state-of-the-art agents and find that performance degrades rapidly as $n$ increases. Agents that can dynamically interact with the environment (e.g. to debug their code) can outperform agents in fixed "agentless" harnesses, and there exists a significant gap between single-shot and multi-trial success rates (Pass@1 vs. Pass@5), motivating verifier approaches to our benchmark. Our findings highlight critical challenges in long-horizon code generation, context retrieval, and autonomous experiment execution, establishing AutoExperiment as a new benchmark for evaluating progress in AI-driven scientific experimentation. Our data and code are open-sourced at https://github.com/j1mk1m/AutoExperiment .

View on arXivView PDF

Code Implementations(1)

61Shell, PythonMar 12, 20251 years ago

Similar Papers

Cite this paper

@article{kim2025from,
  title  = {From Reproduction to Replication: Evaluating Research Agents with Progressive Code Masking},
  author = {Gyeongwon James Kim and Alex Wilf and Louis-Philippe Morency and Daniel Fried},
  year   = {2025},
  eprint = {2506.19724},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2506.19724v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2506.19724.svg)](https://codeofpaper.com/paper/2506.19724)

Discussion