# 层次化SVG分词：面向可缩放矢量图形建模的紧凑视觉程序学习

- 来源：HuggingFace Daily Papers（社区热门论文）
- 发布时间：2026-04-10 08:00
- AIHOT 链接：https://aihot.virxact.com/items/cmnzl60r20038slwz3w9q71u0
- 原文链接：https://arxiv.org/abs/2604.05072

## AI 摘要

针对现有SVG生成方法采用字节级分词破坏几何结构、导致坐标幻觉和序列冗余的问题，本文提出HiVG层次化分词框架。该方法将SVG字符串分解为结构化原子token，并压缩命令-参数组为几何约束的段token，同时引入Hierarchical Mean-Noise初始化策略注入数值先验，结合课程训练逐步提升程序复杂度。实验表明，HiVG在文本到SVG和图像到SVG任务中显著提升了生成保真度、空间一致性和序列效率。

## 正文

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
