Overview

An agent that runs machine learning (ML) experiments must do more than write a training script. It must choose an experiment, execute it, interpret the result, and decide what to retain. A large language model (LLM) supplies plans and code, while an execution system supplies data access, training, logs, and scores. The quality of the loop depends on both.

What Is Being Improved?

Consider a classifier for tabular data. Its pipeline fills missing values, encodes categories, trains a model, and produces predictions. The next experiment might replace imputation, add a feature, change the model, or investigate an unexpected error. A candidate is an executable version of that pipeline together with its relevant files and measurements. It is not a sentence in a reasoning trace.

AIDE makes the loop concrete. It drafts initial scripts, repairs scripts that fail, and improves valid ones. In Figure 1, drafting opens new branches, while fixing and improvement extend existing ones. Storing each version and its parent produces this solution tree (Jiang et al. 2025).

Figure 1: AIDE’s solution tree. Drafting creates starting points, fixing repairs failed executions, and improvement modifies working solutions. Each node is solution code rather than a reasoning step. Source: (Jiang et al. 2025) Figure 1.

Two decisions occur at every step: which candidate to work from, and what change to make. A sophisticated rule for the first cannot compensate for consistently poor answers to the second. An experiment can also be useful without producing a better candidate, if it resolves an uncertainty that changes the next decision.

Which Data Can Guide the Loop?

Training data fit the predictive model. Validation data estimate how well a candidate works beyond those training examples and guide development. A held-out test set assesses the final selected solution. Its outcomes must not feed back into the same search if they are to remain an independent final check.

Repeated validation is therefore not repeated independent testing. The agent chooses later experiments in response to earlier scores. Differences in splits, preprocessing, scoring code, and random seeds that initialize training randomness can all affect the ranking of candidates. Some systems additionally reserve a separate split for final selection, keeping it out of the development loop.

For the tabular classifier, preprocessing statistics should be fitted on the training portion and applied to the validation portion. Candidates should be compared with the same metric and compatible splits. Otherwise, a higher number may reflect an easier measurement rather than better predictions.

What Do the Benchmarks Measure?

MLE-bench assembles 75 Kaggle competitions. The flow in Figure 2 separates the agent’s work from the evaluator’s work. The agent receives a task description and data, trains models, and submits predictions. The evaluator scores those predictions against historical human competition results (Chan et al. 2025). Medal rate is the fraction of attempts reaching the task’s medal threshold. It is not prediction accuracy and does not use one common difficulty threshold across tasks.

Figure 2: MLE-bench’s task setup, from description and data to predictions and external grading. The number inside the diagram illustrates a submission score, not overall benchmark performance. Source: (Chan et al. 2025) Figure 1.

The work includes ordinary engineering as well as model design. In Figure 3, one agent discovers that a NumPy file needs binary loading, while another repairs a missing submission column after validation. These execution results change the next action, just as model scores do.

Figure 3: Excerpts of MLE-bench trajectories. Data loading, execution feedback, and submission checks inform subsequent actions. The columns come from different tasks and systems, not a matched speed comparison. Source: (Chan et al. 2025) Figure 2.

Other benchmarks answer different questions. RE-Bench compares agents and human experts on seven short AI research and development tasks. FML-bench standardizes editing and execution across 18 ML research tasks to study differences in agent strategies (Wijk et al. 2025; Zou et al. 2026). A competition medal, a research-code improvement, and a correct explanation of an experiment are distinct outcomes.

How Should the Chapters Be Read?

The book follows the decisions in an experiment loop.

The main subject is improving solution code for a task. Improving the experiment-running agent itself is a different level. In Figure 4, AIDE² places solution search inside an outer loop: rewritten agents are evaluated by running them on several tasks (Srikanth et al. 2026).

Figure 4: AIDE² separates agent improvement in the outer loop from solution improvement in the inner loop. The outer loop evaluates the agent’s ability to conduct searches, not merely one candidate’s score. Source: (Srikanth et al. 2026) Figure 1.

Harness Optimization develops that outer-loop question. Here, the organizing question is simpler: given the data, observations, and budget available now, what makes the next experiment useful?

Figure Sources and Usage Terms

References

Chan, Jun Shern, Neil Chowdhury, Oliver Jaffe, et al. 2025. “MLE-bench: Evaluating Machine Learning Agents on Machine Learning Engineering.” International Conference on Learning Representations 2025: 50466–94. https://proceedings.iclr.cc/paper_files/paper/2025/hash/7e3767db483c942b883eb4f8cfb74e31-Abstract-Conference.html.
Jiang, Zhengyao, Dominik Schmidt, Dhruv Srikanth, et al. 2025. “AIDE: AI-Driven Exploration in the Space of Code.” arXiv Preprint arXiv:2502.13138. https://arxiv.org/abs/2502.13138.
Srikanth, Dhruv, Bingchen Zhao, Dixing Xu, Yuxiang Wu, and Zhengyao Jiang. 2026. “Recursive self-improvement of AI research agents.” arXiv Preprint arXiv:2609.26457. https://arxiv.org/abs/2609.26457.
Wijk, Hjalmar, Tao Roa Lin, Joel Becker, et al. 2025. “RE-Bench: Evaluating Frontier AI R&D Capabilities of Language Model Agents against Human Experts.” Proceedings of the 42nd International Conference on Machine Learning, Proceedings of machine learning research, vol. 267: 66772–832. https://proceedings.mlr.press/v267/wijk25a.html.
Zou, Qiran, Hou Hei Lam, Wenhao Zhao, et al. 2026. “FML-bench: A Controlled Study of AI Research Agent Strategies from the Perspective of Search Dynamics.” arXiv Preprint arXiv:2605.17373. https://arxiv.org/abs/2605.17373.