Introduction
Reinforcement Learning (RL) is a powerful tool for teaching robots complex skills, but it faces a significant "bottleneck": the reward function. Designing a reward function that perfectly captures a task—without being exploited—usually requires a human expert to spend hours hand-tuning numerical values. While Large Language Models (LLMs) possess vast task-specific knowledge, they are notoriously poor at precise numerical reasoning. Previous attempts to bridge this gap relied on expensive human feedback or token-intensive "evolutionary" methods that randomly mutate code.
This paper introduces a self-alignment framework that allows robots to autonomously learn and refine their own reward functions using LLMs. By iteratively minimizing the ranking discrepancy between an LLM's qualitative judgment and a learned reward function's quantitative output, the system achieves expert-level performance across diverse manipulation tasks with 10x better token efficiency than previous methods.
Methodology
The authors propose a bi-level optimization loop that treats the LLM as a high-level "critic" rather than a low-level "coder."
- Initial Proposal: An LLM uses Chain-of-Thought (CoT) prompting to decompose a task (e.g., "Open the drawer") into "Dos" and "Don'ts," generating a Python reward function template with adjustable parameters.
- The Inner Loop: A standard RL agent (such as SAC or PPO) attempts to learn the task using the current reward function.
- The Outer Loop (Self-Alignment): The system samples trajectories of the robot's attempts and generates textual summaries. It then asks the LLM to rank these trajectories from best to worst. Simultaneously, the current reward function ranks them.
- Bayesian Update: If a "ranking inconsistency" occurs (e.g., the LLM prefers Trajectory A, but the reward function scores B higher), the system uses Bayesian inference (Metropolis-Hastings) to update reward parameters to align with LLM preferences.
- Active Adjustment: If rankings agree but the robot still fails, the LLM "reflects" on the execution and suggests parameter shifts (e.g., "increase the weight for grasping") to make the reward signal more salient.
Experimental Setup
The framework was validated on 9 tasks across two physics simulation environments:
- ManiSkill2: Rigid and articulated object manipulation like Pick Cube, Peg Insertion, Open Cabinet Door/Drawer, and Push Chair.
- Isaac Gym: High-dimensional tasks including Franka Cabinet and complex dexterous manipulation with a Shadow Hand (opening scissors and doors).
Results and Key Insights
The self-alignment process naturally creates a curriculum. For a "Pick Cube" task, the LLM initially rewards the robot for proximity. Once the robot is consistently near the cube, the alignment process shifts the reward weight toward grasping and lifting.
- Oracle-Level Performance: Self-aligned rewards achieved success rates comparable to expert-designed "oracle" rewards. In the Push Chair task, the method reached 83.65% success, significantly outperforming the environment's own oracle reward (60.59%).
- Token Efficiency: Compared to Eureka (a state-of-the-art mutation-based baseline), this method consumed 10x fewer GPT tokens per iteration because it optimizes parameters rather than regenerating entire blocks of code.
- Grounding via Ranking: LLMs are much better at discriminating (ranking A vs. B) than generating absolute values. Using ranking as a supervision signal makes the grounding process significantly more stable.
Discussion and Future Work
Despite its success, the framework faces a "textual bottleneck." Summarizing a 500-step robot trajectory into text can miss crucial details. Future work may leverage Vision-Language Models (VLMs) to "watch" executions directly. Additionally, LLMs still struggle with extremely subtle numerical differences (e.g., millimeter-level precision) and preference ambiguity when trajectories are equally good or bad.
Summary updated