Introduction
Reinforcement Learning (RL) is highly effective at teaching robots to perform complex tasks, but it relies heavily on a "reward function"—a mathematical signal telling the robot what it did right. Writing these functions by hand is notoriously tedious. While recent work has used Large Language Models (LLMs) to generate them automatically, most existing methods assume the human will provide clean, structured instructions for a fixed goal.
In reality, human preferences are unconstrained, diverse, and dynamic. People use vague pronouns (e.g., "move it a bit more"), give feedback that contradicts previous steps, or change their minds mid-task. Existing "reward-from-code" baselines like Eureka or Text2Reward often fail when task requirements shift or when language becomes too colloquial.
To bridge this gap, researchers have introduced ROSETTA, a new framework that allows robots to adapt to the messy, ambiguous way people actually talk. By translating natural language into executable reward code, ROSETTA enables robots to align with evolving human intent in a single step of online adaptation.
The ROSETTA Framework
ROSETTA uses a modular pipeline powered by foundation models (specifically GPT-4o and o1-mini) to turn raw, unconstrained feedback into dense, optimizable reward signals.
The system operates in three main stages:
- Preference Grounding (GPT-4o): This module takes raw human feedback, trajectory images, and symbolic states to disambiguate the language. It maps vague references (like "the red one") to specific environment objects and ensures that the context of previous interactions is preserved. Without this grounding, LLMs frequently hallucinate or ignore the history of the interaction.
- Staging (GPT-4o): Instead of jumping straight to code, ROSETTA first creates a high-level plan. It breaks the grounded preference into "atomic stages" (e.g., "Stage 1: Reach the cube," "Stage 2: Align edges"). This makes the resulting reward function much easier for an RL algorithm to optimize.
- Coding (o1-mini): The final module translates the staged plan into Python code. It uses a "domain knowledge checklist" to ensure the code handles physical realities, such as object dimensions, coordinate systems, and reward "densification" (ensuring the robot gets partial credit for getting closer to a goal).
The framework also features an Iterative Error Correction loop. The system runs the generated code in a simulator, catches any stack traces, and prompts the LLM to fix bugs automatically before finalizing the reward function.
Experimental Setup
The researchers evaluated ROSETTA using the ManiSkill 3 simulation environment across five task-agnostic manipulation setups. These included short-horizon tasks focused on continuous control (SphereAndBins, BallAndTarget) and long-horizon tasks focused on action primitives (ThreeCubes, ObjectsAndBins, ObjectsAndDrawer).
To test the system's robustness, they collected a new dataset of 116 unique human preferences from 35 interaction sequences. Sourced from real human annotators encouraged to speak naturally, this dataset presents a wide variety of "in-the-wild" linguistic challenges.
Key Insights and Results
ROSETTA demonstrates that reasoning-heavy models like o1-mini are significantly better at applying long-context instructions and complex geometric constraints than standard chat-tuned models. Furthermore, policies trained in simulation using ROSETTA-generated rewards transferred successfully to a physical Franka Panda robot without a "sim-to-real gap."
Quantitative results highlight ROSETTA's superiority over existing methods:
- High Human Satisfaction: ROSETTA achieved 86% human satisfaction, outperforming state-of-the-art baselines like Text2Reward and Eureka by roughly 33%.
- Technical Reliability: It reached an 87% average success rate across all tasks, proving that the generated code is not just "smart-sounding" but functionally viable for RL training.
- Semantic Match: Expert roboticists rated the generated code at a 78% semantic match, confirming it accurately reflected the human's intent.
- Adaptability: Unlike baselines that struggle when a human changes the goal, ROSETTA maintained high performance even after four consecutive rounds of evolving preferences.
Limitations and Future Work
While highly effective, ROSETTA has a few limitations. It currently requires detailed documentation of the simulator's API and environment code to generate rewards, making it somewhat simulator-dependent. Additionally, because the generated reward functions are largely Markovian, the framework struggles with preferences that have complex temporal dependencies (e.g., "wait for 2 seconds before doing X").
Finally, the authors note that evaluating code-based rewards still relies heavily on human experts. Developing automated metrics for reward quality, alongside robust safety filters to prevent harmful LLM generations, remain vital next steps for the field.
Summary updated