Editor’s introduction
The study evaluates how large language models process SVG vector graphics, focusing on generation, editing, and understanding tasks. It compares reasoning-enhanced models to standard LLMs, finding that reasoning improves performance across all tasks, with models like DeepSeek-R1 showing strong results in generation and understanding. The findings suggest that while reasoning boosts performance, further progress depends on richer, more inclusive benchmark datasets to support model training and assessment.
Introduction
In recent years, there has been a significant breakthrough in the field of computer vision, particularly in image generation and processing. Modern machine learning models demonstrate impressive results when working with raster images, enabling advancements in graphic design, art, and data visualization. At the same time, vector graphics are also widely used in digital design. Vector graphics have a fundamentally different structure and offer several advantages, including scalability without quality loss, compact representation, and ease of editing.
Vector images are based on mathematical descriptions of shapes such as lines, curves, polygons, and text elements. Unlike raster images, which consist of pixels, vector images store shape information as a set of coordinates and instructions, making them ideal for use in design, web development, and printed media. The most popular vector graphics format is SVG (Scalable Vector Graphics), which is based on XML markup.
Despite the clear value of vector graphics, the development of methods for their automatic generation and processing is still in its early stages. The earliest pioneering models for vector graphics generation produced relatively simple images that were often noisy and distorted. However, their quality was insufficient for industrial use. A significant breakthrough in this area came with the introduction of DiffVG, which enabled iterative vectorization of raster images with subsequent optimization of coordinates and other shape parameters. This led to the development of multiple optimization-based methods for image vectorization and vector domain-specific style transfer methods.
Furthermore, the advent of diffusion models has significantly improved the quality of generated raster images, facilitating substantial improvements in vector image generation through vectorization techniques. The high fidelity of diffusion-generated images provides a robust foundation for vectorization processes, leading to more accurate and visually coherent vector outputs. Moreover, these advancements have enabled the optimization of vectorized representations through Score Distillation Sampling (SDS) loss, which refines the generated vector images by leveraging the gradients of diffusion models, thereby improving their structural consistency and overall quality.
The study presented in, which focuses on generating SVGs, deliberately avoids utilizing DiffVG due to its inefficiency and frequent failures. Instead, the authors propose a novel generating approach based on a diffusion process. However, this process operates unconditionally and requires further investigation and refinement to enhance its effectiveness.
The emergence of large language models (LLMs) has introduced new possibilities for vector graphics generation and processing, because vector files in SVG format are text-based. XML-based structure makes SVGs an ideal medium for interaction with language models, as LLMs can generate, analyze, and edit SVG code, enabling users to work with vector graphics using natural language commands. This approach simplifies the creation of complex graphic elements, reduces the effort of designers and developers, and fosters new techniques for automated image generation.
It is important to note that research on applying large language models to SVG has already started, with several studies demonstrating the potential of this approach. Specifically, some works showcase the feasibility of automatic SVG generation based on textual descriptions, as well as the application of LLMs for editing and optimizing existing vector images. These studies lay the groundwork for future technological advancements that combine the power of language models with the flexibility of vector formats.
We believe that, at present, language models are the only viable versatile approach for processing vector images. In this paper, we explore existing methods for generating and processing vector graphics using LLMs, analyze their advantages and limitations, and discuss the future prospects of this field.
In this paper, we explore the role of large language models (LLMs) in vector graphics processing, highlighting their potential and drawbacks in SVG generation, editing, and understanding tasks. Section 2 provides an overview of existing LLM-based models capable of SVG processing. Section 3 presents a detailed analysis of benchmark datasets and evaluation frameworks used to assess LLMs’ capabilities in vector-related tasks, covering Image-text bridging, SVGEditBench, SVG Taxonomy, VGBench, and SGP-Bench. Section 4 describes our experimental methodology, including evaluation metrics, implementation details, and the systematized results obtained in our study. Finally, Section 5 summarizes our findings, discusses limitations, and outlines future directions for research in this field.
LLM-Based models capable of SVG processing
In this section, we present a review of existing approaches for vector graphic processing that leverage the capabilities of LLMs. Our focus is on (1) specialized models explicitly designed for vector graphics, (2) general-purpose LLMs. We exclude methods that rely on vectorization techniques, because while being effective in certain contexts, they are often computationally intensive and impractical for real-world applications. Additionally, this review does not cover models for text-to-image generation that do not utilize LLMs, since in this research we explore the current capabilities and potential improvements of LLMs in the domains of vector graphic generation, editing, and analysis – areas where LLMs offer distinct advantages.
IconShop
The IconShop model was trained on the FIGR8 dataset, which consists of black-and-white images paired with simple, often monosyllabic text labels. Although this dataset provides a suitable foundation for the initial exploration of vector image generation using LLMs, its simplicity also imposes certain limitations. The restricted complexity and diversity of the FIGR8 dataset hinder the model’s ability to generate complex and varied images when faced with complex prompts. This highlights the need for more diverse and richly annotated datasets to fully utilize the potential of state-of-the-art models in the task of generating complex vector graphics.
StrokeNUWA
Another model connected to LLMs for vector image generation is the StrokeNUWA approach. The authors adapted the successful autoregressive image generation approach based on VQ-VAE to operating vector graphics. Similarly to raster images, StrokeNUWA utilizes VQ-VAE to convert vector images into a compressed representation as a sequence of tokens. Subsequently, an Encoder-Decoder Language Model generates vector images from textual descriptions. During training, the encoder remains frozen, meanwhile the decoder constructs its token vocabulary based on VQ-VAE and is responsible for the autoregressive generation of these tokens. The resulting token sequence is then decoded by the VQ-VAE decoder to reconstruct the final image.
Despite its novel approach, the results presented by the authors are limited to simple images composed of unfilled curved lines. This raises concerns about the model’s applicability in practical settings, as its current capabilities appear significantly constrained.
StarVector
A recently introduced model, StarVector, enables the generation of vector images conditioned on textual prompts or input raster images. In this work, the authors present a Multi-Modal Large Language Model (MLLM) trained to process conditioning tokens derived from either an image encoder or textual input. The model operates in an autoregressive manner, generating tokens that represent the output vector image based on the given conditioning input.
The study addresses three interrelated tasks: vector image generation from textual descriptions, raster-to-vector conversion, and diagram generation. To facilitate a comprehensive evaluation, the authors introduce multiple datasets of varying complexity. The assessment of model performance is conducted using their custom benchmarking framework, SVG-Bench. For image vectorization, in addition to standard metrics such as MSE, SSIM, and LPIPS, the authors employ DinoScore and further assess the number of generated tokens and conduct user studies. In the text-to-image generation task, the evaluation is based on FID, CLIP-FID, and CLIP Score metrics.
The reported results are promising, demonstrating the model’s capability to produce high-quality vector images. However, despite its effectiveness, the generated images still exhibit noticeable artifacts, particularly when processing complex prompts. Moreover, reproducibility remains an issue, as the authors have not yet released the code, pre-trained models, benchmarks, or datasets.
Empowering LLMs to Understand and Generate Complex Vector Graphics
One of the most recent models for vector image generation and analysis using LLMs is SVG4LLM, introduced in. In this work, the authors propose the new Vision-Language Large Model (VLLM) while introducing a key innovation: the integration of SVG-specific tokens into the shared token vocabulary. This enhancement enables the model to better capture the structural characteristics of the SVG code, leading to more accurate and coherent generation and analysis of vector graphics.
In addition, the study focuses on the challenge of annotating SVG images. To address this, the authors curated a specialized annotated dataset, which was utilized during training to improve the model’s understanding of vector graphics. The reported results demonstrate strong performance, showcasing the potential of the model in both generation and analysis tasks. However, it is important to note that the dataset, source code, and trained model weights have not yet been released publicly. As a result, independent verification of the reported findings is currently impossible.
General-Purpose LLMs
Models, such as GPT-4, LLaMA, and Qwen, have demonstrated impressive capabilities in a wide range of natural language processing (NLP) tasks, but their application to vector graphics remains underexplored. Unlike specialized models trained explicitly for SVG generation and manipulation, general-purpose LLMs possess broad adaptability and a vast pre-trained knowledge base, enabling them to reason about and process SVG code without domain-specific fine-tuning. Recent studies suggest that while these models can perform basic SVG-related tasks – such as code generation, semantic understanding, and structural editing – their effectiveness remains inconsistent, especially when dealing with intricate vector compositions. Moreover, the reliance on tokenization strategies optimized for textual data often leads to inefficiencies when encoding geometric primitives and SVG-specific commands. Despite these challenges, the flexibility of general-purpose LLMs could make them a valuable tool for exploratory research in SVG processing, particularly when combined with fine-tuning or retrieval-augmented generation techniques. As the capabilities of foundation models continue to expand, their role in vector graphics processing is likely to grow, driving the need for improved tokenization strategies and fine-grained task-specific adaptation.
Benchmarks
Scalable Vector Graphics (SVG), being a text-based format, aligns well with LLMs, allowing direct manipulation without rasterization. Although early studies have shown that models like GPT can interpret and edit SVG, they mainly emphasize qualitative examples rather than systematic evaluation. To truly assess LLMs’ capabilities in processing vector graphics, standardized benchmarks and metrics are essential. This section examines recent efforts to establish such benchmarks.
Image-text bridging
The results showed that GPT-4 performed moderate in understanding and working with SVG representations, especially in visual reasoning and answering questions. However, the models struggled with tasks requiring delicate visual details. While the study highlighted the potential of LLMs to handle a range of visual tasks without explicit visual encoders, it also exposed current limitations, suggesting that enhanced SVG representations may be needed for more complex visual reasoning.
SVGEditBench
The experimental results demonstrated that GPT-4 consistently outperformed GPT-3.5 across almost all tasks, showing superior accuracy in applying edits and understanding SVG structures. GPT-4 also displayed more sophisticated strategies, like optimizing code through intelligent smoothing in compression tasks. Despite these strengths, the study highlighted that even advanced models sometimes struggle with complex editing tasks, particularly when precision in SVG syntax is required.
SVG Taxonomy
Visual analytics is one of the SVG’s possible applications, enabling the automation of tasks such as statistical analysis, data filtering, and other data workflow processes. SVG’s code-based structure allows for complex visual manipulations, improving efficiency and accessibility in data exploration. The paper examines how well LLMs can handle such tasks on SVG-based charts.
The results showed that GPT-4-turbo excelled in pattern recognition tasks such as clustering and anomaly detection, but struggled with mathematical tasks, often generating inaccurate or hallucinated results, especially when the charts lacked value labels. Increasing data points amount did not always enhance performance, in certain cases improving numerical accuracy but also increasing the errors number. The study highlights LLMs’ potential and limits in visual analytics, suggesting hybrid methods could improve the results, while better prompts and fine-tuning might overcome current weaknesses.
VGBench
The authors of the work took a step further by not only evaluating LLMs’ ability to understand or edit vector graphics but generate. In the VGBench, they introduced two key components for comprehensive model assessment: Vector Graphics Question Answering (VGQA) for evaluating vector graphics understanding and Vector Generation (VGen) for assessing generation capabilities.
The VGen assessed the models’ ability to generate vector graphics from textual descriptions. GPT-4V first produced captions for existing images, and LLMs were then asked for generating corresponding vector graphics code based on these descriptions. The quality of the generated graphics was evaluated using CLIP Score and Fréchet Inception Distance (FID), measuring both semantic alignment with the text and visual similarity to the originals. Results showed that LLMs, particularly GPT-4, demonstrated capabilities in both understanding and generating vector graphics, especially for high-level semantic formats such as TikZ and Graphviz. In contrast, a low-level format like SVG, based on geometric primitives, is a greater challenge for the models.
SGP-Bench
The results showed that LLM demonstrates abilities to interpret symbolic graphics. However, significant limitations remain, particularly in tasks requiring complex spatial reasoning or understanding fine-grained details. Large proprietary models consistently outperform smaller open-source models, reflecting a clear scaling effect. SIT notably enhanced model performance, not only improving understanding of symbolic programs, but also boosting general reasoning abilities across other benchmarks.
Experiments
In this section, we apply the methods using the methods with code available on benchmarks, which include the original datasets and evaluation scripts. Additionally, we assess a diverse set of LLMs to evaluate their performance across these benchmarks.
Metrics
Each benchmark includes its own specific metrics. However, to ensure consistency and enable the aggregation of scores across different benchmarks, we normalize these metrics. Additionally, since we evaluate multiple LLMs on a large set of tasks, we subsample the original datasets to reduce their size and computational budget.
Conclusion
Our experimental results indicate that reasoning-enhanced LLMs significantly outperform their non-reasoning counterparts across multiple SVG-related tasks. Models such as DeepSeek-R1 demonstrate particularly strong capabilities in both generation and understanding tasks, while specialized models like IconShop remain limited by the simplicity of their training data. The analysis of benchmarks further highlights the lack of a comprehensive dataset covering all aspects of SVG processing, underscoring the need for future efforts in dataset creation and refinement.
We anticipate that future research will focus on improving model robustness, enhancing SVG-specific tokenization strategies, and leveraging multi-modal approaches to bridge the gap between text-based LLM capabilities and the intricate requirements of vector graphics. By refining these methodologies, LLMs have the potential to revolutionize SVG generation, making vector images more accessible, efficient, editable, and customizable for designers, developers, and others. We also plan to analyze correlation between model performance and specific SVG complexity metrics and to discover how the relatively simple nature of benchmark SVGs (with average of 5-6 paths) limits applicability to complex real-world graphics.


