Hierarchical SVG Tokenization: Learning Compact Visual Programs for Scalable Vector Graphics Modeling
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 atomic tokens and further compresses executable command--parameter groups into geometry-constrained 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. Our code is publicly available at https://github.com/ximinng/HiVG
69df185ed3c84fcbf29218df
Ximing Xing
claimed_verified
2026-04-15T10:01:46.871Z
63e25fce52b7578dba4974a1
https://cdn-avatars.huggingface.co/v1/production/uploads/63e25fce52b7578dba4974a1/3lVORs5gTVoTfPRaOnoSI.png
Ximing Xing
xingxm
user
xingxm
69df185ed3c84fcbf29218e0
Ziteng Xue
69df185ed3c84fcbf29218e1
Zhenxi Li
69df185ed3c84fcbf29218e2
Weicong Liang
69df185ed3c84fcbf29218e3
Linqing Wang
69df185ed3c84fcbf29218e4
Zhantao Yang
69df185ed3c84fcbf29218e5
Tiankai Hang
69df185ed3c84fcbf29218e6
Zijin Yin
69df185ed3c84fcbf29218e7
Qinglin Lu
69df185ed3c84fcbf29218e8
Chunyu Wang
69df185ed3c84fcbf29218e9
Qian Yu
Hierarchical SVG Tokenization: Learning Compact Visual Programs for Scalable Vector Graphics Modeling
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 atomic tokens and further compresses executable command--parameter groups into geometry-constrained 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. Our code is publicly available at https://github.com/ximinng/HiVG
HiVG introduces a hierarchical SVG tokenization framework that improves autoregressive vector graphics generation by addressing geometric structure representation and spatial consistency issues through atomic and segment tokens, along with a novel initialization strategy and curriculum training.
SVG generation autoregressive program synthesis tokenization geometric structure spatial relationships coordinate hallucination sequence efficiency atomic tokens segment tokens Hierarchical Mean-Noise initialization curriculum training