MM-ReCoder:以强化学习与自纠正推进图表到代码生成
MM-ReCoder: Advancing Chart-to-Code Generation with Reinforcement Learning and Self-Correction
把可执行环境的反馈作为奖励信号,用两阶段多轮 GRPO 训练 MLLM 自我纠错,这一范式可直接迁移到视觉到代码类任务(如 UI 到代码、图表理解、视觉程序合成),也为视觉语言模型引入执行级验证提供了可复用训练流程。
原文依据 We propose a two-stage multi-turn self-correction RL strategy based on Group Relative Policy Optimization (GRPO).
摘要译文
由模型翻译 · 术语统一 · 请对照原文核对关键结论多模态大语言模型(MLLMs)近期在多模态编程任务(如图表到代码生成)上展现出可观的能力。然而,现有方法主要依赖监督微调(SFT),要求模型通过图表-代码对学习代码模式,却未让模型接触代码执行环境。此外,尽管借助执行反馈进行自纠正为提升代码质量提供了潜在途径,但已有研究表明,即便最优的 MLLM 也难以实现有效的自纠正。在本工作中,我们提出 MM-ReCoder,一个以强化学习(RL)训练并具备自纠正能力的图表到代码生成模型。我们提出一种基于组相对策略优化(GRPO)的两阶段多轮自纠正 RL 策略。第一阶段通过展开共享的首轮来增强模型的自纠正能力,第二阶段以全轨迹优化提升编程能力。MM-ReCoder 通过与环境的交互以及迭代纠正自身输出,学会生成更准确、更可执行的代码。我们在三个图表到代码基准上的结果证明了 MM-ReCoder 的最优性能。
英文原文摘要 1278 字符
Multimodal Large Language Models (MLLMs) have recently demonstrated promising capabilities in multimodal coding tasks such as chart-to-code generation. However, existing methods primarily rely on supervised fine-tuning (SFT), which requires the model to learn code patterns through chart-code pairs but does not expose the model to a code execution environment. Moreover, while self-correction through execution feedback offers a potential route to improve coding quality, even state-of-the-art MLLMs have been shown to struggle with effective self-correction. In this work, we introduce MM-ReCoder, a chart-to-code generation model trained with reinforcement learning (RL) and equipped with self-correction ability. We propose a two-stage multi-turn self-correction RL strategy based on Group Relative Policy Optimization (GRPO). The first stage enhances the model's self-correction ability via rolling out a shared first turn, while the second stage improves the coding capability with full-trajectory optimization. MM-ReCoder learns to produce more accurate and executable code through the interaction with the environment and by iteratively correcting its own outputs. Our results on three chart-to-code benchmarks demonstrate the state-of-the-art performance of MM-ReCoder.