Paper2Frame:基于框架的论文到代码生成方法,借助编程智能体实现
Paper2Frame: Framework-Conditioned Paper-to-Code Generation with Coding Agents
AI 导读
Paper2Frame 是一种论文到代码生成框架,先确定论文算法各部分在目标框架中的归属位置,再基于框架源码构建扩展点与可复用组件地图来写代码,配套提出 FrameJudge 评测,从运行成功率、算法准确性、框架忠实度三项分别打分。
正文 · 原文
Abstract:LLM agents can turn the algorithm from a research paper into working code. Existing paper-to-code systems generate a separate standalone repository for each algorithm, while researchers collect and run algorithms inside a shared framework for consistent evaluation and maintenance. Implementing a paper inside such a framework requires reusing the base components that the framework shares across algorithms and placing each algorithm-specific behavior at the extension point where it belongs, without changing the core code of the framework. We propose Paper2Frame, which implements an algorithm on top of a framework by determining where each element of the algorithm belongs before writing code, using a map of extension points and reusable components that it builds from the framework source. To evaluate such implementations, we propose FrameJudge, which writes grading criteria from the paper and the framework separately and grades run success, algorithm accuracy, and framework faithfulness as three separate measures. We implement and evaluate 12 papers on three frameworks in federated learning (FL), whose algorithms have a complex structure that spans clients, a server, and communication rounds. Using three models, 94--100% of Paper2Frame implementations run successfully, with algorithm scores of 0.92--0.99 and framework scores of 0.83--0.89. We compare the implementations of Paper2Frame with the official code of seven papers under the same setting, and they reach a final accuracy within 3.1% of the reference code, which indicates that Paper2Frame implements the algorithms of the papers accurately.
| Comments: | 28 pages |
| Subjects: | Artificial Intelligence (cs.AI); Software Engineering (cs.SE) |
| Cite as: | arXiv:2612.04688 [cs.AI] |
| (or arXiv:2612.04688v1 [cs.AI] for this version) | |
| https://doi.org/10.48550/arXiv.2612.04688 arXiv-issued DOI via DataCite (pending registration) |
Submission history
From: Sungmin Kang [view email]
[v1]
Wed, 2 Dec 2026 22:15:50 UTC (170 KB)
来源:arXiv cs.AI · arxiv.org