VFIG: Vectorizing Complex Figures in SVG with Vision-Language Models

Qijia He, Xunmei Liu, Hammaad Memon, Ziang Li, Zixian Ma, Jaemin Cho, Zhongzheng Ren, Daniel S Weld, Ranjay KrishnaarXiv 2026

TL;DR

VFIG introduces a novel framework, dataset, and benchmark designed to automate the conversion of complex raster diagrams (like neural network architectures and flowcharts) into clean, editable Scalable Vector Graphics (SVGs). By combining a simple-to-complex training curriculum with structure-aware Reinforcement Learning, VFIG bridges the gap between open-source and proprietary models, matching the performance of commercial giants like Claude 4.6 Sonnet.

What Problem Does This Paper Address?

In technical fields, diagrams are essential for communicating complex ideas, but their original vector source files (SVGs) are frequently lost. This leaves researchers and designers with flat raster images (like PNGs or JPEGs) that are incredibly tedious to edit or scale.

While AI has made strides in raster-to-SVG conversion, existing approaches suffer from two major bottlenecks:

  1. Dataset Limitations: Most open-source SVG datasets are dominated by simple icons and emojis, lacking the structural complexity of professional scientific diagrams.
  2. Flawed Evaluation Metrics: Traditional benchmarks rely on pixel-level similarity (like SSIM) or embedding distances. These metrics fail to capture structural correctness; a misplaced arrow or broken line might only alter a few pixels, but it completely changes the semantic meaning of a diagram.

Methods

The authors tackle these challenges by training a family of Vision-Language Models (VLMs) using a two-stage strategy:

  • Simple-to-Complex SFT Curriculum: Directly fine-tuning a model on intricate diagrams destabilizes training. Instead, VFIG is first trained on structurally simpler graphics to master basic geometric primitives and layouts before moving on to complex, multi-panel compositions.
  • RL with Rendering-Aware Rewards: Token-prediction alone often misses fine-grained alignment and connectivity. VFIG uses Group Relative Policy Optimization (GRPO) where generated SVGs are rendered in real-time and evaluated by a rubric-based VLM judge (Gemini-3-Flash). The judge scores the output across four critical structural axes: Presence (are all elements there?), Layout (spatial alignment), Connectivity (do arrows connect the right boxes?), and Details (text and styling).

Additionally, the authors implement strict code-level filtering during data preparation to favor semantic primitives (like <rect>, <circle>, and <line>) over messy, free-form <path> tags, ensuring the resulting SVGs are genuinely editable.

Datasets

The paper introduces a massive data and evaluation ecosystem:

  • VFIG-DATA: A large-scale dataset of 66K high-quality diagram-SVG pairs. It combines real-world scientific figures (converted via a robust VLM describe-and-generate pipeline) with programmatically generated diagrams that offer noise-free supervision for fonts, geometry, and arrow styles.
  • VFIG-BENCH: A structure-aware evaluation suite built from a held-out split of complex diagrams.
  • VFIG-BENCH-OOD: An out-of-distribution evaluation set consisting of 198 figures manually curated from highly cited recent arXiv papers across 12 computer science subfields.

Key Insights and Ideas

  • Structure Trumps Pixels: The authors demonstrate that pixel-level metrics are poor proxies for diagram quality. Their rubric-based VLM judge correlates exceptionally well with human preference ($r = 0.89$), proving that evaluating semantic connectivity is key to successful vectorization.
  • Curriculum Learning is Essential: Trying to teach a model layout logic and primitive drawing simultaneously is overwhelming. Separating primitive-heavy pretraining from realistic figure fine-tuning dramatically stabilizes the model and boosts rendering success rates.
  • The Path-Explosion Problem: Tracing-style SVGs rely heavily on coordinate-dense <path> elements, which cause token explosion in VLMs. Filtering these out in favor of clean primitives keeps sequence lengths manageable and outputs highly editable.

Key Results

VFIG achieves state-of-the-art performance among open-source models, outperforming the next best open-source VLM baseline by over 30%.

On the core VFIG-BENCH evaluation, VFIG effectively matches the proprietary Claude 4.6 Sonnet:

  • Gemini-Judge Score: VFIG achieved 78.2% vs. Claude's 76.7%.
  • GPT-Judge Score: VFIG achieved 87.5% vs. Claude's 87.4%.

While it still trails slightly behind the strongest closed-source models (like GPT-5.2 and Gemini-3), adding Reinforcement Learning (RL) consistently yielded substantial improvements in visual fidelity, code cleanliness, and human Elo ratings across all tested benchmarks.

Limitations and Future Work

Despite its strong performance, VFIG still faces a few hurdles:

  • Fine-Grained Local Structures: The model occasionally struggles with highly precise local details, such as the exact placement of arrowheads and thin connectors.
  • 3D and Perspective Graphics: Diagrams containing 3D shapes or perspective layouts remain highly challenging and frequently result in distorted geometry.
  • Stylistic Bias: Because the real-world training targets were generated using Gemini-3-Pro, the dataset inherits a specific stylistic prior. The authors suggest that incorporating human-authored ground truths and expanding the diversity of VLM judges will be crucial next steps to closing the remaining gap with top-tier proprietary models.

Summary updated

BibTeX
@misc{he2026vfig,
  author = {Qijia He and Xunmei Liu and Hammaad Memon and Ziang Li and Zixian Ma and Jaemin Cho and Zhongzheng Ren and Daniel S Weld and Ranjay Krishna},
  title = {{VFIG: Vectorizing Complex Figures in SVG with Vision-Language Models}},
  year = {2026},
  eprint = {2603.24575},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2603.24575},
}
Figure