TRANSMISSION // 2612.04688v1
Teaching AI coding agents to fit research into shared software
Source published
Paper2Frame plans where a research algorithm belongs in an existing framework before generating code. Tests in federated learning show promising results, but the preprint has a limited scope.

Turning a research paper into code is not just a matter of translating equations. The code must also fit the software framework researchers already use. A new preprint introduces Paper2Frame, which plans this fit before coding, and FrameJudge, a model-based system for assessing whether implementations run, follow the paper’s algorithm, and respect the framework.
The challenge: more than getting code to run
A research algorithm may describe what clients compute, what a server aggregates, and what information passes between them. A software framework already has components and execution rules for those jobs. Generated code can appear to work while bypassing the framework’s runner, rewriting features that should be reused, or missing part of the algorithm.
The authors ask whether coding agents can implement a paper’s algorithm inside an existing framework, rather than producing a separate program. They study federated learning, where clients and a server share computation and stored information over repeated rounds.
Planning before coding
Paper2Frame first maps a framework’s extension points—places intended for new components—along with reusable features and the way the framework runs an experiment. A mapping agent builds this map once per framework. It also creates a small “walking skeleton,” a basic program that runs through the framework, to check aspects of the map and provide a starting point for implementations.
For each paper, a coding agent describes the algorithm’s operations and the information it retains. That agent then combines the description with the framework map to plan where each operation and state variable belongs. A reviewer checks the plan against the paper and framework. A coding agent implements the plan and runs the code in a sandbox on a small synthetic-data setup, using the output to find and fix problems.
This initial run helps check and refine the implementation. For reported training comparisons, the authors adapted generated code to the relevant experiment settings, data, and models; the paper describes these as separate evaluation experiments.
The authors also introduce FrameJudge. It uses model-generated criteria drawn separately from the paper and framework source. Its algorithm score is based on a checklist of required behavior, while its framework score follows rubric-based rules about framework use. These are model-graded measures, not independent proof of correctness. In validation, FrameJudge detected 29 of 30 deliberately introduced defects. When it graded the same nine implementations again, verdicts matched on 147 of 150 algorithm checklist items (98%) and 145 of 154 framework items (94%). The checks are encouraging, but the missed defect and disagreements show why the scores warrant caution.
What the tests found
The researchers tested 12 papers across three federated-learning frameworks—APPFL, Flower, and NVIDIA FLARE—with three coding models. Across Paper2Frame implementations, 94–100% ran successfully. Algorithm scores ranged from 0.92 to 0.99, and framework-faithfulness scores from 0.83 to 0.89.
The comparisons suggest that explicit planning helped code fit its framework in these tests. Direct generation, in which an agent sees the paper and framework while coding, scored 0.24–0.75 on framework faithfulness. Generating standalone code and then porting it scored 0.01–0.62. These ranges cover the tested models and conditions, not every project. There was also an exception: on Flower, direct generation with one model scored higher on framework faithfulness than Paper2Frame.
For seven papers with official implementations, the team compared Paper2Frame code with reference code under the same settings. The largest reported difference in final accuracy was 3.1%; for the other six papers, it was below 1%. This supports close reproduction for those algorithms in those experiments, but does not show the generated code is interchangeable with official implementations in every setting.
The authors also implemented seven algorithms on Flower for a shared experiment. All seven implementations completed the reported 500-round runs at both tested levels of data heterogeneity and received full algorithm scores from FrameJudge. Five reached or exceeded the FedAvg baseline in those conditions; FedNova and MOON fell below it. The authors suggest the latter results may reflect a mismatch between those methods’ original tuning and the shared experiment setup. This is a comparison under specific conditions, not a general ranking of federated-learning methods.
What remains uncertain
The evidence covers 12 papers, three frameworks, and federated learning. The authors say extending Paper2Frame and FrameJudge to other machine-learning frameworks is future work. Even in the tested setting, framework scores leave room for improvement: the authors identify reuse of existing components as the main remaining issue, alongside misplaced changes and other framework-faithfulness problems. Algorithm errors also occurred, especially around edge cases such as the first training round.
FrameJudge’s scores deserve caution because its criteria and grading rely on language models. It missed one planted defect, and repeat grading did not produce identical verdicts for every item. Also, a program that runs on a small synthetic example may still need substantial validation before researchers rely on it for scientific conclusions.
The paper is labeled a preprint; the supplied source does not establish peer-review status or independent validation. Its results provide evidence from a bounded set of federated-learning tests, not confirmation that the approach will transfer to other fields. Whether Paper2Frame works similarly with other frameworks and kinds of research algorithms remains an open question.
- Paper2Frame
- coding agents
- research code
- federated learning
- software frameworks
- FrameJudge
Related reading
Automatically matched by shared topic keywords. These links do not imply that the sources agree or establish a consensus.
When Should Federated Learning Cluster Clients?
Source published
Shared keywords: federated learning
FedFiOT matches neurons to merge federated models with fewer exchanges
Source published
Shared keywords: federated learning
A Style-Aware Way to Combine Federated Learning
Source published
Shared keywords: federated learning
What proxy data reveals about federated distillation
Source published
Shared keywords: federated learning
In federated learning, more attackers mattered more than split triggers
Source published
Shared keywords: federated learning