Abstract
Offline reinforcement learning (RL) aims to learn an optimal policy from pre-collected and labeled datasets, which eliminates the time-consuming data collection in online RL. However, offline RL still bears a large burden of specifying/handcrafting extrinsic rewards for each transition in the offline data. As a remedy for the labor-intensive labeling, we propose to endow offline RL tasks with a few expert data and utilize the limited expert data to drive intrinsic rewards, thus eliminating the need for extrinsic rewards. To achieve that, we introduce Calibrated Latent gUidancE (CLUE), which utilizes a conditional variational auto-encoder to learn a latent space such that intrinsic rewards can be directly qualified over the latent space. CLUE's key idea is to align the intrinsic rewards consistent with the expert intention via enforcing the embeddings of expert data to a calibrated contextual representation. We instantiate the expert-driven intrinsic rewards in sparse-reward offline RL tasks, offline imitation learning (IL) tasks, and unsupervised offline RL tasks. Empirically, we find that CLUE can effectively improve the sparse-reward offline RL performance, outperform the state-of-the-art offline IL baselines, and discover diverse skills from static reward-free offline data.
Introduction
Offline Reinforcement Learning (RL) is a powerful paradigm that allows agents to learn from static, pre-collected datasets without the risks or costs of real-world trial and error. However, a significant hidden cost remains: reward engineering. Most offline RL methods assume every transition in the dataset is labeled with an "extrinsic reward" (a score defined by a human). In complex real-world scenarios—like a robot tidying a room—defining and labeling these rewards for millions of data points is incredibly tedious and often impractical.
While "intrinsic rewards" (like curiosity or exploration bonuses) help in online RL, they are difficult to adapt to offline settings because they usually rely on real-time agent interaction. CLUE bridges this gap by using a small amount of "expert" data to automatically label massive, unlabeled datasets with high-quality intrinsic rewards.
The CLUE Framework
The core of CLUE is a Conditional Variational Auto-Encoder (CVAE). Standard CVAEs learn to map inputs (states and actions) into a compressed "latent space." The "secret sauce" of CLUE is Calibration.
- The Latent Space: CLUE trains the CVAE on the entire offline dataset.
- The Calibration Loss: Crucially, it adds a specific regularization term that forces all the embeddings of the expert data to "collapse" into a single, tight point in the latent space.
- Intrinsic Reward Generation: Once the space is calibrated, the intrinsic reward for any random data point is simply its proximity to that expert "cluster" in the latent space.
By "binding" the expert behaviors together, CLUE ensures that the latent space captures task-relevant features. This makes the resulting reward signal much cleaner and more aligned with the expert's intention than a naive distance metric would be. CLUE is "pluggable," meaning it can be used to generate rewards for any existing offline RL algorithm, such as Implicit Q-Learning (IQL).
Key Insights: The Necessity of Calibration
Without the calibration loss, expert and non-expert data points often overlap in the latent space, creating "noisy" rewards. Collapsing the expert data to a single point provides a clear "North Star" for the agent.
Beyond calibration, CLUE offers several advantages:
- Smoothing Sparse Signals: In sparse-reward tasks (where the agent only gets a '1' for finishing and '0' otherwise), CLUE provides a continuous, dense reward signal. This "reward relabeling" makes the optimization landscape much easier for the RL algorithm to navigate.
- Unsupervised Skill Discovery: By clustering unlabeled data and treating each cluster as a different "expert," CLUE can discover diverse behaviors (like an Ant walking in different directions) without any human-defined goals at all.
- Data Efficiency: CLUE performs remarkably well even with extremely limited data. In some tests, it achieved competitive results using only one expert trajectory.
Empirical Results
The authors evaluated CLUE using the standard D4RL benchmark, focusing on AntMaze (sparse navigation), Adroit (robotic manipulation), and MuJoCo Locomotion tasks.
- Outperforming Ground Truth: On AntMaze, CLUE (using only one expert trajectory) achieved 106.2% of the performance of standard IQL trained on the original human-labeled rewards.
- Imitation Learning: In locomotion tasks, CLUE outperformed state-of-the-art offline Imitation Learning (IL) baselines like SQIL and IQ-Learn, proving that its latent-distance rewards are more robust than adversarial-based methods.
- Robustness: CLUE showed stable performance across a wide range of hyperparameters and maintained high performance even when the amount of unlabeled offline data was reduced to just 5-25% of the original dataset.
Conclusion
CLUE effectively eliminates the burden of manual reward labeling by leveraging limited expert data to calibrate a latent guidance space. While the current model assumes unimodal expert behavior and requires state-action pairs, future work may explore state-only expert data, potentially allowing agents to learn directly from human videos.
Summary updated