While artificial intelligence has made massive strides in raster image generation (pixels), the modeling of Scalable Vector Graphics (SVGs) remains a highly fragmented field. SVGs are XML-based code that describes geometry, making them resolution-independent, easily editable, and highly desirable for web design and engineering. However, current SVG AI faces three major hurdles: fragmented data focused on single tasks, structural complexity leading to broken code, and a lack of generalization across different domains.
To address these challenges, researchers have introduced the InternSVG family—an integrated data, benchmark, and model suite that leverages the strong transfer and generalization capabilities of Multimodal Large Language Models (MLLMs) to achieve unified modeling for SVG understanding, editing, and generation.
The InternSVG Framework
The authors propose a unified framework designed to move beyond models that only handle single tasks. This framework is built upon three core pillars: a massive new dataset, a standardized benchmark, and a specialized model architecture.
Datasets and Benchmarks
To overcome the data fragmentation problem, the paper introduces two major resources:
- SAgoge: The largest multimodal SVG dataset to date, containing 16 million training samples. It spans four diverse domains: simple icons, long-sequence illustrations, chemical structures, and dynamic animations (SANI).
- SArena: A comprehensive companion benchmark of 31,000 samples designed for standardized evaluation across understanding (multiple-choice QA), editing (low-level and semantic), and generation (text/image/video-to-SVG).
Model Architecture and Training
The InternSVG Model is built on an InternViT-300M vision encoder and a Qwen2.5-7B language backbone. To handle the structural complexity of long XML sequences, the researchers implemented several key innovations:
- SVG-Specific Tokenization: They designed 55 specialized "tag" tokens (e.g.,
<path>,<circle>) and 42 "attribute" tokens (e.g.,fill=,viewBox=). They also utilized discrete integer tokens (-128 to 128) and decimal tokens (.0 to .99) to represent coordinates and values compactly. - Subword-based Initialization: Instead of random initialization, new SVG tokens are initialized by averaging the embeddings of their constituent subwords from the original LLM vocabulary. This anchors the new tokens in a pre-trained semantic space, significantly speeding up convergence.
- Two-Stage Curriculum Training: The model is trained progressively. Stage 1 focuses on short, simple SVGs like icons and chemistry diagrams. Stage 2 expands the context window to handle long-sequence illustrations and complex animations.
Key Insights and Innovations
- Unified Modeling as a Catalyst: The most significant finding is that training on understanding, editing, and generation simultaneously induces "positive transfer." The model learns the underlying grammar and geometry of SVGs more deeply than if it were trained on a single, task-specific objective.
- The "Token Compression" Effect: By using specialized tokens for SVG tags and coordinates, the authors reduced sequence lengths significantly. This not only saves computational power but also makes it easier for the model to maintain structural integrity over long sequences, reducing hallucinations.
- Zero-Shot Cross-Domain Strength: A model trained exclusively on icons demonstrated remarkable "zero-shot" improvement when tested on chemistry diagrams, suggesting that the model successfully learns a generalized geometric reasoning capability.
Key Results
InternSVG achieves state-of-the-art (SOTA) results across the board, consistently outperforming leading open and proprietary counterparts:
- Versus Proprietary Models: On the SArena-Icon benchmark, InternSVG outperformed Claude-Sonnet-4 by 11% in understanding accuracy and showed a 56% lower FID (indicating better visual quality) in Text-to-SVG generation tasks.
- Editing Excellence: In SVG editing tasks, InternSVG achieved a PSNR of 77.33, significantly higher than the 57.59 achieved by the next best model (Claude-Sonnet-4).
- Code Quality: Qualitatively, InternSVG produces much cleaner code. While optimization-based methods often create thousands of tiny, uneditable paths to mimic an image, InternSVG uses an average of just 4.48 paths for icons, making the output highly practical for human designers.
Limitations and Future Work
While InternSVG dominates most tasks, it still has room for growth. It lags slightly behind Claude-Sonnet-4 in high-level "style transfer" (e.g., changing the entire artistic vibe of an illustration while keeping the layout intact). Additionally, while the model handles basic SVG animations well, extremely complex interactive SVGs involving heavy JavaScript or intricate logic remain a challenge.
Future directions include exploring even larger-scale pre-training and integrating more advanced reasoning capabilities to handle professional-grade CAD or architectural SVGs, pushing the boundaries of what AI can achieve in vector graphics.
Summary updated