Paper deep dive
RefineSVG: Visual Feedback-Driven Reinforcement Learning for Image-to-SVG Generation
Shaobo Liu, Feiqiao Mao, Shuaishuai Zhou, Yan Zhan, Weiqi Tan, Zhiqiong Lu, Zhengping Liang
Intelligence
Status: succeeded | Model: Gemma-4-26B-A4B | Prompt: intel-v1 | Confidence: 88%
Last extracted: 8/1/2026, 2:02:52 AM
Summary
The paper introduces RefineSVG, a closed-loop visual feedback framework for high-fidelity image-to-SVG generation using Multimodal Large Language Models (MLLMs). It addresses limitations of open-loop methods like geometric drift and error accumulation by employing a Diff-Map (visual residual map) to guide self-correction. Key contributions include an SVG-oriented semantic vocabulary for token compression, a ReAct-style correction mechanism, and a progressive training pipeline involving supervised fine-tuning, rejection-sampling cold-start, and agentic reinforcement learning.
Entities (9)
Relation Signals (7)
RefineSVG โ uses โ Diff-Map
confidence 95% ยท The comparison yields a multi-dimensional visual residual map (Diff-Map) that is fed back to the model as a ReAct-style correction signal
RefineSVG โ employs โ SVG-oriented semantic vocabulary
confidence 92% ยท To support this render-observe-correct interaction, we further introduce an SVG-oriented semantic vocabulary that compresses token sequences by over 52%
RefineSVG โ utilizes โ ReAct
confidence 90% ยท fed back to the model as a ReAct-style correction signal, driving a targeted correction step
RefineSVG โ trainswith โ GRPO
confidence 88% ยท apply end-to-end optimization using Group Relative Policy Optimization (GRPO)
RefineSVG โ uses โ CairoSVG
confidence 85% ยท We use CairoSVG (https://cairosvg.org/) for SVG-to-raster conversion throughout this work.
Reward Design โ uses โ DinoV2
confidence 85% ยท measure cosine similarity in the feature space of a pretrained DINOv2 [17] encoder
Cold-Start Data Construction โ uses โ CLIP
confidence 85% ยท each rendered prediction is scored against the target image via CLIP [20] similarity
Cypher Suggestions (0)
No Cypher suggestions yet.
Abstract
Abstract: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 this http URL is available at this https URL.
Tags
Links
- Source: https://arxiv.org/abs/2607.27699v1
- Canonical: https://arxiv.org/abs/2607.27699v1
Trouble viewing inline? Open PDF directly โ
Full Text
77,508 characters extracted from source content.
Expand or collapse full text
RefineSVG: Visual Feedback-Driven Reinforcement Learning for Image-to-SVG Generation Shaobo Liu โ Shenzhen University Shenzhen, China 2410105049@mails.szu.edu.cn Feiqiao Mao โ Shenzhen University Shenzhen, China feiqiao@szu.edu.cn Shuaishuai Zhou Shenzhen University Shenzhen, China 2400101044@mails.szu.edu.cn Yan Zhan Peking University Beijing, China 2401210760@stu.pku.edu.cn Weiqi Tan Shenzhen University Shenzhen, China 2400101088@mails.szu.edu.cn Zhiqiong Lu Shenzhen University Shenzhen, China 2410105037@mails.szu.edu.cn Zhengping Liang โ Shenzhen University Shenzhen, China liangzp@szu.edu.cn Figure 1: Left: RefineSVG corrects three failure modes of open-loop SVG generation (geometric drift, error accumulation, visual hallucination) via Diff-Map-guided ReAct correction. Right: additional SVG samples generated by RefineSVG-7B. Abstract 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 geo- metric drift, error accumulation, and visual hallucination on com- plex images. RefineSVG overcomes this limitation by invoking an โ These authors contributed equally to this work. Preprint notice. This is the author-prepared arXiv version of a paper accepted at the 34th ACM International Conference on Multimedia (M โ26), November 10โ14, 2026, Rio de Janeiro, Brazil. The technical content is preserved, while conference- specific rights metadata and publisher placeholders are intentionally omitted. This version includes the complete supplementary material as an appendix and may differ in presentation from the final publisher-formatted Version of Record. The source archive is provided to support accessibility and reproducibility. Please cite the final conference version once its DOI and bibliographic record become available. Its pagination therefore differs from the conference submission. 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 fi- delity, structural accuracy, and code efficiency. Code is available at https://github.com/liuxiaobo66/RefineSVG. CCS Concepts โข Computing methodologiesโComputer vision; Neural net- works. arXiv:2607.27699v1 [cs.CV] 30 Jul 2026 M โ26, November 10โ14, 2026, Rio de Janeiro, BrazilLiu et al. Keywords SVG Generation, Image-to-SVG, Agentic Reinforcement Learning, Multimodal Model ACM Reference Format: Shaobo Liu, Feiqiao Mao, Shuaishuai Zhou, Yan Zhan, Weiqi Tan, Zhiqiong Lu, and Zhengping Liang. 2026. RefineSVG: Visual Feedback-Driven Rein- forcement Learning for Image-to-SVG Generation. In Proceedings of the 34th ACM International Conference on Multimedia (M โ26), November 10โ14, 2026, Rio de Janeiro, Brazil. ACM, New York, NY, USA, 17 pages. 1 Introduction Scalable Vector Graphics (SVG) serves as an essential format in modern digital design, web development, and industrial produc- tion owing to its resolution independence, compact representa- tion, and inherent editability. Converting raster images into SVG, commonly referred to as Image-to-SVG generation, has tradition- ally been approached through optimization-based pipelines. Meth- ods such as Diff VG [13], LIVE [15], and VectorFusion [12] itera- tively refine vector primitives via differentiable rendering or CLIP- guided [20] loss functions, producing visually plausible results at the cost of hundreds to thousands of gradient update steps per image. With the rapid advancement of multimodal large language models (MLLMs) [2,14], a distinct paradigm has emerged that re- frames Image-to-SVG as an inverse rendering and code generation task [22,39]: MLLMs directly read input images and output com- plete SVG code in a single forward pass, bypassing the iterative optimization loop entirely. This direct generation approach has shown strong performance on simple icons and low-complexity graphics. However, when confronted with illustrations and complex icons that exhibit intricate geometric structures and rich spatial hier- archies, existing MLLM-based direct generation methods expose severe limitations. The root cause is their single-pass open-loop in- ference mechanism: the model receives visual input only once and must then produce thousands of code tokens without ever observing the rendered result of its own output. Without mid-stream verifi- cation, geometric drift causes coordinates to deviate progressively from intended positions, accumulated errors in color or placement propagate through subsequent elements, and visual hallucination leads the model to produce redundant or contradictory primitives when handling occluded and nested structures (Figure 1). The model progressively loses visual grounding as the sequence grows, a fail- ure mode that stands in stark contrast to the closed-loop workflow of human designers, who naturally iterate between drawing, ob- serving, and revising. Motivated by this observation, we propose RefineSVG, a frame- work for image-to-SVG generation that elevates the MLLM from a passive code generator to a self-correcting visual agent. After the model produces an initial SVG output, the system invokes an external rendering engine to convert the code into a pixel-level preview and compares it with the target image to extract a multi- dimensional visual residual map (Diff-Map) that spatially highlights regions of deficiency and deformation. The target image, the current rendering, and the Diff-Map together form a triplet visual prompt that is fed back to the model, triggering a ReAct correction step in which the model locates and revises the code responsible for the observed discrepancies. This generate-then-correct paradigm en- ables the model to ground its revisions in concrete visual evidence rather than relying solely on open-loop token prediction. Realizing this paradigm within MLLM-based code generation poses two technical challenges. First, native SVG code is extremely verbose, and the additional context from visual feedback further inflates the input, rapidly exhausting the context window. Second, existing open-source MLLMs lack the native ability to interpret a visual residual and revise code accordingly, as no such alignment data exists in their pretraining corpora. To address these challenges, we make the following contributions: (1)We propose RefineSVG, a closed-loop visual feedback frame- work for Image-to-SVG generation that introduces an exter- nal rendering engine 1 and a triplet-based Diff-Map as the correction signal, overcoming the geometric drift and error accumulation inherent in open-loop methods. (2)We construct an SVG-oriented semantic vocabulary with quantized coordinate encoding and prior initialization that substantially compresses SVG token sequences, removing the context bottleneck for closed-loop interaction. (3) We design a progressive agentic training pipeline span- ning rejection-sampling-based cold-start data construction and end-to-end reinforcement learning with composite vi- sual rewards, equipping the model with visual correction capability for complex scenes. 2 Related Work 2.1 Optimization-based SVG Generation Optimization-based vectorization iteratively refines SVG primitives through differentiable rendering or semantic guidance. Diff VG [13] enables gradient-based parameter optimization, and LIVE [15] ex- tends it through layer-wise vectorization. CLIPDraw [8] applies CLIP guidance to stroke optimization. CLIPasso [32] uses related se- mantic losses for object sketching, while Im2Vec [21] learns vector synthesis without explicit vector supervision. VectorFusion [12] and SVGDreamer [38] further use pretrained diffusion models [24] with score distillation [19]. Although visually effective, these methods require hundreds to thousands of optimization steps and often pro- duce dense, non-semantic path collections with limited topological control. 2.2 LLM-based Direct SVG Generation Early neural approaches represent SVG as structured command se- quences. DeepSVG [5] introduces a hierarchical VAE that encodes path- and command-level structure for generation and interpola- tion, SVGFormer [4] learns continuous vector graphics representa- tions via transformers, and IconShop [37] employs autoregressive transformers [31] conditioned on text prompts. Recent text-to-SVG systems treat SVG synthesis as code generation: SVGen [33] con- structs a million-scale text-SVG dataset and fine-tunes text-only LLMs with curriculum learning, while SVGThinker [6] integrates 1 We use CairoSVG (https://cairosvg.org/) for SVG-to-raster conversion throughout this work. RefineSVG: Visual Feedback-Driven Reinforcement Learning for Image-to-SVG GenerationMM โ26, November 10โ14, 2026, Rio de Janeiro, Brazil chain-of-thought reasoning into instruction-aligned generation and editing. These models acquire SVG syntax through task-specific fine-tuning but cannot directly consume raster images. For image- to-SVG generation, StarVector [22] couples a visual encoder with a code-oriented LLM and contributes the large-scale SVG-Stack dataset and SVG-Bench suite. OmniSVG [39] parameterizes SVG commands as discrete tokens within a vision-language architec- ture to mitigate coordinate hallucination, while Chat2SVG [36] combines LLM-based layout planning with diffusion-based detail synthesis. RLRF [23] incorporates rendering feedback as a rein- forcement learning reward beyond supervised fine-tuning, and VGBench [45] supports standardized evaluation. Despite these ad- vances, existing methods remain open-loop at inference time and do not verify their rendered output during generation. RefineSVG instead closes the loop by returning visual residuals to the model as explicit correction signals. 2.3 Self-Refinement and Agentic Reasoning Feedback-driven agents improve LLM outputs beyond single-pass generation. ReAct [40] interleaves reasoning with environment actions, Reflexion [29] converts feedback into persistent reflections, and Self-Refine [16] performs iterative critique and revision. Tool- former [25] learns autonomous tool use, while Self-Debug [7] and Detikzify [3] correct programs from execution or compilation feed- back. Unlike these text- or code-oriented traces, RefineSVG requires the model to interpret rendered visual discrepancies and revise syn- tactically constrained SVG markup; we therefore treat the renderer as the external ReAct environment. 3 Method We propose RefineSVG, a closed-loop framework that introduces ex- ternal visual feedback into MLLM-based Image-to-SVG generation. As shown in Figure 2, at inference time the model first generates an initial SVG with an extended SVG-oriented vocabulary (Sec- tion 3.1), then an external renderer compares the output against the target image to produce a multi-dimensional Diff-Map, which drives a ReAct-style correction step (Section 3.2). The model is trained through a three-stage progressive pipeline: open-loop SFT, rejection-sampling-based cold-start, and end-to-end agentic RL with multi-dimensional rewards (Sections 3.3โ3.4). 3.1 SVG-Oriented Semantic Tokenization The BPE tokenizer [27] in the backbone MLLM is optimized for natural language and fragments SVG code into sub-word pieces that lack geometric meaning: a tag such as<pathmay be split across multiple tokens, and floating-point coordinates are arbitrarily trun- cated, disrupting both structural continuity and spatial accuracy while inflating the sequence length. To bridge this gap, we extend the vocabulary with 725 SVG-specific tokens organized into three categories. Structural primitives encode element tags (<svg,<path, <rect), attribute keywords (d=",fill="), path commands (M,L,C, Z), and delimiters (/>,</svg>) as atomic tokens, preserving syntac- tic integrity at the element level. Quantized coordinates represent spatial positions within a 256ร256 canvas: each coordinate value is decomposed into an integer token (0โ256) and a decimal token (.00โ.99), so that a coordinate such as128.75maps to exactly two semantically complete tokens. A compact color palette comprises 128 base colors systematically sampled from the grayscale and HSL color spaces, complemented by 128 additional colors obtained by clustering all hex values across the training corpus. To accelerate convergence, we apply semantic prior initialization: each new token embedding is set to the mean of the sub-word embeddings that the base tokenizer produces for a short natural-language description of that token, providing a meaningful starting point instead of random initialization. The complete vocabulary listing and initialization prompts are provided in the supplementary material. As shown in Figure 3, the extended vocabulary reduces the aver- age token count across over 1.55 million SVG samples from 1977 to 933, achieving a compression rate of 52.8%. The median (P50) drops from 1248 to 594, and the 90th percentile (P90) for complex long-tail samples decreases from 4426 to 2129. This compression frees over half of the context budget, alleviating the hallucination tendency in long-sequence generation and enabling closed-loop visual feedback within a bounded context window. 3.2 Visual Feedback-Driven ReAct Mechanism After the model produces an initial SVG, the system invokes an external rendering engine to obtain a pixel-level previewํผ ํํํํ . To construct a spatially informative correction signal, we compute a multi-dimensional residual between the rendered output and the target imageํผ ํกํํก . Both images are converted to the YCbCr color space, and differences are extracted along three perceptually moti- vated dimensions: a luminance differenceฮํฟmeasuring brightness discrepancy, a chrominance distanceฮํถcomputed from the Cb and Cr channels, and a structural gradient differenceฮํบ that cap- tures edge discrepancies via luminance gradient magnitudes. Each component is independently scaled by a robust percentile-based normalizerN(ยท), and the final Diff-Map score is obtained through weighted nonlinear fusion: ํ ํํํ ํ = ( ํผ ยทN(ฮํฟ)+ ํฝยทN(ฮํถ)+ํพ ยทN(ฮํบ) ) ํ (1) where the weights satisfyํผ< ํฝ< ํพto emphasize chrominance and structural discrepancies over raw brightness following visual perception priors, and the exponentํ<1 applies a compressive nonlinearity that smooths transitions while preserving salient error peaks. The continuous score map is converted into a pseudo-color heat map ํท for visual clarity. The system concatenates the target image, the current rendering, and the heat map to form a visual tripletํผ ํกํํํํํํก =[ํผ ํกํํก โํผ ํํํํ โํท] that is fed to the model alongside a dedicated ReAct prompt. The prompt explains the triplet layout and the color encoding of the heat map, then instructs the model to preserve correct regions of the initial draft while correcting incorrect geometry, colors, structure, and missing elements indicated by the residual. If no meaningful discrepancy is detected, the model returns the draft unchanged, providing a graceful exit condition. The corrected output is wrapped in structured delimiter tags to enable reliable parsing. Detailed parameter values, operator definitions, and the complete ReAct prompt template are provided in the supplementary material. M โ26, November 10โ14, 2026, Rio de Janeiro, BrazilLiu et al. Figure 2: Overview of the RefineSVG framework. Top: At inference time, the model first generates an initial SVG from the target image (Step 1: Open-loop Generation). An external renderer produces a pixel-level preview, which is compared with the target via YCbCr decomposition to yield a multi-dimensional Diff-Map. The triplet visual prompt then drives a ReAct-style correction step (Step 2: ReAct Correction). Bottom: The three-stage progressive training pipeline: Stage 1 performs open-loop SFT on 1.55M image-SVG pairs; Stage 2 bootstraps closed-loop behavior via rejection-sampling-based ReAct SFT; Stage 3 applies agentic RL (GRPO) with multi-dimensional rewards for structure, visual fidelity, and code efficiency. MeanP50P75P90P95P99 0 2000 4000 6000 8000 10000 12000 Sequence Length (tokens) 1977 1248 2445 4426 6211 10540 933 594 1150 2129 2893 4874 52.8% 52.4% 53.0% 51.9% 53.4% 53.8% Base Tokenizer SVG Tokenizer (Ours) Figure 3: Sequence length statistics before and after applying the SVG-oriented semantic vocabulary. The extended vocab- ulary achieves consistent compression of over 50% across all percentiles, from short samples (P50) to complex long-tail cases (P99). 3.3 Progressive Agentic Training Pipeline The model progresses through three stages: open-loop supervised fine-tuning establishes basic generation capability, rejection sam- pling constructs cold-start data for interpreting visual feedback, and end-to-end reinforcement learning aligns the full closed-loop behavior. Stage 1: Open-loop Generation. We perform full-parameter supervised fine-tuning on a large-scale image-SVG dataset to equip the model with cross-modal alignment and SVG code generation capability. Given a target imageํผ ํกํํก and its corresponding ground- truth SVG sequenceํ โ =ํ โ 1 ,ํ โ 2 , . . .,ํ โ ํ encoded with the extended vocabulary, the model is trained to autoregressively predict each token by minimizing the negative log-likelihood: L ํํนํ (ํ)=โ ํ โ๏ธ ํก=1 log ํ ํ (ํ โ ํก | ํ โ <ํก , ํผ ํกํํก )(2) After this stage, the model can generate complete SVG code from an input image but remains unaware of the visual quality of its output, as no rendering feedback is provided during training. Stage 2: ReAct Cold-Start. The Stage 1 model generates SVG from images but cannot interpret visual feedback or revise its own output. Because naturally occurring correction pairs are unavail- able, we construct cold-start data through a rejection-sampling pipeline [42]. The Stage 1 model is applied to the training images to produce draft SVGs, and each rendered prediction is scored against the target image via CLIP [20] similarity. A band-pass filter re- tains only drafts whose similarity falls within a moderate range, excluding near-perfect outputs that provide no learning signal and severely broken outputs whose correction would degenerate into full re-generation. An additional structural matching filter ensures that retained drafts share a compatible element topology with the ground-truth SVG, so that the supervision signal corresponds to local revision rather than wholesale rewriting. The ground-truth SVG of each selected sample then serves as the correction target. Fil- tering thresholds, selection statistics, and dataset size are reported in the supplementary material. Each training instance is organized as a complete single-round ReAct episode: ํ=[ํผ ํกํํก , ํ ํํํํก , ํ ํํํํก , ํ ํํํ , ํผ ํกํํํํํํก , ํ ํํํํํก , ํ โ ํํํํํํก ](3) RefineSVG: Visual Feedback-Driven Reinforcement Learning for Image-to-SVG GenerationMM โ26, November 10โ14, 2026, Rio de Janeiro, Brazil whereํ ํํํํก andํ ํํํํํก denote the generation and correction prompts, ํ ํํํ is the tool-calling return from the rendering engine,ํผ ํกํํํํํํก is the visual feedback triplet defined in Section 3.2, andํ โ ํํํํํํก is the ground-truth correction target. During training, the cross- entropy loss is computed on all model-generated segments, namely the initial draftํ ํํํํก and the corrected outputํ โ ํํํํํํก , while all non-generated tokens including input images, text prompts, and tool-calling returns are masked. This joint supervision teaches the model to perform both open-loop generation and closed-loop cor- rection within a unified training episode. Stage 3: Agentic Reinforcement Learning. Supervised fine- tuning exposes the model only to curated correction examples, achieving surface-level behavioral alignment [44] without endow- ing the model with genuine correction capability that generalizes beyond the imitation distribution [10]. The model remains unable to explore diverse correction strategies or recover from novel gen- eration errors. To close this gap, we turn to reinforcement learning from environmental feedback [18] and apply end-to-end optimiza- tion using Group Relative Policy Optimization (GRPO) [28], a value- network-free alternative to PPO [26] that estimates advantages from group-level reward statistics and has proven effective for scaling reasoning capabilities [11]. Given a target image and generation prompt as the initial con- textํ, the policyํ ํ autoregressively produces a group ofํบcom- plete agentic trajectoriesํ ํ ํบ ํ=1 . Each trajectory follows the Re- Act episode structure defined in Eq. 3 and contains two model- generated segmentsโthe initial SVG draftํ (ํ) ํํํํก and the corrected outputํ (ํ) ํํํํํํก โinterleaved with environment-provided content (text prompts, tool-calling returns, and the visual feedback triplet). Consistent with Stage 2, the policy gradient is computed exclusively over the model-generated token positions; all non-generated to- kens are masked. The outcome rewardํ ํ (Section 3.4) is determined solely by the final corrected output:ํ (ํ) ํํํํํํก is extracted from each trajectory, rendered, and evaluated against the target image. The group-normalized advantage is ห ํด ํ =(ํ ํ โ ํ ํ )/ํ ํ , and the training objective is: J(ํ)= E ํ,ํ ํ " 1 ํบ ํบ โ๏ธ ํ=1 min ํ ํ ห ํด ํ , clip(ํ ํ , 1โํ, 1+ํ) ห ํด ํ # (4) whereํ ํ = ํ ํ (ํ ํ |ํ)/ํ ํ ํํํ (ํ ํ |ํ) is the importance sampling ra- tio computed over the model-generated tokens in trajectoryํ ํ . Following the analysis by Yu et al. [41] that KL regularization is unnecessary when the policy must diverge substantially from its initialization to acquire new capabilities, we remove the KL penalty to allow unconstrained exploration of correction strategies. 3.4 Multi-dimensional Reward Design The outcome reward drives exploration in Stage 3. Each generated SVGํ ํํํํ is rendered to produce a previewํผ ํํํํ , and the reward is composed from three complementary components that jointly assess visual quality and code efficiency. Structural Fidelity Reward. This component measures pixel- level similarity via mean squared error. An exponential decay with rateํ maps the unbounded error to a reward in[0,1], yielding finer discrimination among near-correct outputs while saturating for large errors: ํ ํ ํกํํขํํก = exp โํ ยท MSE(ํผ ํํํํ , ํผ ํกํํก ) (5) Semantic Perception Reward.Pixel-level error is overly sensi- tive to minor spatial shifts that do not affect perceived quality. To capture high-level semantic alignment, we measure cosine similar- ity in the feature space of a pretrained DINOv2 [17] encoderํ(ยท) and apply a hard thresholdํthat zeroes out severely misaligned outputs: ํ ํ ํํ = ํ ยท I[ํ โฅ ํ], ํ = cos ํ(ํผ ํํํํ ), ํ(ํผ ํกํํก ) (6) Code Efficiency Reward. During RL exploration the model tends to stack redundant SVG elements that inflate code length without improving visual quality. Letํ= ํ ํํํํ /ํ ํกํํก denote the ratio of the generated token length to the ground-truth length. We apply a cosine decay function: ํ ํํ ํ = 1 2 1+ cos ํ ยท clamp ํ โํ ํกํํ ํ ํํํฅ โํ ํกํํ , 0, 1 (7) whereclamprestricts the normalized ratio to[0,1], so thatํ ํํ ํ =1 whenํ โค ํ ํกํํ andํ ํํ ํ =0 whenํ โฅ ํ ํํํฅ , with smooth cosine decay in between. Reward Aggregation.The three components are combined into a weighted visual rewardํ ํฃํํ = ํค 1 ํ ํ ํกํํขํํก +ํค 2 ํ ํ ํํ +ํค 3 ํ ํํ ํ . To enforce adherence to the ReAct template and code renderability, we impose a hierarchical penalty conditioned on three failure in- dicators: core code absence (I ํํํ ), rendering crash (I ํํํํํํ ), and template format violation (I ํํํก ): ํ ํกํํกํํ = ๏ฃฑ ๏ฃด ๏ฃด ๏ฃด ๏ฃด๏ฃฒ ๏ฃด ๏ฃด ๏ฃด ๏ฃด ๏ฃณ ํ 1 if I ํํํ = 1 or I ํํํํํํ = 1 ํ ํฃํํ + ํ 2 if I ํํํก = 1 ํ ํฃํํ otherwise (8) whereํ 1 andํ 2 (ํ 1 โค ํ 2 <0) are fixed penalties. Fatal errors (miss- ing code or rendering failure) override the visual reward entirely with the harshest penaltyํ 1 , while format violations reduce the reward by a constant offsetํ 2 , still allowing the model to receive partial credit for visual quality. 4 Experiments 4.1 Experimental Setup Implementation Details. We build RefineSVG on Qwen2.5- VL [2] and report results for both the 3B and 7B variants, each ex- tended with the SVG-oriented vocabulary described in Section 3.1. All training is conducted on 32 NVIDIA H20 GPUs. The vision encoder and multimodal projector remain frozen throughout all stages; only the language model parameters are updated. In Stage 1, the model is trained for 3 epochs with a learning rate of 1ร10 โ5 and an effective batch size of 512. In Stage 2, we reduce the learning rate to 1ร10 โ6 and train for 2 epochs with a maximum context length of 24,576 tokens to accommodate the full ReAct episode. In Stage 3, we apply GRPO withํบ=8 rollouts per prompt, an actor learning rate of 1ร10 โ6 , a clipping ratio ofํ=0.2, and a sampling temperature of 1.0. The reward weights areํค 1 =0.3,ํค 2 =0.5, ํค 3 =0.2, withํ =3.0,ํ=0.3,ํ ํกํํ =1.5,ํ ํํํฅ =3.0,ํ 1 = โ0.5, and ํ 2 =โ0.3. All stages use a cosine learning rate schedule. M โ26, November 10โ14, 2026, Rio de Janeiro, BrazilLiu et al. MethodParams DINOโ PSNRโ CLIP-I2Iโ SSIMโ LPIPSโ MSEโ #Tok. Time (s) Optimization-based Diff VG [13]โ0.841932.480.95860.95390.19170.0008268.43k109 LIVE [15]โ0.905333.930.97190.98040.07640.000672.59k402 General-purpose VLMs Qwen3-VL-235B [1]235B0.76906.580.86910.32790.43480.44638.65kโ GPT-5.2 [30]โ0.924711.920.94830.61140.28010.1228849โ Gemini-3.1-Pro [9]โ0.913813.190.9433 0.65640.24140.12051.14kโ SVG-specialized models StarVector [22]8B0.78209.890.88300.42960.33290.40494.51k124 OmniSVG [39]8B0.821211.720.88380.60720.27840.22735.79k78 InternSVG [34]8B0.864713.700.90980.63970.2390 0.19808.34k34 RefineSVG (Ours) Qwen2.5-VL-3B-Instruct3B0.69364.910.83650.31700.49980.45404.46k22 +SVG-SFT3B0.74238.270.86480.35090.39110.45998.93k58 +RefineSVG (ours)3B0.887214.61 0.91710.66380.23990.073231917 ฮ Gainโ14.5โ6.34โ5.2โ31.3โ15.1โ38.7โ8.6k Qwen2.5-VL-7B-Instruct7B0.73156.640.84580.38620.47180.34773.97k34 +SVG-SFT7B0.772510.140.87940.40970.34960.41218.91k100 +RefineSVG (ours)7B0.9207 15.860.93060.7114 0.1891 0.060363427 ฮ Gainโ14.8โ5.72โ5.1โ30.2โ16.1โ35.2โ8.3k Table 1: Quantitative comparison on SVG-Stack-1K. Among MLLM-based methods, the best results are in bold and second-best areunderlined. Optimization-based methods are listed for reference. #Tok. denotes the average generated SVG token count. Time is measured in seconds per image on a single GPU.ฮGain reports the improvement of the full RefineSVG pipeline over the SVG-SFT baseline (Stage 1). Datasets.All training data originate from SVG-Stack [22]. Stage 1 uses 1.52M quality-filtered image-SVG pairs rendered on a 256ร256 canvas; Stage 2 uses 20K repair pairs obtained via rejection sampling (Section 3.3); Stage 3 uses a 35K candidate pool biased toward complex samples (>700 tokens). For evaluation, we construct SVG- Stack-1K by stratified sampling from the SVG-Stack test split within the SVG-Bench [22] suite, filtering out trivially simple instances to focus on samples with moderate to high structural complexity. All training data and evaluation benchmarks will be publicly released. Evaluation Metrics.We use six complementary metrics. DINO and CLIP-I2I measure semantic similarity using DINOv2 [17] and CLIP [20] image-level features, respectively. SSIM [35], LPIPS [43], PSNR, and MSE are standard image quality metrics. We additionally report the generated SVG token length (#Tokens) to assess code ef- ficiency. All our models are evaluated with a sampling temperature of 0.6; each result is averaged over three independent runs, with per-run variance reported separately. Baselines. We compare against three categories of methods. (1) Optimization-based: Diff VG [13] and LIVE [15]. (2) General- purpose VLMs: Qwen3-VL-235B [1], GPT-5.2 [30], and Gemini-3.1- Pro [9], where the latter two are closed-source models evaluated via their official APIs. (3) SVG-specialized models: StarVector-8B [22], OmniSVG-8B [39], and InternSVG-8B [34]. Complete training con- figurations, data construction pipelines, per-run variance, and in- ference prompts are detailed in the supplementary material. 4.2 Main Results Table 1 presents the quantitative comparison on SVG-Stack-1K. Among all MLLM-based methods, RefineSVG-7B achieves the best results on four of six quality metrics (PSNR, SSIM, LPIPS, MSE) and ranks second on DINO, establishing a new state of the art for open-source Image-to-SVG generation. Compared with the best competing SVG-specialized model InternSVG-8B, RefineSVG-7B improves DINO by +0.056, reduces LPIPS by 20.9%, and lowers MSE by 69.5%, demonstrating substantial gains in both semantic fidelity and pixel-level accuracy. Against the strongest closed-source model GPT-5.2, RefineSVG-7B trails only on two semantic similarity met- rics, DINO (โ0.004) and CLIP-I2I (โ0.018), while surpassing it on all four remaining metrics by considerable margins, achieving +3.94 higher PSNR and 51% lower MSE with only 7B parameters. Even the 3B variant already surpasses InternSVG-8B on five of six metrics despite having less than half the parameter count, confirming the effectiveness of the proposed training paradigm over pure scale. Optimization-based methods (Diff VG, LIVE) attain the highest overall pixel-level fidelity through iterative gradient optimization, consistent with findings in concurrent work [34]. However, this RefineSVG: Visual Feedback-Driven Reinforcement Learning for Image-to-SVG GenerationMM โ26, November 10โ14, 2026, Rio de Janeiro, Brazil advantage comes at the cost of extreme SVG complexity and pro- hibitive latency: LIVE produces 72.59k tokens per image (over 114ร that of RefineSVG-7B) and requires 402 seconds, yielding dense, non-editable path primitives that lack semantic structure. A notable observation concerns the quality-efficiency tradeoff. Fewer tokens do not inherently imply better results: overly compact code may omit fine-grained details, while verbose code introduces redundant primitives without improving fidelity. Among MLLM- based methods, InternSVG uses 8.34k tokens and GPT-5.2 uses 849 tokens, yet both fall short of RefineSVG-7B on most quality metrics. The final corrected SVG produced by RefineSVG-7B averages only 634 tokens, a 14รreduction from its SFT counterpart (8.91k), while simultaneously improving all quality metrics. This indicates that the efficiency reward eliminates structural redundancy rather than blindly minimizing code length, yielding more information-dense SVG representations. Although the full ReAct episode generates both an initial draft and a corrected output, the combined token bud- get remains well below competing single-pass methods, translating directly into faster inference: RefineSVG-7B completes in 27 sec- onds, faster than all SVG-specialized baselines including InternSVG (34s), OmniSVG (78s), and StarVector (124s), and 3.7รfaster than its single-pass SFT counterpart (100s). Both model scales exhibit consistent stage-wise improvements, confirming the scalability of the proposed framework. 4.3 Ablation Studies To validate the contribution of each component, we conduct abla- tion experiments on both model scales (Table 2). 0.4 0.5 0.6 0.7 0.8 0.9 RefineSVG-7B RefineSVG-3B Reward 050100150200250300 Training Step 500 1000 1500 Token Length Figure 4: Stage 3 RL training dynamics. Top: total reward steadily increases and converges for both model scales, with the 7B variant reaching a higher plateau. Bottom: average generated token length drops rapidly from the SFT initial- ization and stabilizes, confirming that the efficiency reward effectively regularizes code redundancy without compromis- ing generation quality. Removing the cold-start stage (w/o Cold-Start) causes the largest degradation, with DINO dropping by 0.098 on the 3B model versus 0.032 on 7B. The disproportionate impact on the smaller model confirms that learning the ReAct correction paradigm from scratch via RL alone is prohibitively costly when model capacity is limited; cold-start supervision provides the behavioral scaffold that enables efficient RL convergence. Replacing the multi-dimensional Diff- Map with a plain rendered image (w/o Diff-Map) degrades quality on both scales, with the 7B model exhibiting a larger DINO decline (โ0.019) than the 3B (โ0.009). This scale-dependent pattern suggests that larger models are better positioned to exploit fine-grained spatial error signals, and removing this visual channel limits their correction precision. VariantDINOโ SSIMโ LPIPSโ MSEโ #Tok. 3B RefineSVG-3B (full) 0.8872 0.6638 0.2399 0.0732319 w/o Cold-Start0.78940.62540.21270.0957806 w/o Diff-Map0.87850.65960.24200.0744312 Direct RL0.87200.66180.24380.0895347 7B RefineSVG-7B (full) 0.9207 0.7114 0.1891 0.0603634 w/o Cold-Start0.88860.70970.18880.0691526 w/o Diff-Map0.90220.69210.20380.0662464 Direct RL0.87980.70220.19290.0715427 Table 2: Ablation study on SVG-Stack-1K. Each variant re- moves one component from the full RefineSVG pipeline. Applying RL directly after Stage 1 SFT without the agentic Re- Act loop (Direct RL), an approach architecturally comparable to RLRF [23], consistently underperforms the full pipeline. The perfor- mance gap widens with model scale: DINO declines by 0.015 on 3B but 0.041 on 7B, indicating that the closed-loop agentic paradigm unlocks additional capacity that open-loop RL cannot exploit. This result validates that visual feedback at inference time, rather than reward-only feedback at training time, is essential for realizing the full potential of larger models. Notably, while some ablation variants produce fewer tokens (e.g., w/o Diff-Map yields 464 tokens on 7B vs. 634 for the full model), this comes at the cost of degraded fidelity, reinforcing that the efficiency reward serves as a regularizer against redundancy rather than a code-length minimizer. Figure 4 visualizes the Stage 3 training dynamics. The reward curves exhibit oscillatory but steadily ascending trajectories for both scales, with the 7B model converging to a higher plateau than 3B, reflecting a consistent scaling trend. The token length curves reveal an initial increase during early exploration, where the pol- icy experiments with diverse correction strategies, followed by a gradual decline as the model discovers compact and efficient SVG representations. This convergence behavior is facilitated by the SVG-oriented vocabulary, which retains high-level semantic ele- ments (e.g.,<rect>,<circle>) rather than decomposing all geom- etry into low-level path commands, enabling the model to express complex structures with fewer tokens. M โ26, November 10โ14, 2026, Rio de Janeiro, BrazilLiu et al. Figure 5: Qualitative comparison on out-of-distribution samples drawn from MMSVG-Illustration, MMSVGBench, and svg-emoji. RefineSVG-7B produces structurally coherent and visually faithful SVGs, preserving fine-grained details where competing methods exhibit geometric drift, color distortion, or structural omission. 4.4 Qualitative Results Figure 5 presents qualitative comparisons on out-of-distribution samples that are absent from the training data. Optimization-based methods (Diff VG, LIVE) reproduce pixel-level details but produce dense, non-semantic path primitives. General-purpose VLMs cap- ture coarse layout but frequently hallucinate structural elements or distort fine geometry. Among SVG-specialized models, InternSVG achieves the closest results to ours but still exhibits noticeable color shifts and missing details in complex regions. RefineSVG-7B consis- tently generates clean, structurally coherent outputs with accurate color reproduction and complete element coverage, demonstrating strong generalization beyond the training distribution. Quantita- tively, across SVG-Emoji, MMSVGBench, and MMSVG-Illustration, RefineSVG-7B outperforms all SVG-specialized baselines on the four reconstruction-oriented metrics (PSNR, SSIM, LPIPS, and MSE), while delivering competitive semantic similarity. Full DINO and CLIP-I2I results are provided in the supplementary material. 5 Conclusion We present RefineSVG, a single-step closed-loop visual feedback framework that elevates MLLMs from passive code generators to self-correcting visual agents for image-to-SVG generation. Through an SVG-oriented semantic vocabulary, a Diff-Map-guided ReAct mechanism, and a progressive training pipeline spanning SFT, rejec- tion sampling for cold-start supervision, and agentic RL, RefineSVG achieves state-of-the-art results among MLLM-based methods on SVG-Stack-1K while generating substantially shorter and more effi- cient SVG code than competing approaches. The current framework performs a single correction round per image. Extending it to multi- round refinement remains an open challenge because constructing reliable cold-start supervision for multi-turn correction is consid- erably more difficult. Developing adaptive stopping criteria and curricula for deciding when further refinement is beneficial, as well as scaling to higher-resolution canvases, are promising directions. This paradigm may also generalize to multimodal structured code generation beyond SVG. Acknowledgments This work was supported in part by the National Natural Science Foundation of China (Grant 62572327) and the Guangdong Basic and Applied Basic Research Foundation (Grant 2025A1515010260). Author contributions: Shaobo Liu conceived the core method, de- signed and implemented the full training pipeline, and wrote the manuscript. Shuaishuai Zhou conducted the baseline experiments and evaluation across multiple models and contributed to techni- cal discussions. Yan Zhan designed the main method figure and data-processing visualizations and reviewed the final manuscript. RefineSVG: Visual Feedback-Driven Reinforcement Learning for Image-to-SVG GenerationMM โ26, November 10โ14, 2026, Rio de Janeiro, Brazil References [1]Shuai Bai, Yuxuan Cai, Ruizhe Chen, Keqin Chen, Xionghui Chen, Zesen Cheng, Lianghao Deng, Wei Ding, Chang Gao, Chunjiang Ge, Wenbin Ge, Zhifang Guo, Qidong Huang, Jie Huang, Fei Huang, Binyuan Hui, Shutong Jiang, Zhaohai Li, Mingsheng Li, Mei Li, Kaixin Li, Zicheng Lin, Junyang Lin, Xuejing Liu, Jiawei Liu, Chenglong Liu, Yang Liu, Dayiheng Liu, Shixuan Liu, Dunjie Lu, Ruilin Luo, Chenxu Lv, Rui Men, Lingchen Meng, Xuancheng Ren, Xingzhang Ren, Sibo Song, Yuchong Sun, Jun Tang, Jianhong Tu, Jianqiang Wan, Peng Wang, Pengfei Wang, Qiuyue Wang, Yuxuan Wang, Tianbao Xie, Yiheng Xu, Haiyang Xu, Jin Xu, Zhibo Yang, Mingkun Yang, Jianxin Yang, An Yang, Bowen Yu, Fei Zhang, Hang Zhang, Xi Zhang, Bo Zheng, Humen Zhong, Jingren Zhou, Fan Zhou, Jing Zhou, Yuanzhi Zhu, and Ke Zhu. 2025. Qwen3-VL Technical Report. arXiv preprint arXiv:2511.21631 (2025). [2]Shuai Bai, Keqin Chen, Xuejing Liu, Jialin Wang, Wenbin Ge, Sibo Song, Kai Dang, Peng Wang, Shijie Wang, Jun Tang, Humen Zhong, Yuanzhi Zhu, Mingkun Yang, Zhaohai Li, Jianqiang Wan, Pengfei Wang, Wei Ding, Zheren Fu, Yiheng Xu, Jiabo Ye, Xi Zhang, Tianbao Xie, Zesen Cheng, Hang Zhang, Zhibo Yang, Haiyang Xu, and Junyang Lin. 2025. Qwen2.5-VL Technical Report. arXiv preprint arXiv:2502.13923 (2025). [3]Jonas Belouadi, Simone Paolo Ponzetto, and Steffen Eger. 2024.DeTikZ- ify: Synthesizing Graphics Programs for Scientific Figures and Sketches with TikZ. In Advances in Neural Information Processing Systems 38: An- nual Conference on Neural Information Processing Systems 2024, NeurIPS 2024, Vancouver, BC, Canada, December 10 - 15, 2024, Amir Globersons, Lester Mackey, Danielle Belgrave, Angela Fan, Ulrich Paquet, Jakub M. Tomczak, and Cheng Zhang (Eds.). http://papers.nips.c/paper_files/paper/2024/hash/ 9a8d52eb05eb7b13f54b3d9eada667b7-Abstract-Conference.html [4]Defu Cao, Zhaowen Wang, Jose Echevarria, and Yan Liu. 2023. SVGformer: Rep- resentation Learning for Continuous Vector Graphics using Transformers. In IEEE/CVF Conference on Computer Vision and Pattern Recognition, CVPR 2023, Van- couver, BC, Canada, June 17-24, 2023. IEEE, 10093โ10102. doi:10.1109/CVPR52729. 2023.00973 [5]Alexandre Carlier, Martin Danelljan, Alexandre Alahi, and Radu Timofte. 2020. DeepSVG: A Hierarchical Generative Network for Vector Graphics Animation. In Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual, Hugo Larochelle, MarcโAurelio Ranzato, Raia Hadsell, Maria-Florina Balcan, and Hsuan-Tien Lin (Eds.). https://proceedings.neurips.c/paper/2020/ hash/bcf9d6bd14a2095866ce8c950b702341-Abstract.html [6]Hanqi Chen, Zhongyin Zhao, Ye Chen, Zhujin Liang, and Bingbing Ni. 2025. SVGThinker: Instruction-Aligned and Reasoning-Driven Text-to-SVG Generation. In Proceedings of the 33rd ACM International Conference on Multimedia. 11004โ 11012. [7]Xinyun Chen, Maxwell Lin, Nathanael Schรคrli, and Denny Zhou. 2024. Teaching Large Language Models to Self-Debug. In The Twelfth International Conference on Learning Representations, ICLR 2024, Vienna, Austria, May 7-11, 2024. OpenRe- view.net. https://openreview.net/forum?id=KuPixIqPiq [8] Kevin Frans, Lisa B. Soros, and Olaf Witkowski. 2022. CLIPDraw: Exploring Text- to-Drawing Synthesis through Language-Image Encoders. In Advances in Neural Information Processing Systems 35: Annual Conference on Neural Information Processing Systems 2022, NeurIPS 2022, New Orleans, LA, USA, November 28 - December 9, 2022, Sanmi Koyejo, S. Mohamed, A. Agarwal, Danielle Belgrave, K. Cho, and A. Oh (Eds.). http://papers.nips.c/paper_files/paper/2022/hash/ 21f76686538a5f06dc431efea5f475f5-Abstract-Conference.html [9]Google. 2026.Gemini 3.1 Pro: A smarter model for your most complex tasks.https://blog.google/innovation-and-ai/models-and-research/gemini- models/gemini-3-1-pro/. [10]Arnav Gudibande, Eric Wallace, Charlie Snell, Xinyang Geng, Hao Liu, Pieter Abbeel, Sergey Levine, and Dawn Song. 2023. The false promise of imitating proprietary llms. arXiv preprint arXiv:2305.15717 (2023). [11]Daya Guo, Dejian Yang, Haowei Zhang, Junxiao Song, Peiyi Wang, Qihao Zhu, Runxin Xu, Ruoyu Zhang, Shirong Ma, Xiao Bi, et al. 2025. Deepseek-r1: Incen- tivizing reasoning capability in llms via reinforcement learning. arXiv preprint arXiv:2501.12948 (2025). [12]Ajay Jain, Amber Xie, and Pieter Abbeel. 2023. Vectorfusion: Text-to-svg by ab- stracting pixel-based diffusion models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 1911โ1920. [13]Tzu-Mao Li, Michal Lukรกฤ, Michaรซl Gharbi, and Jonathan Ragan-Kelley. 2020. Differentiable vector graphics rasterization for editing and learning. ACM Trans- actions on Graphics (TOG) 39, 6 (2020), 1โ15. [14]Haotian Liu, Chunyuan Li, Qingyang Wu, and Yong Jae Lee. 2023.Vi- sual Instruction Tuning. In Advances in Neural Information Processing Systems 36: Annual Conference on Neural Information Processing Systems 2023, NeurIPS 2023, New Orleans, LA, USA, December 10 - 16, 2023, Alice Oh, Tristan Naumann, Amir Globerson, Kate Saenko, Moritz Hardt, and Sergey Levine (Eds.).http://papers.nips.c/paper_files/paper/2023/hash/ 6dcf277ea32ce3288914faf369fe6de0-Abstract-Conference.html [15]Xu Ma, Yuqian Zhou, Xingqian Xu, Bin Sun, Valerii Filev, Nikita Orlov, Yun Fu, and Humphrey Shi. 2022. Towards layer-wise image vectorization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 16314โ 16323. [16]Aman Madaan, Niket Tandon, Prakhar Gupta, Skyler Hallinan, Luyu Gao, Sarah Wiegreffe, Uri Alon, Nouha Dziri, Shrimai Prabhumoye, Yiming Yang, Shashank Gupta, Bodhisattwa Prasad Majumder, Katherine Hermann, Sean Welleck, Amir Yazdanbakhsh, and Peter Clark. 2023. Self-Refine: Iterative Refinement with Self- Feedback. In Advances in Neural Information Processing Systems 36: Annual Confer- ence on Neural Information Processing Systems 2023, NeurIPS 2023, New Orleans, LA, USA, December 10 - 16, 2023, Alice Oh, Tristan Naumann, Amir Globerson, Kate Saenko, Moritz Hardt, and Sergey Levine (Eds.). http://papers.nips.c/paper_files/ paper/2023/hash/91edff07232fb1b55a505a9e9f6c0f3-Abstract-Conference.html [17]Maxime Oquab, Timothรฉe Darcet, Thรฉo Moutakanni, Huy V. Vo, Marc Szafraniec, Vasil Khalidov, Pierre Fernandez, Daniel Haziza, Francisco Massa, Alaaeldin El-Nouby, Mido Assran, Nicolas Ballas, Wojciech Galuba, Russell Howes, Po- Yao Huang, Shang-Wen Li, Ishan Misra, Michael Rabbat, Vasu Sharma, Gabriel Synnaeve, Hu Xu, Hervรฉ Jรฉgou, Julien Mairal, Patrick Labatut, Armand Joulin, and Piotr Bojanowski. 2024. DINOv2: Learning Robust Visual Features without Supervision. Trans. Mach. Learn. Res. 2024 (2024). https://openreview.net/forum? id=a68SUt6zFt [18] Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll L. Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, John Schulman, Jacob Hilton, Fraser Kelton, Luke Miller, Maddie Simens, Amanda Askell, Peter Welinder, Paul F. Christiano, Jan Leike, and Ryan Lowe. 2022. Train- ing language models to follow instructions with human feedback. In Advances in Neural Information Processing Systems 35: Annual Conference on Neural Informa- tion Processing Systems 2022, NeurIPS 2022, New Orleans, LA, USA, November 28 - December 9, 2022, Sanmi Koyejo, S. Mohamed, A. Agarwal, Danielle Belgrave, K. Cho, and A. Oh (Eds.). http://papers.nips.c/paper_files/paper/2022/hash/ b1efde53be364a73914f58805a001731-Abstract-Conference.html [19] Ben Poole, Ajay Jain, Jonathan T. Barron, and Ben Mildenhall. 2023. DreamFusion: Text-to-3D using 2D Diffusion. In The Eleventh International Conference on Learn- ing Representations, ICLR 2023, Kigali, Rwanda, May 1-5, 2023. OpenReview.net. https://openreview.net/forum?id=FjNys5c7VyY [20]Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, and Ilya Sutskever. 2021. Learning Transferable Visual Models From Natural Language Supervision. In Proceedings of the 38th International Conference on Machine Learning, ICML 2021, 18-24 July 2021, Virtual Event (Pro- ceedings of Machine Learning Research), Marina Meila and Tong Zhang (Eds.). PMLR, 8748โ8763. http://proceedings.mlr.press/v139/radford21a.html [21]Pradyumna Reddy. 2021. Im2Vec: Synthesizing Vector Graphics Without Vector Supervision. In IEEE Conference on Computer Vision and Pattern Recognition Workshops, CVPR Workshops 2021, virtual, June 19-25, 2021. Computer Vision Foundation / IEEE, 2124โ2133. doi:10.1109/CVPRW53098.2021.00241 [22]Juan A Rodriguez, Abhay Puri, Shubham Agarwal, Issam H Laradji, Pau Ro- driguez, Sai Rajeswar, David Vazquez, Christopher Pal, and Marco Pedersoli. 2025. Starvector: Generating scalable vector graphics code from images and text. In Proceedings of the Computer Vision and Pattern Recognition Conference. 16175โ16186. [23]Juan A Rodriguez, Haotian Zhang, Abhay Puri, Aarash Feizi, Rishav Pramanik, Pascal Wichmann, Arnab Mondal, Mohammad Reza Samsami, Rabiul Awal, Per- ouz Taslakian, et al.2025. Rendering-aware reinforcement learning for vector graphics generation. In Advances in Neural Information Processing Systems. [24] Robin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser, and Bjรถrn Ommer. 2022. High-Resolution Image Synthesis with Latent Diffusion Models. In IEEE/CVF Conference on Computer Vision and Pattern Recognition, CVPR 2022, New Orleans, LA, USA, June 18-24, 2022. IEEE, 10674โ10685. doi:10.1109/CVPR52688. 2022.01042 [25]Timo Schick, Jane Dwivedi-Yu, Roberto Dessรฌ, Roberta Raileanu, Maria Lomeli, Eric Hambro, Luke Zettlemoyer, Nicola Cancedda, and Thomas Scialom. 2023. Toolformer: Language Models Can Teach Themselves to Use Tools. In Advances in Neural Information Processing Systems 36: Annual Conference on Neural Infor- mation Processing Systems 2023, NeurIPS 2023, New Orleans, LA, USA, December 10 - 16, 2023, Alice Oh, Tristan Naumann, Amir Globerson, Kate Saenko, Moritz Hardt, and Sergey Levine (Eds.). http://papers.nips.c/paper_files/paper/2023/ hash/d842425e4bf79ba039352da0f658a906-Abstract-Conference.html [26] John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. 2017. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347 (2017). [27]Rico Sennrich, Barry Haddow, and Alexandra Birch. 2016. Neural Machine Translation of Rare Words with Subword Units. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics, ACL 2016, August 7-12, 2016, Berlin, Germany, Volume 1: Long Papers. The Association for Computer Linguistics. doi:10.18653/V1/P16-1162 [28]Zhihong Shao, Peiyi Wang, Qihao Zhu, Runxin Xu, Junxiao Song, Mingchuan Zhang, Y. K. Li, Y. Wu, and Daya Guo. 2024. DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models. CoRR abs/2402.03300 M โ26, November 10โ14, 2026, Rio de Janeiro, BrazilLiu et al. (2024). arXiv:2402.03300 doi:10.48550/ARXIV.2402.03300 [29]Noah Shinn, Federico Cassano, Ashwin Gopinath, Karthik Narasimhan, and Shunyu Yao. 2023. Reflexion: language agents with verbal reinforcement learning. In Advances in Neural Information Processing Systems 36: Annual Conference on Neural Information Processing Systems 2023, NeurIPS 2023, New Orleans, LA, USA, December 10 - 16, 2023, Alice Oh, Tristan Naumann, Amir Globerson, Kate Saenko, Moritz Hardt, and Sergey Levine (Eds.). http://papers.nips.c/paper_files/paper/ 2023/hash/1b44b878b782e6954cd888628510e90-Abstract-Conference.html [30] Aaditya Singh, Adam Fry, Adam Perelman, Adam Tart, Adi Ganesh, Ahmed El-Kishky, Aidan McLaughlin, Aiden Low, AJ Ostrow, Akhila Ananthram, et al. 2025. Openai gpt-5 system card. arXiv preprint arXiv:2601.03267 (2025). [31]Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017.Attention is All you Need. In Advances in Neural Information Processing Systems 30: An- nual Conference on Neural Information Processing Systems 2017, December 4- 9, 2017, Long Beach, CA, USA, Isabelle Guyon, Ulrike von Luxburg, Samy Bengio, Hanna M. Wallach, Rob Fergus, S. V. N. Vishwanathan, and Roman Garnett (Eds.). 5998โ6008.https://proceedings.neurips.c/paper/2017/hash/ 3f5e243547dee91fbd053c1c4a845a-Abstract.html [32]Yael Vinker, Ehsan Pajouheshgar, Jessica Y Bo, Roman Christian Bachmann, Amit Haim Bermano, Daniel Cohen-Or, Amir Zamir, and Ariel Shamir. 2022. Clipasso: Semantically-aware object sketching. ACM Transactions on Graphics (TOG) 41, 4 (2022), 1โ11. [33]Feiyu Wang, Zhiyuan Zhao, Yuandong Liu, Da Zhang, Junyu Gao, Hao Sun, and Xuelong Li. 2025. Svgen: Interpretable vector graphics generation with large language models. In Proceedings of the 33rd ACM International Conference on Multimedia. 9608โ9617. [34] Haomin Wang, Jinhui Yin, Qi Wei, Wenguang Zeng, Lixin Gu, Shenglong Ye, Zhangwei Gao, Yaohui Wang, Yanting Zhang, Yuanqi Li, et al.2026. Internsvg: To- wards unified svg tasks with multimodal large language models. In International Conference on Learning Representations. [35] Zhou Wang, Alan C. Bovik, Hamid R. Sheikh, and Eero P. Simoncelli. 2004. Image quality assessment: from error visibility to structural similarity. IEEE Trans. Image Process. 13, 4 (2004), 600โ612. doi:10.1109/TIP.2003.819861 [36] Ronghuan Wu, Wanchao Su, and Jing Liao. 2025. Chat2SVG: Vector Graphics Gen- eration with Large Language Models and Image Diffusion Models. In IEEE/CVF Conference on Computer Vision and Pattern Recognition, CVPR 2025, Nashville, TN, USA, June 11-15, 2025. Computer Vision Foundation / IEEE, 23690โ23700. doi:10.1109/CVPR52734.2025.02206 [37]Ronghuan Wu, Wanchao Su, Kede Ma, and Jing Liao. 2023. IconShop: Text-Guided Vector Icon Synthesis with Autoregressive Transformers. ACM Trans. Graph. 42, 6 (2023), 230:1โ230:14. doi:10.1145/3618364 [38]Ximing Xing, Haitao Zhou, Chuang Wang, Jing Zhang, Dong Xu, and Qian Yu. 2024. Svgdreamer: Text guided svg generation with diffusion model. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. 4546โ4555. [39]Yiying Yang, Wei Cheng, Sijin Chen, Xianfang Zeng, Fukun Yin, Jiaxu Zhang, Liao Wang, Gang Yu, Xingjun Ma, and Yu-Gang Jiang. 2025. Omnisvg: A unified scalable vector graphics generation model. In Advances in Neural Information Processing Systems. [40] Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik R. Narasimhan, and Yuan Cao. 2023. ReAct: Synergizing Reasoning and Acting in Language Models. In The Eleventh International Conference on Learning Representations, ICLR 2023, Kigali, Rwanda, May 1-5, 2023. OpenReview.net. https://openreview. net/forum?id=WE_vluYUL-X [41]Qiying Yu, Zheng Zhang, Ruofei Zhu, Yufeng Yuan, Xiaochen Zuo, Yu Yue, Tiantian Fan, Gaohong Liu, Lingjun Liu, Xin Liu, Haibin Lin, Zhiqi Lin, Bole Ma, Guangming Sheng, Yuxuan Tong, Chi Zhang, Mofan Zhang, Wang Zhang, Hang Zhu, Jinhua Zhu, Jiaze Chen, Jiangjie Chen, Chengyi Wang, Hongli Yu, Weinan Dai, Yuxuan Song, Xiangpeng Wei, Hao Zhou, Jingjing Liu, Wei-Ying Ma, Ya-Qin Zhang, Lin Yan, Mu Qiao, Yonghui Wu, and Mingxuan Wang. 2025. DAPO: An Open-Source LLM Reinforcement Learning System at Scale. CoRR abs/2503.14476 (2025). arXiv:2503.14476 doi:10.48550/ARXIV.2503.14476 [42] Zheng Yuan, Hongyi Yuan, Chengpeng Li, Guanting Dong, Keming Lu, Chuanqi Tan, Chang Zhou, and Jingren Zhou. 2023. Scaling relationship on learning math- ematical reasoning with large language models. arXiv preprint arXiv:2308.01825 (2023). [43] Richard Zhang, Phillip Isola, Alexei A. Efros, Eli Shechtman, and Oliver Wang. 2018. The Unreasonable Effectiveness of Deep Features as a Perceptual Metric. In 2018 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2018, Salt Lake City, UT, USA, June 18-22, 2018. Computer Vision Foundation / IEEE Computer Society, 586โ595. doi:10.1109/CVPR.2018.00068 [44]Chunting Zhou, Pengfei Liu, Puxin Xu, Srinivasan Iyer, Jiao Sun, Yuning Mao, Xuezhe Ma, Avia Efrat, Ping Yu, Lili Yu, Susan Zhang, Gargi Ghosh, Mike Lewis, Luke Zettlemoyer, and Omer Levy. 2023. LIMA: Less Is More for Alignment. In Advances in Neural Information Processing Systems 36: Annual Conference on Neural Information Processing Systems 2023, NeurIPS 2023, New Orleans, LA, USA, December 10 - 16, 2023, Alice Oh, Tristan Naumann, Amir Globerson, Kate Saenko, Moritz Hardt, and Sergey Levine (Eds.). http://papers.nips.c/paper_files/paper/ 2023/hash/ac662d74829e4407ce1d126477f4a03a-Abstract-Conference.html [45] Bocheng Zou, Mu Cai, Jianrui Zhang, and Yong Jae Lee. 2024. Vgbench: A comprehensive benchmark of vector graphics understanding and generation for large language models. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing. 3647โ3659. RefineSVG: Visual Feedback-Driven Reinforcement Learning for Image-to-SVG Generation Figure 1: Additional SVG samples generated by RefineSVG-7B across diverse categories, demonstrating the modelโs ability to produce structurally coherent and visually faithful vector graphics. This supplementary document accompanies the main paper and is organized as follows: Section 1 details the data construction pipeline; Section 2 presents the complete SVG vocabulary and se- mantic prior initialization; Section 3 provides Diff-Map operator definitions and visualizations; Section 4 reports full training con- figurations and prompt templates; Section 5 contains extended evaluation results. The complete training code and vocabulary construction scripts are publicly available at https://github.com/ liuxiaobo66/RefineSVG. Full datasets and model weights will be released through the same repository. 1 Data Construction Pipeline All training data originate from SVG-Stack (2,283,875 raw files). We apply a multi-stage pipeline that performs three categories of processing: (1) filtering, which removes samples containing non- renderable markup, complex filter primitives, external references, animations, editor metadata, and unresolvable inter-element depen- dencies (e.g., gradient definitions, clip-path references,url(#...) bindings); (2) structural normalization, which flattens group hierar- chies (<g>) by pushing inherited styles onto leaf elements, converts all relative path commands to absolute form, compresses the path command vocabulary to four canonical types (M,L,C,Z), absorbs transformattributes into geometric coordinates, and serializes the root element to a minimal single-line representation; and (3) numer- ical and color quantization, which unifies the canvas to 256ร256, rounds all coordinates to two decimal places, and maps all colors to a fixed 256-color mixed palette (128 systematic HSL/grayscale anchors + 128 K-means-clustered data-driven colors from 325K unique RGB values in the corpus). After all stages, 1,630,057 samples remain (1,548,533 in the train split), with a controlled vocabulary of 10 element tags, 29 attributes, 4 path commands, and 259 color tokens. The complete vocabu- lary listing is provided in Table 2 (Section 2). Unlike approaches that decompose all geometry into low-level<path>commands, our pipeline preserves high-level semantic elements (e.g.,<rect>, <circle>,<polygon>), enabling the model to express complex structures with fewer and more interpretable tokens. Figure 2 il- lustrates the overall pipeline, and Figure 3 shows a concrete be- fore/after example. M โ26, November 10โ14, 2026, Rio de Janeiro, BrazilLiu et al. Figure 2: Overview of the data construction pipeline. Raw SVG-Stack samples undergo filtering, structural normalization, and numerical/color quantization to produce training-ready SVG code with a controlled vocabulary. Figure 3: Before and after data processing. The raw SVG (left) contains verbose attributes, nested groups, and arbitrary color formats. The processed SVG (right) uses a flat structure with standardized coordinates and quantized palette colors. 1.1 Quantization Fidelity To measure the visual fidelity retained by the normalization and quantization pipeline, we rasterize each SVG before and after pro- cessing with the same renderer and compare the resulting images on 47,403 held-out SVGs. Table 1 shows that the processed repre- sentation remains visually close to the original while providing the controlled coordinate and color space used for training. SVGs PSNRโ SSIMโ LPIPSโ MSEโ DINOโ 47,40345.850.98810.01030.000480.9942 Table 1: Rasterization fidelity of normalized and quantized SVGs relative to their raw counterparts. 1.2 Stage 2: Cold-Start Data Synthesis The Stage 1 model is applied to 613K colored training images (fil- tered from the 1.55M train split to exclude blank/grayscale samples) to produce draft SVGs. Each rendered prediction is scored against the target via CLIP (ViT-L/14) image-level cosine similarity. A two- stage filter then selects repair-worthy drafts: (1)CLIP band-pass: retain drafts with similarity in[0.50,0.95]. Outputs below 0.50 are too degraded for meaningful local cor- rection; outputs above 0.95 provide insufficient learning signal. This yields 26,882 candidates. (2)Structural matching: verify that the predicted and ground- truth SVGs share compatible element topology using three crite- ria: tag-set Jaccard similarityโฅ0.5, path count ratio difference โค0.5, and element count ratioโฅ0.3. Samples with path-type presence mismatch are also rejected. This retains 20,294 struc- turally suitable repair pairs. The final dataset is split into 20,000 training and 294 validation instances. 1.3 Stage 3: RL Candidate Pool The RL training pool is drawn from the SVG-Stack validation split (77,403 samples). Using the SVG-oriented vocabulary, we tokenize all samples and define complex instances as those with 700< token lengthโค 12,288. The final 35K pool comprises 31,500 complex and 3,500 simple (โค700 tokens) samples, maintaining a 9:1 ratio that biases RL exploration toward challenging cases. 1.4 Evaluation Set: SVG-Stack-1K SVG-Stack-1K is constructed by stratified sampling from the SVG- Stack test split (4,121 samples). We define three complexity strata based on tokenized length under the SVG-oriented vocabulary, RefineSVG: Visual Feedback-Driven Reinforcement Learning for Image-to-SVG GenerationMM โ26, November 10โ14, 2026, Rio de Janeiro, Brazil GroupCount Tokens Tag prefixes14 <svg, <path, <rect, <circle, <ellipse, <polygon, <polyline, <line, <text, <tspan, </svg>, </text>, </tspan>, /> Attribute literals30 viewBox=", xmlns=", d=", fill=", stroke=", stroke-width=", x=", y=", width=", height=", cx=", cy=", r=", rx=", ry=", points=", fill-rule=", opacity=", fill-opacity=", stroke-opacity=", stroke-linecap=", stroke-linejoin=", stroke-miterlimit=", font-size=", font-family=", text-anchor=", x1=", y1=", x2=", y2=" Path commands4 M, L, C, Z Special colors3 none, currentColor, inherit Palette colors256128 HSL/grayscale anchors + 128 K-means clustered colors Integer coords337 0, 1, 2, . . . , 336 Decimal parts100 .00, .01, .02, . . . , .99 Total: 744(725 newly added to base tokenizer) Table 2: Complete SVG-oriented vocabulary. 19 tokens (single- digit integers, common delimiters) already exist in the base Qwen2.5-VL tokenizer and are reused; the remaining 725 are newly added. with secondary stratification by path count, color count, and text presence within each stratum: (1) Simple (โค 700 tokens): 180 samples. (2) Moderate (700โ2,048 tokens): 470 samples. (3) Hard (2,048โ12,288 tokens): 350 samples. This design avoids over-representation of trivially simple icons and ensures that model differences are measured on samples with meaningful structural complexity. 2 SVG-Oriented Semantic Vocabulary 2.1 Complete Token Listing Table 2 lists the full SVG-oriented vocabulary organized by category. The vocabulary comprises 725 tokens that fall into six groups, cov- ering the complete syntactic and numerical space of the normalized SVG code described in Section 1. 2.2 Semantic Prior Initialization Randomly initialized embeddings for newly added tokens are far from the pretrained manifold, requiring many gradient steps before they become useful. To accelerate convergence, we initialize each new token embedding from a short natural-language description of its semantic role. Concretely, letํกdenote a new SVG token and ํ ํก its textual description (e.g., โShape tag. Draws a rectangle.โ for <rect>, or โA integer value of 128.โ for coordinate token128). We tokenizeํ ํก with the original (unextended) tokenizer into sub-word TokenInitialization prompt <rect>Shape tag. Draws a rectangle. <circle>Shape tag. Draws a circle. fill="Style attribute. Sets interior fill color. MAn SVG path command token M (move to). CAn SVG path command token C (cubic Bezier). 128A integer value of 128. .75A high-precision fractional value of 0.75. #F0000A very light, highly saturated red color. noneA special SVG paint token meaning no paint. Table 3: Representative semantic initialization prompts for each token category. The full prompt listing is available in the released code. 02000400060008000 Training Step 0.5 1 2 5 10 2.4ร lower Random Init Semantic Prior Init (Ours) SFT Loss 400060008000 0.63 0.66 0.69 0.72 Zoom-in Figure 4: Stage 1 SFT training loss comparison between se- mantic prior initialization and Gaussian initialization. Se- mantic initialization yields 2.4รlower initial loss and main- tains a consistent advantage throughout training. piecesํค 1 ,ํค 2 , . . .,ํค ํพ and compute the mean of their pretrained embeddings: e ํก = 1 ํพ ํพ โ๏ธ ํ=1 E[ํค ํ ](1) where E denotes the original input embedding matrix. When the input and output embedding layers are untied, the same averaging procedure is applied independently to the output embedding matrix. This places each new token in a semantically meaningful region of the embedding space from the start of training. Table 3 shows representative initialization prompts for each token category. 2.3 Vocabulary Ablation: Semantic vs. Random Initialization To validate the effectiveness of semantic prior initialization, we compare training loss convergence between two otherwise iden- tical Stage 1 SFT runs: one using the prompt-based initialization described above, and one using standard Gaussian initialization for all 725 new token embeddings. M โ26, November 10โ14, 2026, Rio de Janeiro, BrazilLiu et al. As shown in Figure 4, semantic initialization yields a 2.4รlower loss at the start of training compared to Gaussian initialization, and maintains a consistent advantage throughout the entire SFT stage. The zoom-in panel confirms that the gap persists even after con- vergence, indicating that the semantically initialized embeddings settle into a more favorable region of the loss landscape rather than merely accelerating early-stage adaptation. 3 Diff-Map Computation Details 3.1 Operator Definitions and Parameters Both images are composited onto a white background and converted to YCbCr: ํ= 0.299ํ + 0.587ํบ+ 0.114ํต ํถ ํ = 0.564(ํตโํ), ํถ ํ = 0.713(ํ โํ)(2) Three difference channels are computed: Luminance.ฮํฟ=|ํ ํกํํก โํ ํํํํ |. Chrominance. ฮํถ= โ๏ธ (ฮํถ ํ ) 2 +(ฮํถ ํ ) 2 (3) whereฮํถ ํ =ํถ ํ,ํกํํก โํถ ํ,ํํํํ andฮํถ ํ =ํถ ํ,ํกํํก โํถ ํ,ํํํํ . Gradient.ฮํบ= |โํ ํกํํก |โ|โํ ํํํํ | , where|โํ|is the luminance gradient magnitude via central differences. Each channel is normalized by a percentile-based scaler: N(ํฅ)= clamp ํฅ ํ 99 (ํฅ) , 0, 1 (4) whereํ 99 (ํฅ)denotes the 99th percentile ofํฅ. The final score fuses the three channels: ํ ํํํ ํ = ํผN(ฮํฟ)+ ํฝN(ฮํถ)+ํพN(ฮํบ) ํ (5) withํผ=0.25,ํฝ=0.35,ํพ=0.40,ํ=0.75. The orderingํผ< ํฝ< ํพ prioritizes structural and color discrepancies over brightness, and the sub-linear exponent smooths noise while preserving salient error peaks. 3.2 Pseudo-color Visualization The continuous score mapํ ํํํ ํ โ [0,1]is converted to a pseudo- color heat map using a six-anchor colormap with piecewise linear interpolation: Score Color 0.00Black (no difference) 0.20Blue 0.40Cyan 0.65Yellow 0.82Orange-red 1.00Red (maximum difference) This colormap is designed so that regions with no discrepancy appear dark (non-distracting), while areas requiring correction are highlighted in warm colors (yellow to red), providing an intuitive visual signal for the model. Figure 5 shows representative triplet visualizations. Figure 5: Diff-Map triplet examples. Each row shows the target image (left), the rendered prediction (middle), and the pseudo-color Diff-Map (right). Warm regions (yellow to red) indicate areas with large structural or color discrepancies that guide the ReAct correction. 3.3 Diff-Map Design Ablation We isolate the contribution of the multi-channel residual represen- tation on the 7B model in Table 4. A single residual map retains part of the benefit of visual feedback, whereas the full YCbCr-plus- gradient Diff-Map achieves the strongest results across all reported metrics. VariantDINOโ SSIMโ LPIPSโ MSEโ Full multi-channel Diff-Map 0.9207 0.7114 0.1891 0.0603 Single residual map0.91030.70260.19180.0644 Plain rendering feedback0.90220.69210.20380.0662 Table 4: Diff-Map design ablation on the 7B model. 3.4 Fusion Sensitivity Table 5 tests local changes to the Diff-Map fusion rule. These runs use the 3B model at RL step 100 and are intended to assess robust- ness of the default design rather than to perform an exhaustive hyperparameter search. RefineSVG: Visual Feedback-Driven Reinforcement Learning for Image-to-SVG GenerationMM โ26, November 10โ14, 2026, Rio de Janeiro, Brazil HyperparameterStage 1 Stage 2 Stage 3 Training frameworkLLaMA-FactoryveRL OptimizerAdamW PrecisionBF16 LR schedulerCosine Warmup ratio0.01โ Learning rate1ร10 โ5 1ร10 โ6 1ร10 โ6 Epochs325 Per-device batch size11โ Grad. accum. steps1616โ Effective batch size512512128 Max context length16,38424,57619,024 GRPO rollouts (ํบ )โ8 Clipping ratio (ํ )โ0.2 Sampling temperatureโ1.0 Top-ํโ0.95 KL penaltyโdisabled Table 6: Complete training hyperparameters for all three stages. Stage3B7B Stage 1: SFT (total) โผ41 h โผ47 h Stage 3: RL (per step) โผ180 s โผ230 s Table 7: Wall-clock training time on 32 NVIDIA H20 GPUs. Variantํผ/ํฝ/ํพํ DINOโ Base0.25/0.35/0.400.75 0.8542 Equal weights1/3/1/3/1/30.750.8531 No nonlinearity0.25/0.35/0.401.000.8523 Table 5: Sensitivity to Diff-Map fusion weights and nonlin- earity (3B, RL step 100). 4 Training Configurations and Prompt Templates 4.1 Training Hyperparameters All three stages are trained on 32 NVIDIA H20 GPUs (4 nodesร 8 GPUs) using DeepSpeed ZeRO-2 with FlashAttention-2 and gra- dient checkpointing enabled. The vision encoder and multimodal projector remain frozen throughout; only the language model pa- rameters are updated. Table 6 reports the complete hyperparameter settings for each stage. 4.2 Training Cost Table 7 summarizes the wall-clock training cost on 32รH20 GPUs. 4.3 Prompt Templates The generation prompt (ํ ํํํํก ) and the ReAct correction prompt (ํ ํํํํํก ) are shown in Figures 6 and 7, respectively. The same genera- tion prompt is also used for zero-shot evaluation of general-purpose VLM baselines (GPT-5.2, Gemini-3.1-Pro, Qwen3-VL-235B). Figure 6: Open-loop generation prompt (ํ ํํํํก ). This prompt is used for Stage 1 SVG generation and also serves as the zero- shot inference prompt for all general-purpose VLM baselines. Figure 7: ReAct correction prompt (ํ ํํํํํก ). The prompt ex- plains the triplet layout, the Diff-Map color encoding, and instructs the model to preserve correct regions while correct- ing discrepancies indicated by the visual feedback. 5 Extended Evaluation Results 5.1 Per-Run Variance Table 8 reports the mean and standard deviation across three inde- pendent runs for all non-API models evaluated on SVG-Stack-1K. General-purpose VLMs (GPT-5.2, Gemini-3.1-Pro, Qwen3-VL-235B) are evaluated via deterministic API calls and therefore have no per- run variance. All RefineSVG models are evaluated with a sampling temperature of 0.6. 5.2 Out-of-Distribution Evaluation Table 9 reports quantitative results on three out-of-distribution benchmarks that are absent from the training data. RefineSVG-7B outperforms all SVG-specialized baselines (StarVector, OmniSVG, InternSVG) across all three benchmarks on every metric, consistent with the in-distribution results in the main paper. Against closed- source VLMs, RefineSVG-7B achieves the best or near-best pixel- level fidelity (LPIPS, MSE) on all benchmarks while trailing Gemini- 3.1-Pro or GPT-5.2 on semantic similarity metrics (DINO, CLIP- I2I) in some cases, mirroring the pattern observed on SVG-Stack- 1K where semantic similarity metrics slightly favor larger closed- source models. These results confirm that the closed-loop correction mechanism generalizes beyond the training distribution without overfitting to SVG-Stack-specific patterns. M โ26, November 10โ14, 2026, Rio de Janeiro, BrazilLiu et al. MethodDINOโ PSNRโ CLIP-I2Iโ SSIMโLPIPSโMSEโ StarVector-8B0.7820 ยฑ.006 9.89 ยฑ.35 0.8830 ยฑ.003 0.4296 ยฑ.016 0.3329 ยฑ.009 0.4049 ยฑ.017 OmniSVG-8B0.8212 ยฑ.006 11.72 ยฑ.53 0.8838 ยฑ.002 0.6072 ยฑ.026 0.2784 ยฑ.010 0.2273 ยฑ.027 InternSVG-8B0.8647 ยฑ.002 13.70 ยฑ.17 0.9098 ยฑ.001 0.6397 ยฑ.008 0.2390 ยฑ.002 0.1980 ยฑ.009 Qwen2.5-VL-3B-Instruct0.6936 ยฑ.002 4.91 ยฑ.04 0.8365 ยฑ.001 0.3170 ยฑ.002 0.4998 ยฑ.001 0.4540 ยฑ.002 +SVG-SFT (3B)0.7423 ยฑ.004 8.27 ยฑ.13 0.8648 ยฑ.002 0.3509 ยฑ.007 0.3911 ยฑ.003 0.4599 ยฑ.009 +RefineSVG (3B)0.8872 ยฑ.001 14.61 ยฑ.06 0.9172 ยฑ.002 0.6638 ยฑ.001 0.2399 ยฑ.001 0.0732 ยฑ.000 Qwen2.5-VL-7B-Instruct0.7315 ยฑ.001 6.64 ยฑ.04 0.8458 ยฑ.001 0.3862 ยฑ.005 0.4718 ยฑ.001 0.3477 ยฑ.004 +SVG-SFT (7B)0.7725 ยฑ.001 10.14 ยฑ.14 0.8794 ยฑ.001 0.4097 ยฑ.004 0.3496 ยฑ.002 0.4121 ยฑ.003 +RefineSVG (7B)0.9207 ยฑ.001 15.86 ยฑ.06 0.9306 ยฑ.001 0.7114 ยฑ.001 0.1891 ยฑ.002 0.0603 ยฑ.001 Table 8: Meanยฑstandard deviation across 3 independent runs on SVG-Stack-1K. Subscripts denote one standard deviation. API-based models (GPT-5.2, Gemini-3.1-Pro, Qwen3-VL-235B) are omitted as they use deterministic decoding. SVG-EmojiMMSVGBenchMMSVG-Illustration MethodDINO PSNR CLIP SSIM LPIPS MSEDINO PSNR CLIP SSIM LPIPS MSEDINO PSNR CLIP SSIM LPIPS MSE Optimization-based Diff VG0.854335.790.96800.98130.09550.00040.884135.990.97460.98260.11090.00030.859136.010.96890.98040.09890.0004 LIVE0.951635.100.97730.98450.06690.00030.940235.190.97470.98540.07340.00030.937235.290.97410.97990.07170.0003 General-purpose VLMs Qwen3-VL-235B0.67523.940.83280.15600.54400.54950.70654.770.86470.24560.46310.55940.65603.570.82870.12360.55250.6415 GPT-5.20.87626.270.92250.31740.44890.39030.86755.430.93610.43020.56080.34200.902512.09 0.93910.59320.35030.0891 Gemini-3.1-Pro 0.886911.68 0.93050.61380.31990.10630.91128.86 0.95180.48750.28430.32530.9041 14.430.9418 0.66380.27030.0809 SVG-specialized models StarVector0.76489.280.87390.43210.39260.31030.75248.270.88690.39540.35410.44420.73087.740.86240.33490.42870.4542 OmniSVG0.74819.260.85290.53620.41000.21530.833913.840.90520.71300.23590.13800.801711.630.88360.60930.32210.1892 InternSVG0.843312.350.88950.62230.33740.12560.893215.120.93760.76410.18720.07610.829412.680.89920.58640.31000.2008 RefineSVG (Ours) RefineSVG-7B0.8755 13.530.9105 0.6868 0.2706 0.05430.8927 15.940.9399 0.7858 0.1749 0.03200.867613.500.90550.6308 0.2879 0.0685 Table 9: Quantitative evaluation on three out-of-distribution benchmarks. Best results among MLLM-based methods are in bold. Optimization-based methods are listed for reference. 5.3 Reward and Optimization Sensitivity All sensitivity studies in this subsection use the 3B model at RL step 100. They examine whether the main trend persists under local changes to reward design and optimization settings, rather than selecting a globally optimal configuration. Tables 10 and 11 vary the reward weights and code-efficiency decay, while Table 12 varies the reward threshold and MSE scale. Variantํค struct /ํค sem /ํค eff DINOโ #Tokโ Base0.30/0.50/0.200.8542364 Uniform0.33/0.33/0.330.8443344 Structural-heavy0.50/0.30/0.200.8406357 Semantic-heavy0.20/0.60/0.200.8565367 Low efficiency weight0.35/0.55/0.100.8553373 High efficiency weight0.25/0.45/0.300.8521347 Table 10: Reward-weight sensitivity (3B, RL step 100). Efficiency decay DINOโ #Tokโ Cosine0.8542364 Linear0.8521351 Step-1.50.8510339 Step-2.00.8528346 No ํ eff 0.8498394 Table 11: Sensitivity to the code-efficiency reward shape (3B, RL step 100). RefineSVG: Visual Feedback-Driven Reinforcement Learning for Image-to-SVG GenerationMM โ26, November 10โ14, 2026, Rio de Janeiro, Brazil ParameterValueDINOโ MSEโ DINO threshold ํ0.20.85340.0766 DINO threshold ํ0.3 (base) 0.85420.0769 DINO threshold ํ0.40.8539 0.0761 DINO threshold ํ0.50.85170.0770 MSE scale ํ 1.50.85430.0783 MSE scale ํ 3.0 (base)0.8542 0.0769 MSE scale ํ 5.00.85370.0796 Table 12: Sensitivity to reward threshold and MSE scale (3B, RL step 100). KL regularization. Figure 8 shows that no or small KL regular- ization remains stable in this setting, whereas larger KL values destabilize training and restrict correction exploration. 050100150200250 0.3 0.4 0.5 0.6 0.7 0.8 0.9 Reward no KL (3B) KL=0.001 KL=0.01 KL=0.05 Figure 8: KL-regularization sensitivity during 3B RL training. Larger KL values destabilize the training trajectory. 5.4 Reward Function Ablation Figure 9 ablates the code efficiency rewardํ ํํ ํ by comparing the full reward function against a variant that removesํ ํํ ํ while keep- ingํ ํ ํกํํขํํก andํ ํ ํํ unchanged. Without the efficiency reward, the generated response length grows unconstrained during RL training, exceeding 6,000 tokens in early exploration and stabilizing around 1,500 tokens. Withํ ํํ ํ enabled, the model converges to approxi- mately 800 tokens, a 49% reduction compared to the ablated variant (zoom-in panel). This confirms that the efficiency reward serves as an effective regularizer against code bloat without degrading visual quality, as demonstrated by the comparable or superior fidelity metrics reported in the main paper ablation (Table 2). 5.5 Multi-turn Training Behavior Figure 10 evaluates a multi-turn setting without cold-start repair data. Training collapses early, indicating that repeatedly applying correction steps alone is insufficient for stable multi-turn refine- ment; dedicated multi-turn data and curricula remain necessary. 050100150200250300 Training Step 0 2000 4000 6000 8000 w/o Efficiency Reward w/ Efficiency Reward (Ours) Response Length 150200250300 800 1000 1200 1400 1600 Zoom-in 49% Figure 9: Effect of the code efficiency rewardํ ํํ ํ on gener- ated response length during Stage 3 RL training (3B model). Removingํ ํํ ํ leads to unconstrained token growth; with ํ ํํ ํ , the model converges to 49% shorter sequences. 050100150200250 0.3 0.4 0.5 0.6 0.7 0.8 0.9 Reward Origin (3B) w/o cold-start & multi-turn Figure 10: Multi-turn training behavior without cold-start repair data. The training process collapses early.