PaperCompiler:透過倉儲層級規範編譯實現忠實的論文至程式碼生成
PaperCompiler: Faithful Paper-to-Code Generation via Repository-Level Specification Compilation
September 2, 2026
作者: Yunhao Liu, Hong Phuc Pham, Jaehong Yoon
cs.AI
摘要
將研究論文忠實轉化為程式碼庫層級的實作仍具挑戰性,因為論文通常以高階層次描述方法、將實作假設隱性化,而且要求所生成的程式碼庫必須保留方法邏輯、評測協議以及跨檔案一致性。儘管近年論文轉程式碼代理(paper-to-code agents)有所進展,但其中間輸出往往以自由形式的計畫或摘要呈現,下游的程式碼生成代理可能忽略、重新詮釋或壓縮這些內容,導致演算法簡化與程式碼庫結構不一致。為解決這些挑戰,我們提出 PaperCompiler——一個將以論文為根據的證據編譯成明確之程式碼庫層級實作規格的論文轉程式碼生成框架。PaperCompiler 在保留來源出處的前提下,為與實作相關的證據建立論文依據,並區分四類資訊:論文支持、推斷、外部委派以及尚未解決。產生的規格涵蓋不降級要求、所有權指派、跨檔案依賴與檔案層級約束。程式碼庫生成在此等經編譯的規格下進行,同時對論文未限定的局部工程選擇保留彈性。在 Paper2CodeBench 上,PaperCompiler 效能優於強基準,以參考為基準的忠實度(reference-based fidelity)相對提升 13.8%(自 3.64 至 4.15),並將高嚴重度的評估器批判(evaluator critiques)從 13.2% 降至 6.1%。
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%).