HiVG's pipeline begins with a Hierarchical SVG Tokenizer that decomposes raw SVG into atomic tokens, then learns Structure Segments to compress sequences. A 3B-parameter language model generates SVG token sequences, which are detokenized back into clean SVG output.
TOKENIZER
Hierarchical SVG Tokenizer
A two-level tokenization scheme that preserves the full geometric semantics of SVG commands.
Level 1 (Atomic) decomposes raw SVG into typed tokens — structure, commands, coordinates, and attributes.
Level 2 (Segment) merges each drawing command with its parameters into a single compact token.
2.76×
Sequence Compression
5×
Fewer than BPE
COMPRESSION
Structure Segment Learning
Learns segment tokens directly from the SVG corpus. Each segment merges a drawing command (e.g., Bézier curve, arc, line) with its coordinate parameters into one token, capturing renderable geometric primitives while discarding invalid combinations.
author={Xing, Ximing and Xue, Ziteng and Li, Zhenxi and Liang, Weicong and Wang, Linqing and Yang, Zhantao and Hang, Tiankai and Yin, Zijin and Lu, Qinglin and Wang, Chunyu and Yu, Qian},