Reinforcement Learning from Intermediate Renders for Image-to-Code Generation
AuthorsOmri Kaduri, Kate Feingold, Phillip Isola, Tali Dekel
AffiliationsWeizmann Institute of Science · MITProject page: https://ir4rl.github.io
Resources
IR4RL improves image-to-code generation by rewarding models for making useful visual progress at every intermediate rendering step.
Key results
svg-stack examples used to train the OmniSVG-4B IR4RL model
DINO score achieved by OmniSVG-4B with combined process and outcome rewards
Token count for IR4RL outputs on MMSVGBench Illustrations
DreamSim score achieved by IR4RL for Image-to-TikZ generation
Token count for IR4RL outputs on DaTikZ-v3
Process-reward weight alpha identified in the SVG ablation
What the paper found
IR4RL, or Intermediate Renders for Reinforcement Learning, addresses a core weakness of image-to-code reinforcement learning: outcome-only rewards score the final rendering but cannot identify which tokens helped or harmed it. The method closes each executable SVG or TikZ prefix, renders it, computes the visual-score change between consecutive prefixes, and propagates these delta rewards backward through tokens with exponential discounting, while combining them with the final outcome reward under GRPO. Using OmniSVG-4B trained on 700 svg-stack examples, IR4RL reaches a DINO score of 97.48 on MMSVGBench Illustrations while reducing output length to 2.5k tokens, outperforming supervised fine-tuning, RAFT, and outcome-only RL. On Image-to-TikZ, it achieves 86.9 DreamSim and produces 0.6k-token programs on DaTikZ-v3, surpassing DeTikZify baselines. Ablations identify a process-reward weight of 10 and propagation factor of 0.9 as effective settings, with rendering after every completed drawing command performing best. The approach also compares favorably with larger general-purpose systems, including Qwen3-VL-235B, Gemini 3 Flash, Anthropic’s Sonnet 5, and OpenAI’s GPT-5.2. IR4RL changes training supervision without changing inference, but requires representations whose partial programs remain meaningfully renderable.
Original 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.
Read the original paperMore in Code Generation
Browse all 52 papers →CompoundingKernel: Self-Improving from Zero to First
Qian Qu, Hongyang Wang, Wenbo Chen, Yichuan Li, Jingguo Liu, Xian Li, Xuan Wang, Ruochen Wen, Leo Fan, Yiming Yan, Zheshen Wang, Benoit Dumoulin
CompoundingKernel uses parallel agents and an archive of successful attempts to discover fast, correct GPU kernels.
CoReMem: Cost-Internalizing Memory for Successive Coding Tasks with Prospective Valuation
Peiwen Li, Harshit Verma, Sophia Zhou, Haiwen Wang, Ngoc Bui, Heng Chang, Fei Fei, David van Dijk, Rex Ying
CoReMem helps coding agents carry forward useful repository knowledge while accounting for the cost of writing and using memory.
From Repositories to Training Environments: Scaling Long-Horizon Coding Agents with Environment Evolution Loop
Yang Tian, Tianyu Zheng, Xiyuan Yang, Yaxin Du, Chengran Yang, Bo Zhao, Jian Yang, Bryan Dai
RepoFactory turns real software repositories into training environments and iteratively improves them to help coding agents tackle longer, more realistic projects.