Abstract
Offline Preference-based Reinforcement Learning (PbRL) faces a significant challenge in credit assignment: human preferences are often outcome-oriented, yet standard models assume a Markovian reward structure where rewards are summed independently over time. This paper introduces Hindsight Preference Learning (HPL), a novel framework that models rewards based on future outcomes. By utilizing a Variational Auto-Encoder (VAE) to learn compact representations of future trajectories from unlabeled data, HPL allows for reward learning conditioned on hindsight. During policy training, these rewards are marginalized over potential futures, leading to more robust and accurate credit assignment. HPL demonstrates substantial performance gains over existing methods across diverse benchmarks, including locomotion and complex robotic manipulation tasks.
Introduction: The Challenge of Outcome-Oriented Preferences
Reinforcement Learning (RL) typically relies on manually designed reward functions, which are often difficult to specify and prone to "reward hacking." Preference-based RL (PbRL) offers an alternative by leveraging human comparisons between trajectory segments. However, most PbRL methods assume a Markovian reward structure, where the total preference is the sum of independent, step-wise rewards.
This assumption fails to capture the outcome-oriented nature of human judgment. Humans often prefer an action not because of its immediate appearance, but because of where it leads. This leads to the "lottery problem": a standard model might over-reward a risky action simply because it happened to result in a successful outcome in a specific training segment, failing to account for the high probability of failure. HPL addresses this by explicitly modeling the relationship between current actions and future outcomes.
Hindsight Preference Learning (HPL) Framework
HPL decomposes the learning process into three distinct stages designed to capture the intent behind human preferences through hindsight.
- Future Segment Embedding: A conditional Variational Auto-Encoder (VAE) is trained on a large, unlabeled dataset. This VAE, which utilizes a GPT-style transformer architecture, learns to compress a sequence of future states and actions into a compact "hindsight" embedding ($z_t$). This embedding serves as a representation of "the future" from any given state.
- Hindsight Reward Learning: Instead of a standard reward function $r(s, a)$, HPL learns a conditional reward $r(s, a, z_t)$. This model is trained using human preferences but is explicitly conditioned on the actual future outcome ($z_t$) of the segments being compared.
- Reward Labeling & Policy Optimization: To train the RL agent, HPL calculates a scalar reward by marginalizing over possible futures. It uses the VAE to sample multiple potential futures from the current state and averages the hindsight rewards. This produces a robust reward signal that reflects the expected value of an action across various likely outcomes.
Experimental Setup and Benchmarks
The researchers evaluated HPL across three major benchmark suites representing a variety of robotic tasks:
- Gym-MuJoCo: Locomotion tasks including Hopper and Walker2D.
- Adroit: Complex robotic hand manipulation tasks such as Hammer and Pen.
- Meta-World: Robotic arm tasks including Drawer-Open, Button-Press, Plate-Slide, and Sweep-Into.
The experiments utilized both human-annotated preferences and synthetic preferences generated from ground-truth rewards to ensure a comprehensive evaluation.
Results and Key Insights
HPL consistently outperformed established baselines, including Markovian Reward (MR), Preference Transformer (PT), and Inverse Preference Learning (IPL).
Key findings from the empirical evaluation include:
- Superior Performance in Complex Tasks: In the high-dimensional Pen-Human task, HPL achieved a score of 70.9, significantly outperforming the next best baseline (MR), which reached only 14.1.
- Effective Use of Unlabeled Data: HPL leverages cheap, unlabeled data to build a prior distribution of environment dynamics. Performance showed a clear upward trend as the volume of unlabeled data increased.
- Robustness to Distribution Shift: HPL generalizes better when preference data and unlabeled data come from different behavior distributions (e.g., expert preferences vs. medium-quality unlabeled trajectories).
Conclusion and Future Directions
Hindsight Preference Learning provides a more accurate model of human preference by acknowledging its outcome-oriented nature. By integrating hindsight embeddings and marginalization, HPL solves the credit assignment issues inherent in Markovian PbRL. Future work may explore using the VAE for generative data augmentation to further improve sample efficiency or incorporating uncertainty estimation to guide human queries in safety-critical applications.
Summary updated