With the rapid advancement of vision-language models, an increasing number of studies have explored their potential for SVG generation tasks. Although existing approaches improve performance by constructing large-scale SVG datasets and introducing SVG-specific tokens, they still suffer from limited generalization, redundant paths in code outputs, and a lack of explicit reasoning. In this work, we present CTRL-S (Chain-of-Thought Reinforcement Learning for SVG), a unified framework that introduces a chain-of-thought mechanism to explicitly expose the model's reasoning process during SVG generation. To support this structured reasoning, we construct SVG-Sophia, a high-quality dataset containing 145K samples across SVG code refinement, Text-to-SVG, and Image-to-SVG tasks. By training the model to generate group-level structured SVG code, CTRL-S significantly improves structural coherence and visual fidelity. Furthermore, we adopt the GRPO algorithm and design a multi-reward optimization framework, incorporating DINO, image-text similarity, format, and code efficiency rewards. Through joint multi-reward optimization and multi-task training, our approach systematically enhances overall generation capabilities. Extensive experiments show that CTRL-S outperforms existing methods, achieving higher task success rates, superior SVG code quality, and exceptional visual fidelity.
Figures & tables
Figure 1: Overview of CTRL-S. (Top Left) The Multi-Task Multi-Reward GRPO training framework integrates diverse generation tasks (Text-to-SVG, Image-to-SVG, and Code Refinement) guided by multiple rewards. (Bottom Left) During inference, CTRL-S leverages chain-of-thought reasoning to plan step-by-step drawing operations before generating the final group-level structured SVG code, ensuring a clear one-to-one correspondence between the reasoning steps and the generated code groups. (Right) Examples of high-quality generated SVGs and successful code refinement processes.
Figure 2: The overall pipeline of CTRL-S. (1) Two-Stage SFT: The model is first trained on 1M SAgoge samples to align SVG-specific tokens, and then fine-tuned on SVG-Sophia to learn CoT-structured responses with explicit step-wise planning. (2) Multi-Task Multi-Reward RL: We jointly optimize Text-to-SVG, Image-to-SVG, and SVG refinement tasks via a multi-reward mechanism, including Format Reward, DINO Reward, Image-text Similarity Reward, and Code Efficiency Reward, to improve structural validity, visual fidelity, semantic alignment, and concise code generation.
Model
Data
Text-to-SVG
Image-to-SVG
FID ↓
CLIP-T2I ↑
CLIP-I2I ↑
SR
Tokens
DINO ↑
SSIM ↑
LPIPS ↓
SR
Tokens
Traditional SVG Methods
IconShop
–
32.288
20.894
70.922
86.51%
1.6k
–
–
–
–
–
VectorFusion
–
16.594
22.992
70.308
100.0%
33k
–
–
–
–
–
SVGDreamer
–
26.612
20.329
69.975
100.0%
132k
–
–
–
–
–
DiffVG
–
–
–
–
–
–
0.869
0.927
0.097
100.0%
17k
Table 1: SVG generation results on SArena-Icon. SR denotes Success Rate. CTRL-S (SFT) denotes the model after two-stage SFT, CTRL-S (SFT+RL) denotes the full model after RL post-training.
Model
DINO ↑
SSIM ↑
LPIPS ↓
SR
Tokens
Vision-Language Models
Llama 4 Scout
0.840
0.634
0.383
97.00%
788
Llama 4 Maverick
0.845
0.615
0.377
94.75%
616
Qwen3-VL-235B-A22B
0.809
0.515
0.403
77.84%
840
GPT-5.2
0.911
0.640
0.342
99.26%
975
Claude-Sonnet-4.5
0.796
0.579
0.401
84.58%
790
Table 2: SVG refinement results on SVG-Sophia Code Refinement Benchmark.
Figure 3: Qualitative comparisons of SVG generation and code refinement between baselines and CTRL-S.
Figure 4: Qualitative visualization of SVG generation quality across RL training steps.
Table 3: Ablation studies on CoT, reward signals, reward ratios, and multi-task training.
We propose RefineSVG, a single-step closed-loop visual feedback framework that enables multimodal large language models (MLLMs) to perform high-fidelity image-to-SVG generation through self-correction. Existing MLLM-based approaches rely on single-pass open-loop inference, where the model receives visual input only once and must generate thousands of SVG code tokens without intermediate verification. This paradigm inevitably leads to geometric drift, error accumulation, and visual hallucination on complex images. RefineSVG overcomes this limitation by invoking an external rendering engine after an initial SVG generation pass to compare the rendered output against the target image. The comparison yields a multi-dimensional visual residual map (Diff-Map) that is fed back to the model as a ReAct-style correction signal, driving a targeted correction step. To support this render-observe-correct interaction, we further introduce an SVG-oriented semantic vocabulary that compresses token sequences by over 52%. A progressive training pipeline spanning supervised fine-tuning, rejection-sampling cold-start data construction, and end-to-end agentic reinforcement learning aligns the model with closed-loop visual correction. Extensive experiments show that RefineSVG consistently outperforms existing baselines in reconstruction fidelity, structural accuracy, and code efficiency.Code is available at https://github.com/liuxiaobo66/RefineSVG.
Shaobo Liu, Feiqiao Mao, Shuaishuai Zhou +4
Shenzhen University · Shenzhen, China · Peking University +1
Scalable Vector Graphics (SVG) are central to digital design due to their inherent scalability and editability. Despite significant advancements in content generation enabled by Visual Language Models (VLMs), existing text-to-SVG generation methods are limited by a core challenge: the autoregressive training process does not incorporate visual perception of the final rendered image, which fundamentally constrains generation quality. To address this limitation, we propose an Introspective SVG Generation Framework (IntroSVG). At its core, the framework instantiates a unified VLM that operates in a closed loop, assuming dual roles of both generator and critic. Specifically, through Supervised Fine-Tuning (SFT), the model learns to draft SVGs and to provide feedback on their rendered outputs; moreover, we systematically convert early-stage failures into high-quality error-correction training data, thereby enhancing model robustness. Subsequently, we leverage a high-capacity teacher VLM to construct a preference dataset and further align the generator's policy through Direct Preference Optimization (DPO). During inference, the optimized generator and critic operate collaboratively in an iterative "generate-review-refine" cycle, starting from imperfect intermediate drafts to autonomously improve output quality. Experimental results demonstrate that our method achieves state-of-the-art performance across several key evaluation metrics, generating SVGs with more complex structures, stronger semantic alignment, and greater editability. These results corroborate the effectiveness of incorporating explicit visual feedback into the generation loop.
Feiyu Wang, Jiayuan Yang, Zhiyuan Zhao +4
Fudan University · TeleAI · Northwestern Polytechnical University +1
Scalable Vector Graphics (SVGs) power much of the modern visual ecosystem, yet state-of-the-art generative models focus almost entirely on rasterized images. We explore whether inference-time methods can unlock SVG generation capabilities in off-the-shelf vision-language models (VLMs). We systematically evaluate a constrained iterative refinement harness that combines visual feedback, structured editing, and constrained decoding to characterize the capabilities and limitations of current VLMs for SVG generation. Across multiple VLMs and generation settings, we find that constrained decoding improves compilation success rates, while iterative refinement reveals a deficit in visual reasoning and self-correction. Our results highlight both the promise and current limitations of using inference-time methods to adapt general-purpose VLMs for SVG generation.
Matthew Perlman, James Beetham, Niels Da Vitoria Lobo +2
University of Massachusetts Amherst · University of Central Florida