Executive Summary
AutoP2C is a novel multi-agent framework designed to automate the "Paper-to-Code" (P2C) transition. It transforms research papers—including text, mathematical equations, and architectural diagrams—into fully functional, multi-file code repositories. By mimicking the workflow of a human expert, AutoP2C achieves a 100% execution success rate on complex benchmarks, significantly outperforming state-of-the-art models like OpenAI-o1 and DeepSeek-R1.
The Challenge of Reproducibility
The Machine Learning (ML) community faces a persistent "reproducibility crisis." While the volume of research is expanding at a breakneck pace, the manual effort required to implement a paper's findings remains high. This process involves interpreting complex diagrams, translating mathematical notations into logic, and organizing code into a coherent structure.
Standard Large Language Models (LLMs) struggle with this task for three primary reasons:
- Multimodality: Papers rely heavily on tables for hyperparameters and diagrams for architectures.
- Complexity: Generating a structured, multi-file repository with proper dependencies is significantly harder than writing isolated snippets.
- Context Limits: Models often lose the "big picture" when attempting to implement an entire system in a single pass.
The AutoP2C Framework
The authors propose a multi-agent system that decomposes the P2C task into four specialized, expert-led stages to ensure both structural integrity and functional correctness.
1. Repository Blueprint Extraction
To avoid "spaghetti code," the system first analyzes high-quality GitHub repositories to learn standard organizational patterns. It generates a "Repo Structure Template" that defines how folders, classes, and functions should be organized for specific types of ML tasks.
2. Multimodal Content Parsing
AutoP2C uses Optical Character Recognition (OCR) for text and Vision-Language Models (VLMs) to interpret architectural diagrams and tables. This information is distilled into a unified, implementation-ready Markdown format, ensuring that critical details like layer connections and hyperparameters are preserved.
3. Hierarchical Task Decomposition
Acting as a project manager, the agent plans the repository top-down. It defines the interfaces for every file and class before a single line of code is written. This stage builds an inter-file dependency graph to guide the subsequent implementation.
4. Iterative Feedback-Driven Implementation
A coding agent implements files sequentially according to the dependency graph. A verification agent then executes the code in a sandbox environment. If errors occur, the traceback is fed back to the coder for iterative debugging—a process that mirrors human software development.
Key Results and Insights
The framework was evaluated using two primary benchmarks: Paper2Repo (a new benchmark of eight recent ML papers with rich multimodal content) and the public PaperBench Code-Dev.
- 100% Execution Success: AutoP2C generated runnable code for all papers in the Paper2Repo benchmark. In contrast, OpenAI-o1 and DeepSeek-R1 only produced runnable code for 12.5% of the cases.
- High Fidelity: The generated code achieved an average of 99.5% of the performance reported in the original papers. In some instances, the AI-generated code slightly outperformed the original results due to automated hyperparameter optimization.
- The Importance of Vision: Ablation studies proved that "seeing" architectural diagrams is critical; removing the image modality caused the accuracy of the generated code to drop by over 20%.
Limitations and Future Work
While highly effective, the framework is currently optimized for Python. Future work will focus on expanding support to other languages like C++, incorporating human-in-the-loop reviews for handling "bleeding-edge" algorithms, and improving token efficiency to reduce the computational cost of processing long research documents.
Summary updated