Progress Reward Model for Reinforcement Learning via Large Language Models

Xiuhui Zhang, Ning Gao, Xingyu Jiang, Yihui Chen, Yuheng Pan, Mohan Zhang, Yue Deng

This paper introduces PRM4RL (Progress Reward Model for Reinforcement Learning), a novel framework that leverages Large Language Models (LLMs) to solve a persistent challenge in robotics: learning complex tasks when the only feedback is a sparse "success" or "failure" signal at the very end.

Overview of the PRM4RL framework and its performance compared to baselines.

TL;DR

PRM4RL uses LLMs to decompose complex robotic tasks into manageable subtasks and generates a fine-grained "progress function" for each. By treating this progress as a mathematical potential field, the authors create a dense reward signal that guides the agent step-by-step. This approach provides theoretical guarantees that the agent will converge optimally without "cheating" the reward system.

The Challenge of Sparse Rewards

Reinforcement Learning (RL) excels at optimization but struggles with sparse rewards. Imagine teaching a robot to make a sandwich, but only rewarding it once the sandwich is fully assembled. The robot will likely spend eternity flailing its arms before accidentally completing the task.

To address this, researchers typically try two approaches:

  1. Task Planning: Using an LLM to break the task into high-level steps (e.g., "pick up bread," "apply jam"). However, this often ignores the low-level motor control needed to execute the movements.
  2. Reward Shaping: Creating a "dense" reward (e.g., giving points for moving closer to the bread). The danger here is "reward hacking," where the robot finds a loophole to accumulate points without actually finishing the task.

PRM4RL bridges this gap by using the LLM to simultaneously generate both the high-level plan and the low-level mathematical reward structure.

Methods: Code as a Bridge

The authors utilize a "Program-aided Chain-of-Thought" approach. Instead of asking the LLM for natural language instructions, they prompt it to write Python code that defines the task logic.

Task decomposition and determination function generated via Python code.

The framework consists of three main components:

  • Subtask Decomposition: The LLM breaks a task down into a sequential plan_list (e.g., Move $\rightarrow$ Grasp $\rightarrow$ Rotate $\rightarrow$ Move to goal).
  • Determination Function ($\Psi$): The LLM writes executable code to detect which subtask the robot is currently attempting based on sensor observations (e.g., checking if the distance between the gripper and the object crosses a specific threshold).
  • Progress Function ($\Phi$): For each subtask, the LLM defines a fine-grained progress metric ranging from 0 to 1.

The core innovation lies in how $\Phi$ is utilized. Inspired by potential-based reward shaping, the reward is defined as the change in progress between two time steps. This ensures Policy Invariance—a mathematical guarantee that the dense reward will not alter the optimal policy compared to the original sparse reward, effectively preventing reward hacking.

Datasets and Evaluation

The authors evaluated PRM4RL on two major robotics benchmarks:

  • MetaWorld: A suite of tabletop manipulation tasks (e.g., opening a window, pushing a button, picking and placing objects).
  • ManiSkill: A high-fidelity simulation environment for more complex, multi-stage coordination tasks like "LiftPegUpright."

Key Insights

  • Precision Through Code: Using Python code as the LLM output is significantly more reliable than natural language. It forces the LLM to define precise geometric conditions that an RL agent can directly compute.
  • The "1+1 > 2" Effect: Providing both a subtask description (as a text embedding prior) and a dense reward signal yields better performance than either component alone. The text embedding supplies the "intent," while the reward provides the learning "gradient."
  • High Efficiency: Unlike previous methods that query an LLM continuously during training, PRM4RL calls the LLM only once at the start to generate the code. This drastically reduces computational overhead.

Key Results

PRM4RL achieved state-of-the-art performance across the evaluated benchmarks:

  • Success Rates: In complex tasks where standard LLM-planners achieved less than 15% success, PRM4RL reached nearly 100% average success rates on both MetaWorld and ManiSkill.
  • Convergence Speed: The model learned significantly faster than "LLM-as-rewarder" baselines, which often struggled to find a stable path to the goal.
  • Generalization: By structuring subtasks with a "verb + noun" pattern, the model demonstrated a strong ability to transfer learned skills to unseen tasks.

Limitations and Future Work

  • Hallucinations: Like all LLM-based systems, the model can occasionally generate "hallucinated" code—logic that appears correct but references non-existent variables or impossible thresholds.
  • Domain Constraints: The framework is currently tailored to robotics. Expanding its application to other domains, such as software agents or chemical synthesis, remains an open area for exploration.
  • Static Planning: The current version generates a plan once at the beginning of the task. If the environment changes unexpectedly, the agent lacks the ability to "re-plan" dynamically.

Summary updated

BibTeX
@inproceedings{zhang2025progress,
  author = {Xiuhui Zhang and Ning Gao and Xingyu Jiang and Yihui Chen and Yuheng Pan and Mohan Zhang and Yue Deng},
  title = {{Progress Reward Model for Reinforcement Learning via Large Language Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=TJhHb6CscW},
}
Figure