Skip to main content
Back

Shanghai AI Lab's MLEvolve Beats Every MLE Agent at Half the Compute

MLEvolve beats AlphaEvolve and every MLE agent on the leaderboard using half the standard compute budget, with a new graph search and memory system that lets agents actually learn from past runs.

Pro

  • New SOTA on MLE-Bench: MLEvolve achieves a 65.3% average medal rate on 75 Kaggle tasks in just 12 hours, beating all prior agents running on 24-hour budgets.
  • Beats AlphaEvolve: A general-purpose MLE agent outperforms Google DeepMind's specialized AlphaEvolve on its own mathematical optimization benchmark tasks.
  • Progressive MCGS: Upgrades Monte Carlo Tree Search to a graph structure with reference edges, enabling cross-branch knowledge sharing and 4 expansion strategies.
  • Retrospective Memory: A two-layer memory (static domain knowledge base + dynamic runtime memory) lets the agent reuse past successes and avoid repeated failures.
  • Hierarchical planning: Separates strategy (Planner) from implementation (Coder), with 3 adaptive coding modes to prevent unstable full rewrites.
  • Open source: Code available at github.com/InternScience/MLEvolve; uses Gemini-3.1-Pro-preview as the backbone LLM.

LLM agents that can autonomously run machine learning experiments have been improving fast, but they all share a frustrating blind spot: each iteration starts nearly from scratch. A new framework from Shanghai AI Lab called MLEvolve attacks that problem head-on, introducing a self-evolving multi-agent system that accumulates experience, shares knowledge across search branches, and adapts its strategy over time. The result is state-of-the-art performance on MLE-Bench in just 12 hours -- half the compute budget that competing systems use.

The Three Cracks in Every MLE Agent

To understand why MLEvolve matters, you need to understand what existing agents get wrong. When an LLM agent explores a solution space, it typically builds a search tree -- each branch is a different approach to the problem. The issue is that these branches are completely isolated from each other.

  • Inter-branch isolation: A winning trick discovered in branch A never reaches branch B. If branch B tries the same dead end, it has no way to know it already failed elsewhere.
  • Memoryless search: Each planning decision is made in a vacuum. Past successes and failures don't accumulate into reusable knowledge -- only a scalar reward propagates back up the tree.
  • No hierarchical control: Most agents conflate what to change with how to implement it in a single generation step. This leads to unstable, full-rewrite iterations that undo good work as often as they improve it.

These aren't minor inefficiencies. Together they mean that after dozens of iterations, an agent isn't meaningfully smarter than it was at iteration one. MLEvolve is built to fix all three at once.

MLEvolve system overview showing Plan, Generate, Execute, Evolve cycle with Progressive MCGS, Retrospective Memory, and Adaptive Code Generation components

From Tree to Graph: Progressive MCGS

The core search mechanism in MLEvolve is called Progressive Monte Carlo Graph Search (MCGS). Standard MCTS (Monte Carlo Tree Search -- the same algorithm behind AlphaGo) organizes candidates in a tree, where each node is a solution and children are derived from their parent. MLEvolve upgrades this to a directed graph by adding a second type of edge: reference edges.

Reference edges let any node borrow context from any other node in the graph, regardless of branch. This enables four distinct expansion strategies:

  1. Primary expansion: Generate a new solution from its parent only (standard MCTS behavior).
  2. Intra-branch evolution: Look back at the last k nodes in the same branch, reflect on what worked and what didn't, then generate the next step.
  3. Cross-branch reference: When a branch stagnates, pull in the top-N solutions from other branches as context before generating the next candidate.
  4. Multi-branch aggregation: When the entire search stalls globally, synthesize insights from multiple strong solutions across all branches and start a fresh branch from that combined context.

The system also uses an entropy-inspired progressive schedule to manage the exploration-exploitation tradeoff. Early in the search, the agent casts a wide net (high entropy across branches). As time runs out, it increasingly focuses on refining the best-known solutions. The transition is smooth and probabilistic -- not a hard cutoff -- so the agent never fully stops exploring.

