用强化学习和自纠错提升图表转代码的准确性和可执行性
MM-ReCoder: Advancing Chart-to-Code Generation with Reinforcement Learning and Self-Correction
- 采用两阶段强化学习,通过环境反馈迭代优化代码生成
- 在三个基准上达到当前最优性能,显著提升代码可执行率
- 适合需要高可靠性代码生成的开发者或自动化工具使用者
多模态大语言模型(MLLMs)在图表转代码等多模态编程任务中展现出潜力。然而,现有方法主要依赖监督微调(SFT),缺乏对代码执行环境的交互,且即使最先进的MLLMs也难以有效进行自纠错。本文提出MM-ReCoder,一种基于强化学习(RL)并具备自纠错能力的图表转代码模型。我们设计了一种基于组相对策略优化(GRPO)的两阶段多轮自纠错强化学习策略:第一阶段通过共享首轮回溯增强自纠错能力,第二阶段通过全轨迹优化提升编码能力。MM-ReCoder通过与环境互动并迭代修正自身输出,生成更准确、可执行的代码。在三个图表转代码基准上的实验表明,该模型达到当前最优性能。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。