Abstract
InternSVG introduces the first truly unified framework for Scalable Vector Graphics (SVG) tasks, combining a massive 16-million-sample dataset (SAgoge), a rigorous benchmark (SArena), and a specialized Multimodal Large Language Model (InternSVG). By treating SVG code as a first-class language and using a curriculum-based training strategy, the model outperforms top-tier proprietary systems like GPT-4o and Claude-3.5 in understanding, editing, and generating vector art.
Introduction
Scalable Vector Graphics (SVGs) are the backbone of modern web design and digital illustration because they are resolution-independent and infinitely editable. However, teaching AI to handle SVGs is notoriously difficult. Unlike raster images (pixels), SVGs are structured XML code. Existing research has been highly fragmented, with models typically specialized for either generation or understanding. InternSVG aims to bridge this gap with a unified model that can "speak" SVG across all these tasks.
Methodology
The InternSVG model is built upon a vision-language backbone (InternVL3-8B with a Qwen2.5-7B LLM). Its architecture incorporates several key innovations:
- SVG-Specific Tokenization: To handle the structured nature of SVG code, the authors introduced 55 specialized tag tokens (e.g.,
<path>,<circle>) and 42 attribute tokens (e.g.,fill=,viewBox=). Specialized numerical tokens for integers and decimals ensure precise and compact representation of coordinates. - Subword-Based Embedding Initialization: New tokens were initialized by averaging the embeddings of their constituent subwords (e.g., anchoring the
<path>token to the semantic meaning of "path"). This "semantic anchoring" stabilizes early training and leverages pre-existing knowledge in the language model. - Curriculum Training: The model follows a two-stage training process. It first learns on simpler data (icons, chemical formulas) to master basic geometry before progressing to complex, long-sequence illustrations and dynamic animations.
Data and Benchmarking
The project introduces two major resources:
- SAgoge: The largest multimodal SVG dataset to date, containing 16 million training samples across icons, illustrations, chemical formulas, and animations.
- SArena: A companion benchmark with 31,000 samples designed for standardized evaluation of multiple-choice QA, instruction-based editing, and generation.
Key Results and Insights
InternSVG achieves state-of-the-art results across the board. A key finding is that training on understanding, editing, and generation simultaneously induces "positive transfer," where learning how to edit a graphic actually improves the model's ability to generate one from scratch.
- Understanding: On the SArena-Icon benchmark, InternSVG achieved 85.1% accuracy, surpassing Claude-Sonnet-4 (77.1%) and GPT-4o (71.0%).
- Editing: It achieved significantly higher visual fidelity in instruction-based editing tasks compared to general-purpose MLLMs.
- Generation: In Text-to-SVG tasks, it produced much more compact and semantically accurate code than optimization-based methods. For example, InternSVG generates icons using ~1.3k tokens, whereas previous methods like LIVE require ~18k tokens.
- Domain Expertise: It showed a remarkable ability to generate accurate chemical structural formulas, a task where most general MLLMs fail.
Conclusion and Future Work
InternSVG represents a massive step forward in unified vector graphics modeling. While the model excels at low-level editing and generation, future work will focus on improving high-level artistic style transfer and scaling the pipeline to handle professional-grade, high-resolution architectural or engineering SVGs.
Summary updated