Latent-Variable Advantage-Weighted Policy Optimization for Offline RL

Xi Chen, Ali Ghadirzadeh, Tianhe Yu, Yuan Gao, Jianhao Wang, Wenzhe Li, Bin Liang, Chelsea Finn, Chongjie ZhangarXiv 2022 · DOI

Introduction

Offline Reinforcement Learning (RL) is a paradigm for learning optimal policies from fixed datasets without environment interaction. This is particularly valuable for robotics, where real-world exploration is costly and potentially dangerous. However, real-world datasets are frequently heterogeneous, containing multi-modal behaviors from various demonstrators or policies with different goals.

Standard offline RL methods often struggle with these datasets because they attempt to "average" conflicting but valid actions. This "averaging" effect produces out-of-distribution (OOD) samples—actions that were never seen during training—leading to catastrophic failure when the agent is deployed.

Conceptual overview of LAPO vs. standard action space learning in heterogeneous datasets.

The LAPO Framework

To address the limitations of standard action-space learning, the authors introduce Latent-Variable Advantage-Weighted Policy Optimization (LAPO). LAPO leverages generative modeling and advantage-based weighting to navigate complex data distributions through a two-stage process.

1. Advantage-Weighted Action Policy

Instead of fitting a simple Gaussian distribution to all actions in the dataset, LAPO learns a latent-variable generative model $\pi_\theta(a|s, z)$. The training objective maximizes the advantage-weighted log-likelihood of the data. By weighting samples by their advantage scores, the model prioritizes high-reward "modes" of the data, effectively filtering out sub-optimal or irrelevant behaviors from the training set.

2. Latent Policy Optimization

Once the latent space is established, LAPO learns a separate "latent policy" $\pi_\vartheta(z|s)$ that selects the optimal latent code $z$ to maximize expected returns. Operating in the latent space naturally constrains the agent to the distribution of behaviors seen during training. To prevent the latent variables from drifting into regions that decode into OOD actions, the authors utilize a truncated Gaussian distribution for the latent policy, ensuring stability during optimization.

Empirical Evaluation and Results

The authors tested LAPO across several challenging benchmarks, including D4RL Antmaze, FrankaKitchen, and custom mixed-behavior locomotion tasks where data heterogeneity is a primary hurdle.

Comparison of action distributions between AWAC (averaging) and LAPO (mode-seeking).

As shown in the action distribution analysis above, standard methods like AWAC tend to produce a unimodal "average" of the data, which often falls into low-density (and low-reward) regions. In contrast, LAPO successfully captures the distinct modes of the data, aligning its policy with high-advantage actions while ignoring "distractor" behaviors.

Key Findings

  • Heterogeneous Mastery: LAPO achieved a 49% performance boost over state-of-the-art methods on heterogeneous datasets.
  • Navigation Breakthrough: In the complex Maze2d-large task, LAPO reached a score of 200.56, significantly outperforming the next best method, IQL, which reached only 64.30.
  • Consistency: Unlike many offline RL algorithms that excel in only one domain, LAPO remained competitive on standard "narrow" datasets, showing an 8% improvement over baselines like CQL.

Conclusion

LAPO demonstrates that latent-variable modeling, when combined with advantage weighting, provides a robust solution for offline RL in the presence of "messy," heterogeneous data. By acting as a filter for high-reward behaviors and constraining policy search to a learned latent space, LAPO avoids the common pitfalls of distribution shift and action averaging. Future work will explore extending this framework to unlabeled multi-task settings where an agent must distinguish between different goals within a single diverse dataset.

Summary updated

BibTeX
@misc{chen2022latent,
  author = {Xi Chen and Ali Ghadirzadeh and Tianhe Yu and Yuan Gao and Jianhao Wang and Wenzhe Li and Bin Liang and Chelsea Finn and Chongjie Zhang},
  title = {{Latent-Variable Advantage-Weighted Policy Optimization for Offline RL}},
  year = {2022},
  eprint = {2203.08949},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2203.08949},
}
Figure