paper-with-me

홈 › Papers

ReCode: Reinforcing Code Generation with Reasoning-Process Rewards

2025-08-07 · Lishui Fan, Yu Zhang, Mouxiang Chen, Zhongxin Liu arxiv

In practice, rigorous reasoning is often a key driver of correct code, while Reinforcement Learning (RL) for code generation often neglects optimizing reasoning quality. Bringing process-level supervision into RL is appealing, but it faces two challenges. First, training reliable reward models to assess reasoning quality is bottlenecked by the scarcity of fine-grained preference data. Second, naively incorporating such neural rewards may suffer from reward hacking. This work proposes ReCode (Reasoning-Reinforced Code Generation), a novel RL training framework comprising: (1) Contrastive Reasoning-Process Reward Learning (CRPL), which trains a reward model with synthesized optimized and degraded reasoning variants to assess the quality of reasoning process; and (2) Consistency-Gated GRPO (CG-GRPO), which integrates the reasoning-process reward model into RL by gating neural reasoning-process rewards with strict execution outcomes, using execution correctness as a hard gate to mitigate reward hacking. Additionally, to assess the reward model's discriminative capability in assessing reasoning-process quality, we introduce LiveCodeBench-RewardBench (LCB-RB), a new benchmark comprising preference pairs of superior and inferior reasoning processes tailored for code generation. Experimental results across HumanEval(+), MBPP(+), LiveCodeBench, and BigCodeBench show that a 7B model trained with ReCode outperforms the base version by 16.1% and reaches performance comparable to GPT-4-Turbo. We further demonstrate the generalizability of ReCode by extending it to the math domain.

📄 PDF Abstract BibTeX arXiv:2508.05170

Code (0)

등록된 구현이 없습니다.

Tasks

Reinforcement LearningCode Generation

Similar Papers 제목 키워드 기반

RECODE: Reasoning Through Code Generation for Visual Question Answering

2025-10-15 · Junhong Shen, Mu Cai, Bo Hu, Ameet Talwalkar 외 arxiv

Multimodal Large Language Models (MLLMs) struggle with precise reasoning for structured visuals like charts and diagrams, as pixel-based perception lacks a mechanism for verification. To address this, we propose to lever…

Visual Question AnsweringMultimodal ReasoningVisual ReasoningCode Generation

ReCode: Updating Code API Knowledge with Reinforcement Learning

2025-06-25 · Haoze Wu, Yunzhi Yao, Wenhao Yu, Huajun Chen 외

Large Language Models (LLMs) exhibit remarkable code generation capabilities but falter when adapting to frequent updates in external library APIs. This critical limitation, stemming from reliance on outdated API knowled…

Code Generationreinforcement-learningReinforcement Learning

CORECODE: A Common Sense Annotated Dialogue Dataset with Benchmark Tasks for Chinese Large Language Models

2023-12-20 · Dan Shi, Chaobin You, Jiantao Huang, Taihao Li 외

As an indispensable ingredient of intelligence, commonsense reasoning is crucial for large language models (LLMs) in real-world scenarios. In this paper, we propose CORECODE, a dataset that contains abundant commonsense …

Causal InferenceCommon Sense Reasoning

A Syntax-Guided Edit Decoder for Neural Program Repair

2021-06-15 · Qihao Zhu, Zeyu Sun, Yuan-an Xiao, Wenjie Zhang 외

Automated Program Repair (APR) helps improve the efficiency of software development and maintenance. Recent APR techniques use deep learning, particularly the encoder-decoder architecture, to generate patches. Though exi…

Code CompletionCode GenerationDecoderProgram Repair

Drawing-Recode: Annotation Grounding for Parametric CAD Code Generation from Raster 2D CAD Drawings

2026-07-30 · Mingi Kim, Yongjun Kim, Hyungki Kim arxiv

Recovering Parametric CAD sequences from raster-format 2D Computer-Aided Design (CAD) drawings accumulated prior to digital transformation is important for part reproduction and manufacturing process automation. However,…

Code Generation