🤖 AI Summary
Existing SVG generation methods rely on generic byte-level tokenization, which disrupts the geometric structure of vector graphics, leading to fragmented coordinates, loss of spatial relationships, and sequence redundancy. This work proposes HiVG—a hierarchical SVG tokenization framework tailored for vector graphics—that decomposes raw SVG paths into atomic tokens and further compresses them into geometry-constrained segment tokens. By integrating hierarchical mean-noise (HMN) embedding initialization with a curriculum learning strategy, HiVG significantly shortens sequence length while preserving spatial semantics. The approach achieves marked improvements in generation fidelity, spatial consistency, and program executability on both text-to-SVG and image-to-SVG tasks, outperforming current tokenization schemes.
📝 Abstract
Recent large language models have shifted SVG generation from differentiable rendering optimization to autoregressive program synthesis. However, existing approaches still rely on generic byte-level tokenization inherited from natural language processing, which poorly reflects the geometric structure of vector graphics. Numerical coordinates are fragmented into discrete symbols, destroying spatial relationships and introducing severe token redundancy, often leading to coordinate hallucination and inefficient long-sequence generation. To address these challenges, we propose HiVG, a hierarchical SVG tokenization framework tailored for autoregressive vector graphics generation. HiVG decomposes raw SVG strings into structured \textit{atomic tokens} and further compresses executable command--parameter groups into geometry-constrained \textit{segment tokens}, substantially improving sequence efficiency while preserving syntactic validity. To further mitigate spatial mismatch, we introduce a Hierarchical Mean--Noise (HMN) initialization strategy that injects numerical ordering signals and semantic priors into new token embeddings. Combined with a curriculum training paradigm that progressively increases program complexity, HiVG enables more stable learning of executable SVG programs. Extensive experiments on both text-to-SVG and image-to-SVG tasks demonstrate improved generation fidelity, spatial consistency, and sequence efficiency compared with conventional tokenization schemes.