TL;DR
DeepRepro is a novel framework that automates the complex task of translating machine learning research papers into fully functional code repositories. Unlike traditional AI coding assistants that rely on rigid, upfront planning, DeepRepro uses "state-aware subplanning" to dynamically update its implementation strategy as the codebase evolves. This adaptive approach allows it to consistently outperform existing code agents and even surpass human expert baselines on scientific code generation benchmarks.
What Problem Does This Paper Address?
Automating "paper-to-code" reproduction is a notoriously difficult long-horizon problem in software engineering. When human developers implement a machine learning paper, they don't just write code linearly; they build an evolving repository where modules depend on one another, interfaces shift, and unexpected bugs require architectural adjustments.
Current Large Language Model (LLM) coding agents typically rely on a static, global plan generated at the very beginning. They then attempt to generate files sequentially based on that initial blueprint. However, as the codebase grows, early assumptions break, dependencies become misaligned, and errors cascade. Without a way to continually align planning with the actual, real-time state of the repository, static agents quickly get trapped in endless, costly repair cycles.
Methods
DeepRepro solves this by treating repository construction as an iterative, state-conditioned process. The framework is divided into three tightly coupled components:
- Blueprint Planning: The system first ingests the paper and uses three specialized sub-analysis agents (Figure, Concept, and Algorithm agents) to extract visual evidence, high-level methodology, and critical implementation details (like equations and hyperparameters). These views are synthesized into an initial global plan ($B_0$).
- Repository-Aware Orchestration: Instead of blindly executing $B_0$, DeepRepro enters an agentic loop. At each round, a Subplan Agent assesses the current execution state—which includes completed files, accumulated repository memory, and runtime diagnostics.
- The framework supports two modes: a lightweight fast mode (which simply targets the next files to generate) and a comprehensive deepplan mode (which groups dependent files, determines execution order, and generates specific per-file instructions and acceptance checks).
- Asynchronous Memory & Diagnostics: As files are successfully written, a memory management agent asynchronously compresses the code into structured summaries (purpose, interfaces, dependencies). Simultaneously, a diagnostics gate catches syntax or dependency errors and feeds them directly back into the next subplanning round as localized repair targets.
The framework also includes a Process-Aware Frontend so human users can transparently monitor subplans, file statuses, and diagnostics in real time.
Datasets
The authors evaluated DeepRepro using PaperBench Code-Dev, a standardized benchmark designed to evaluate AI capabilities in replicating machine learning research. The dataset consists of 20 papers accepted as Spotlights or Orals at ICML 2024. Quantitative evaluation is performed using hierarchical rubrics that grade the completeness and correctness of the developed code structure against rigorous requirements.
Key Insights and Ideas
- Planning Must Follow State, Not Time: The core "aha" moment of the paper is that code generation performance degrades not because the LLM forgets the initial goal, but because the plan becomes decoupled from the messy reality of the generated code. Conditioning the next step on the actual repository state prevents cascading errors.
- Subplanning Compensates for Weak Executors: A fascinating finding from the ablation studies showed that the advanced
deepplanmode provided the biggest performance boosts when paired with weaker underlying execution models (like DeepSeek-V4-Flash vs. GPT-5.4). This indicates that smart, macro-level coordination can effectively buffer against an LLM's micro-level coding limitations. - Asynchronous Compression is Vital: Rather than stuffing entire source files into the LLM's context window—which causes attention fragmentation and high token costs—abstracting completed code into a structured "repository memory" keeps the agent context-aware and highly efficient.
Key Results
DeepRepro demonstrated substantial improvements over both specialized scientific code agents and commercial tools:
- Benchmark Superiority: On the primary 5-paper subset of PaperBench, DeepRepro achieved an average score of 84.2, outperforming the previous state-of-the-art scientific baseline, DeepCode (82.9), as well as commercial assistants like Cursor (66.5) and Codex (61).
- Beating Human Experts: On the shared human-expert subset, DeepRepro achieved a score of 77.8, notably exceeding the reported human expert baseline of 72.4 (compiled from ML PhD students working on the same tasks).
- Robustness & Efficiency: Across the full 20-paper dataset, DeepRepro maintained a high average score of 75.09. Furthermore, DeepRepro proved faster than its competitors; its
deepplanmode completed repositories in roughly 1.5 hours compared to nearly 2 hours for DeepCode, while maintaining moderate API costs (~$12.50 per paper).
Limitations and Future Work
While DeepRepro excels at generating the correct repository structures and code files, the evaluation protocol used in this paper (Code-Dev) focuses strictly on code development rubrics and skips full runtime execution testing. The authors note that integrating an execution-based validation loop—where the agent actually runs the training pipelines and checks for convergence or accuracy metrics—remains an important and resource-intensive direction for future work.
Summary updated