Abstract: Recent advances in AI and ML have transformed data science, yet increasing complexity and expertise requirements continue to hinder progress. Although crowd-sourcing platforms alleviate some challenges, high-level machine learning engineering (MLE) tasks remain labor-intensive and iterative. We introduce R&D-Agent, a comprehensive, decoupled, and extensible framework that formalizes the MLE process. R&D-Agent defines the MLE workflow into two phases and six components, turning agent design for MLE from ad-hoc craftsmanship into a principled, testable process. Although several existing agents report promising gains on their chosen components, they can mostly be summarized as a partial optimization from our framework's simple baseline. Inspired by human experts, we designed efficient and effective agents within this framework that achieve state-of-the-art performance. Evaluated on MLE-Bench, the agent built on R&D-Agent ranks as the top-performing machine learning engineering agent, achieving 35.1% any medal rate, demonstrating the ability of the framework to speed up innovation and improve accuracy across a wide range of data science applications.
Introduction
While Large Language Models (LLMs) have demonstrated significant potential in code generation, real-world machine learning engineering (MLE) involves far more than writing scripts. It is a complex, iterative process of hypothesis formulation, data analysis, debugging, and resource management. Current AI agents for data science often suffer from a "monolithic" design, where research and development tasks are tangled within a single prompt or a rigid, non-adaptive pipeline. This lack of modularity makes them difficult to improve and often leads to agents becoming trapped in local optima, unable to pivot from mediocre initial ideas.
To bridge the gap between current agent performance and human expert capability, we present R&D-Agent. This framework shifts agent design from ad-hoc craftsmanship to a principled engineering process by decoupling the MLE workflow into distinct, modular components.
The R&D-Agent Framework
The R&D-Agent framework decomposes the MLE workflow into two primary phases: Research and Development. This separation allows for specialized reasoning and execution strategies tailored to the unique demands of each phase.
1. The Research Phase (The "Thinker")
This phase focuses on high-level strategy and idea generation through four components:
- Planning: Dynamically adjusts strategies over time, encouraging novel, low-cost exploration early on and shifting toward high-budget techniques like ensembles as the deadline approaches.
- Exploration Path Structuring: Utilizes an adaptive Directed Acyclic Graph (DAG) to explore multiple research directions in parallel, enabling the agent to prune unproductive paths and merge successful insights.
- Scientific Reasoning Pipeline: Implements a multi-step reasoning process (data analysis → hypothesis generation → virtual evaluation) to ensure ideas are grounded before implementation.
- Memory Context: Facilitates "collaborative memory," allowing parallel exploration branches to share successful insights while maintaining their specific focus.
2. The Development Phase (The "Doer")
This phase translates research ideas into executable code through two components:
- Coding Workflow: Employs an iterative debugging loop. To maximize efficiency, the agent prototypes on small data samples to catch errors quickly before committing to full-scale training.
- Evaluation Strategy: Enforces standardized data splitting (train/val/test) to prevent common failure modes like overfitting to the validation set or data leakage.
Experimental Evaluation
We evaluated R&D-Agent on MLE-Bench, a comprehensive benchmark consisting of 75 authentic Kaggle competitions spanning image classification, text analysis, and time-series forecasting. We also conducted detailed ablation studies on a 40-competition subset and compared performance on MLE-Bench Lite (22 tasks) against existing state-of-the-art (SOTA) agents.
Results and Key Insights
R&D-Agent achieves a new state-of-the-art performance on the MLE-Bench. When powered by GPT-5, it reached a 35.1% Any Medal rate, significantly outperforming previous leading agents like ML-Master (29.3%) and AIDE (16.9%).
Key Findings:
- The Importance of Exploration: Ablation studies revealed that "Exploration Path Structuring" is the most critical component. Forcing the agent into a sequential chain rather than a branching DAG resulted in a 28% performance drop.
- The RAG Paradox: Interestingly, Retrieval-Augmented Generation (RAG) was found to harm performance on simpler tasks by introducing noise, only proving beneficial for high-difficulty, niche competitions.
- Efficiency Multipliers: By prototyping on 10% of the data, R&D-Agent can explore significantly more ideas within a 12-hour budget. The framework achieved its SOTA results using a single NVIDIA V100 GPU, whereas some competitors required significantly more compute for lower scores.
- Model Specialization: Decoupling allows for heterogeneous model assignments. Using a reasoning-heavy model (like o3) for Research and a coding-optimized model (like GPT-4.1) for Development yielded superior results compared to using a single model for both roles.
Conclusion
R&D-Agent demonstrates that a modular, principled approach to agent design can significantly advance the automation of machine learning engineering. While a 35.1% medal rate is a record for autonomous agents, a gap remains between AI and elite human data scientists. Future work will focus on refining RAG selectivity and developing better proxy metrics to evaluate complex deep learning models without requiring full training cycles.
Summary updated