AI Coding Agents in Real Research Labs: Strong AI Engineers, Not Yet AI Scientists
This article examines what happens when leading coding agents are placed in real research environments with a fixed compute budget and no human intervention. Across twenty scientific machine learning benchmarks, every agent achieved positive gains, yet most improvements came from homogeneous tweaks such as learning rate tuning and larger backbones rather than genuine scientific insight. The article walks through a reusable evaluation design covering task standardization, sandbox isolation, compute and time budgets, and automated scoring, outlines the cloud infrastructure capabilities needed to run such experiments, and explains why current agents still fall short on hypothesis generation and causal reasoning. It closes with a practical division of labor for R&D teams.
1. Background: What Happens When You Put the Best Coding Assistant in a Lab
Imagine placing the most capable coding tool available today inside a real laboratory, equipped with an eight-GPU high-end accelerator server, a top-tier conference paper, and an official reference implementation, then giving it a twelve-hour unattended window to autonomously improve an astronomy observation model, a protein structure prediction model, or a power grid simulation model. What would it produce?
This is not a thought experiment. A research team put four mainstream coding agents into twenty real-world scientific machine learning benchmarks simultaneously, with no human intervention allowed at any point, and observed the full pipeline: retrieving papers, understanding code, designing changes, running training, and submitting results. The findings cut both ways. On one hand, every agent delivered positive gains, and on every benchmark at least one agent surpassed the best result reported in the paper, with no overall failure. On the other hand, manual review showed that the sources of improvement were highly homogeneous: learning rate and schedule adjustments, larger-parameter backbone networks, and standard data augmentation. Changes reflecting genuine scientific insight made up a very small share.
The name of this evaluation points straight at the core question: are agents “AI engineers” or “AI scientists”? Engineering capability means reading code, locating bottlenecks, and tuning according to best practices. Scientific capability means proposing testable hypotheses, designing experiments that can falsify them, and transferring conclusions to new settings. The value of the evaluation lies not in the rankings but in drawing a clear line between these two capabilities.
2. Evaluation Design: Making “No Human Intervention” Credible
For the conclusions to hold, the evaluation itself must be more rigorous than the systems under test. The reusable design rests on four layers.
The first layer is task and material standardization. Every benchmark provides the same paper, reference implementation, data splits, evaluation scripts, and metric definitions, so agents do not waste time guessing data conventions. Metrics must match the paper exactly; otherwise, any claim of “surpassing” is meaningless.
The second layer is environment isolation and reproducibility. All experiments run in disposable sandboxes with controlled network egress, locked dependency versions, fixed random seeds, and complete retention of raw logs and artifacts. Without these constraints, results cannot be attributed.
The third layer is aligned compute and time budgets. Every run gets the same single machine with eight GPUs and the same twelve-hour wall-clock budget, with no covert scaling allowed. Budget is a real constraint in research and a key variable that separates agents that plan from agents that rely on brute force.
The fourth layer is submission format and automated scoring. Agents may submit artifacts only through an agreed interface, and the scoring pipeline automatically runs a hidden test set, eliminating any possibility of manually editing result files.
A schematic task contract can be written as:
task:paper: ./assets/paper.pdfrepo: ./assets/reference_impldata: {train: ./data/train, valid: ./data/valid, test: HIDDEN}metric: {name: primary_score, higher_is_better: true}budget:gpus: 8wall_clock_hours: 12network: restrictedsubmission:entrypoint: ./submit.shartifacts: [metrics.json, run.log, diff.patch]
3. Experimental Platform: Sandbox, Orchestration, and Observability
The infrastructure supporting this kind of experiment can be abstracted into five general capability categories, all of which can be assembled from standard product categories on Baidu AI Cloud.
- Container platform: spins up an isolated, disposable runtime for each agent and destroys it when the task ends.
- Object storage: centrally holds papers, code snapshots, datasets, and all artifacts, naturally forming a traceable experiment archive.
- Message queue: decouples the scheduler from the executors for task distribution, timeout reclamation, and failure retries.
- Logging service: aggregates training logs and tool-call traces, making it easier to review an agent’s decision path after the fact.
- Monitoring and alerting: tracks accelerator utilization, GPU memory usage, and temperature to prevent ineffective tasks from occupying resources indefinitely.
The orchestration logic itself is general: the scheduler dispatches tasks according to budget, the executor drives the agent loop inside the sandbox, artifacts are written back to object storage, the scorer reads the hidden test set to produce a score, and the auditor performs static checks.
def run_once(task, budget):with sandbox(task.image, gpus=budget.gpus, net="restricted") as box:box.mount(task.repo, task.data)agent.loop(goal=task.metric, deadline=budget.wall_clock_hours)art = box.collect("artifacts/")score = scorer(task.hidden_test, art["metrics.json"])audit = auditor(art["diff.patch"], art["run.log"])return score, audit
It is worth stressing that the platform only provides compute, storage, and orchestration; it does not replace evaluation design. Confusing monitoring metrics with experiment metrics is the most common way teams fool themselves in projects like this.
4. Interpreting Results: The Homogeneity Trap Behind Positive Gains
All four agents achieved positive gains, which shows that the “read code, modify code, run evaluation” loop is now stable enough. But the concentration of improvement sources exposes three structural problems.
The first is insufficient search depth. Tuning hyperparameters and enlarging parameter counts are low-cost local searches with fast, low-risk returns, which agents naturally prefer. Hypotheses that require cross-module refactoring are avoided because their validation cycles are long.
The second is a single validation signal. When feedback is only one scalar metric, agents can only perform greedy hill climbing and cannot distinguish a “real mechanism improvement” from a “lucky gain.”
The third is the lack of failure archiving. Failed experiments are not recorded in a structured way, the same mistakes recur, and exploration cannot accumulate.
The corresponding improvements are to write the “scientific method” into the agent’s workflow: require a falsifiable hypothesis first, then an ablation experiment design, and only then allow submission; record the conclusion of every experiment, including negative results, in a structured knowledge base; and impose complexity and change-scope constraints on submissions to suppress pure parameter stacking.
5. Capability Boundary: Where AI Engineers End and AI Scientists Begin
The evaluation delivers a clear verdict: current agents are excellent AI engineers but not yet AI scientists. They can efficiently handle engineering implementation, performance tuning, and experiment execution, but they still depend heavily on humans for problem definition, hypothesis generation, cross-domain analogy, and causal explanation. For R&D teams, the pragmatic positioning is to let agents act as “parallel experiment executors” while humans retain the roles of “hypothesis proposers and conclusion arbiters,” and to solidify this division of labor into the workflow through a unified sandbox, budget constraints, and automated auditing, rather than expecting agents to complete the research loop on their own.
