Abstract
Large language models (LLMs) have shown impressive performance in general programming tasks. However, in Machine Learning Engineering (MLE) scenarios such as AutoML and Kaggle competitions, achieving high performance depends heavily on expert intervention and repeated adjustments rather than simply generating correct code. When applied directly to these tasks, LLMs often lack fine-grained domain priors, and existing MLE approaches that use linear or tree-structured searches limit knowledge transfer to adjacent hierarchical links. As a result, they cannot leverage past full trajectories or share information across branches, limiting self-evolving ability and search space diversity. To address these limitations, we introduce AutoMLGen, an LLM-based coding agent that integrates a domain knowledge base for high-quality prior guidance and Monte Carlo Graph Search (MCGS) for efficient exploration. MCGS retains the tree-guided exploration of MCTS while embedding a graph structure into the expansion stage to enable dynamic path reorganization, historical trajectory reuse, and multi-solution fusion to support both self-evolution and collaborative learning. Combined with fine-grained operator sets, this design improves stability and accelerates convergence. Evaluation on the MLE-Bench shows that AutoMLGen achieves state-of-the-art performance in numerous dimensions, such as the average medal rate and the valid submission rate, under a 12-hour budget (half the standard runtime).
Introduction
While Large Language Models (LLMs) excel at general programming, Machine Learning Engineering (MLE)—exemplified by Kaggle competitions—is a different beast. It requires iterative optimization, domain-specific "tricks," and complex trial-and-error rather than just writing a single correct script. Current MLE agents face two major bottlenecks: an over-reliance on internal knowledge, which often lacks the fine-grained, specialized priors needed for niche ML domains, and node isolation in traditional tree searches. Most agents use tree-based search (like MCTS); if one "branch" of the search discovers a brilliant feature engineering trick, other branches remain "blind" to it, preventing the reuse of successful code snippets across different experimental paths.
Methodology
AutoMLGen introduces a framework that shifts from a tree-structured search to a graph-structured one. Its core components include:
ML Domain Knowledge Base
A curated repository of "expert priors" categorized by Model (backbones), Data (preprocessing), and Strategy (e.g., test-time augmentation). This helps the agent avoid "cold start" errors and provides high-quality guidance during initialization.
Monte Carlo Graph Search (MCGS)
Unlike standard MCTS, MCGS introduces Reference Edges. This allows for:
- Intra-branch evolution: Reflecting on a local trajectory of past attempts.
- Cross-branch reference: Borrowing high-quality solutions from entirely different search paths.
- Multi-branch aggregation: Fusing insights from multiple successful trajectories into a new, optimized starting point.
Fine-grained Operators
Instead of generic "improve" commands, the agent uses specific operators like Improve-FE (Feature Engineering), Improve-CS (Competition Strategies), and Fusion to merge candidate solutions.
Experimental Results
The authors evaluated AutoMLGen on MLE-Bench, a comprehensive benchmark introduced by OpenAI featuring 75 Kaggle tasks. They also utilized MLE-Bench Lite (a 22-task subset) for ablation studies and efficiency testing.
Performance and Efficiency
AutoMLGen achieved a 36.4% average medal rate on the full MLE-Bench, outperforming all existing baselines. Notably, it secured an impressive 18.7% gold medal rate, the highest reported to date.
A key finding is the efficiency of the approach: AutoMLGen achieved its SOTA results within a 12-hour budget. This is significant because previous top-performers like Neo required 36 hours to reach lower performance levels, proving that a more structured search is more valuable than raw compute time.
Reliability and Ablation
The agent maintained a 96.4% valid submission rate, indicating high stability. Ablation studies confirmed the importance of the core innovations: removing the Knowledge Base or the Graph Search components led to significant performance drops (e.g., on MLE-Bench Lite, the full system scored 68.1% vs. 40.9% for the baseline MCTS).
Conclusion
AutoMLGen demonstrates that the MLE search space is better represented as a graph. By allowing horizontal information flow between branches, the agent achieves a form of "collective intelligence." Future work will explore multi-step, decomposed code generation to handle even more complex tasks and testing on broader software engineering benchmarks.
Summary updated