Agent2Figure compiles scientific method figures into editable vectors
Agent2Figure treats method-figure generation as compilation: an LLM writes a typed intermediate representation, FigureSpec, with no coordinates, and a deterministic geometry compiler solves element positions, anchors and orthogonal paths. A geometry checker…
Why it matters
The 'model decides semantics, deterministic code solves geometry' pattern applies to any tool that generates diagrams or layouts with an LLM.
What happened
1 min readAgent2Figure treats method-figure generation as compilation: an LLM writes a typed intermediate representation, FigureSpec, with no coordinates, and a deterministic geometry compiler solves element positions, anchors and orthogonal paths. A geometry checker and a vision-language reviewer flag residual issues, and the system patches FigureSpec and recompiles instead of editing the image. On PaperBananaBench it scores 63.9 versus 57.4 for PaperBanana.
Our analysis
The key idea is not asking the model to predict absolute coordinates, the main source of layout errors; alignment and connector-crossing error rates fall to a few percent. Scores come from an LLM judge on a scale where the paper's own figure is 50 by construction, so 63.9 reflects judge preference rather than a human evaluation. Editable vector output is a real practical benefit for researchers who draw figures.