Abstract
Teaching autonomous agents complex tasks often requires meticulously hand-crafted reward functions, which are prone to error and unintended behaviors. While Preference-Based Reinforcement Learning (RL) offers a solution by learning from human choices, traditional "online" approaches are often unsafe or prohibitively expensive. We present Offline Preference-Based Apprenticeship Learning (OPAL), a framework that learns custom reward functions and optimal policies using only static, pre-collected datasets. OPAL leverages active query selection to efficiently learn rewards from human preferences and demonstrates the ability to "stitch" sub-optimal data into novel, complex behaviors.
Introduction
The challenge of reward engineering remains a significant bottleneck in deploying Reinforcement Learning (RL) in the real world. Preference-based RL addresses this by allowing humans to provide qualitative feedback (e.g., "Clip A is better than Clip B"). However, existing methods typically require the agent to interact with the environment during training to generate query clips. This "online" requirement is a major hurdle for safety-critical applications like autonomous driving or expensive robotic platforms.
OPAL bridges the gap between preference-based learning and Offline RL. By utilizing static datasets, OPAL eliminates the need for real-time interaction, providing a safer and more efficient path for teaching robots custom tasks.
Methodology: The OPAL Framework
OPAL decomposes the learning process into three distinct phases that operate entirely on pre-recorded data.
- Active Query Selection: Rather than presenting random clips, OPAL identifies trajectory segments that maximize information gain or highlight model uncertainty. Strategies such as Ensemble Disagreement—where multiple reward models are trained and clips with the highest variance in predictions are selected—ensure high query efficiency.
- Reward Learning: Human labels are used to train a neural network reward function. This model learns to map state-action pairs to scalar rewards based on the provided preferences.
- Offline Policy Optimization: The learned reward function is used to relabel the entire offline dataset. A standard offline RL algorithm is then applied to derive the final policy.
Experiments and Datasets
The framework was evaluated on standard D4RL benchmarks (e.g., Maze2D, Franka Kitchen) and several "open-ended" tasks designed to test the limits of reward learning from sub-optimal data. These included:
- Open Maze: A dataset of random point-to-point navigation used to teach novel behaviors like orbits.
- Constrained Maze: Reaching a goal while avoiding specific "no-go" zones.
- Modified CartPole: Learning "windmill" behaviors from random swings.
Key Insights: The Power of Stitching
A critical finding of this work is that reward learning is most valuable when the underlying data is diverse and sub-optimal. In datasets consisting purely of expert demonstrations, agents often succeed through simple behavioral cloning, rendering the reward function irrelevant.
OPAL's primary strength lies in its ability to stitch together segments of different trajectories. In the Open Maze experiment, the robot was never shown a complete orbit. However, by identifying and rewarding segments that contributed to the desired circular motion, the RL agent learned to combine these fragments into a novel, complete behavior that was not present in the original data.
Results and Conclusion
OPAL demonstrates remarkable efficiency, achieving performance comparable to ground-truth rewards with as few as 15 human queries in Maze2D tasks. In complex environments like the Franka Kitchen, OPAL-trained policies even surpassed those using hand-coded rewards, suggesting that human preferences can provide superior "reward shaping."
While OPAL is constrained by the diversity of the offline dataset, it represents a significant step toward practical, safe, and human-centric robot training. Future work will focus on handling noisy human labels and scaling to higher-dimensional real-world applications.
Summary updated