TL;DR
The authors introduce RL-SaLLM-F, a novel framework that eliminates the need for unrealistic "scripted teachers" or tedious human intervention in online preference-based reinforcement learning (PbRL). By converting robot trajectories into text, using a double-check mechanism to eliminate noisy labels, and prompting an LLM to "imagine" successful goal-directed trajectories, the method achieves performance on par with privileged-reward baselines using cost-effective models like GPT-4o-mini.
What Problem Does This Paper Address?
Designing reward functions for reinforcement learning (RL) is notoriously difficult and time-consuming. Preference-based RL (PbRL) bypasses this by training a reward model from pairwise comparisons of agent trajectories. However, online PbRL requires real-time feedback during training. To evaluate algorithms without exhausting human labelers, researchers typically rely on a "scripted teacher"—a simulated oracle that cheats by looking at the environment's hidden, handcrafted reward function to generate preferences. This completely undermines the core motivation of PbRL.
While Large Language Models (LLMs) seem like an obvious replacement for this oracle, they suffer from a major bottleneck early in training: query ambiguity. In the initial stages of RL, the agent's policies are poor, meaning both sampled trajectories are highly suboptimal failures. When asked to choose between two equally bad trajectories, LLMs provide random, inconsistent, or hallucinated preference labels, which corrupts the reward model and stalls policy learning.
Methods
RL-SaLLM-F addresses query ambiguity by leveraging both the discriminative and reflective/generative capabilities of LLMs through a multi-step pipeline:
- Textual Abstraction: Low-level environment states (such as robot end-effector coordinates, object positions, and targets) are serialized into structured text descriptions.
- Double-Check Mechanism: To combat the randomness of LLM preference labels, the framework queries the LLM with a pair of trajectories, swaps their input order, and queries it again. If the LLM's choices are inconsistent (e.g., preferring A over B, but then preferring B over A when swapped), the pair is deemed ambiguous and discarded.
- Self-Augmented Feedback (Trajectory Generation): This is the core innovation. Instead of just asking the LLM to judge bad trajectories, the framework prompts the LLM to act as a planner. Taking the better of the two suboptimal trajectories and its initial state, the LLM generates an "imagined" text trajectory that successfully achieves the task goal. This synthetic, high-quality trajectory is paired with the original suboptimal trajectory to create a clear, unambiguous preference pair (where the imagined trajectory is always preferred) to train the reward model.
Datasets
The framework was evaluated on two primary benchmarks:
- MetaWorld: Eight robotic manipulation tasks including Button Press, Drawer Open, Drawer Close, Door Open, Door Unlock, Window Open, Handle Pull, and Reach.
- Point-Maze: Three navigation tasks (Open, UMaze, and Medium) used to evaluate cross-domain generalization capability.
Key Insights and Ideas
- The Virtuous Cycle of Augmentation: By injecting high-quality, imagined trajectories into the reward model's training set, the reward function becomes highly discriminative. This encourages the RL policy to explore better states, which in turn populates the replay buffer with higher-quality trajectories, naturally resolving the query ambiguity problem as training progresses.
- Imagination Over Physics: Crucially, the LLM's imagined trajectories do not need to strictly adhere to real-world physical constraints. Because they are only used to train a Markovian reward model (teaching it what a good state looks like, rather than training a dynamics model or policy directly), even physically unfeasible trajectories provide a powerful learning signal if they successfully reach the goal state.
- Scale vs. Cost: While scaling up to larger models like GPT-4o yields higher label accuracy and more cautious evaluations (assigning equal preference to highly similar trajectories), the lightweight GPT-4o-mini provides a highly cost-effective alternative that still solves the downstream control tasks successfully.
Key Results
- On Par with Privileged Baselines: Across the 8 MetaWorld tasks, RL-SaLLM-F achieved success rates comparable to, and sometimes exceeding, PEBBLE (the standard PbRL baseline that relies on a scripted teacher with access to ground-truth rewards).
- Label Accuracy Boost: The double-check mechanism combined with self-augmentation raised the LLM's label accuracy from a baseline of ~58% to over 72% on the Button Press task.
- Highly Cost-Effective: By optimizing prompts and utilizing GPT-4o-mini, the average cost per full training cycle was kept to a modest ~$2.19, compared to the prohibitive costs associated with larger models or continuous visual-token processing.
Limitations and Future Work
- State-Space Dependency: The current method relies on text-based coordinate descriptions of the environment. It cannot directly ingest raw pixel inputs, meaning it requires pre-existing object tracking or state estimation.
- Label Accuracy Ceiling: Even with self-checking, the LLM's preference label accuracy relative to ground truth maxes out around 70-80%, indicating room for improvement in fine-grained trajectory understanding.
- Future Directions: The authors suggest integrating Vision-Language Models (VLMs) and video diffusion models to directly evaluate and generate visual trajectories, removing the need for explicit coordinate tracking.
Summary updated