Code2Figure generates method figures directly from research code
An arXiv paper describes a system that turns research repositories into method figures grounded in the source code, plus a benchmark of 550 published papers for testing such tools.
In plain words
Researchers use coding agents, which are AI tools that write and edit code, and the resulting implementations can become hard for their own authors to follow. Code2Figure is a proposed system that reads a research code repository and produces a method figure, a diagram explaining how the method works, with each part tied to the actual code. The authors also built a benchmark to measure whether such figures stay faithful to the implementation.
What was announced
The paper, posted as an arXiv preprint, argues that two existing approaches each solve only half the problem. Scientific figure generation reduces manual drawing effort but does not align figures with the code, while software structure visualization derives design diagrams from code without organizing them for scientific readability. Code2Figure addresses both by building a figure graph, described as a hierarchy of scientific components and relations grounded in the source code and optionally informed by paper text.
The accompanying benchmark, Code2FigureBench, covers 550 published papers. The authors report that 31.5 percent of author-created figures contradict the released code, so the benchmark does not treat those figures as scientific ground truth. Instead, it measures implementation faithfulness under 3,300 controlled code modifications, scope controllability using code-verified checklists at four levels of detail, and visual quality against author-created figures. The authors state that Code2Figure outperforms ten baselines on all three requirements, with figure graphs achieving high scientific content coverage and evidence support. These results come from the paper's own evaluation and have not been independently confirmed.
What it does not show
- The source is the paper's abstract only, so the method details, evaluation setup and reported results cannot be verified beyond what the abstract states.
- The performance comparison against ten baselines is the authors' own claim and does not constitute independent confirmation.
Sources
Source-support review completed 5 Dec 2026. This story was drafted with AI assistance and checked against retained source passages. Automated checking is not independent verification.
Coverage: arXiv: abstract.
Updates and corrections
No corrections so far.
First published 5 Dec 2026
New to the subject? AI from the Ground Up starts from the beginning.