PaperCompiler : Faithful Paper-to-Code Generation with Repository-Level Constraints
Yunhao Liu ⋅ Hong P Pham ⋅ Jaehong Yoon
Abstract
Faithfully translating research papers into repository-level implementations remains challenging because papers often describe methods at a high level, leave implementation assumptions implicit, and require generated repositories to preserve method logic, evaluation protocols, and cross-file consistency. Despite recent advances in paper-to-code agents, their intermediate outputs are often presented as free-form plans or summaries that downstream coding agents may ignore, reinterpret, or compress, leading to algorithmic simplification and inconsistent repository structure. To address these challenges, we introduce PaperCompiler, a repository-level constraint-guided paper-to-code generation architecture that preserves paper semantics and context consistency. Unlike existing multi-stage baselines that first compress a paper into a high-level implementation roadmap and then generate code from that roadmap, PaperCompiler converts the paper into structured implementation evidence that explicitly distinguishes grounded facts, assumptions, and unresolved specifications. PaperCompiler compiles grounded evidence into explicit non-degradation requirements and assigns them to repository files and interfaces through an ownership graph. File-level specifications then constrain generation while preserving method fidelity and cross-file dependencies. On 90 papers from Paper2CodeBench, PaperCompiler outperforms strong baselines, achieving a 13.8\% relative improvement in reference-based fidelity (3.64$\rightarrow$4.15), demonstrating more faithful translation of paper specifications into executable implementations.
Chat is not available.
Successful Page Load