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

📄 arXiv: 2609.34587v1 📥 PDF

作者: Omri Kaduri, Kate Feingold, Phillip Isola, Tali Dekel

分类: cs.CV, cs.AI

发布日期: 2026-09-28

备注: Project page: https://ir4rl.github.io/


💡 一句话要点

提出IR4RL框架以优化图像到代码生成中的反馈问题

🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture)

关键词: 强化学习 图像到代码 中间渲染 过程监督 生成模型 SVG生成 TikZ生成

📋 核心要点

  1. 现有图像到代码生成方法依赖单一终端奖励,导致反馈稀疏,难以有效指导每个生成标记的优化。
  2. 本文提出IR4RL框架,通过中间渲染进度奖励机制,为生成过程提供更密集的监督反馈,提升生成质量。
  3. 在Image-to-SVG和Image-to-TikZ生成任务中,IR4RL方法超越了传统的监督微调和GRPO,取得了新的开源模型的最优性能。

📝 摘要(中文)

随着强化学习在图像到代码生成中的应用日益增多,现有方法依赖于最终渲染结果的单一终端奖励,导致反馈稀疏且与单个标记的贡献不匹配。本文提出IR4RL框架,通过引入基于中间渲染进度的奖励机制,为生成序列提供局部反馈。该方法在Image-to-SVG和Image-to-TikZ生成任务中表现优异,超越了监督微调和标准GRPO,展示了中间渲染作为过程监督的有效性。

🔬 方法详解

问题定义:本文旨在解决图像到代码生成中,现有方法依赖单一终端奖励导致的反馈稀疏问题。这种方法无法有效评估每个生成标记的贡献,导致生成的代码质量不均。

核心思路:IR4RL框架的核心思想是利用中间渲染结果作为奖励信号,提供更细粒度的反馈。通过评估中间代码前缀的渲染效果,能够更好地指导生成过程,提升最终结果的质量。

技术框架:IR4RL框架包括以下主要模块:首先,生成模型根据输入图像生成代码;其次,模型在生成过程中定期进行中间渲染;最后,基于中间渲染结果计算奖励,更新模型参数。

关键创新:IR4RL的关键创新在于引入了基于中间渲染进度的局部反馈机制。这一机制与传统方法的终端奖励形成鲜明对比,使得每个生成标记都能获得更具针对性的优化信号。

关键设计:在设计中,IR4RL采用了特定的损失函数来结合中间渲染奖励与最终目标,确保模型在生成过程中能够平衡局部与全局目标。此外,模型结构经过优化,以适应中间渲染的需求,提升生成效率。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

在Image-to-SVG和Image-to-TikZ生成任务中,IR4RL方法显著提升了生成质量,相较于监督微调和标准GRPO,取得了新的开源模型的最优性能,展示了中间渲染作为过程监督的有效性。

🎯 应用场景

该研究的潜在应用领域包括图像到代码生成、自动化设计工具和程序生成等。通过提供更有效的反馈机制,IR4RL框架能够在软件开发、图形设计等领域中提升生产力,未来可能推动更智能的编程助手和设计工具的发展。

📄 摘要(原文)

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.