VFIG: Vectorizing Complex Figures in SVG with Vision-Language Models
The paper introduces VFIG, a family of Vision-Language Models that converts rasterized figures into high-fidelity SVGs by leveraging a large-scale dataset (VFIG-DATA), a coarse-to-fine training curriculum combining supervised fine-tuning and reinforcement learning, and a specialized evaluation suite (VFIG-BENCH) to achieve state-of-the-art performance comparable to GPT-5.2.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you have a beautiful, hand-drawn blueprint of a house. It's perfect: you can move a wall, change a window, or resize a room with a single click because it's built from clean, mathematical lines. This is what SVG (Scalable Vector Graphics) is like for digital images.
Now, imagine someone takes a photo of that blueprint, prints it out, and then scans it back into a computer. Suddenly, it's just a flat picture (like a JPEG or PNG). The "walls" are no longer walls; they are just colored pixels. If you want to move a window now, you have to paint over the old one and draw a new one from scratch. It's messy, impossible to edit, and if you zoom in, it gets blurry.
The Problem:
In the world of science and engineering, researchers constantly lose these "blueprints." They have the final picture (the scan), but the original, editable code is gone. Manually redrawing these complex diagrams is like trying to rebuild a cathedral by hand, brick by brick, just because you lost the architect's plans. It takes forever and requires a specialist.
The Solution: VFig
The authors of this paper built a new AI called VFig (Vector Figure). Think of VFig as a super-intelligent "reverse engineer" that looks at a flat, messy photo of a diagram and instantly writes the original, clean, editable blueprint code for it.
Here is how they taught this AI to do it, using some creative analogies:
1. The Training Data: The "Cookbook"
To teach a chef to cook, you need recipes. To teach an AI to draw diagrams, you need a massive library of "Image + Code" pairs.
- The Challenge: Existing libraries were like a cookbook full of simple recipes (like "how to draw a smiley face"). They didn't have complex recipes (like "how to draw a 10-step nuclear reactor").
- The Fix: The team created VFig-Data, a massive new library with 66,000 complex diagrams. They didn't just copy-paste; they built a pipeline to filter out "bad ingredients" (like photos of clouds or math equations) and kept only the structural diagrams (flowcharts, architecture, networks). They also generated millions of synthetic diagrams to ensure the AI saw every possible shape and arrow combination.
2. The Training Method: "Learn to Walk, Then Run"
You wouldn't ask a baby to run a marathon on day one. You'd teach them to sit, then stand, then walk.
- Step 1 (SFT - Supervised Fine-Tuning): The AI first practiced on simple diagrams (like basic shapes and arrows). This taught it the "alphabet" of SVG: how to draw a perfect circle, a straight line, or a text box.
- Step 2 (The "Coarse-to-Fine" Curriculum): Once it mastered the alphabet, they gave it the "novels" (complex scientific papers). This helped it learn how to arrange those shapes into a coherent story (a flowchart or a system diagram).
3. The "Art Critic" (Reinforcement Learning)
Even after practice, the AI might draw a diagram that looks right but is structurally wrong (e.g., an arrow pointing to the wrong box).
The Old Way: Just check if the pixels match the original image. This is like judging a painting only by how close the colors are, ignoring if the perspective is wrong.
The VFig Way: They introduced a Reinforcement Learning stage. Imagine the AI draws a diagram, and then a strict Art Critic (another AI) looks at it. The Critic doesn't just say "Good job." It gives a report card:
- Did you include all the parts? (Presence)
- Are the boxes in the right spots? (Layout)
- Do the arrows connect the right things? (Connectivity)
- Is the text readable and the style correct? (Details)
If the AI gets a bad score, it tries again, learning from the Critic's feedback until it gets an "A." This is like a student taking a test, getting graded, studying the mistakes, and taking the test again until they master it.
4. The Results: Beating the Giants
The team tested VFig against other AI models and even massive, expensive, closed-source giants (like GPT-5.2 and Gemini).
- The Outcome: VFig, which is open-source and free to use, performed on par with the most expensive, proprietary AI models. It could take a messy photo of a complex scientific diagram and turn it back into a clean, editable code file that looked almost identical to the original.
Why This Matters
Before VFig, if a scientist lost their diagram source file, that diagram was "dead"—it was just a picture. With VFig, that picture can be resurrected.
- For Students: You can take a diagram from a textbook, turn it into code, and modify it for your own presentation.
- For Engineers: You can update old technical manuals without needing the original CAD files.
- For Everyone: It bridges the gap between a static image and a living, editable document.
In a nutshell: VFig is a time machine for digital diagrams. It takes a frozen, unchangeable snapshot and turns it back into a flexible, editable blueprint, saving researchers and designers from the nightmare of redrawing everything from scratch.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.