Crafter: Towards Automated Reproducible Machine Learning via Agentic Code Generation
Abstract
Reproducing machine learning research is challenging because many papers do not provide executable code, and key implementation details are often scattered, implicit, or missing. Existing paper-to-code systems improve over direct prompting, but the generated repositories can still miss paper-critical logic or fail at execution time. We present Crafter, an automated paper-to-code pipeline that treats reproduction as a problem of context-calibrated implementation recovery rather than single-pass code generation. Crafter builds an evidence-grounded specification, resolves missing implementation details before planning, and repairs the generated repository through execution-aware debugging. We evaluate Crafter with the PaperBench Code-Dev protocol for implementation faithfulness and a fixture-scale protocol for execution readiness. Across 27 research papers using the Claude Sonnet 4.6 backend, Crafter achieves an average Code-Dev score of 0.83, improving over Paper2Code by 18.4% and over DeepCode by 21.8%. In execution evaluation, Crafter satisfies the fixture-level contribution checks after repair on all seven evaluated papers, compared with six for each baseline, while reducing average repair cycles from 10.7–12.9 to 5.7.