Graphics Program Synthesis is pivotal for interpreting and editing visual data, effectively facilitating the reverse-engineering of static visuals into editable TikZ code. While TikZ is the de facto standard for scientific schematics due to its programmatic flexibility, its requirement for rigorous spatial precision presents a significant challenge for Multimodal Large Language Models. Progress is currently stifled by two primary gaps: (1) Data Quality Gap: existing image-TikZ corpora often lack strict executability and reliable visual alignment; (2) Evaluation Gap: a lack of benchmarks for both structural and visual fidelity. To address these, we present a closed-loop framework featuring: SciTikZ-230K, a large-scale, high-quality dataset from our Execution-Centric Data Engine covering 11 diverse scientific disciplines; SciTikZ-Bench, a multifaceted benchmark spanning from basic geometric constructs to intricate hierarchical schematics to evaluate both visual fidelity and structural logic. To further broaden the scope of visual-code optimization methodology, we introduce a novel Dual Self-Consistency Reinforcement Learning optimization paradigm, which utilizes Round-Trip Verification to penalize degenerate code and boost overall self-consistency. Empowered by these, our trained model SciTikZer-8B achieves state-of-the-art performance, consistently outperforming proprietary giants like Gemini-2.5-Pro and massive models like Qwen3-VL-235B-A22B-Instruct.
Figures & tables
Figure 1. Challenges in graphics program synthesis. Current open-source MLLMs struggle with the strict constraints of TikZ, exhibiting critical issues such as syntax hallucinations , dependency omissions and geometric misalignments .
Figure 2. Overview of the SciTikZ-230K Dataset. The chart above presents the hierarchical distribution of our full dataset, spanning 11 scientific domains and over 90 fine-grained sub-categories.
Figure 3. Overview of the Execution-Centric Data Engine . Beyond passive filtering, it uses MLLM-guided remediation to correct compilation faults and distill misaligned pairs, preserving diversity under strict visual-program alignment.
Figure 4. Overview of the SciTikZ Framework. The pipeline initializes with SFT and Curriculum Data Selection. Core DSC-RL integrates Visual Alignment for pixel precision and Self-Consistency Refinement via symbolic back-translation.
Model
Params
Compile
Visual Fidelity
Code Quality
Success Rate ↑
SigLIP ↑
CLIP ↑
LPIPS ↓
SSIM ↑
DreamSim ↓
TED Norm ↓
C-BLEU ↑
Proprietary Models
GPT-5-Mini
-
77.3
72.5 / 93.7
70.4 / 91.1
54.3 / 40.9
55.1 / 71.4
33.9 / 14.5
53.4
12.7
Claude-4.5-Sonnet
-
91.0
86.4 / 94.9
84.4 / 92.7
40.9 / 35.1
66.2 / 72.8
20.2 / 12.3
47.0
19.6
GPT-5.1
-
90.3
86.3 / 95.5
84.7 / 93.8
38.5 / 31.9
66.8 / 73.9
18.9 / 10.2
45.1
21.9
Gemini-2.5-Pro
-
88.9
85.5 / 96.2
83.6 / 94.1
40.2 / 32.7
65.8 / 74.1
19.8 / 9.8
46.7
23.6
Table 1. Main Results on SciTikZ-Bench. Zero-shot performance comparison. Visual metrics are reported as All / Success , while code metrics are calculated on all samples. The best results are highlighted in bold and the second best are underlined .
Scale
Training Stage
Compile Rate ↑
SigLIP ↑
CLIP ↑
LPIPS ↓
SSIM ↑
DreamSim ↓
TED Norm ↓
C-BLEU ↑
4B
Base (Qwen3-VL-4B)
68.1
61.5 / 90.3
60.5 / 88.9
64.2 / 47.4
49.1 / 72.0
45.1 / 19.4
51.0
15.9
+ SFT
80.4
74.3 / 92.5
72.4 / 90.1
52.5 / 40.9
58.8 / 73.2
32.8 / 16.4
45.6
30.7
+ SFT + Stage 1
90.7
86.0 / 94.8
84.0 / 92.6
37.5 / 31.1
66.7 / 73.6
19.4 / 11.1
44.1
29.1
+ SFT + Stage 1 + Stage 2
95.9
92.4 / 96.3
90.6 / 94.4
30.8 / 27.9
70.7 / 73.8
12.2 / 8.5
43.2
28.6
8B
Base (Qwen3-VL-8B)
71.0
64.5 / 90.8
63.3 / 89.1
60.7 / 44.6
50.9 / 71.7
42.3 / 18.8
50.8
17.0
+ SFT
81.0
75.1 / 92.7
73.3 / 90.5
51.4 / 40.0
59.8 / 73.8
30.3 / 14.0
45.2
31.6
Table 2. Progressive Training Framework Analysis on SciTikZ-Bench. This table disentangles the cumulative gains from each training stage: Base model, SFT, Stage 1 RL (Visual Alignment), and the full SciTikZer with Stage 2 DSC-RL.
Model
DSim ↑
KID ↓
cBLEU ↑
TED ↓
Compile ↑
Gemini-2.5-Pro
87.34
2.86
12.29
50.45
66.42
Qwen3-VL-8B
78.25
5.32
7.75
60.39
55.17
InternVL3.5-14B
72.51
7.70
10.53
53.45
65.31
Qwen3-VL-235B-A22B
83.91
2.66
16.05
49.80
87.82
DeTikZify-v2.5-8b
85.05
1.72
12.83
51.10
90.41
SciTikZer-8B (Ours)
88.29
1.14
16.17
48.83
94.46
Table 3. Performance on DaTikZ-v3 test set. The best results are highlighted in bold and the second best are underlined .
Figure 5. Impact of Data Curation. Curated data enhances both executability and visual fidelity in 4B and 8B models compared with raw data and DaTikZ-v3.
Figure 6. Ablation of Dual Self-Consistency (DSC). Comparison between standard RL and our full DSC method.
Figure 7. Case Analysis. A qualitative comparison of rendered TikZ code generated by different models. We compare SciTikZer-8B with SOTA baselines, including Gemini-2.5-Pro, DeTikZify-v2.5-8B, and Qwen3-VL-Instruct-32B.
Model
ChartMimic_direct_v2
Exec. Rate ↑
Low-L ↑
High-L ↑
VinciCoder-8B-SFT
87.9
75.2
79.3
VinciCoder-8B-RL
91.2
79.3
80.9
VinciCoder-8B-DSC
92.1
80.2
81.5
Table 4. Performance on ChartMimic_direct_v2. Comparison against standard VinciCoder RL method.
Table 5. Blind human evaluation carefully conducted on 300 randomly sampled benchmark test examples.
Although multimodal large language models (MLLMs) have shown substantial potential in visual understanding and graphic code generation, editing scientific figures through code presents a greater challenge: a model must jointly recover visual structure, ground the requested change, generate compilable code, and preserve all unrelated content. While existing TikZ benchmarks mainly focus on figure reconstruction and generation, few systematically evaluate instruction-guided scientific figure editing with compilable code. We introduce Edit2TikZ, a comprehensive benchmark for scientific figure editing tasks, featuring 1,548 diverse and high-quality samples. Edit2TikZ combines real-world and controlled synthetic edit cases, supports both textual and visual localization request, and contains multi-step editing, each with step-level annotations. We further construct a human-aligned evaluation framework to measure whether a requested edit is completed while irrelevant content is preserved. Utilizing Edit2TikZ, we evaluate 14 mainstream MLLMs and find that current systems remain unreliable: on average, proprietary models achieve a compilation success rate of merely 75% and remain limited in both figure restoration and edit correctness, while compact models below 9B struggle further with instruction following and complete figure generation. Therefore, we build a mixed training set TikZEditMix and adopt reconstruction-then-editing curriculum learning for compact models. On Qwen3.5-4B, this training improves the compilation success rate from 45.35% to 83.40% and yields an average improvement of 18.7 points across our proposed evaluation metrics. The code and data will be released at https://github.com/Solunny/Edit2TikZ.
Large language models (LLMs) are increasingly used to assist scientists across diverse workflows. A key challenge is generating high-quality figures from textual descriptions, often represented as TikZ programs that can be rendered as scientific images. Prior research has proposed a variety of datasets and modeling approaches for this task. However, existing datasets for Text-to-TikZ are too small and noisy to capture the complexity of TikZ, causing mismatches between text and rendered figures. Moreover, prior approaches rely solely on supervised fine-tuning (SFT), which does not expose the model to the rendered semantics of the figure, often resulting in errors such as looping, irrelevant content, and incorrect spatial relations. To address these issues, we construct DaTikZ-V4, a dataset more than four times larger and substantially higher in quality than DaTikZ-V3, enriched with LLM-generated figure descriptions. Using this dataset, we train TikZilla, a family of small open-source Qwen models (3B and 8B) with a two-stage pipeline of SFT followed by reinforcement learning (RL). For RL, we leverage an image encoder trained via inverse graphics to provide semantically faithful reward signals. Extensive human evaluations with over 1,000 judgments show that TikZilla improves by 1.5-2 points over its base models on a 5-point scale, surpasses GPT-4o by 0.5 points, and matches GPT-5 in the image-based evaluation, while operating at much smaller model sizes.
Vision-language models (VLMs) have shown strong performance in generating scientific figures from text or images. However, publication-ready figures often require iterative refinement, making scientific figure editing an important yet largely unexplored step toward interactive figure creation. Existing approaches rely on costly proprietary agentic systems, focus primarily on evaluation, or construct training supervision from synthetically generated edits. Instead, we leverage naturally occurring scientific revision and development trajectories as a scalable source of supervision. To this end, we introduce DaEdiTikZ, the first large-scale dataset of revision-derived scientific figure edits, constructed by mining 391K plausible TikZ edit pairs from arXiv, GitHub, and TeX SE and inferring 781K directed edit instructions with a VLM conditioned on rendered figures and TikZ code. We further introduce DaEdiTikZ-Bench, a human-refined benchmark with 690 instances, and train two compact Qwen3.5-based EdiTikZ models (4B and 9B) by jointly learning image-to-TikZ reconstruction and instruction-conditioned editing, followed by reinforcement learning (RL) with complementary rewards for rendered fidelity and edit application. Automatic evaluation places our 9B model above all tested baselines, while human evaluation with 9 annotators and 4,320 ratings places it above GPT-5.6-Sol and on par with Gemini-3.1-Pro. Under severe out-of-distribution shifts, it remains competitive with GPT-5.6-Sol near its 2K training sequence-length regime.
Christian Greisinger, Zhixue Zhao, Steffen Eger
University of Technology Nuremberg · University of Sheffield