MURPHY: Feedback-Aware GRPO with Retrospective Credit Assignment for Multi-Turn Code Generation
Chanakya Ekbote, Vijay Lingam, Sujay Sanghavi, Luke Huan, Behrooz O Tehrani, Anoop Deoras, Stefano Soatto
NeurIPS page · OpenReview · alphaXiv · Open on the map
Category: LLM Post-Training: RL & Distillation › Reinforcement Learning for Language Model Reasoning · Type: new method · Keywords: multi-turn code generation, GRPO, feedback-conditioned rollout, retrospective credit assignment, self-correction
Areas: LLM Reasoning › Reasoning Optimization › Policy Optimization for Language Models; Code & Coding Agents › Code Generation and Optimization › Code Generation; RL for LLMs & Agents › Language Model Agents › Language Model Optimization
Summary
MURPHY introduces a multi-turn extension of GRPO that uses feedback-conditioned rollout trees and retrospective credit assignment to improve self-correcting code generation.
Explained to a 5-year-old
A computer program tries to write code. When it makes a mistake, it gets a hint. It uses that hint to try again, making a new version of the code. It can keep doing this many times, each time improving based on the previous mistakes. To help it, the program builds a tree of possible attempts, where each failed attempt is linked to the feedback it received. This way, the program learns faster and writes better code.
Explained to a 5-year-old, longer
When a computer program is asked to write code, it often makes mistakes. It can get feedback from a checker that tells it what is wrong. Instead of just trying once, the program can use that feedback to try again, making a new version of the code. It can keep doing this many times, each time improving based on the previous mistakes. To help it, the program builds a tree of possible attempts, where each failed attempt is linked to the feedback it received. It then looks back at earlier attempts to see which ones gave useful hints, and uses that information to give credit to those attempts when a later attempt succeeds. This way, the program learns faster and writes better code. The method also prunes unnecessary attempts to save time. It works on different coding challenges and helps the program get higher scores. It is especially good at hard coding problems where many tries are needed. Overall, this makes coding assistants more reliable and easier to use.
For a technical reader
The paper addresses the limitation of single-turn GRPO methods in multi-turn code generation by constructing feedback-conditioned rollout trees. Each failed code candidate is paired with executor feedback and expanded into subsequent turns, enabling iterative refinement. Rewards are propagated backward through the tree using Max Reward and Mean Reward strategies, allowing successful refinements to credit earlier attempts that provided informative feedback. Post-rollout pruning mechanisms reduce the computational cost of multi-turn optimization. Experiments on HumanEval, MBPP, and LiveCodeBench-v6 show consistent gains over prior multi-turn approaches, especially on harder subsets.
Problem
Existing GRPO-based methods are single-turn and cannot leverage iterative environmental feedback for refining code generation, limiting performance in multi-turn self-correction scenarios.
Method
The approach builds feedback-conditioned rollout trees where failed code candidates are paired with executor feedback and expanded into subsequent turns, then propagates rewards backward using strategies like Max Reward and Mean Reward, and applies post-rollout pruning to reduce optimization cost.
Results
The approach achieves up to 6% absolute pass@1 gains over prior multi-turn methods across three benchmarks, with the largest improvements of +4.38%/+4.20% on Medium/Hard LiveCodeBench subsets at iteration 5.
Contributions
It introduces a multi-turn GRPO extension that constructs feedback-conditioned rollout trees, implements retrospective credit assignment via Max Reward and Mean Reward propagation, and adds pruning to reduce optimization cost.
This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction