Empowering LLMs to Understand and Generate Complex Vector Graphics

Ximing Xing, Juncheng Hu, Guotao Liang, Jing Zhang, Dong Xu +1 more
2/9/2026

No official code found. Best implementation: ximinng/LLM4SVG (664 stars, MIT, last commit 2025-05-22).

Abstract

The unprecedented advancements in Large Language Models (LLMs) have profoundly impacted natural language processing but have yet to fully embrace the realm of scalable vector graphics (SVG) generation. While LLMs encode partial knowledge of SVG data from web pages during training, recent findings suggest that semantically ambiguous and tokenized representations within LLMs may result in hallucinations in vector primitive predictions. Additionally, LLM training typically lacks modeling and understanding of the rendering sequence of vector paths, which can lead to occlusion between output vector primitives. In this paper, we present LLM4SVG, an initial yet substantial step toward bridging this gap by enabling LLMs to better understand and generate vector graphics. LLM4SVG facilitates a deeper understanding of SVG components through learnable semantic tokens, which precisely encode these tokens and their corresponding properties to generate semantically aligned SVG outputs. Using a series of learnable semantic tokens, a structured dataset for instruction following is developed to support comprehension and generation across two primary tasks. Our method introduces a modular architecture to existing large language models, integrating semantic tags, vector instruction encoders, fine-tuned commands, and powerful LLMs to tightly combine geometric, appearance, and language information. To overcome the scarcity of SVG-text instruction data, we developed an automated data generation pipeline that collected our SVGX-SFT Dataset, consisting of high-quality human-designed SVGs and 580k SVG instruction following data specifically crafted for LLM training, which facilitated the adoption of the supervised fine-tuning strategy popular in LLM development. By exploring various training strategies, we developed LLM4SVG, which significantly moves beyond optimized rendering-based approaches and language-model-based baselines to achieve remarkable results in human evaluation tasks. Code, model, and data will be released at: https://ximinng.github.io/LLM4SVGProject/

View on arXivView PDF

Code Implementations(1)

ximinng/LLM4SVGCommunity71%
MIT

[CVPR 2025] Official implementation for "Empowering LLMs to Understand and Generate Complex Vector Graphics" https://arxiv.org/abs/2412.11102

66411Shell, PythonDec 15, 20241 years agoMIT
llmllm-sftllm-svgllm4svgsvg-generation+3 more

Similar Papers

Cite this paper

@article{xing2026empowering,
  title  = {Empowering LLMs to Understand and Generate Complex Vector Graphics},
  author = {Ximing Xing and Juncheng Hu and Guotao Liang and Jing Zhang and Dong Xu and Qian Yu},
  year   = {2026},
  eprint = {2412.11102},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2412.11102},
  journal = {CVPR 2024 2024}
}

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/2412.11102.svg)](https://codeofpaper.com/paper/2412.11102)

Discussion