Vector Graphics Representation Learning

SLS: A Scalable SVG Latent Space

Learning compact, invertible path embeddings for vector graphics.

Leonardo Zini, Elia Frigieri, Lorenzo Baraldi

University of Modena and Reggio Emilia

Paper Code Models BibTeX

SLS provides a compact SVG latent space that preserves editability, supports inversion back to vector paths, and enables downstream vector-native applications.

View source PDF

Motivation

SVGs still lack the latent spaces that made raster vision scale

Raster images benefit from continuous latent spaces such as VAEs and CLIP-style embeddings, but SVGs still do not have a compact, continuous, and invertible representation. That gap matters because SVGs are symbolic, editable, and resolution-independent, which makes them attractive for graphics, design, and multimodal modeling.

Existing SVG methods typically depend on long token sequences or rasterization-heavy pipelines. SLS instead maps each SVG path to a single dense vector, giving vector graphics a representation that is compact enough for foundation-model pipelines while remaining faithful to the underlying geometry and style.

Method

From symbolic paths to invertible latent tokens

SLS encodes each SVG path into one dense latent token through a unified tokenization scheme that captures both geometry and style. The resulting embedding lies on the unit hypersphere, giving a normalized latent space that works cleanly for similarity, interpolation, retrieval, and generation.

  • Path-level representation: one dense vector per SVG path instead of long XML sequences.
  • Unified tokenization of geometry and style via BPE over symbolic SVG commands.
  • Invertibility through a learned decoder that reconstructs the original path representation.
  • Unit hypersphere embeddings for stable latent-space operations and downstream learning.

SVG path → BPE tokenizer → Transformer encoder → dense latent vector → Transformer decoder → SVG path

Key Results

Compact enough for scale, structured enough for decoding

156×

shorter context

167×

fewer training TFLOPs

Invertible

path embeddings

SLS reduces SVG captioning context length from 2432 XML tokens to 15.56 latent tokens while improving downstream quality. The result is a representation that is dramatically cheaper to model without sacrificing vector fidelity.

Reconstruction

Geometry and style are both preserved

SLS reconstructs SVG geometry and stylistic attributes more faithfully than prior SVG encoders, retaining both shape structure and rendering cues.

View source PDF

Latent Space Robustness

Stable under meaningful perturbations

SLS remains robust under Gaussian noise and angular perturbations in latent space. This indicates that the learned representation is not only compact, but also locally well-behaved for manipulation, search, and generative modeling.

Generation

Vector-native synthesis from the learned latent space

The SLS latent space supports SVG generation directly in a compact vector-native representation.

View source PDF

Interpolation

A continuous manifold for SVGs

Smooth latent interpolation shows that SLS learns a structured continuous SVG manifold. Traversing between embeddings yields coherent transitions in vector geometry and style rather than brittle token-level jumps.

Applications

One latent space, multiple vector-native tasks

SVG retrieval

Compact path embeddings for similarity search across large vector collections.

SVG captioning

Short latent contexts that are much easier for language models to consume.

SVG interpolation

Continuous morphing across geometry and appearance in vector space.

Citation

BibTeX

Show citation
@inproceedings{yourpaper2026,
  title={Project Title},
  author={Author One and Author Two and Author Three},
  booktitle={ECCV},
  year={2026}
}