Paper #43: SVG-BERT: Code-Native Representations for Structure-Aware Vector Graphics Workflows
Abstract
Human-AI creative systems increasingly assist with visual design, but editable vector graphics remain poorly served by representations that treat artifacts only as pixels or generic text. Raster encoders capture appearance but discard program structure, while generic text encoders are not optimized for analyzing geometric and rendering semantics in SVG code. We introduce SVG-BERT, a code-native encoder pretrained directly on SVG source code as representation infrastructure for structure-aware vector design workflows. We train SVG-BERT with an SVG-specific tokenizer on raw and canonicalized SVGs, and evaluate it using diagnostic tasks that probe geometry, typographic style consistency, graph-structured reasoning, semantic icon classification, and render equivalence. SVG-BERT consistently outperforms generic text encoders and provides information complementary to raster encoders, which remain stronger on strongly visual semantic tasks. These results suggest that code-native SVG analysis is a promising building block for future creative systems requiring editable asset retrieval, variation management, deduplication, and structure-preserving vector editing.