Memory That Actually Persists

MLEvolve introduces a two-layer memory system called Retrospective Memory. The first layer is a static domain knowledge base pre-populated with curated model recommendations organized by task type (image classification, NLP, tabular regression, etc.), synthesized from open-source repos and competition platforms. This solves the cold-start problem: instead of hallucinating a baseline from scratch, the agent starts with a reasonable prior.

The second layer is a dynamic global memory that grows during the search. After every valid code execution, the system stores a structured record containing the plan, the outcome, an analysis, and a feedback signal. When the agent needs to plan its next move, it queries this memory using a hybrid retrieval system that combines keyword matching with FAISS-based semantic search, fused via Reciprocal Rank Fusion (RRF -- a technique for merging ranked lists from multiple retrieval sources). The agent retrieves different things at different stages:

  • At the planning stage, it retrieves similar past successes and failures to refine its strategy before writing code.
  • At the debugging stage, it retrieves past resolved errors that match the current error message.

Separating Strategy from Code

The third pillar is hierarchical planning. MLEvolve decouples a Planner agent (which decides what to change and why, operating at the module level) from a Coder agent (which implements the change). The Coder then selects among three modes based on the current search state:

  • Base mode: Full code generation from scratch, used at initialization.
  • Stepwise mode: Module-by-module generation following the Planner's spec, for complex multi-stage pipelines.
  • Diff mode: Targeted patch edits on existing working code, for incremental refinement.

This prevents the common failure mode where an agent rewrites an entire working solution just to change one hyperparameter, accidentally breaking everything else in the process.

Benchmarks: Beating Everyone at Half the Cost

MLE-Bench, introduced by OpenAI, is the standard stress test for MLE agents. It comprises 75 ML engineering-related competitions from Kaggle, testing real-world skills such as training models, preparing datasets, and running experiments. Agents are graded on whether they earn bronze, silver, or gold medals relative to human Kaggle leaderboards.

MLEvolve achieves a 65.3% average medal rate on MLE-Bench under a 12-hour budget, establishing state-of-the-art performance. To put that in perspective, the best-performing setup at MLE-Bench's launch -- OpenAI's o1-preview with AIDE scaffolding -- achieved at least the level of a Kaggle bronze medal in just 16.9% of competitions. The field has moved fast, but MLEvolve leads the current pack by a meaningful margin, beating the next best open-source method (ML-Master 2.0 at 56.4%) and the best proprietary method (AIBuildAI at 63.1%) -- both running on 24-hour budgets.

The second benchmark is a set of 15 open-ended mathematical optimization tasks drawn from AlphaEvolve, Google DeepMind's specialized algorithm-discovery system. Google DeepMind unveiled AlphaEvolve as an evolutionary coding agent designed to autonomously discover novel algorithms and scientific solutions. MLEvolve outperforms both AlphaEvolve and its successor AlphaEvolve-v2 on these tasks -- a general-purpose MLE agent beating a system purpose-built for mathematical algorithm discovery.

What This Unlocks

The practical use cases are concrete. Any team running repeated ML experiments on similar problem types -- think a company that regularly builds tabular models for different clients, or a research lab iterating on vision benchmarks -- could deploy MLEvolve and have it accumulate institutional knowledge across runs. The Retrospective Memory means the 50th experiment benefits from everything learned in the first 49.

The cross-domain result against AlphaEvolve is also significant. It suggests the framework isn't just a better Kaggle bot -- the same architecture of graph search, persistent memory, and hierarchical planning generalizes to pure algorithm optimization tasks with no ML pipeline involved.

The code is open-source and available at the MLEvolve GitHub repository. The backbone LLM used in experiments is Gemini-3.1-Pro-preview, running on 21 vCPUs, 234 GB RAM, and a single H200 GPU per task -- hardware that's accessible but not trivial. The main limitation to watch: the system's memory and graph structures add overhead that could become unwieldy for very long-horizon runs beyond the tested 500-step, 12-hour budget.