IR4RL: Reinforcement Learning from Intermediate Renders for Image-to-Code Generation

1 2 *Equal contribution, order determined at random

TL;DR: We turn progress between intermediate renders into Reinforcement Learning rewards for image-to-code generation.

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 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. Code and model weights will be released upon publication.

IR4RL

Outcome-only advantage Adding intermediate renders Adding render-progress reward

What does outcome-level reward miss?

Outcome-level rendering-based reinforcement learning, commonly used as a post-training step for image-to-code VLMs, aims to provide visual grounding for the generated code. By comparing the final rendered output to the target image, it assigns a single score per generation, weighting all tokens within a rollout equally.

Try a Game

Imagine yourself as a VLM trained with our method. Trace the target below one segment at a time with a sequence of Lines and Curves, and watch each one score a render-progress reward \(\Delta_j\). Chase the highest \(\Delta_j\) on every step (arrows on the right plot), then hit Finish Drawing to see your outcome reward.

Generated code
" /></svg>
Target
Your drawing
Visual score —
Step 0

Comparisons

Image-to-SVG

Path-by-path rendering of the generated SVG

Input
LIVE
Gemini 3
InternSVG
OmniSVG-4B
OmniSVG
+RAFT
OmniSVG
+Outcome
Ours
Target image 1
LIVE output 1 LIVE generation process 1
Loading…
Gemini 3 output 1 Gemini 3 generation process 1
Loading…
InternSVG output 1 InternSVG generation process 1
Loading…
OmniSVG-4B output 1 OmniSVG-4B generation process 1
Loading…
OmniSVG+RAFT output 1 OmniSVG+RAFT generation process 1
Loading…
OmniSVG+Outcome output 1 OmniSVG+Outcome generation process 1
Loading…
Ours output 1 Ours generation process 1
Loading…
Target image 2
LIVE output 2 LIVE generation process 2
Loading…
Gemini 3 output 2 Gemini 3 generation process 2
Loading…
InternSVG output 2 InternSVG generation process 2
Loading…
OmniSVG-4B output 2 OmniSVG-4B generation process 2
Loading…
OmniSVG+RAFT output 2 OmniSVG+RAFT generation process 2
Loading…
OmniSVG+Outcome output 2 OmniSVG+Outcome generation process 2
Loading…
Ours output 2 Ours generation process 2
Loading…
Target image 3
LIVE output 3 LIVE generation process 3
Loading…
Gemini 3 output 3 Gemini 3 generation process 3
Loading…
InternSVG output 3 InternSVG generation process 3
Loading…
OmniSVG-4B output 3 OmniSVG-4B generation process 3
Loading…
OmniSVG+RAFT output 3 OmniSVG+RAFT generation process 3
Loading…
OmniSVG+Outcome output 3 OmniSVG+Outcome generation process 3
Loading…
Ours output 3 Ours generation process 3
Loading…
Target image 4
LIVE output 4 LIVE generation process 4
Loading…
Gemini 3 output 4 Gemini 3 generation process 4
Loading…
InternSVG output 4 InternSVG generation process 4
Loading…
OmniSVG-4B output 4 OmniSVG-4B generation process 4
Loading…
OmniSVG+RAFT output 4 OmniSVG+RAFT generation process 4
Loading…
OmniSVG+Outcome output 4 OmniSVG+Outcome generation process 4
Loading…
Ours output 4 Ours generation process 4
Loading…

Image-to-TikZ

Command-by-command rendering of the generated TikZ (every 2 commands)

