From Tokens to Numbers: Continuous Number Modeling for SVG Generation

Michael Ogezi, Martin Bell, Freda Shi, Ethan Smith
2/2/2026
cs.LGcs.AIcs.CV

Official code: mikeogezi/CNM (1 star, last commit 2026-01-29).

Abstract

For certain image generation tasks, vector graphics such as Scalable Vector Graphics (SVGs) offer clear benefits such as increased flexibility, size efficiency, and editing ease, but remain less explored than raster-based approaches. A core challenge is that the numerical, geometric parameters, which make up a large proportion of SVGs, are inefficiently encoded as long sequences of tokens. This slows training, reduces accuracy, and hurts generalization. To address these problems, we propose Continuous Number Modeling (CNM), an approach that directly models numbers as first-class, continuous values rather than discrete tokens. This formulation restores the mathematical elegance of the representation by aligning the model's inputs with the data's continuous nature, removing discretization artifacts introduced by token-based encoding. We then train a multimodal transformer on 2 million raster-to-SVG samples, followed by fine-tuning via reinforcement learning using perceptual feedback to further improve visual quality. Our approach improves training speed by over 30% while maintaining higher perceptual fidelity compared to alternative approaches. This work establishes CNM as a practical and efficient approach for high-quality vector generation, with potential for broader applications. We make our code available http://github.com/mikeogezi/CNM.

View on arXivView PDF

Code Implementations(1)

mikeogezi/CNMOfficial61%

Code repository for Continuous Number Modeling (CNM)

10Jan 29, 20268 months ago

Similar Papers

Cite this paper

@article{ogezi2026from,
  title  = {From Tokens to Numbers: Continuous Number Modeling for SVG Generation},
  author = {Michael Ogezi and Martin Bell and Freda Shi and Ethan Smith},
  year   = {2026},
  eprint = {2602.02820},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2602.02820v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2602.02820.svg)](https://codeofpaper.com/paper/2602.02820)

Discussion