TL;DR
GRAPE (Generalizing Robot Policy via Preference Alignment) is a new framework that moves beyond simple imitation learning for robots. By using trajectory-level preference optimization and automatically generated cost functions from large vision-language models, it allows robots to learn from both successes and failures, significantly improving their ability to generalize to new tasks while balancing objectives like safety and efficiency.
What Problem Does This Paper Address?
Most modern Vision-Language-Action (VLA) models rely on Supervised Fine-Tuning (SFT), essentially playing a game of "follow the leader" with expert demonstrations. While this works in controlled settings, it has two major flaws:
- Brittleness: Models struggle to generalize to new objects or environments because they only know how to copy specific successful paths, not the underlying logic of the task.
- Fixed Objectives: SFT models can't easily be "tweaked" to be safer or faster; they just do what the expert did.
Reinforcement Learning (RL) could solve this, but defining precise mathematical rewards for complex tasks like "pick up the grape and put it in the pot" is notoriously difficult and expensive. GRAPE aims to bridge this gap by automating reward generation and focusing on whole trajectories rather than individual steps.
Methods
The GRAPE framework consists of two main components:
- Guided-Cost Preference Generation (GCPG): This is the "brain" that defines what a good trajectory looks like. It uses a Vision-Language Model (VLM) to decompose a complex task into temporal stages (e.g., Grasp $\rightarrow$ Move $\rightarrow$ Drop). It then identifies spatial keypoints and prompts an LLM (GPT-4o) to write Python cost functions for each stage. These functions can be customized for specific goals like Safety (avoiding obstacles) or Efficiency (minimizing path length).
- Trajectory-wise Preference Optimization (TPO): Instead of rewarding the robot at every tiny step (which is noisy), GRAPE evaluates the entire trajectory. It ranks sampled trajectories based on the generated costs, the model's own self-evaluation, and a binary success indicator. The model is then fine-tuned to prefer the high-ranking trajectories over the low-ranking ones.
Datasets
The authors evaluated GRAPE across both simulated and real-world benchmarks:
- Simpler-Env: A simulation environment focused on evaluating how well VLA models generalize to new objects, sizes, and instructions.
- LIBERO: A benchmark for lifelong robot learning featuring diverse manipulation tasks.
- Real-World Dataset: 300 experiments across 30 distinct tasks using a Franka robotic arm. These tasks tested five types of "out-of-distribution" generalization: visual, subject, action, semantic, and language grounding.
Key Insights and Ideas
- Failure is a Teacher: By including failed trials in the preference ranking, GRAPE teaches the model what not to do, which is often more informative for generalization than only seeing perfect successes.
- The LLM as a Reward Engineer: Manually coding rewards is a bottleneck. GRAPE shows that LLMs can effectively translate high-level human objectives (like "be safe") into functional code that guides robot learning.
- Global vs. Local Alignment: Optimizing at the trajectory level (global) rather than the step level (local) helps the model avoid getting stuck in "step-wise noise" and focuses it on the ultimate goal of task completion.
- Iterative Refinement: As shown in Figure 6, the model's performance improves progressively over multiple iterations of sampling and optimization, indicating that it gets better at generating its own high-quality training data.
Key Results
GRAPE consistently outperformed state-of-the-art baselines like OpenVLA and Octo:
- Success Rates: In simulation, GRAPE increased success rates on unseen tasks by an average of 58.20% compared to SFT baselines.
- Real-World Performance: GRAPE achieved a total average success rate of 50.3%, significantly higher than OpenVLA-SFT (32.3%) and OpenVLA-DPO (39.3%).
- Flexible Alignment: By simply tweaking the cost functions, the researchers created "GRAPE-Safety" (which reduced collision rates by 37.44%) and "GRAPE-Efficiency" (which reduced path lengths by 11.15%).
Limitations and Future Work
While powerful, GRAPE has a few areas for growth:
- Computational Cost: Iterative online sampling and preference ranking require significant compute resources compared to simple SFT.
- VLM/LLM Dependency: The quality of the cost functions depends heavily on the reasoning capabilities of the underlying models (like GPT-4o).
- Binary Preferences: The current implementation mostly uses a binary "chosen vs. rejected" ranking; future work could explore more nuanced, multi-level preference rankings to further refine behavior.
Summary updated