Paper deep dive
Reinforcement Learning from Intermediate Renders for Image-to-Code Generation
Omri Kaduri, Kate Feingold, Phillip Isola, Tali Dekel
Intelligence
Status: not_run | Model: - | Prompt: - | Confidence: 0%
Entities (0)
Relation Signals (0)
No relation signals yet.
Cypher Suggestions (0)
No Cypher suggestions yet.
Abstract
Abstract:Reinforcement learning is increasingly used to post-train vision-language models for image-to-code generation, such as generating SVG code from a reference image, by optimizing rewards computed from the final rendered output. However, relying on a single terminal reward provides sparse feedback that is poorly aligned with the contribution of individual tokens. A generated program may contain operations that accurately reproduce some parts of the target image alongside others that introduce errors, yet all tokens are trained from the same final outcome. We observe that many intermediate code prefixes are not only executable, but already produce meaningful partial renders that reflect progress toward the target. This property provides a natural source of denser supervision during generation. Based on this observation, we introduce IR4RL, an RL framework with a token-level render-progress reward that turns changes between intermediate renders into localized feedback for the generated sequence. We evaluate our approach on Image-to-SVG and Image-to-TikZ generation. Across both tasks, our method improves over supervised fine-tuning and standard GRPO, yielding new state-of-the-art open-source models. This shows that intermediate rendering provides a simple and effective source of process supervision for RL post-training of image-to-code models.
Tags
Links
- Source: https://arxiv.org/abs/2609.34587v1
- Canonical: https://arxiv.org/abs/2609.34587v1
Trouble viewing inline? Open PDF directly ā
Full Text
61,480 characters extracted from source content.
Expand or collapse full text
REINFORCEMENT LEARNING FROM INTERMEDIATE RENDERS FOR IMAGE-TO-CODE GENERATION Omri Kaduri 1ā Kate Feingold 1ā Phillip Isola 2 Tali Dekel 1 1 Weizmann Institute of Science 2 MIT Project page: https://ir4rl.github.io Figure 1: We introduce a method that leverages Intermediate Renders for Reinforcement Learning (IR4RL) post-training of image-to-code VLMs as a supervision signal, allowing us to improve over outcome-only RL and achieve state-of-the-art results in Image-to-SVG and Image-to-TikZ tasks. ABSTRACT Reinforcement learning is increasingly used to post-train vision-language mod- els for image-to-code generation, such as generating SVG code from a reference image, by optimizing rewards computed from the final rendered output. How- ever, relying on a single terminal reward provides sparse feedback that is poorly aligned with the contribution of individual tokens. A generated program may con- tain operations that accurately reproduce some parts of the target image alongside others that introduce errors, yet all tokens are trained from the same final out- come. We observe that many intermediate code prefixes are not only executable, but already produce meaningful partial renders that reflect progress toward the target. This property provides a natural source of denser supervision during gen- eration. Based on this observation, we introduce IR4RL, an RL framework with a token-level render-progress reward that turns changes between intermediate ren- ders into localized feedback for the generated sequence. We evaluate our approach on Image-to-SVG and Image-to-TikZ generation. Across both tasks, our method improves over supervised fine-tuning and standard GRPO, yielding new state-of- the-art open-source models. This shows that intermediate rendering provides a simple and effective source of process supervision for RL post-training of image- to-code models. ā Equal contribution, order determined at random. 1 arXiv:2609.34587v1 [cs.CV] 28 Sep 2026 1INTRODUCTION Recent generative image models synthesize illustrations, icons, and slides directly in pixel space with striking visual quality (Rombach et al., 2022; Esser et al., 2024). Yet raster outputs do not ex- pose their underlying elements for structured editing and cannot be scaled arbitrarily without loss of quality. Many downstream applications therefore require the underlying code. Image-to-code gener- ation produces a program whose rendering reproduces the image while making it editable, scalable, and compatible with existing graphics and design pipelines. Recent vision-language models (VLMs) have made substantial progress on this task, spanning a growing range of representations, including vector graphics (Yang et al., 2025), scientific figures (Belouadi et al., 2024; Zhao et al., 2025), vector animations (Yang et al., 2026a; Chen et al., 2026), and parametric CAD (Chen et al., 2025a). These models are typically first trained with supervised fine-tuning (SFT) on paired image and code data. SFT learns from reference programs, without observing how an error in the code translates into a visual error in the rendered image. Rendering-based reinforcement learning has therefore emerged as a natural post-training step, grounding generated code in its visual outcome (Rodriguez et al., 2025b; Zhao et al., 2025). However, a program may contain both helpful and harmful decisions, yet a single final reward cannot distinguish their individual contributions. Our key observation is that image-to-code generation exposes meaningful visual feedback during generation. Intermediate prefixes can be rendered as partial programs, revealing how the recon- struction evolves toward the target, as shown in Fig. 1. Based on this insight, we introduce IR4RL (Intermediate Renders for Reinforcement Learning), a framework with a render-progress reward that uses the change in visual similarity between consecutive renders as a local signal of the contri- bution of newly generated code. We propagate this reward backward to the tokens that produced it and combine the resulting token-level reward with the outcome reward from the final render. Our approach applies naturally to image-to-code representations where intermediate program states can be rendered and evaluated, and where generated elements persist as the program evolves. Under these conditions, changes between successive renders directly reflect the visual contribution of newly generated code. We study two such settings, Image-to-SVG and Image-to-TikZ generation, which differ in representation syntax and rendering pipeline but satisfy both properties. Across both tasks, our method consistently improves over supervised fine-tuning and outcome-only RL with GRPO (Shao et al., 2024), establishing new state-of-the-art results among open-source models while producing substantially shorter programs. Our analysis shows that the render-progress reward accounts for most of the improvement, with the combination of process and outcome feed- back performing best. We further find that finer-grained intermediate feedback improves perfor- mance and that our method shifts probability toward high-quality generations, making them easier to obtain with limited test-time scaling. These results highlight intermediate renderings as an effec- tive source of process-level supervision for image-to-code post-training. In summary, our contributions are: ⢠Render-progress reward. We identify intermediate renderings as a source of process- level supervision for image-to-code generation, and introduce a reward that turns changes between consecutive renders into render-progress rewards. ⢠Efficient RL method for image-to-code post-training. Building on the render-progress reward, we propose an RL method IR4RL and demonstrate that it outperforms standard outcome-based supervision, successfully generalizing across two image-to-code tasks. We study its behavior across design choices, including combining with outcome reward and supervision granularity. ⢠Strong results on Image-to-SVG and Image-to-TikZ. Extensive evaluations demonstrate consistent gains on Image-to-SVG and Image-to-TikZ tasks over available baselines, estab- lishing new state-of-the-art results among open-source models while producing substan- tially shorter programs. The model weights for both tasks will be open-sourced upon publication. 2 2RELATED WORK Image-to-code tasks. Image-to-code generation converts an image into a program whose rendering reproduces the input, spanning vector graphics, scientific figures, webpages, and CAD (Yang et al., 2025; Belouadi et al., 2024; Yun et al., 2024; Chen et al., 2025b; Zhao et al., 2026). Image-to-SVG supports scalable and editable graphics. Optimization-based methods such as DiffVG (Li et al., 2020) and LIVE (Ma et al., 2022) directly optimize rendered similarity and achieve strong recon- struction, but require slow per-image optimization and can produce complex geometry that limits editability. VLM-based approaches such as StarVector (Rodriguez et al., 2025a), OmniSVG (Yang et al., 2025), and InternSVG (Wang et al., 2026b) instead learn to generate SVG programs from large-scale image-code pairs. Image-to-TikZ methods similarly generate executable programs for diagrams and scientific figures (Belouadi et al., 2024; Saito et al., 2025; Zhao et al., 2025), along- side related chart- and document-to-code tasks (Tan et al., 2025; Ling et al., 2025). These learned models are trained on reference code with SFT, without visual grounding in the rendered output. Learning from rendering feedback. Rendering provides a natural way to supervise image-to-code models beyond matching reference programs. Recent approaches therefore post-train models using rewards computed from generated renderings, including Image-to-SVG (Rodriguez et al., 2025b; Wang et al., 2026a) and Image-to-TikZ (Zhao et al., 2025; Zeng et al., 2026). However, these rewards are aggregated at the sequence level, even when augmented with signals for format, code efficiency, language alignment, structural consistency, or compilation success (Wang et al., 2026a; Zhao et al., 2025; Zeng et al., 2026), collapsing informative visual progress into a single outcome- level signal. Intermediate renders have been exploited during inference. Iterative methods render partial or completed programs and feed the visual state back to the model for refinement (Liang et al., 2026; Deng et al., 2026; Yang et al., 2026b), while search-based approaches use MCTS for Image-to-TikZ (Belouadi et al., 2024) or ERM for vision-to-code (Liu et al., 2026). In contrast, we use intermediate renders during training to identify which parts of a generation improve or degrade the reconstruction, while leaving inference unchanged. Fine-grained credit assignment. Fine-grained credit assignment has been extensively studied in mathematical reasoning, where outcome reward models score solutions while process reward models provide feedback at intermediate reasoning steps (Cobbe et al., 2021; Uesato et al., 2022). Such supervision has been obtained from human step-level labels (Lightman et al., 2024), automatic step- wise supervision (Wang et al., 2024), and learned estimates of the process (Setlur et al., 2025). In theorem proving, Lean has similarly been used directly as a process oracle, converting tactic-level verification into fine-grained RL feedback without a learned reward model (Kim & Yun, 2026). Related ideas also appear beyond mathematical reasoning: code-generation methods use compiler and execution feedback for finer-grained optimization (Dou et al., 2024; Ye et al., 2025), while RLHF-V uses segment-level human corrections for dense multimodal alignment (Yu et al., 2024). A central challenge is obtaining reliable intermediate supervision, which may require human anno- tations, learned or sampling-based verifiers, or domain-specific execution signals. Our key obser- vation is that image-to-code generation exposes directly evaluable intermediate states: many partial programs can already be rendered and compared with the target. We exploit this property to mea- sure changes in visual alignment between successive renders, obtaining localized process rewards without human annotations or a learned verifier. 3PRELIMINARY Given a reference image x, a vision-language model Ļ Īø generates a graphics program y whose rendering aims to reconstruct the input. Supervised fine-tuning trains the model to match a reference code y ā , potentially penalizing visually accurate programs that differ from it. In contrast, rendering- based reinforcement learning (Zhao et al., 2025; Rodriguez et al., 2025b) does not use ground truth code and rewards visual similarity S between the target and the programās renderingR(y) with an outcome reward R(y,x) = S R(y),x . Group Relative Policy Optimization. For each image prompt x, GRPO (Shao et al., 2024) sam- ples a group of G programs y i G i=1 from the current policy Ļ Īø and scores them with outcome rewards R i = R(y i ,x). The group-relative outcome advantage is: A Outcome i = R i ā μ R Ļ R + ε ,(1) 3 Figure 2:Process Reward from Intermediate Renders. Rollouts 1 and 2 reach similar final quality through different generation trajectories while Rollout 3 makes early progress that later op- erations reverse. Outcome-only advantage rewards all tokens within a rollout equally without dis- tinguishing helpful from harmful decisions. Our method complements it with localized feedback leveraging changes in visual score between consecutive renders (the arrows ā j ). where μ R and Ļ R are the group mean and standard deviation, and ε > 0 ensures numerical stability. With on-policy updates, PPO-style clipping is not used, and the policy is trained with L(Īø) =āE " 1 G G X i=1 1 T i T i X t=1 A Outcome i logĻ Īø y i,t | x,y i,<t # + βL KL (Īø),(2) where T i is the length of y i , y i,t is its t-th token, andL KL is a regularizer toward a reference policy. 4METHOD The outcome reward evaluates only the final program and therefore cannot localize which decisions helped or hurt the reconstruction. Intermediate renders provide this missing information by revealing how visual quality changes during generation (Fig. 2). Our method uses these intermediate changes as process supervision, while retaining outcome super- vision on the completed program. We first define a render-progress reward from changes in visual score between successive executable prefixes (Sec. 4.1). We then propagate these rewards through the generated tokens (Sec. 4.2) and combine the resulting process signal with the group-relative outcome advantage (Sec. 4.3). 4.1RENDER-PROGRESS REWARD Let y = (y 1 ,...,y T ) be a generated program and let 0 = b 0 < b 1 < Ā· < b M = T be the token positions at which a drawing command is completed, with b M = T marking the end of the program. We place a boundary after every completed command, so M is as large as the representation allows. Finer boundaries give more localized feedback. The tokens y b j :b j+1 form the j-th segment. A prefix y b 0 :b j is generally not a well-formed program, since enclosing structures are still open, so we apply a closure operatorC that appends the missing closing syntax (e.g., </svg>) to obtain the executable prefix P j =C(y 1:b j ). Its visual score is F j = S R(P j ),x .(3) F 0 is the score of an empty canvas and F M = R(y,x) corresponds to a complete generation. We want newly generated code to receive feedback that captures its marginal impact on the recon- struction. The absolute score F j does not isolate this contribution, since it conflates the progress established by earlier segments. Thus, we define the render-progress reward as a delta score ā j = F j ā F jā1 ,(4) such that ā j > 0 rewards a segment that improves alignment with the target, whereas ā j < 0 penalizes one that degrades it (green and red arrows in Fig. 2). We analyze the effect of rendering granularity in Fig. 6c. 4 4.2PROPAGATING RENDER-PROGRESS REWARDS The delta reward ā j is defined per segment, whereas the policy is updated at every token. Tokens within a segment therefore receive no direct reward, even though they affect the render at the next boundary. We address this by propagating future render-progress rewards backward through the sequence with exponentially decaying weights. For token t, letF (t) = j | b j ā„ t denote the future render events, and let d(t,j) = b j ā t be the token distance from t to event j. We aggregate the corresponding render-progress rewards as A Process t = X jāF(t) Ī» d(t,j) ā j , Ī»ā [0, 1].(5) The parameter Ī» controls how far each render-progress reward propagates backward. This lets later improvements partially compensate for temporary degradations, while preserving stronger influence from nearby renders. At Ī» = 0, each reward is assigned only at its render boundary, while larger values extend its influence to earlier tokens, in the spirit of GAE (Schulman et al., 2015). We analyze the effect of Ī» in Fig. 6b. 4.3COMBINING PROCESS AND OUTCOME REWARDS Outcome and process supervision operate at complementary levels. While A Process i,t rewards each segmentās marginal contribution, final quality is reflected only by A Outcome i . A sum of good steps does not guarantee a good final result: a rollout can accumulate exclusively positive deltas and still end far from the target, e.g. by stopping before it is reached. We therefore combine both signals: A i,t = A Outcome i + αA Process i,t ,(6) where α controls the contribution of the aggregated render-progress reward. We substitute A i,t for A Outcome i in Eq. 2, so each token is weighted by both final outcome and its visual progress during generation. As shown in Fig. 6a, the process term alone accounts for most of the improvement over outcome-only, while combining both signals performs best. 5APPLICATIONS Our method is designed for image-to-code settings where partial programs can be executed, ren- dered, and compared with the target, and where newly generated drawing elements persist as gen- eration continues. These properties make changes between consecutive renders informative of the visual contribution of newly generated code. We evaluate our method on two such image-to-code tasks: Image-to-SVG (Sec. 5.1) and Image- to-TikZ (Sec. 5.2) generation. Across both tasks, we show that intermediate-render supervision consistently improves over supervised fine-tuning and outcome-based reinforcement learning. Fur- thermore, we provide an extensive empirical analysis (Sec. 5.3) of the proposed objective, studying the contribution of process and outcome rewards, the granularity of intermediate renderings, and the propagation of render-progress reward through the generated sequence. 5.1IMAGE-TO-SVG Setup. We use OmniSVG-4B (Yang et al., 2025) as our SFT base model. SVG represents vector graphics as sequences of drawing commands and their parameters (e.g. C, L), making intermediate stages after each segment renderable. We train on svg-stack (Rodriguez et al., 2025a) trainset using the scale-invariant L2 reward of Rodriguez et al. (2025b) as a visual score F (Eq. 3). We evaluate on MMSVGBench (Yang et al., 2025) using reconstruction metrics (Wang et al., 2004; Zhang et al., 2018; Oquab et al., 2024; Radford et al., 2021), aesthetic quality (Wu et al., 2023), and token length. We compare against optimization-based methods DiffVG (Li et al., 2020) and LIVE (Ma et al., 2022). We also evaluate general-purpose models, including Qwen3-VL-235B (Bai et al., 2025), Gemini 3 Flash (Google DeepMind, 2025), Sonnet 5 (Anthropic, 2026), and GPT-5.2 (OpenAI, 2025), and task-specific models, including StarVector (Rodriguez et al., 2025a), InternSVG (Wang et al., 2026b), and OmniSVG in 4B and 8B sizes. Existing outcome-reward (GRPO) baselines 5 Figure 3: Qualitative evaluation of Image-to-SVG. We compare LIVE, Gemini-3-Flash, task- specific SVG models, and post-training baselines. Our method better preserves structure, color, geometry, and fine details, while competing methods more often omit or distort visual elements. Figure 4: Qualitative evaluation of Image-to-TikZ. We compare our method with general-purpose VLMs, task-specific TikZ models, and post-training baselines. Our method better preserves struc- ture, geometry, and annotations, with fewer omitted or distorted elements. (Rodriguez et al., 2025b; Wang et al., 2026a) are not open-source. Hence, to isolate the effect of our reward, we also compare post-training methods initialized from the same base model. The outcome-only RL baseline uses only the final rendering reward, with GRPO as described in Sec. 3. RAFT (Dong et al., 2023) iteratively fine-tunes the model on its highest-scoring samples with a rejection-sampling SFT. See App. A for more details on SVG intermediate renderings, training and evaluation parameters. Results. Table 1 reports results on both MMSVGBench splits. Our method consistently improves the OmniSVG-4B base model across metrics and outperforms both outcome-only RL and RAFT. It also surpasses existing task-specific SVG models, despite having only 4B parameters, and compares favorably with substantially larger general-purpose VLMs. In addition to improving reconstruction quality, our model produces considerably shorter SVG programs than the base model. Figure 3 shows representative qualitative comparisons. Our model more faithfully reconstructs the target structure, geometry, and colors, while supervised and outcome-only baselines more frequently 6 MMSVGBench-IllustrationsMMSVGBench-Icons DINOā LPIPSā MSEā SSIMā CLIPā Aestheticā TokensāDINOā LPIPSā MSEā SSIMā CLIPā Aestheticā Tokensā Optimization-based DiffVG92.039.230.3594.1093.524.8579.6k90.979.240.4493.7695.294.8979.5k LIVE94.5510.020.7295.4893.684.998.4k94.249.180.8695.1995.604.918.4k General-purpose (M)LLMs Qwen3-VL-235B92.8128.325.3087.8989.824.825.0k92.2329.907.7884.7791.614.775.9k Gemini 3 Flash96.6618.632.9690.6395.805.092.6k96.9220.144.3988.5897.474.973.5k Sonnet 595.9525.704.4088.6494.695.020.7k96.5826.016.0986.6197.104.940.5k GPT-5.294.7128.975.3087.4192.905.021.7k94.9629.837.8284.3194.874.961.5k SVG VLMs StarVector-8B85.2225.045.1889.4183.454.642.5k88.6625.086.9886.6689.014.712.2k InternSVG-8B91.3119.183.4591.0988.884.773.7k92.4217.574.4689.6892.924.822.3k OmniSVG-8B88.8121.154.9888.8585.574.689.1k92.0418.094.9289.2891.894.796.0k OmniSVG-4B (SFT)85.4822.265.1189.7082.034.5511.3k89.2119.825.8087.9688.424.658.4k OmniSVG-4B + RAFT92.2017.564.6089.3289.344.814.8k 96.5512.212.5791.5596.054.933.3k OmniSVG-4B + Outcome 92.8516.895.0888.9790.524.885.7k95.6813.044.1290.2095.574.903.6k OmniSVG-4B + Process95.8912.282.2792.6893.574.993.5k97.3511.272.2092.1197.034.952.8k OmniSVG-4B + Ours97.489.791.1794.2296.055.092.5k98.268.671.2393.8898.014.982.1k Table 1: Quantitative evaluation on MMSVGBench. We compare optimization-based methods, general-purpose VLMs, SVG models, and post-training baselines on the Illustrations and Icons splits. Our method surpasses baselines, substantially improves the SFT base model, and performs best when process and outcome supervision are combined. Bold and underline denote the best and second-best results among learned methods, excluding optimization-based methods. Gemini 3 Flash InternSVG-8B OmniSVG-4B (SFT) OmniSVG-4B + RAFT OmniSVG-4B + Outcome RL Usersā60.6%76.3%92.7%74.9%74.0% VLMā54.0%74.0%94.0%78.0%76.0% Table 2: User Study and VLM evaluation. 2AFC win rate (%) of our method vs. each baseline demonstrates our method is preferred by humans and a VLM (VLM-human agreement: 88%). Figure 5: Qualitative reward composition ablation. Process-only training recovers much of the gain over outcome-only, while combining both rewards yields the most faithful reconstructions. omit or distort visual elements. We complement these metrics with human preferences and VLM- as-a-judge evaluation. As shown in Table 2, both consistently prefer our method over external and post-training baselines. 5.2IMAGE-TO-TIKZ Setup. For Image-to-TikZ generation, we use DeTikZify-v2 (Belouadi et al., 2025) as the super- vised base model. TikZ programs similarly construct figures through sequences of drawing com- mands, allowing intermediate states to be rendered and evaluated. We train on DaTikZ-v3 (Belouadi et al., 2025) training set and use the DeTikZify (Belouadi et al., 2024) SelfSim reward as a visual score F (Eq. 3), following its reported correlation with human judgment of scientific diagrams. We evaluate on the DaTikZ-v3 test set using visual reconstruction metrics (Zhai et al., 2023; Fu et al., 2023), token length, and reference-based code metrics (Stanchev et al., 2019; Eghbali & Pradel, 2022), comparing to general-purpose models, task-specific models, including VinciCoder (Zhao et al., 2025) and DeTikZify-v2.5. Notably, we surpass VinciCoder-8B and DeTikZify-v2.5, which both represent open-source GRPO baselines. As in the Image-to-SVG application, we additionally 7 DreamSimā SigLIPā CLIPā LPIPSā KIDā C-BLEUā TEDā Tokensā General-purpose (M)LLMs Qwen3-VL-235B80.391.589.040.40.743.454.13.9k Gemini 3 Flash91.096.194.327.2-0.056.651.72.4k Sonnet 585.494.092.235.90.063.752.80.7k GPT-5.284.993.891.435.70.414.454.01.5k TikZ VLMs VinciCoder-8B82.692.590.638.30.777.455.11.1k DeTikZify-v2.583.692.291.0 34.80.724.652.90.8k DeTikZify-v2 (SFT)80.390.088.938.30.727.055.71.3k DeTikZify-v2 + RAFT81.590.989.836.90.448.954.61.3k DeTikZify-v2 + Outcome83.992.190.934.30.457.453.31.0k DeTikZify-v2 + Ours86.994.092.832.80.203.153.90.6k Table 3: Quantitative evaluation on DaTikZ-v3. Our method improves DeTikZify-v2 and post- training baselines across the visual reconstruction metrics while producing substantially shorter pro- grams. Bold and underlinemark best and second-best results among task-specific TikZ models. compare against RAFT and outcome-only RL initialized from the same SFT model. See App. B for more details on TikZ intermediate rendering, training and evaluation parameters. Results. Table 3 shows that the gains from intermediate-render supervision also extend to Image- to-TikZ generation. Our method improves over the DeTikZify-v2 SFT base model and over outcome-only RL across all metrics, while once again producing shorter TikZ programs. We note a small decline in code-similarity metrics, expected since unlike SFT and RAFT, RL post-training does not enforce a code-matching objective. Figure 4 shows representative qualitative comparisons and reflects the same trend. Our method more faithfully reconstructs the visual structure and content of the target figures, while the supervised model and outcome-based GRPO more frequently omit or distort visual elements. Across both SVG and TikZ, our method outperforms SFT and outcome-only RL, demonstrating the effectiveness of intermediate-render supervision across distinct image-to-code representations. 5.3ANALYSIS Having established gains on both SVG and TikZ, we use Image-to-SVG to further analyze the pro- posed supervision. We study the contributions of process and outcome rewards, the impact of reward propagation, intermediate rendering frequency, and test-time sampling performance. Process and Outcome Rewards. We first ablate the two components of our objective (Eq. 6). As shown in Tab. 1, process reward alone substantially outperforms outcome-only and recovers most of the gain of the full method, while combining both performs best across all metrics. Fig. 5 shows the same qualitative trend. We report the corresponding TikZ ablation in Tab. B.1. We further vary the weight of the process reward α (Eq. 6). As shown in Fig. 6a, increasing its contribution improves peak test reward around α = 10. Larger values provide no further gain. Reward Propagation. We vary Ī», which controls how far each render-progress reward propagates to preceding tokens (Eq. 5). As shown in Fig. 6b, propagation substantially improves performance, with the best result at Ī» = 0.9. Fully undiscounted propagation (Ī» = 1) performs worse, suggesting that preserving locality in the process signal is beneficial. Render Frequency. Our default formulation renders after every completed drawing command (Sec. 4.1). We vary this frequency by rendering once every N commands while keeping the training procedure fixed. Figure 6c shows that performance consistently decreases as renders become less frequent, with the best result at N = 1. This supports measuring visual progress as frequently as the representation allows. 8 Figure 6:Ablations of process supervision. (a) Increasing the process contribution improves performance up to α = 10. (b) Reward propagation performs best at Ī» = 0.9. (c) More frequent intermediate renders consistently improve performance. Stars mark our default settings. 1248163264128 K (samples per prompt) 0.0 0.2 0.4 0.6 0.8 1.0 Reward MMSVGBench-Illustrations OmniSVG 4B OmniSVG 8B RAFT Outcome-RL Ours 1248163264128 K (samples per prompt) 0.2 0.4 0.6 0.8 1.0 MMSVGBench-Icons OmniSVG 4B OmniSVG 8B RAFT Outcome-RL Ours OmniSVG 8BOmniSVG 4BRAFTOutcome-RLOursgreedy decode Figure 7: Best-of-K sampling. For each image, we sample K candidate SVGs and report the mean reward of the best ones. Horizontal lines show greedy decoding. Our method performs best across both dataset subsets, with the largest gains at small K. Test-time Scaling. We evaluate how sampling of additional K candidates per image improves generation quality. Figure 7 shows that our model consistently achieves the highest best-of-K re- ward, with the largest margin at small K. The narrowing gap at larger K suggests that training primarily increases the probability of high-quality generations of the base model, consistent with prior observations (Yue et al., 2025). In Appendix A.1, we extend this analysis to an additional test set and sampling temperatures and observe the same trend. Interestingly, OmniSVG-8B also approaches the 4B variant at large K, despite it being substantially stronger at K = 1. We therefore examine its effect on our post-training in Appendix A.4. 6CONCLUSIONS We introduced IR4RL, a method for reinforcement learning from intermediate renders for image- to-code generation. By using changes between consecutive renders, our method provides localized reward during generation while retaining the global outcome signal. Across Image-to-SVG and Image-to-TikZ, it consistently improves over supervised fine-tuning and outcome-only RL, yielding state-of-the-art results among open-source models. Our analysis further shows that highly granular render-progress reward accounts for most of the gains. A limitation is that intermediate program prefixes must be convertible into meaningful executable states that can be evaluated against the target. This holds naturally for SVG and TikZ, but not for ar- bitrary image-to-code generation tasks. Intermediate rendering also adds training-time computation but, importantly, maintains inference cost unchanged. As base models continue to advance rapidly through large-scale pretraining, our method could serve as a natural post-training step for image-to- code tasks. Future work could extend this idea to other incrementally rendered representations, such as Lottie animations, HTML interfaces, and 3D scene programs. More broadly, our results high- light intermediate execution as a natural source of process-level supervision for improving credit assignment beyond terminal rewards. 9 AI USE STATEMENT In this work, we used generative AI tools to implement methods, creating and editing software code, drafting parts of the paper, editing for readability, identifying relevant literature, and formatting references. We reviewed all AI-assisted work: code was tested and verified for correctness by the authors, and all AI-drafted or AI-edited text was checked against the underlying results and revised by the authors. We take responsibility for the final content of this work, including text, claims, and artifacts produced with the aid of generative AI. ETHICS STATEMENT This work includes a human evaluation conducted through Prolific, in which participants compared model-generated images against reference images. The study collected preference judgments only and did not involve sensitive personal data. Participants were compensated through the Prolific platform. The remaining experiments use publicly available datasets and models. We also note that image-to-code generation could in principle be used to reproduce copyrighted visual content (e.g., logos, diagrams). We do not target or evaluate this use case, and mitigating such misuse is left to downstream deployment safeguards. REPRODUCIBILITY STATEMENT We build on open-source base models and train/evaluate only on open datasets; code will be released upon publication. Implementation and training details, including hyperparameters and dataset splits, are provided in A and B. ACKNOWLEDGMENTS This research was supported by the Sagol Weizmann-MIT Bridge Program and made possible through a GPU compute resource grant funded by the Association of University Heads, the Council for Higher Education and the AI Research Compute Center. REFERENCES Anthropic.Claudesonnet5systemcard. https://anthropic.com/ claude-sonnet-5-system-card, 6 2026. System card. Accessed 2026-09-22. 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, Qi- uyue 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, Hu- men Zhong, Jingren Zhou, Fan Zhou, Jing Zhou, Yuanzhi Zhu, and Ke Zhu. Qwen3-vl technical report. arXiv preprint arXiv:2511.21631, 2025. Jonas Belouadi, Simone Paolo Ponzetto, and Steffen Eger. DeTikZify: Synthesizing graphics pro- grams for scientific figures and sketches with TikZ. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, 2024. URL https://openreview.net/forum? id=bcVLFQCOjc. Jonas Belouadi, Eddy Ilg, Margret Keuper, Hideki Tanaka, Masao Utiyama, Raj Dabre, Steffen Eger, and Simone Paolo Ponzetto. TikZero: Zero-shot text-guided graphics program synthesis, 2025. URL https://arxiv.org/abs/2503.11509. Cheng Chen, Jiacheng Wei, Tianrun Chen, Chi Zhang, Xiaofeng Yang, Shangzhan Zhang, Bingchen Yang, Chuan-Sheng Foo, Guosheng Lin, Qixing Huang, et al. Cadcrafter: Generating computer- aided design models from unconstrained images. In 2025 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), p. 11073ā11082. IEEE, 2025a. 10 Junhao Chen, Kejun Gao, Yuehan Cui, Mingze Sun, Mingjin Chen, Shaohui Wang, Xiaoxiao Long, Fei Ma, Qi Tian, Hao Zhao, and Ruqi Huang. Lottiegpt: Tokenizing vector animation for au- toregressive generation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), p. 31639ā31651, June 2026. Tianrun Chen, Chunan Yu, Yuanqi Hu, Jing Li, Tao Xu, Runlong Cao, Lanyun Zhu, Ying Zang, Yong Zhang, Zejian Li, and Lingyun Sun. Img2CAD: Conditioned 3D CAD model generation from single image with structured visual geometry. IEEE Transactions on Industrial Informatics, 21(11):8539ā8549, 2025b. Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Jacob Hilton, Reiichiro Nakano, Christopher Hesse, and John Schulman. Training verifiers to solve math word problems, 2021. Jie Deng, Kaichun Yao, and Libo Zhang.VisRefiner: Learning from visual differences for screenshot-to-code generation, 2026. URL https://arxiv.org/abs/2602.05998. Hanze Dong, Wei Xiong, Deepanshu Goyal, Yihan Zhang, Winnie Chow, Rui Pan, Shizhe Diao, Jipeng Zhang, KaShun SHUM, and Tong Zhang. RAFT: Reward ranked finetuning for generative foundation model alignment. Transactions on Machine Learning Research, 2023. ISSN 2835- 8856. URL https://openreview.net/forum?id=m7p5O7zblY. Shihan Dou, Yan Liu, Haoxiang Jia, Enyu Zhou, Limao Xiong, Junjie Shan, Caishuang Huang, Xiao Wang, Xiaoran Fan, Zhiheng Xi, et al. Stepcoder: improving code generation with reinforcement learning from compiler feedback. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), p. 4571ā4585, 2024. Aryaz Eghbali and Michael Pradel. CrystalBLEU: Precisely and efficiently measuring the similarity of code. In Proceedings of the 37th IEEE/ACM International Conference on Automated Soft- ware Engineering, ASE ā22, p. 1ā12, New York, NY, USA, 2022. Association for Computing Machinery. doi: 10.1145/3551349.3556903. Patrick Esser, Sumith Kulal, Andreas Blattmann, Rahim Entezari, Jonas M Ģ uller, Harry Saini, Yam Levi, Dominik Lorenz, Axel Sauer, Frederic Boesel, et al. Scaling rectified flow transformers for high-resolution image synthesis. In Forty-first international conference on machine learning, 2024. Stephanie Fu, Netanel Y. Tamir, Shobhita Sundaram, Lucy Chai, Richard Zhang, Tali Dekel, and Phillip Isola. Dreamsim: Learning new dimensions of human visual similarity using synthetic data. In Advances in Neural Information Processing Systems (NeurIPS), 2023. Google DeepMind.Gemini 3 flash. https://deepmind.google/models/gemini/ flash/, 12 2025. Model card. Accessed 2026-09-22. Edward J Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. LoRA: Low-rank adaptation of large language models. In International Con- ference on Learning Representations, 2022. URL https://openreview.net/forum? id=nZeVKeeFYf9. Minsu Kim and Se-Young Yun. Process-verified reinforcement learning for theorem proving via lean. arXiv preprint arXiv:2606.20068, 2026. Tzu-Mao Li, Michal Luk Ģ a Ė c, Micha Ģ el Gharbi, and Jonathan Ragan-Kelley. Differentiable vector graphics rasterization for editing and learning. ACM Trans. Graph. (Proc. SIGGRAPH Asia), 39 (6):193:1ā193:15, 2020. Guotao Liang, Zhangcheng Wang, Juncheng Hu, Haitao Zhou, Ziteng Xue, Jing Zhang, Dong Xu, and Qian Yu. Render-in-the-loop: Vector graphics generation via visual self-feedback, 2026. URL https://arxiv.org/abs/2604.20730. Hunter Lightman, Vineet Kosaraju, Yuri Burda, Harrison Edwards, Bowen Baker, Teddy Lee, Jan Leike, John Schulman, Ilya Sutskever, and Karl Cobbe. Letās verify step by step. In International Conference on Learning Representations, volume 2024, p. 39578ā39601, 2024. 11 Jun Ling, Yao Qi, Tao Huang, Shibo Zhou, Yanqin Huang, Jiang Yang, Ziqi Song, Ying Zhou, Yang Yang, Heng Tao Shen, and Peng Wang. Table2LaTeX-RL: High-fidelity LaTeX code generation from table images via reinforced multimodal language models. In Advances in Neural Information Processing Systems, volume 38, 2025. Ziyu Liu, Shengyuan Ding, Xinyu Fang, Xuanlang Dai, Penghui Yang, Jianze Liang, Jiaqi Wang, Kai Chen, Dahua Lin, and Yuhang Zang. Visual-ERM: Reward modeling for visual equivalence, 2026. URL https://arxiv.org/abs/2603.13224. Xu Ma, Yuqian Zhou, Xingqian Xu, Bin Sun, Valerii Filev, Nikita Orlov, Yun Fu, and Humphrey Shi. Towards layer-wise image vectorization. In Proceedings of the IEEE conference on computer vision and pattern recognition, 2022. OpenAI.Gpt-5.2systemcard. https://openai.com/index/ gpt-5-system-card-update-gpt-5-2, 12 2025.System card. Accessed 2026- 09-22. Maxime Oquab, Timoth Ģ e Darcet, Th Ģ eo Moutakanni, Huy V. Vo, Marc Szafraniec, Vasil Khali- dov, Pierre Fernandez, Daniel Haziza, Francisco Massa, Alaaeldin El-Nouby, Mahmoud Assran, Nicolas Ballas, Wojciech Galuba, Russell Howes, Po-Yao Huang, Shang-Wen Li, Ishan Misra, Michael Rabbat, Vasu Sharma, Gabriel Synnaeve, Hu Xu, Herv Ģ e Jegou, Julien Mairal, Patrick Labatut, Armand Joulin, and Piotr Bojanowski. DINOv2: Learning robust visual features without supervision. Transactions on Machine Learning Research, 2024. arXiv:2304.07193. Prolific. Prolific. https://w.prolific.com/, 2024. Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agar- wal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, and Ilya Sutskever. Learning transferable visual models from natural language supervision. In Proceedings of the 38th International Conference on Machine Learning (ICML), volume 139 of Proceedings of Machine Learning Research, p. 8748ā8763, 2021. Juan A. Rodriguez, Abhay Puri, Shubham Agarwal, Issam H. Laradji, Pau Rodriguez, Sai Rajeswar, David Vazquez, Christopher Pal, and Marco Pedersoli. StarVector: Generating Scalable Vector Graphics Code from Images and Text. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), p. 16175ā16186, June 2025a. Juan A. Rodriguez, Haotian Zhang, Abhay Puri, Aarash Feizi, Rishav Pramanik, Pascal Wichmann, Arnab Mondal, Mohammad Reza Samsami, Rabiul Awal, Perouz Taslakian, Spandana Gella, Sai Rajeswar, David Vazquez, Christopher Pal, and Marco Pedersoli. Rendering-aware reinforcement learning for vector graphics generation. In Advances in Neural Information Processing Systems, volume 38, p. 67317ā67355, 2025b. Robin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser, and Bj Ģ orn Ommer. High- resolution image synthesis with latent diffusion models. In 2022 IEEE/CVF conference on com- puter vision and pattern recognition (CVPR), p. 10674ā10685. ieee, 2022. Itsumi Saito, Haruto Yoshida, and Keisuke Sakaguchi. Sketch2Diagram: Generating vector di- agrams from hand-drawn sketches. In International Conference on Learning Representations, 2025. John Schulman, Philipp Moritz, Sergey Levine, Michael Jordan, and Pieter Abbeel.High- dimensional continuous control using generalized advantage estimation.arXiv preprint arXiv:1506.02438, 2015. Amrith Setlur, Chirag Nagpal, Adam Fisch, Xinyang Geng, Jacob Eisenstein, Rishabh Agarwal, Alekh Agarwal, Jonathan Berant, and Aviral Kumar. Rewarding progress: Scaling automated process verifiers for llm reasoning. In International Conference on Learning Representations, volume 2025, p. 60808ā60838, 2025. Zhihong Shao, Peiyi Wang, Qihao Zhu, Runxin Xu, Junxiao Song, Xiao Bi, Haowei Zhang, Mingchuan Zhang, Y. K. Li, Y. Wu, and Daya Guo. Deepseekmath: Pushing the limits of mathe- matical reasoning in open language models, 2024. URL https://arxiv.org/abs/2402. 03300. 12 Peter Stanchev, Weiyue Wang, and Hermann Ney. EED: Extended edit distance measure for ma- chine translation. In Proceedings of the Fourth Conference on Machine Translation (Volume 2: Shared Task Papers, Day 1), p. 514ā520, Florence, Italy, August 2019. Association for Com- putational Linguistics. doi: 10.18653/v1/W19-5359. URL https://aclanthology.org/ W19-5359. Wentao Tan, Qiong Cao, Chao Xue, Yibing Zhan, Changxing Ding, and Xiaodong He. ChartMas- ter: Advancing chart-to-code generation with real-world charts and chart similarity reinforcement learning, 2025. URL https://arxiv.org/abs/2508.17608. Jonathan Uesato, Nate Kushman, Ramana Kumar, Francis Song, Noah Siegel, Lisa Wang, Antonia Creswell, Geoffrey Irving, and Irina Higgins. Solving math word problems with process- and outcome-based feedback. arXiv preprint arXiv:2211.14275, 2022. Haomin Wang, Qi Wei, Qianli Ma, Shengyuan Ding, Jinhui Yin, Kai Chen, and Hongjie Zhang. Reliable reasoning in SVG-LLMs via multi-task multi-reward reinforcement learning, 2026a. URL https://arxiv.org/abs/2603.16189. Haomin Wang, Jinhui Yin, Qi Wei, Wenguang Zeng, Lixin Gu, Shenglong Ye, Zhangwei Gao, Yaohui Wang, Yanting Zhang, Yuanqi Li, Yanwen Guo, Wenhai Wang, Kai Chen, Yu Qiao, and Hongjie Zhang. Internsvg: Towards unified svg tasks with multimodal large language models. In International Conference on Learning Representations, 2026b. Peiyi Wang, Lei Li, Zhihong Shao, Runxin Xu, Damai Dai, Yifei Li, Deli Chen, Yu Wu, and Zhifang Sui. Math-shepherd: Verify and reinforce llms step-by-step without human annotations. In Pro- ceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), p. 9426ā9439, 2024. Yiping Wang, Qing Yang, Zhiyuan Zeng, Liliang Ren, Liyuan Liu, Baolin Peng, Hao Cheng, Xuehai He, Kuan Wang, Jianfeng Gao, Weizhu Chen, Shuohang Wang, Simon Shaolei Du, and Yelong Shen. Reinforcement learning for reasoning in large language models with one training example. arXiv preprint arXiv:2504.20571, 2025. Zhou Wang, Alan C. Bovik, Hamid R. Sheikh, and Eero P. Simoncelli. Image quality assessment: From error visibility to structural similarity. IEEE Transactions on Image Processing, 13(4): 600ā612, 2004. doi: 10.1109/TIP.2003.819861. Xiaoshi Wu, Yiming Hao, Keqiang Sun, Yixiong Chen, Feng Zhu, Rui Zhao, and Hongsheng Li. Human preference score v2: A solid benchmark for evaluating human preferences of text-to- image synthesis. arXiv preprint arXiv:2306.09341, 2023. Ge Yang, Edward Hu, Igor Babuschkin, Szymon Sidor, Xiaodong Liu, David Farhi, Nick Ryder, Jakub Pachocki, Weizhu Chen, and Jianfeng Gao. Tuning large neural networks via zero-shot hyperparameter transfer. In Advances in Neural Information Processing Systems, 2021. Yiying Yang, Wei Cheng, Sijin Chen, Xianfang Zeng, Fukun Yin, Jiaxu Zhang, Liao Wang, Gang Yu, Xingjun Ma, and Yu-Gang Jiang. Omnisvg: A unified scalable vector graphics generation model. In Advances in Neural Information Processing Systems, volume 38, 2025. doi: 10.52202/ 085713-3791. Yiying Yang, Wei Cheng, Sijin Chen, Honghao Fu, Xianfang Zeng, Yujun Cai, Gang Yu, and Xinjun Ma. Omnilottie: Generating vector animations via parameterized lottie tokens. arXiv preprint arxiv:2603.02138, 2026a. Zhen Yang, Wenyi Hong, Mingde Xu, Xinyue Fan, Weihan Wang, Jiale Cheng, Xiaotao Gu, and Jie Tang. UI2Code N : UI-to-code generation as interactive visual optimization. In Proceedings of the 43rd International Conference on Machine Learning, volume 306 of Proceedings of Machine Learning Research, 2026b. URL https://arxiv.org/abs/2511.08195. Yufan Ye, Ting Zhang, Wenbin Jiang, and Hua Huang. Process-supervised reinforcement learning for code generation. In Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing, p. 14224ā14237, 2025. 13 Tianyu Yu, Yuan Yao, Haoye Zhang, Taiwen He, Yifeng Han, Ganqu Cui, Jinyi Hu, Zhiyuan Liu, Hai-Tao Zheng, Maosong Sun, et al. Rlhf-v: Towards trustworthy mllms via behavior alignment from fine-grained correctional human feedback. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, p. 13807ā13816, 2024. Yang Yue, Zhiqi Chen, Rui Lu, Andrew Zhao, Zhaokai Wang, Yang Yue, Shiji Song, and Gao Huang. Does reinforcement learning really incentivize reasoning capacity in llms beyond the base model? arXiv preprint arXiv:2504.13837, 2025. Sukmin Yun, Haokun Lin, Rusiru Thushara, Mohammad Qazim Bhat, Yongxin Wang, Zutao Jiang, Mingkai Deng, Jinhong Wang, Tianhua Tao, Junbo Li, Haonan Li, Preslav Nakov, Timothy Baldwin, Zhengzhong Liu, Eric P. Xing, Xiaodan Liang, and Zhiqiang Shen. Web2Code: A large-scale webpage-to-code dataset and evaluation framework for multimodal LLMs. In Ad- vances in Neural Information Processing Systems, volume 37, p. 112134ā112157, 2024. doi: 10.52202/079017-3560. Xingchen Zeng, Zhewei Su, Hengming Zhang, Juyong Jiang, Jiazhi Xia, and Wei Zeng. DaVinci: Reinforcing visual-structural syntax in MLLMs for generalized scientific diagram parsing. In International Conference on Learning Representations, 2026. Xiaohua Zhai, Basil Mustafa, Alexander Kolesnikov, and Lucas Beyer. Sigmoid loss for language image pre-training. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), p. 11975ā11986, 2023. Richard Zhang, Phillip Isola, Alexei A. Efros, Eli Shechtman, and Oliver Wang. The unreasonable effectiveness of deep features as a perceptual metric. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), p. 586ā595, 2018. Xuanle Zhao, Deyang Jiang, Zhixiong Zeng, Lei Chen, Haibo Qiu, Jing Huang, Yufeng Zhong, Liming Zheng, Yilin Cao, and Lin Ma. Vincicoder: Unifying multimodal code generation via coarse-to-fine visual reinforcement learning. arXiv preprint arXiv:2511.00391, 2025. Xuanle Zhao, Qiushi Sun, Jingyu Xiao, Xuexin Liu, Haoyue Yang, Qiaosheng Chen, Xianzhen Luo, Jing Huang, Yufeng Zhong, Lei Chen, Shuai Fu, Zhenlin Wei, Jinhe Bi, Lei Jiang, Haibo Qiu, Siqi Yang, Peng Shi, Jian Hu, and Zhixiong Zeng. Beyond NL2Code: A structured survey of multimodal code intelligence. arXiv preprint arXiv:2606.15932, 2026. URL https://arxiv. org/abs/2606.15932. 14 Appendix Appendix Contents A Image-to-SVG setup details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 A.1 Test-time scaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 A.2 Prefix closure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 A.3 Training parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 A.4 Impact of Base Model Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 A.5 Baseline parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 A.6 Metrics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 B Image-to-TikZ setup details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 B.1 Reward ablation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 B.2 Prefix closure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 B.3 Training parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 B.4 Baseline parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 B.5 Metrics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 AIMAGE-TO-SVG SETUP DETAILS A.1TEST-TIME SCALING We extend the test-time scaling analysis from Sec. 5.3 across three evaluation sets and four sam- pling temperatures, T ā 0.3, 0.7, 1.0, 1.3 in Fig. A.1. Our method achieves the highest reward across nearly all sampling budgets and temperatures, with the largest advantage at small K. As K increases, the gap to the baselines narrows, consistent with our method assigning greater probability to high-quality generations rather than relying on large sampling budgets to discover them. This trend is consistent across SVG-Stack, MMSVGBench-Illustrations, and MMSVGBench-Icons. 1248163264128 K (samples per prompt) 0.0 0.5 1.0 Reward SVG-Stack 1248163264128 K (samples per prompt) 0.0 0.5 1.0 MMSVGBench-Illustrations 1248163264128 K (samples per prompt) 0.0 0.5 1.0 MMSVGBench-Icons OmniSVG 8BOmniSVG 4BRAFTOutcome-RLOursOmniSVG 8BOmniSVG 4BRAFTOutcome-RLOurs T=0.3T=0.7T=1T=1.3 Figure A.1: Best-of-K sampling on SVG generation. For each image, we sample K candidate SVGs and report the mean reward of the best candidate. Across multiple datasets and temperature values, our method performs best across all sampling budgets, with the largest gains at small K. A.2PREFIX CLOSURE To achieve the highest possible reward granularity, we place a boundary b j after every completed SVG drawing command (move, line, curve, arc, or close). This is possible because any prefix of an SVG pathās segments is already well-formed: it can be closed back to its starting point with a default black color, well before its enclosing path is finished. In practice, for our setup this results in b j boundaries accounting for roughly 15% of tokens. Realizing C (Sec. 4.1) requires knowing what syntax a truncated prefix is still missing before it can be closed into an executable, renderable program. For SVG, OmniSVGās tokenization never represents the container tags a document would normally nest through (e.g., <svg>...</svg>, or a pathās own <path d="...">...</path> wrapper), only the underlying path commands 15 Figure A.2: Prefix closure for (a) Image-to-SVG, (b) Image-to-TikZ. A model generates a program code y that is separated into granular segments y 1:b j , well-formed by a closure operatorC into P j = C(y 1:b j ) and rendered. This process depends on the task and a tokenizer. Specifically, OmniSVG does not generate the <svg> tag, while in DeTikZify the opening code is part of the sequence. MMSVGBench-IllustrationsMMSVGBench-Icons DINOā LPIPSā MSEā SSIMā CLIPā Aestheticā TokensāDINOā LPIPSā MSEā SSIMā CLIPā Aestheticā Tokensā 700 samples 97.489.791.1794.2296.055.092.5k98.268.671.2393.8898.014.982.1k 10k samples 97.2610.111.2794.1195.355.082.2k98.498.421.2094.1298.355.021.9k Table A.1: Effect of the number of training samples. We observe that increasing the size of the trainset provides only marginal gains on Icons subset at the cost of mild degradation on Illustrations, and increases the overall generation length. We thus opt for a smaller trainset in all experiments. and their coordinate/color arguments. C therefore just wraps commands decoded from y 1:b j in the standard container boilerplate, yielding a well-formed, renderable document at every boundary. The process is demonstrated in Fig. A.2a. A.3TRAINING PARAMETERS The visual similarity function S between SVG renders and a target is defined following prior work (Rodriguez et al., 2025a) as a scale-invariant normalized L2 that emphasizes structural and color discrepancies: S = clip 1ā 1 N I norm in ā I norm pred 2 2 , ā1, 1 ,(A.1) where I norm is z-score normalized image. S lies within [ā1, 1], and for blank or malformed SVGs it is equal toā1. We train OmniSVG-4B with a learning rate 5e-5, KL coefficient β = 0, a group size 16, and an effective batch of 8 unique images per optimizer step, resulting in 128 rollouts per update sampled with temperature 1.1. We attach a LoRA adapter (Hu et al., 2022) (rank r = 64, α = 128, dropout 0.05) to the query/key/value/output projections and gate/up/down MLP projections of the LLM part of the model. Training is done for 300 steps on a single B200 GPU for 2 days. The training set size is only 700 samples of svg-stack (Rodriguez et al., 2025a). Tab. A.1 shows that scaling to 10k samples (a 14Ć increase) brings no consistent gain in reconstruction quality: 700 samples wins on 16 MMSVGBench-IllustrationsMMSVGBench-Icons DINOā LPIPSā MSEā SSIMā CLIPā Aestheticā TokensāDINOā LPIPSā MSEā SSIMā CLIPā Aestheticā Tokensā OmniSVG-4B85.4822.265.1189.7082.034.5511.3k89.2119.825.8087.9688.424.658.4k OmniSVG-8B88.8121.154.9888.8585.574.68 9.1k92.0418.094.9289.2891.894.796.0k OmniSVG-4B + Ours 97.489.791.1794.2296.055.092.5k98.268.671.2393.8898.014.982.1k OmniSVG-8B + Ours 97.34 9.561.2094.3296.295.093.0k98.388.471.1294.2598.474.992.3k Table A.2: Effect of Delta at 4B and 8B scale. Despite a significant margin between 4B and 8B base models, applying our method to both models produces similar results, motivating us to adopt a smaller variant. Illustrations, 10k on Icons, with marginal difference in both cases. This aligns with recent findings that RL fine-tuning can saturate on remarkably few examples (Wang et al., 2025), and we adopt the smaller, cheaper set. A.4IMPACT OF BASE MODEL SIZE Table A.2 compares our method applied to OmniSVG-4B and OmniSVG-8B. The 8B model fol- lows the same training recipe as the 4B model, except that we scale the learning rate by 0.7Ć to account for model size, following (Yang et al., 2021), which we found to work best for 8B. Before post-training, the 8B SFT model is stronger under greedy decoding, but Fig. 7 shows that the 4B and 8B models approach similar performance at larger sampling budgets. After post-training, this gap largely disappears, while the 8B model produces approximately 20% longer completions. This is consistent with prior observations that RL can increase the probability of high-quality genera- tions already reachable under the base policy (Shao et al., 2024; Yue et al., 2025). We therefore use OmniSVG-4B for the remaining experiments, as it achieves comparable final result at lower computational cost. A.5BASELINE PARAMETERS DiffVG was run with 500 iterations and 128 paths, and LIVE with 200 iterations and 16 paths, following their default settings. General-purpose (M)LLMs (Qwen3-VL-235B (Bai et al., 2025), Gemini 3 Flash (Google DeepMind, 2025), Sonnet 5 (Anthropic, 2026), GPT-5.2 (OpenAI, 2025)) are prompted with the input image via each providerās API using the system prompt in Fig. A.4a. StarVector-8B (Rodriguez et al., 2025a) and InternSVG-8B (Wang et al., 2026b) are decoded with each modelās default sampling parameters. OmniSVGās base models (4B, 8B) are sampled with default top-p = 0.95, top-k = 50, temperature 0.3, and all the discussed post-training variants follow the same sampling configuration. All non-API evaluations are done with 2048 max tokens. RAFT (Dong et al., 2023) is trained for 15 iterations, sampling 32 completions per input per it- eration, selecting the highest-reward sample, and fine-tuning for two SFT epochs on the selected set. A.6METRICS CLIP is computed image-vs-image rather than image-vs-text. Both CLIP and DINO use their base- size checkpoints (ViT-B/32, dinov2-base), and LPIPS uses the AlexNet backbone. Aesthetic is a no- reference score of the generated image alone. For fair comparison, token counts for all models use OmniSVGās tokenizer (Qwen2.5-VL-3B-Instruct), applied to the extracted SVG markup, following OmniSVG evaluation setup. For the API responses, the leaked prose and thinking-trace text is additionally taken into account. A user study was conducted on Prolific (Prolific, 2024) platform with 50 samples drawn at ran- dom from MMSVGBench. For each baseline, participants saw the reference image alongside two candidates, ours and the baselineās, presented in random order as a two-alternative forced-choice (interface in Fig. A.3). They were asked: āWhich image, A or B, matches the reference image above better? Judge overall accuracy compared to the reference in detail, shape, color, and spatial place- ment.ā. Each comparison was rated by 6 participants, giving 1500 judgments from 30 participants in total. 17 Figure A.3: User study interface. Example of an interface with a question comparing Ours to Gemini 3 Flash. Figure A.4: API evaluation prompts. System prompts used for evaluation with closed-source API models of (a) Image-to-SVG, (b) Image-to-TikZ. As an automatic counterpart with a VLM-as-a-judge, we ran the same comparisons through Gem- ini 3 Flash (Google DeepMind, 2025), providing it with the input and the question matching the one seen by humans, and asking it to answer with A or B plus a brief justification. BIMAGE-TO-TIKZ SETUP DETAILS B.1EXTENDED REWARD ABLATION FOR IMAGE-TO-TIKZ In addition to numeric evaluations in Tab. 3, we provide a reward composition ablation in Table B.1, which demonstrates the same trend as the one observed in Image-to-SVG of a higher contribution of the process reward to the full performance of the method. 18 DreamSimā SigLIPā CLIPā LPIPSā TED Normā C-BLEUā Tokensā w/ Outcome only80.990.689.337.857.312.91.3k w/ Process only81.1 91.390.237.356.811.90.7k w/ Process + Outcome (Ours)83.892.591.235.455.514.41.0k Table B.1: Reward composition ablation on Image-to-TikZ. Ablation done at 30% of training schedule. B.2PREFIX CLOSURE To achieve the highest reward granularity, a boundary b j is placed after every completed TikZ state- ment: a semicolon-terminated drawing command (e.g. or ), the smallest unit that the representation allows as a complete, renderable drawing primitive. In practice, for our setup this results in b j boundaries accounting for roughly 5% of tokens. Realizing C (Sec. 4.1) for TikZ requires tracking syntax that the base modelās standard sub-word tokenizer emits as free-form text rather than as structured commands: brace groups, bracketed op- tions, and env... env environments can all still be open at a prefix boundary. We close these by tracking which delimiters and environments are still open at the cut point and appending their closers back in, innermost first, to obtain a compilable file. The process is demon- strated in Fig. A.2b. B.3TRAINING PARAMETERS The visual similarity function S between TikZ renders and a target is defined as Self-Sim, following prior work (Belouadi et al., 2024). Self-Sim uses DeTikZify-v2ās own fine-tuned SigLIP vision encoder to extract patch-level features f in ,f pred for the target and rendered image, and computes their Earth Moverās Distance d EMD under patch-wise cosine cost: S = 2 tanh (ād EMD (f in ,f pred )) + 1,(B.1) S lies within [ā1, 1], and for blank or malformed renders it is equal to ā1. This score has been shown to correlate with human judgment of scientific figure reconstruction. We train DeTikZify-8B with a learning rate of 1e-5, KL coefficient β = 0, a group size of 32, and an effective batch of 4 unique images per optimizer step, resulting in 128 rollouts per update sampled with temperature 1.1. We attach a LoRA adapter (rank r = 64, α = 128, dropout 0.05) to the query/key/value/output and gate/up/down MLP projections of the LLM decoder, leaving the vision encoder frozen. Training is done for 900 steps on a single B200 GPU for 6 days. The training set is ā¼25k trainset samples from the DaTikZ-v3 dataset (Belouadi et al., 2024). B.4BASELINE PARAMETERS General-purpose (M)LLMs are prompted with the input image via each providerās API using the system prompt in Fig. A.4b. VinciCoder (Zhao et al., 2025) and DeTikZify-v2 (Belouadi et al., 2024) are decoded with each modelās default sampling parameters, with a generation budget of 4096 tokens for all non-API models. All the post-training variants are reported with greedy sampling. RAFT (Dong et al., 2023) is trained for 40 iterations, sampling 32 completions per input on a subset of 700 trainset images per iteration due to the high sampling runtime cost, selecting the highest- reward sample, and fine-tuning for two SFT epochs on the selected set. B.5METRICS For all methods, generations that fail to compile are re-sampled up to 10 retries, until the first suc- cess. SigLIP and CLIP use their large checkpoints (so400m/384, ViT-L/14). TED is computed as an edit distance over TeX-tokenized source following DeTikZifyās evaluation. For fair compari- son, token counts for all models use DeTikZify-v2ās tokenizer, applied to the extracted TikZ code, and in the case of the API responses, the leaked prose and thinking-trace text, following the same convention as the SVG setup above. 19