AAAI 2027

Agent2Figure

Evidence-Grounded Scientific Figure Generation via Geometry Compilation to Editable Vectors

The model decides what to draw. The compiler decides where.

Paper soonCodeGallery
Every figure behind this title was drawn by Agent2Figure.

Overview

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.

One FigureSpec shown as the delivered vector figure and as the compiler's structural view, with five further examples
Top, one FigureSpec seen two ways, as the delivered figure and as the compiler's view of boxes, anchors and checks. Bottom, five more layouts from the same compiler. This figure was drawn by Agent2Figure.

Quality

63.9

overall score against 57.4 for PaperBanana under the same judge, on a scale where the author's own figure scores 50

Geometry

0

non-orthogonal or crossing connectors among those the compiler routes, which are 91.9% of all connectors

Grounding

99.2%

of 9,684 generated elements are consistent with the paper they illustrate

Method

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.

Method figure of the paper: planning FigureSpec from the paper, compiling it, one compiler for several figure types, and the check, review and patch loop
The method figure of the paper, also drawn by Agent2Figure.

Live Compiler Playground

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.

{"version":"1.0","claim":"Video clips compress horizontally through a 3D Causal VAE into latent cubes transported by a block-causal MeanFlow DiT and expanded back into coherent video rollouts.","targetWidthMm":174,"palette":"showlab","canvas":{"width":1758,"height":607}} Causal Spatiotemporal Video World Model with MeanFlow Transport a3D Spatiotemporal Encoding bBlock-Causal MeanFlow DiTinterleaved tokens · block-causal mask · average-velocity ODE c3D Decoding Input VideoT × H × W × 3 3D CausalVAE Enc8×8×4 ↓ 3D LatentCubez0 · t×h×w×d Video + Pose +Action TokenszEa2D RoPE · KV-Cached Attention Block-Causal MeanFlow VelocityField uθ(zt, r, t)vu(zt, r, t)t=0t=1t=rt=tInstantaneous v vs Average Chord u · ×L AdaLN DiT Blocks 3D VAEDecoder8×8×4 ↑ Rollout Clip1-to-4 NFE MeanFlow Identityutgt = vt - (t - r) du/dtL(θ) = || uθ(zt, r, t) - sg(utgt) ||2 patchify 1-4 NFE 3D Video / Latent Volume Frozen 3D VAE Funnel Trainable MeanFlow DiT Block-Causal Mask
Hover any element to inspect its node ID and paper provenance, or toggle Compiler X-Ray to see solved boxes and ports.1758×607px · 9 nodes · 6 routed edges · 100% in-browser

Results

All results are on the 292 method figures of the PaperBananaBench test split unless a row says otherwise.

Quality against the author's figure

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.

Agent2FigureClaude Opus 4.8 backbone 163.9
Agent2FigureOpen-weight backbone, Qwen3-VL-235B-A22B, 50 random samples 260.0
PaperBananaRe-judged with our protocol 357.4
SciSketch50 random samples 51.0
Author's figureReference, by construction50.0
Agent2FigureClaude Opus 4.8 backbone 147.6
Agent2FigureOpen-weight backbone, Qwen3-VL-235B-A22B, 50 random samples 243.0
PaperBananaRe-judged with our protocol 342.3
Author's figureReference, by construction50.0
Agent2FigureOpen-weight backbone, Qwen3-VL-235B-A22B, 50 random samples 155.0
Agent2FigureClaude Opus 4.8 backbone 254.3
PaperBananaRe-judged with our protocol 352.9
Author's figureReference, by construction50.0
Agent2FigureClaude Opus 4.8 backbone 175.2
Agent2FigureOpen-weight backbone, Qwen3-VL-235B-A22B, 50 random samples 268.0
PaperBananaRe-judged with our protocol 366.8
Author's figureReference, by construction50.0

PaperBanana's own table, scored by a Gemini-3-Pro judge, reports 60.2 for PaperBanana, 43.2 for Nano-Banana-Pro and 11.5 for direct text-to-image generation.

Structural errors

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.

Direct text-to-imageRaster, traced to SVG 24.1%
PaperBananaRaster, traced to SVG 314.5%
Model-written coordinatesSame content, no FigureSpec or compiler 15.2%
Compiler without repairFigureSpec and compiler, refinement off 211.1%
Agent2FigureFull system 16.4%
Direct text-to-imageRaster, traced to SVG 26.7%
PaperBananaRaster, traced to SVG 314.0%
SciSketch50 random samples 39.0%
Model-written coordinatesSame content, no FigureSpec or compiler 16.1%
Compiler without repairFigureSpec and compiler, refinement off 212.3%
Agent2FigureFull system 17.5%
Direct text-to-imageRaster, traced to SVG 28.8%
PaperBananaRaster, traced to SVG 18.2%
Model-written coordinatesSame content, no FigureSpec or compiler 315.8%
Compiler without repairFigureSpec and compiler, refinement off 214.0%
Agent2FigureFull system 112.3%
Direct text-to-imageRaster, traced to SVG 18.2%
PaperBananaRaster, traced to SVG 15.1%
Model-written coordinatesSame content, no FigureSpec or compiler 314.7%
Compiler without repairFigureSpec and compiler, refinement off 28.2%
Agent2FigureFull system 13.4%
Direct text-to-imageRaster, traced to SVG 25.0%
PaperBananaRaster, traced to SVG 316.1%
SciSketch50 random samples 26.0%
Model-written coordinatesSame content, no FigureSpec or compiler 18.8%
Compiler without repairFigureSpec and compiler, refinement off 212.0%
Agent2FigureFull system 17.2%
Direct text-to-imageRaster, traced to SVG 21.9%
PaperBananaRaster, traced to SVG 28.9%
Model-written coordinatesSame content, no FigureSpec or compiler 10.6%
Compiler without repairFigureSpec and compiler, refinement off 28.9%
Agent2FigureFull system 11.7%

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.

Shape overlap

Whole figure7.5%
Compiler-constrained1.8%

Non-orthogonal connectors

Whole figure7.2%
Compiler-constrained0

Connector crossings

Whole figure1.7%
Compiler-constrained0

Pairwise preference

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 againstDirect text-to-image
214 wins 45 33
p < 10⁻⁴
Agent2Figure againstPaperBanana
192 wins 51 49
p < 10⁻⁴
Agent2Figure againstModel-written coordinates
165 wins 64 63
p < 10⁻⁴
Agent2Figure againstCompiler without repair
132 wins 74 86
p = 0.0022

Agent2Figure preferredTieOpponent preferred

Grounding

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.

70.6%27.3%2.1%

Stated directly in one sentenceDerived from several sentencesWithout a source, mostly schematic marks such as ×N

Open-Source Toolkit

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.

Embodied World-Model Policy hybrid visual-vector teaser
Hybrid Visual-Vector Teaser · studio visual assets embedded inside compiled orthogonal vectors
Causal Spatiotemporal Video World Model with MeanFlow Transport
Panoramic Vector Architecture · layered 3D VAE funnels, MeanFlow ODE field, and italic equation card
Structure-Guided De Novo Ligand Design via SE(3)-Equivariant Flow Matching
Scientific Hybrid Bio-AI · SE(3) pocket graph, 3D flow transport, and Nature-style protein renders
Track B multi-panel publication data chart
Track B Quantitative Charts · multi-panel vector PDF/SVG charts sharing the same paper palette and Carlito font

CLI & Live Watch

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

Paper-Specific Workflow & Theme

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

Citation

@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}
}