atlas

Research map / Large language models / Agents, code and math

DeTikZify: Synthesizing Graphics Programs for Scientific Figures and Sketches with TikZ

NeurIPS 2024 · Large language models › Agents, code and math · approach: Neural program synthesis and transpilation · 3 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Introduces DeTikZify, a multimodal LM (SigLIP encoder + code LLMs) that synthesizes TikZ graphics programs from scientific figures and sketches, with MCTS-based self-refinement guided by compiler diagnostics or self-assessed perceptual similarity, plus three new datasets.

Problem

Recovering semantics-preserving TikZ graphics programs from compiled scientific figures and generating TikZ from hand-drawn sketches, where existing tools and commercial LLMs perform poorly.

Approach

Combine a SigLIP vision encoder with TeX-pretrained code LLMs, train on figures plus synthetic sketches (InstructPix2Pix-generated), and apply a tailored MCTS at inference that uses compiler diagnostics or the model's own visual embedding similarity as reward to iteratively refine its outputs without extra training.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use DeTikZify DS 7B instead of GPT for output-driven generationScientific figure-to-TikZ generation · Reference figuresaverage: 0.612 -> 0.965Helped
Use DeTikZify DS 7B instead of GPT for output-driven generationScientific figure-to-TikZ generation · Synthetic sketchesaverage: 0.15 -> 0.965Helped
Increase inference budget using MCTSDeTikZify DS 7B · Reference figuresaverage: 0.965 -> 0.76Hurt
Increase inference budget using MCTSDeTikZify DS 7B · Synthetic sketchesaverage: 0.965 -> 0.994Helped
Use MCTS time-budgeted refinement instead of output-driven inferenceDeTikZify DS 7B · Human evaluation on sketcheshuman preference score: $\mu=-0.32$ -> $\mu=0.39$Helped
Use Visual Self-Refine instead of output-driven inferenceGPT · Human evaluation on sketcheshuman preference score: $\mu=0.09$ -> $\mu=-0.16$Hurt
Add synthetic-sketch training (ablation)DeTikZify DS 1.3B · Reference figuresaverage performance across reported metrics: MTE -1.957; CBLEU +0.327; TED -0.822; DSIM +2.433; SSIM +1.318; KID +3.296Mixed
Add synthetic-sketch training (ablation)DeTikZify DS 1.3B · Synthetic sketchesaverage performance across reported metrics: MTE -13.358; CBLEU +0.171; TED +1.369; DSIM -3.993; SSIM -3.332; KID +34.18Helped
Pretrain the connector on MetaFig (ablation)DeTikZify DS 1.3B · Reference figuresaverage performance across reported metrics: MTE -1.846; CBLEU -0.096; TED -0.356; DSIM +0.398; SSIM -0.046; KID +0.115No clear effect
Pretrain the connector on MetaFig (ablation)DeTikZify DS 1.3B · Synthetic sketchesaverage performance across reported metrics: MTE -0.132; CBLEU +0.053; TED -0.378; DSIM +0.084; SSIM -0.181; KID +2.773No clear effect

Surprising findings

Limitations

Experimental setup

Datasets: DaTikZ v2 MetaFig SketchFig DaTikZ v1

Benchmarks: DaTikZ v2 test split (reference figures) SketchFig (synthetic and real sketches)

Metrics: CrystalBLEU TED DreamSim SSIM KID average normalized score MTE MST Bradley-Terry-style BWS human score Spearman correlation

Baselines: GPT-4o Claude 3 Opus LIVE Self-Refine Visual Self-Refine

Builds on: MCTS SigLIP LLaVA InstructPix2Pix DeTikZify v1 (DaTikZ)

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy