arXiv:2609.02272cs.CLcs.AI2026-09

将论文转化为可运行代码库,确保逻辑与结构一致

PaperCompiler: Faithful Paper-to-Code Generation via Repository-Level Specification Compilation

论文配图:PaperCompiler: Faithful Paper-to-Code Generation via Repository-Level Specification Compilation
图 1 · 摘自论文原文
  • 把论文中的信息转化为明确的代码库规格说明
  • 参考基准下准确率提升13.8%,严重评审问题减半
  • 适合需要高保真复现论文的开发者和研究者

将研究论文忠实转化为代码库级实现仍具挑战,因论文常以高层次描述方法,隐含实现假设,并要求生成的代码库保持方法逻辑、评估协议及跨文件一致性。尽管近期纸到码智能体有所进展,其中间输出多为自由形式的计划或摘要,下游编码代理可能忽略、重新解释或压缩,导致算法简化和结构不一致。为此,我们提出PaperCompiler,一种将论文相关证据编译为显式代码库级实现规格的框架。该框架在保留来源溯源的同时,区分论文支持、推断、外部委托和未解决的信息。生成的规格包含非退化要求、所有权分配、跨文件依赖和文件级约束。代码库生成在此编译规格下进行,同时保留论文未固定的局部工程选择灵活性。PaperCompiler在Paper2CodeBench上优于强基线,参考基准下的保真度相对提升13.8%(从3.64升至4.15),高严重性评估批评从13.2%降至6.1%。

原文摘要 · Abstract (English)

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%).

论文转代码代码生成复现自动化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。