Building a high-performing machine learning model is often a "trial-and-error" marathon. Data scientists spend weeks iterating on feature engineering, model selection, and hyperparameter tuning. While Large Language Models (LLMs) have shown promise as automated Machine Learning Engineering (MLE) agents, they often struggle with two critical limitations: they rely on outdated training data (favoring "classic" libraries over modern state-of-the-art) and they tend to rewrite entire scripts at once, losing track of what actually worked.
A new paper from researchers at Google Cloud and KAIST introduces MLE-STAR, an agent that treats ML engineering like a surgical operation rather than a total reconstruction. By combining web search with targeted code refinement, MLE-STAR doesn't just write code—it optimizes it until it reaches the podium.
TL;DR
MLE-STAR is an LLM-based agent that automates the end-to-end machine learning pipeline by searching the web for state-of-the-art models and using automated ablation studies to "surgically" refine specific code components. It achieved a 64% medal rate (including 36% gold) across 22 Kaggle competitions, significantly outperforming previous autonomous agents.
What Problem Does This Paper Address?
Existing MLE agents typically suffer from two major flaws:
- Knowledge Bias: LLMs are "frozen" in time. When asked to solve a tabular data problem, they might default to a basic Random Forest because it was prevalent in their training data, missing out on newer, more powerful architectures.
- Coarse Exploration: Most agents use a "total rewrite" strategy. If a model performs poorly, the agent might change the preprocessing, the model, and the evaluation logic all at once. This makes it impossible to tell which change actually helped, often leading the agent to pivot away from a promising direction prematurely.
Methods
MLE-STAR introduces a multi-agent framework designed for "Targeted Refinement":
- Search-based Initialization: Instead of relying solely on internal memory, the agent uses a search tool to find effective models and example code from the web. It then merges these into a strong initial "baseline" solution.
- Ablation-Guided Extraction: To decide what to improve next, the agent performs an ablation study. It creates variations of the current code (e.g., removing a specific feature engineering step) to see which component has the biggest impact on performance.
- Nested Loop Refinement: Once a "bottleneck" component is identified (e.g., the imputation strategy), the agent enters an inner loop. It tries multiple specialized strategies for only that block of code while keeping the rest of the pipeline stable.
- LLM-Driven Ensembling: Rather than simple majority voting, MLE-STAR uses a planning agent to propose and iteratively refine complex ensembling scripts that combine the best-performing candidates.
- Robustness Modules: The framework includes a Data Leakage Checker (to ensure the model isn't "cheating" by looking at test data) and a Data Usage Checker (to ensure the agent hasn't ignored any provided datasets).
Datasets
The researchers evaluated MLE-STAR on MLE-bench Lite, a benchmark consisting of 22 Kaggle competitions. These tasks span a wide range of modalities, including Tabular Classification/Regression, Image Classification/Denoising, Text Classification, and Audio Classification. Unlike older benchmarks that focus only on simple tabular data, this set requires the agent to handle complex file formats and diverse evaluation metrics.
Key Insights and Ideas
- Surgical beats Coarse: The "aha moment" of the paper is that refining a single code block at a time allows for much deeper exploration. By isolating a component, the agent can try 5-10 different feature engineering tricks without the "noise" of changing the model simultaneously.
- Search as a Knowledge Bridge: By using Google Search, the agent can adopt models released after the LLM's cutoff date, preventing it from becoming a "dinosaur" that only knows older techniques.
- Ablation as a Compass: Automated ablation studies provide a principled way for an AI to prioritize its work. Instead of guessing what to fix, the agent uses empirical evidence to find the most influential part of the code.
- The "Cheating" Guardrail: One of the most interesting findings was the necessity of the Data Leakage Checker. LLMs often accidentally use test-set statistics for preprocessing—a common mistake that inflates validation scores but causes failure in the real world.
Key Results
MLE-STAR demonstrates state-of-the-art performance on competitive machine learning tasks.
- Kaggle Performance: Using Gemini 2.5 Pro, MLE-STAR achieved a 63.6% medal rate. For comparison, the previous state-of-the-art agent, AIDE, achieved between 10% and 36% depending on the underlying model.
- Gold Medals: MLE-STAR secured gold medals in 36.4% of the tasks, showing it can reach the very top tier of human performance.
- Model Modernity: Qualitative analysis showed that while older agents stuck to older architectures, MLE-STAR successfully implemented and tuned modern architectures like EfficientNet and Vision Transformers (ViT).
Limitations and Future Work
- Token Cost: The iterative nature of nested loops and parallel runs means MLE-STAR consumes a significant number of tokens. While the cost is manageable for short challenges, more complex tasks could scale this cost up.
- Time Constraints: The experiments were capped at 24 hours. In real-world Kaggle competitions that last months, a human might still find "long-tail" optimizations that a 24-hour agent misses.
- Plagiarism Concerns: While the authors used plagiarism detection tools to show their code was sufficiently original, the risk of LLMs "remembering" specific Kaggle solutions from their training data remains a topic of ongoing debate in the community.
Paper Citation: Nam, J., Yoon, J., Chen, J., Shin, J., Arık, S. Ö., & Pfister, T. (2025). MLE-STAR: Machine Learning Engineering Agent via Search and Targeted Refinement. 39th Conference on Neural Information Processing Systems (NeurIPS 2025).
Summary updated