AI Scientists or Engineers? The Research Limits of Coding Agents
Coding agents can run end-to-end scientific machine learning experiments and improve benchmark results, but most gains still come from engineering optimization rather than scientific discovery. This article examines that distinction, outlines the capabilities needed for credible research, and presents a controlled, auditable framework for combining automated experimentation with human scientific judgment.
1. Putting Coding Agents Inside a Real Research Workflow
Consider an experimental setup with a multi-GPU server, a published scientific machine learning paper, runnable reference code, a defined evaluation metric, and a limited time budget. Can a coding agent that understands code, executes experiments, and analyzes results independently complete the workflow—from reading the paper and inspecting the implementation to proposing changes, running experiments, and submitting results—with little human intervention?
This is not simply a code-completion problem. Real research tasks typically have four characteristics: multiple objectives, imperfect data, expensive experiments, and conclusions that require explanation. In astronomy, protein prediction, and power grid simulation, an evaluation metric may measure an error or correlation coefficient. Researchers, however, also care about physical consistency, out-of-distribution generalization, mechanistic explanations, and reproducibility. An agent that improves a score without explaining why the change works is closer to an AI engineer than an AI scientist.
An evaluation covering 20 real scientific machine learning tasks offers an important signal. Multiple coding agents completed paper reading, code modification, training, and result submission without step-by-step human guidance. All four tested agents achieved positive improvements, and on every task, at least one agent exceeded the best result reported in the corresponding paper. No task was a complete failure across all agents.
These results suggest that current agents have substantial end-to-end engineering capabilities. They can identify optimization opportunities in reference implementations, debug environment failures, and iterate within a limited budget.
Human review, however, revealed a second finding: most improvements came from familiar engineering techniques, such as tuning learning rates, increasing model capacity, adding data augmentation, changing training strategies, or ensembling trained models. Breakthroughs grounded in scientific hypotheses, mechanistic analysis, or domain constraints were rare.
The distinction is both encouraging and sobering. Coding agents can be effective experimental engineers, but they remain some distance from independent scientists.
2. What These Evaluations Actually Demonstrate
The value of this evaluation setting is not merely that an agent can “beat a published paper.” It places agents under constraints resembling real research and development: incomplete instructions, legacy code, complex dependencies, GPU memory limits, random-seed variability, and competing metrics.
An agent must complete the following workflow:
- Extract the task definition, dataset details, evaluation metrics, and experimental settings from the paper.
- Inspect the reference implementation and locate training entry points, preprocessing, model definitions, and evaluation logic.
- Propose changes and execute them in an isolated environment.
- Resolve runtime errors, resource shortages, and variability in results.
- Compare experiments and select a final submission.
- Report the changes, supporting evidence, and potential risks.
Compared with single-turn code generation, this extended workflow exposes more of an agent’s actual capabilities. Producing correct code occasionally is not the hardest part. The challenge is maintaining a coherent experimental direction over hours or longer, recognizing unsuccessful attempts, controlling compute costs, and producing reproducible evidence in the final report.
Current agents appear strongest at verifiable local optimization. Given a clear metric and executable code, they can explore candidate changes much like an experienced engineering optimizer.
Their weaknesses lie in scientific judgments that cannot be verified through a single score: proposing new mechanisms, questioning whether a metric is appropriate, detecting data leakage, and designing experiments that could falsify a hypothesis. These are central to scientific research.
3. Why Engineering Optimization Dominates
3.1 Reference Implementations Leave Room for Optimization
A paper’s reference implementation is rarely the most thoroughly optimized engineering version. For readability, generality, or experimental fairness, it may use conservative learning rates, smaller models, weaker regularization, or simple training strategies.
Agents are well suited to finding these readily available improvements when guided by a clear metric. Hyperparameter tuning, capacity increases, augmentation, and ensembling are all forms of efficient search within an existing training workflow.
This does not diminish their value. It makes agents useful experimental engineers that can relieve researchers of repetitive tuning and execution management. But a higher score is not the same as a scientific discovery.
3.2 Code Pattern Recognition Is Stronger Than Scientific Abstraction
Current agents learn from large amounts of code and technical documentation, making them sensitive to common training patterns. They recognize architectures likely to converge, regularization techniques that can reduce overfitting, and augmentation methods that may improve robustness.
Their causal reasoning about domain knowledge is less reliable. In astronomy, a lower error might result from incorrectly fitting an observational system’s bias. In protein prediction, an improvement might exploit similarities across dataset splits. In power grid simulation, a better score might violate physical constraints.
Without domain-specific checks, an agent can mistake an attractive metric for a scientifically valid result.
3.3 Scientific Hypotheses Are Harder to Validate Automatically
Engineering optimization provides a direct feedback signal: training finishes, and the metric improves.
Scientific hypotheses require more complex feedback. A new hypothesis needs controlled experiments, the exclusion of confounding factors, uncertainty assessment, and confirmation through multiple independent experiments.
Although agents can propose experimental designs, repeated iteration often favors changes that improve scores quickly over changes that explain the underlying phenomenon.
3.4 Benchmarks Still Simplify Real Research
Evaluation tasks generally supply a defined dataset, an explicit metric, and runnable reference code. Real research may have neither a standard answer nor an agreed evaluation metric.
Researchers must decide whether a question is worth pursuing, whether the data are trustworthy, and whether the results support the hypothesis. Agents still depend on humans to establish boundaries for these decisions.
Current successes therefore demonstrate rapid iteration on well-defined optimization problems, not independent scientific research.
4. Classifying Contributions: From Tuning to Mechanistic Insight
A contribution hierarchy can help distinguish engineering improvements from deeper research advances.
| Level | Contribution Type | Typical Examples | Current Capability Assessment |
|---|---|---|---|
| L0 | Code repair | Fixing dependencies, paths, GPU memory issues, and data loading | Relatively mature |
| L1 | Hyperparameter optimization | Learning rate, batch size, training epochs, and regularization | Relatively mature |
| L2 | Training strategy optimization | Scheduling, early stopping, ensembling, mixed precision, and data augmentation | Relatively mature |
| L3 | Architecture or data improvements | Changing model capacity, designing modules, cleaning data, and modifying losses | Emerging |
| L4 | Scientific hypotheses and mechanistic insight | Introducing new constraints, discovering data bias, designing falsifiable experiments, and explaining mechanisms | Rarely observed |
In the evaluation described above, most agent improvements fell between L1 and L3. Agents could quickly identify effective combinations of learning rate, model capacity, and augmentation. They rarely proposed higher-level explanations such as: “The main source of error is observational system bias, so the model should incorporate a physical consistency constraint.”
Reaching L4 is not simply a matter of increasing model size. It requires domain knowledge, experimental design skills, and scientific skepticism.
For a claim to qualify as a scientific contribution under this framework, it should meet at least three conditions:
- The improvement can be attributed to a clearly identified mechanism.
- That mechanism holds on independent data or in an independent setting.
- The experiment is reproducible and rules out data leakage and chance fluctuations.
Reporting a better metric alone is insufficient.
5. The Gap Between Tuning Models and Conducting Research
5.1 Defining the Scientific Question
Engineering tasks usually come with an objective function. Scientific tasks also require deciding what is worth measuring.
An agent must identify implicit assumptions in a paper: Are the data splits appropriate? Do the metrics capture important risks? Are the baselines fair? Are essential controls missing?
Current agents are better at optimizing a supplied objective than questioning the objective itself.
5.2 Modeling Domain Constraints
Scientific machine learning is not purely a prediction problem. Physical laws, conservation relationships, stability boundaries, and biological plausibility may impose hard constraints.
An agent that only minimizes loss can produce solutions that violate those constraints. A research system therefore needs domain-constraint validators that turn expert knowledge into executable checks.
5.3 Designing Experiments and Attributing Causes
A reliable research agent should maintain a complete hypothesis–change–experiment–evidence record for each candidate improvement.
For example, if an agent believes augmentation helps, it should compare no augmentation, weak augmentation, and strong augmentation, then test stability across random seeds.
A score improvement without ablation experiments should not be promoted into a scientific conclusion.
5.4 Identifying Risks and Questioning Results
Agents can be overly optimistic. They need to check proactively for data leakage, test-set contamination, invalid shortcuts, and wasted resources.
In automated experimentation, a single mistake in validation-set usage can produce impressive-looking results that do not reproduce.
Before final submission, the system should require a failure-mode analysis and a checklist of reproducibility experiments.
6. An Engineering Framework for Trustworthy Research Agents
A coding agent used to improve scientific models should be treated as part of a controlled experimental system, not merely as a code generator. A practical framework needs at least six layers.
Layer 1: Task Contract
Define the paper, code, data, metrics, compute budget, domain constraints, and final deliverables.
The task contract is part of the experimental system, not an optional addition to a prompt. It should prohibit modifying the test set, bypassing evaluation logic, or exceeding resource limits.
Layer 2: Isolated Sandboxes and Resource Governance
Run each experiment in a separate container with limits on GPU allocation, memory, training duration, and concurrency.
Store datasets, model checkpoints, and logs in traceable storage. Object storage can hold experimental artifacts, message queues can schedule jobs, and logging and monitoring services can expose anomalies.
In a cloud environment, container platforms, object storage, message queues, logging, and monitoring alerts can turn experimental isolation, resource quotas, and auditing into enforceable engineering controls.
Layer 3: Hypothesis Ledger
The agent should submit more than a final patch. It must record each candidate’s hypothesis, modifications, configuration, results, failure reasons, and confidence level.
This ledger supports human review and helps prevent the agent from repeating unsuccessful experiments in later iterations.
Layer 4: Automated Validation
Validation should include:
- Baseline reproduction
- Multiple random seeds
- An independent validation set
- Ablation experiments
- Physical constraint checks
- Data leakage audits
- Compute cost accounting
Only validated improvements should be eligible for submission. Human experts should review critical checkpoints when necessary.
Layer 5: Reproducible Evidence Package
The final output should be more than a score. It should include code patches, environment details, data versions, random seeds, training logs, evaluation scripts, failed experiments, and the limits of the conclusions.
Scientific claims must be reproducible and open to challenge.
Layer 6: Human–Agent Decision-Making
Human experts assess scientific value, domain constraints, and risk boundaries. Agents handle rapid implementation, batches of experiments, and result summaries.
The most effective arrangement is not complete autonomy. Humans define objectives and constraints, agents expand the search space, and humans review mechanisms and evidence.
The following pseudocode illustrates an abstract experimental loop:
spec ← parse(paper, repo, data, metric, budget, domain_constraints)ledger ← emptyfor round in 1..max_rounds:hypotheses ← propose_hypotheses(spec, ledger)for h in hypotheses:patch ← implement(h, sandbox)run ← execute(patch, seeds=multi_seed, budget=unit_budget)record ← analyze(run, constraints=spec.domain_constraints)ledger.append(h, patch, run, record)candidate ← select(ledger,objective=metric,robustness=multi_seed_stability,novelty=mechanism_supported,cost=compute_cost)if not human_review(candidate, round):continuereturn evidence_package(ledger, best_validated=candidate)
The key is not the syntax but the workflow constraints. Every candidate enters the ledger. Results undergo domain-constraint and robustness analysis. The final output is an evidence package, not merely a higher score.
7. Practical Recommendations for Research and Development Teams
Do not equate outperforming a published metric with a research breakthrough. Report mechanistic explanations, ablation results, resource costs, and failed experiments alongside performance gains.
Provide strong baselines. If the starting implementation is weak, agents can produce apparently substantial improvements with limited scientific value.
Evaluate multiple objectives. Go beyond a single metric to include accuracy, stability, interpretability, physical consistency, out-of-distribution generalization, and the difficulty of reproducing results.
Build automated audits. Pay particular attention to data leakage, test-set contamination, and resource misuse.
Involve domain experts at critical stages. Human review should cover experimental design and mechanistic interpretation, not just the final result.
For teams seeking higher research productivity, the realistic near-term role is an AI experimental engineer. Agents can set up environments, repair code, search parameters, run ablations, analyze logs, and draft reports. Human scientists remain responsible for problem definition, hypothesis formation, mechanistic judgment, and review of conclusions.
This collaboration is currently more reliable than fully autonomous research and more likely to deliver meaningful value.
8. Conclusion: Engineers Today, Potential Scientists Tomorrow
The evaluation sends two complementary signals.
The encouraging signal is that coding agents can complete extended experimental workflows on real scientific machine learning tasks and produce consistent improvements. They already have a strong engineering foundation for supporting research.
The cautionary signal is that those improvements largely come from tuning, capacity increases, augmentation, and training strategy changes. Agents still fall short in proposing new scientific hypotheses, discovering mechanisms, and designing decisive experiments.
The more accurate description is that current coding agents are capable AI experimental engineers, evolving toward AI research assistants, rather than mature AI scientists.
A research agent should be evaluated not only on whether it raises a score, but also on whether it explains why a change works, identifies the conditions under which it fails, and enables independent reproduction.
The threshold for an AI scientist is the ability to propose falsifiable hypotheses proactively and validate them through rigorous experiments. Until then, the soundest approach is to place agents inside constrained, auditable, human-supervised research systems—using them to amplify human experimental capacity rather than replace scientific judgment.
