AutoKaggle: A Multi-Agent Framework for Autonomous Data Science Competitions

Ziming Li, Qianbo Zang, David Ma, Jiawei Guo, Tianyu Zheng, Minghao Liu, Xinyao Niu, Yue Wang, Jian Yang, Jiaheng Liu, Wanjun Zhong, Wangchunshu Zhou, Stephen Huang, Ge Zhang · DOI

Introduction

While Large Language Models (LLMs) have demonstrated proficiency in generating isolated code snippets, executing a full-scale data science project remains a significant challenge. Real-world data science is an iterative "marathon" involving interdependent stages: data cleaning, exploratory data analysis (EDA), feature engineering, and model tuning. Existing autonomous agents often fail in these environments because they lack systematic error-correction mechanisms or become opaque "black boxes" that resist human guidance.

AutoKaggle is introduced as a robust, multi-agent framework designed to automate the entire data science pipeline for tabular data competitions. By integrating a phase-based workflow with iterative unit testing and a library of expert-verified tools, AutoKaggle achieves high submission success rates and competitive performance on complex datasets.

The AutoKaggle Framework

AutoKaggle organizes the data science process into a structured six-phase workflow: Background Understanding, Preliminary EDA, Data Cleaning (DC), In-depth EDA, Feature Engineering (FE), and Model Building, Validation, and Prediction (MBVP).

Overview of the AutoKaggle multi-agent workflow and problem-solving states.

To navigate these phases, the framework employs five specialized agents:

  • Reader: Analyzes competition documentation and file structures.
  • Planner: Formulates high-level strategies for each phase.
  • Developer: Generates the necessary Python code.
  • Reviewer: Performs quality control and logical checks.
  • Summarizer: Documents findings and prepares final reports.

Iterative Debugging and Expert Tools

A core innovation of AutoKaggle is its Iterative Debugging and Unit Testing loop. Unlike standard agents that only check for syntax errors, AutoKaggle's Developer agent utilizes specialized tools to run predefined unit tests. For example, it verifies that target variables remain intact after data cleaning. If a test fails, the agent is granted up to five attempts to self-correct before the system derives a new strategy.

Furthermore, the framework utilizes a Machine Learning Tools Library. Instead of relying on the LLM to write complex algorithms from scratch—which often leads to hallucinations—the agents retrieve expert-written code snippets for tasks like IQR outlier handling or one-hot encoding via Retrieval-Augmented Generation (RAG). This ensures that the generated code follows best practices and remains reliable.

Experimental Evaluation

The framework was evaluated on eight Kaggle competitions, categorized into "Classic" (pre-October 2023) and "Recent" (2024) tasks to test generalization against potential training data leakage. AutoKaggle, powered by GPT-4o, significantly outperformed the state-of-the-art baseline, AIDE.

Comparison of submission rates and comprehensive scores across different framework settings.

As shown in the results, AutoKaggle achieved an average valid submission rate of 0.83, compared to 0.58 for AIDE. Its Comprehensive Score of 0.821 surpassed the baseline in seven out of eight tasks. Notably, AutoKaggle successfully completed Task 8, a complex multi-variable classification problem where the baseline failed entirely.

Key Insights and Limitations

Ablation studies highlighted that unit testing is critical; without it, the completion rate dropped from 0.85 to 0.10. Interestingly, using the reasoning-heavy "o1-mini" model for planning actually hindered performance, as it tended to produce overly complex code that complicated the Developer agent's task.

Despite its success, AutoKaggle faces limitations with very large datasets due to execution timeouts and computational resource constraints. Future work will focus on optimizing agent memory and refining the interaction between the Planner and Developer to handle larger-scale data more efficiently.

Summary updated

BibTeX
@misc{li2024autokaggle,
  author = {Ziming Li and Qianbo Zang and David Ma and Jiawei Guo and Tianyu Zheng and Minghao Liu and Xinyao Niu and Yue Wang and Jian Yang and Jiaheng Liu and Wanjun Zhong and Wangchunshu Zhou and Stephen Huang and Ge Zhang},
  title = {{AutoKaggle: A Multi-Agent Framework for Autonomous Data Science Competitions}},
  year = {2024},
  eprint = {2410.20424},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.20424},
}
Figure