AI Agents in Real Scientific Research: Benchmarking Autonomous Coding on 20 ML Tasks
This article examines what happens when autonomous coding agents are placed in real research environments rather than algorithm contests. It outlines the problem setup, an evaluation across four agent types and 20 scientific machine learning benchmarks with zero human intervention, and the main findings: every agent achieved positive improvements, at least one agent surpassed the paper-reported best result on all 20 benchmarks, yet consistent superiority remains rare. The article also breaks down the behaviors behind successful runs, common failure modes, and practical steps for building reliable automated research pipelines.
1. Problem Setup: What It Means to Put Agents in a “Real Lab”
Picture this scenario: a server with 8 high-end accelerator cards, a top-tier conference paper, an official reference implementation, and 12 hours of unattended runtime. An automated coding agent is expected to independently improve an astronomy observation model, a protein structure prediction model, or a power grid simulation model. This is no longer a thought experiment; it is an engineering path that can be reproduced.
Unlike typical algorithm contest problems, real research tasks have three distinct characteristics:
- Ambiguous goals: Metrics reported in papers often depend on specific data splits, preprocessing, and random seeds, so reproduction itself introduces noise.
- Expensive feedback: A single full training run may take tens of minutes to several hours, so agents cannot brute-force search through massive trial and error.
- Strict delivery: Results must be submitted in a unified format and completed within compute and time constraints.
The focus of evaluation is therefore not just “can it make changes,” but “can it reliably produce verifiable positive improvements without human intervention.”
2. Experimental Design: Four Agent Types, 20 Benchmarks, Zero Human Intervention
The study had four mainstream coding agents (representing general capabilities from different vendors, described here in a neutral way) work independently on 20 real scientific machine learning benchmarks. Key design points:
- Unified environment: Same hardware, same data, same initial code, same time budget, eliminating unfairness from resource differences.
- Full-pipeline autonomy: From reading the paper, locating bottlenecks, modifying code, running experiments, to submitting results, with no human hints or corrections.
- Verifiable scoring: Official benchmark metrics are the standard, and only beating the best result reported in the paper counts as “successful improvement.”
This design turns “research improvement” into a measurable, comparable engineering problem and provides a paradigm for future automated research pipelines.
3. Core Findings: Broadly Positive, but “Consistent Improvement” Is Still Rare
The results present a mix of excitement and sobering reality:
- All four agent types achieved positive improvements on every task, with no negative or collapsing outcomes.
- On the 20 benchmarks, at least one agent surpassed the best result reported in the paper, reaching 100% coverage.
- But there is a clear gap between “one of them can do it” and “every one of them does it reliably,” with significant differences in individual stability.
This shows that current agents have moved from “can they act” to “can they deliver reliably,” and stability is exactly the core threshold for engineering adoption.
4. Capability Breakdown: What Agents Actually Do Right
From the behavioral traces, successful agents generally share the following abilities:
- Paper understanding and information extraction: Locating key hyperparameters, loss functions, and data preprocessing details.
- Bottleneck identification: Using logs and metrics to determine whether the issue lies in data, features, or optimization strategy.
- Small-step iteration: Adopting controlled experiments of “change one thing, run once, check the metric” rather than large rewrites.
- Standardized results: Submitting in a unified format so results can be automatically evaluated.
A schematic controlled iteration logic can be expressed as:
best = baseline_scorefor step in range(max_steps):patch = propose_patch(code, logs, best) # propose a small change based on logsscore = run_and_eval(patch, budget=time_left) # evaluate within the time limitif score > best:best, code = score, patch # accept only positive improvementselse:rollback(patch) # roll back to avoid regression
The core idea is accepting only verifiable positive changes, which aligns with mature continuous integration practices.
5. Failure Modes: Why “It Runs” Does Not Equal “It Delivers”
Failures tend to concentrate in the following areas:
- Reproduction bias: Inconsistent data splits or random seeds shift the baseline itself.
- Overfitting to evaluation: Surface-level optimization targeting the metric, lacking generalization.
- Resource misjudgment: Underestimating training time and failing to complete a full experiment within the limit.
- Format errors: Result files that do not meet the specification and are judged invalid submissions.
The common thread is that agents lack strong constraints on the “verification loop.”
6. Engineering Practice: Building a Reliable Automated Research Pipeline
To reproduce similar capabilities in your own environment, consider the following practices:
- Environment standardization: Use a container platform to lock down dependencies, object storage to manage data and artifacts, and logging and monitoring with alerting to track every experiment.
- Evaluation as code: Write metric computation, data splitting, and submission format as executable validators that act as hard gates.
- Budget and scheduling: Set compute and time limits for each experiment, and use a message queue for task orchestration and failure retries.
- Human on the loop: Let agents execute autonomously while humans review only key decisions and final delivery, balancing efficiency and control.
On Baidu AI Cloud, the above capabilities can be composed from general product categories such as container platforms, object storage, logging services, and monitoring with alerting, without relying on any proprietary interfaces to close the loop.
7. Conclusion: How Far Are We from an “AI Scientist”?
The answer from this observation is: agents can already play the role of a competent “AI engineer,” reliably producing positive improvements under clear goals and strict evaluation; but to become an “AI scientist” that can propose hypotheses and design experiments, they still need to evolve in verification loops, generalization, and autonomy. For developers, the real opportunity lies not in chasing a particular tool, but in turning “verifiable automated experimentation” into reusable engineering capability.