Input
Gemini 3
VinciCoder-8B
DeTikZify-v2.5
DeTikZify-v2
DeTikZify-v2
+RAFT
DeTikZify-v2
+Outcome
Ours
Target image 1
Gemini 3 output 1 Gemini 3 generation process 1
Loading…
VinciCoder-8B output 1 VinciCoder-8B generation process 1
Loading…
DeTikZify-v2.5 output 1 DeTikZify-v2.5 generation process 1
Loading…
DeTikZify-v2 output 1 DeTikZify-v2 generation process 1
Loading…
DeTikZify-v2 +RAFT output 1 DeTikZify-v2 +RAFT generation process 1
Loading…
DeTikZify-v2 +Outcome output 1 DeTikZify-v2 +Outcome generation process 1
Loading…
Ours output 1 Ours generation process 1
Loading…
Target image 2
Gemini 3 output 2 Gemini 3 generation process 2
Loading…
VinciCoder-8B output 2 VinciCoder-8B generation process 2
Loading…
DeTikZify-v2.5 output 2 DeTikZify-v2.5 generation process 2
Loading…
DeTikZify-v2 output 2 DeTikZify-v2 generation process 2
Loading…
DeTikZify-v2 +RAFT output 2 DeTikZify-v2 +RAFT generation process 2
Loading…
DeTikZify-v2 +Outcome output 2 DeTikZify-v2 +Outcome generation process 2
Loading…
Ours output 2 Ours generation process 2
Loading…
Target image 3
Gemini 3 output 3 Gemini 3 generation process 3
Loading…
VinciCoder-8B output 3 VinciCoder-8B generation process 3
Loading…
DeTikZify-v2.5 output 3 DeTikZify-v2.5 generation process 3
Loading…
DeTikZify-v2 output 3 DeTikZify-v2 generation process 3
Loading…
DeTikZify-v2 +RAFT output 3 DeTikZify-v2 +RAFT generation process 3
Loading…
DeTikZify-v2 +Outcome output 3 DeTikZify-v2 +Outcome generation process 3
Loading…
Ours output 3 Ours generation process 3
Loading…

Qualitative Results

Image-to-SVG

Path-by-path rendering of the generated SVG

Target image 1
Generated SVG output 1 Generation process 1
Loading…
Target image 2
Generated SVG output 2 Generation process 2
Loading…
Target image 3
Generated SVG output 3 Generation process 3
Loading…
Target image 4
Generated SVG output 4 Generation process 4
Loading…
Target image 5
Generated SVG output 5 Generation process 5
Loading…
Target image 6
Generated SVG output 6 Generation process 6
Loading…
Target image 7
Generated SVG output 7 Generation process 7
Loading…
Target image 8
Generated SVG output 8 Generation process 8
Loading…
Target image 9
Generated SVG output 9 Generation process 9
Loading…
Target image 10
Generated SVG output 10 Generation process 10
Loading…
Target image 11
Generated SVG output 11 Generation process 11
Loading…
Target image 12
Generated SVG output 12 Generation process 12
Loading…
Target image 13
Generated SVG output 13 Generation process 13
Loading…
Target image 14
Generated SVG output 14 Generation process 14
Loading…
Target image 15
Generated SVG output 15 Generation process 15
Loading…
Target image 16
Generated SVG output 16 Generation process 16
Loading…

Image-to-TikZ

Command-by-command rendering of the generated TikZ (every 2 commands)

Target image 1
Generated TikZ output 1 Generation process 1
Loading…
Target image 2
Generated TikZ output 2 Generation process 2
Loading…
Target image 3
Generated TikZ output 3 Generation process 3
Loading…
Target image 4
Generated TikZ output 4 Generation process 4
Loading…
Target image 5
Generated TikZ output 5 Generation process 5
Loading…
Target image 6
Generated TikZ output 6 Generation process 6
Loading…
Target image 7
Generated TikZ output 7 Generation process 7
Loading…
Target image 8
Generated TikZ output 8 Generation process 8
Loading…
Target image 9
Generated TikZ output 9 Generation process 9
Loading…
Target image 10
Generated TikZ output 10 Generation process 10
Loading…
Target image 11
Generated TikZ output 11 Generation process 11
Loading…
Target image 12
Generated TikZ output 12 Generation process 12
Loading…
Target image 13
Generated TikZ output 13 Generation process 13
Loading…
Target image 14
Generated TikZ output 14 Generation process 14
Loading…
Target image 15
Generated TikZ output 15 Generation process 15
Loading…
Target image 16
Generated TikZ output 16 Generation process 16
Loading…

BibTeX

@article{ir4rl2026,
  title={Reinforcement Learning from Intermediate Renders for Image-to-Code Generation},
  author={Kaduri, Omri and Feingold, Kate and Isola, Phillip and Dekel, Tali},
  journal={arXiv preprint arXiv:2609.34587},
  year={2026}
}

Acknowledgements

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.