Quality
63.9overall score against 57.4 for PaperBanana under the same judge, on a scale where the author's own figure scores 50
Evidence-Grounded Scientific Figure Generation via Geometry Compilation to Editable Vectors
The model decides what to draw. The compiler decides where.
Agent2Figure draws the method figure of a paper. A language model reads the method section and writes FigureSpec, a typed description of the elements of the figure, how they group and connect, and the sentence of the paper each element comes from. FigureSpec contains no coordinates.
A deterministic compiler measures the text, solves rows, columns, grids and nesting with a constraint solver, and routes every connector orthogonally between ports on box edges. Alignment, non-overlap and port-to-port connection therefore hold for every object the compiler constrains and every relation FigureSpec declares.
A geometry checker and a vision-language reviewer then look at the rendered figure. What they find becomes a patch to FigureSpec, and the figure is compiled again instead of being edited as pixels. The output is an SVG whose boxes, labels and arrows can each be moved or retyped.
overall score against 57.4 for PaperBanana under the same judge, on a scale where the author's own figure scores 50
non-orthogonal or crossing connectors among those the compiler routes, which are 91.9% of all connectors
of 9,684 generated elements are consistent with the paper they illustrate
The language model decides what the figure contains, a compiler decides where everything goes, and every repair is an edit to the specification followed by a fresh compile.
Try the open-source TypeScript geometry compiler directly in your browser. Switch presets, test custom paper or institution colors, toggle Compiler X-Ray, or attempt adding raw coordinates to see schema rejection live.
Forty figures from the PaperBananaBench test split, each drawn from the method section and the target caption of a published paper. Open one to see the caption the system was given and to download the SVG.
All results are on the 292 method figures of the PaperBananaBench test split unless a row says otherwise.
A judge (Gemini-2.5-Pro) compares each generated figure with the author's own figure in both presentation orders. A win scores 100, a tie 50 and a loss 0, so the author's figure scores 50. Every row below is judged with the same prompts.
An independent checker parses each final SVG and reports, per figure, the rate of overlapping shapes, connectors with an unattached end, misaligned elements, non-orthogonal connectors and crossing connectors. Raster outputs are traced by hand into SVG and scored by the same checker. Lower is better.
Annotations and imported assets are placed by anchor and sit outside the overlap and routing constraints. Counting only the objects the compiler constrains, 86.1% of shapes and 91.9% of connectors, no connector bends off the grid and none cross.
The same judge sees two generated figures and picks the one closer to publication quality. Each pair is judged in both orders, agreement keeps the outcome and disagreement counts as a tie. Sign tests are Holm-corrected across the four comparisons.
Agent2Figure preferredTieOpponent preferred
Every non-decorative element of FigureSpec records the evidence it comes from. Auditing 9,684 elements against their papers, 99.2% are consistent with the paper. Removing evidence extraction and source spans lowers faithfulness from 47.6 to 42.1 and the overall score from 63.9 to 59.8.
Stated directly in one sentenceDerived from several sentencesWithout a source, mostly schematic marks such as ×N
The maintained TypeScript release on Claw Orchestrator extends the paper's prototype with panoramic layout primitives, hybrid visual-vector assets, custom paper/institution palettes, live watch preview, native PPTX export, Track B data charts, and an MCP server.
git clone https://github.com/Enderfga/Agent2Figure && cd Agent2Figure
npm install && npm run build
a2f compile examples/video-world-model.spec.json --pdf --pptx --audit --strict
a2f watch examples/video-world-model.spec.json a2f init config # set custom paper/institution colors in a2f.config.json
a2f generate --paper paper.tex --caption "Overview of our method." \
--ref-image sketch.png --hybrid-assets --interactive --max-budget 3.0 @misc{fang2026agent2figure,
title = {Agent2Figure: Evidence-Grounded Scientific Figure Generation via
Geometry Compilation to Editable Vectors},
author = {Fang, Guian and Liu, Mengsha and Shou, Mike Zheng},
year = {2026}
}