PaperCompiler: Faithful Paper-to-Code Generation via Repository-Level Specification Compilation
Abstract
PaperCompiler converts research papers into structured repository specifications that preserve method logic and cross-file consistency, improving code fidelity and reducing critical errors.
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 paper-to-code generation framework that compiles paper-grounded evidence into explicit repository-level implementation specifications. PaperCompiler grounds implementation-relevant evidence while preserving source provenance and distinguishing paper-supported, inferred, externally delegated, and unresolved information. The resulting specifications encode non-degradation requirements, ownership assignments, cross-file dependencies, and file-level constraints. Repository generation proceeds under these compiled specifications while retaining flexibility over local engineering choices not fixed by the paper. PaperCompiler outperforms strong baselines on Paper2CodeBench, achieving a 13.8% relative improvement in reference-based fidelity (from 3.64 to 4.15) and reducing high-severity evaluator critiques (from 13.2% to 6.1%).
Community
.
This is an automated message from the Librarian Bot. I found the following papers similar to this paper.
The following papers were recommended by the Semantic Scholar API
- ReproAgent: Contract-Guided Paper-to-Code Reproduction (2026)
- DeepRepro: State-Aware Subplanning for Paper-to-Code Reproduction in Evolving Repositories (2026)
- Repo0: Design-Driven Zero-to-All Code Generation (2026)
- SLICE: Specification-Level Isolation of Contract Enforcement (2026)
- SA-Bench: Evaluating Semantic Alignment in LLM-Based Paper Reproduction (2026)
- Identifying Latent Declarative Representations of Code for Assisting Repository Migration (2026)
- StructureClaw: Traceable LLM Agents and an Executable Benchmark for Structural Engineering Workflows (2026)
Please give a thumbs up to this comment if you found it helpful!
If you want recommendations for any Paper on Hugging Face checkout this Space
You can directly ask Librarian Bot for paper recommendations by tagging it in a comment: @librarian-bot recommend
Get this paper in your agent:
hf papers read 2609.02272 Don't have the latest CLI?
curl -LsSf https://hf.co/cli/install.sh | bash Models citing this paper 0
No model linking this paper
Datasets citing this paper 0
No dataset linking this paper
Spaces citing this paper 0
No Space linking this paper
Collections including this paper 0
No Collection including this paper