Hiërarchische SVG-tokenisatie: Het aanleren van compacte visuele programma's voor schaalbare vectorafbeeldingenmodellering
Hierarchical SVG Tokenization: Learning Compact Visual Programs for Scalable Vector Graphics Modeling
April 10, 2026
Auteurs: Ximing Xing, Ziteng Xue, Zhenxi Li, Weicong Liang, Linqing Wang, Zhantao Yang, Tiankai Hang, Zijin Yin, Qinglin Lu, Chunyu Wang, Qian Yu
cs.AI
Samenvatting
Recente grote taalmodellen hebben de SVG-generatie verschoven van differentieerbare rendering-optimalisatie naar autoregressieve programma-synthese. Bestaande benaderingen vertrouwen echter nog steeds op generieke tokenisatie op byteniveau die is overgenomen uit natuurlijke taalverwerking, wat slecht aansluit bij de geometrische structuur van vectorafbeeldingen. Numerieke coördinaten worden gefragmenteerd in discrete symbolen, waardoor ruimtelijke relaties verloren gaan en ernstige tokenredundantie ontstaat, wat vaak leidt tot coördinaathallucinaties en inefficiënte generatie van lange sequenties. Om deze uitdagingen aan te pakken, stellen we HiVG voor, een hiërarchisch SVG-tokeniseringsraamwerk toegesneden op autoregressieve vectorafbeeldingengeneratie. HiVG ontleedt ruwe SVG-strings in gestructureerde atomaire tokens en comprimeert verder uitvoerbare commando-parametergroepen tot geometrisch-gebonden segmenttokens, wat de sequentie-efficiëntie aanzienlijk verbetert terwijl de syntactische geldigheid behouden blijft. Om ruimtelijke mismatches verder te verminderen, introduceren we een Hiërarchische Mean-Noise (HMN)-initialisatiestrategie die numerieke ordeningssignalen en semantische priors injecteert in nieuwe token-embeddingen. In combinatie met een curriculumtrainingsparadigma dat de programmacomplexiteit geleidelijk verhoogt, stelt HiVG een stabielere learning van uitvoerbare SVG-programma's in staat. Uitgebreide experimenten met zowel tekst-naar-SVG als afbeelding-naar-SVG taken tonen verbeterde generatiefideliteit, ruimtelijke consistentie en sequentie-efficiëntie aan in vergelijking met conventionele tokeniseringsschema's. Onze code is openbaar beschikbaar op https://github.com/ximinng/HiVG.
English
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