Universal Value Density Estimation for Imitation Learning and Goal-Conditioned Reinforcement Learning

Yannick Schroecker, Charles Lee IsbellOpenReview 2020

TL;DR

This paper introduces "Universal Value Density Estimation" (UVD), a novel approach that connects probabilistic long-term dynamics with value functions. UVD leverages advances in density estimation to efficiently train agents for both goal-conditioned reinforcement learning (GCRL) and imitation learning (IL), overcoming limitations like sparse rewards and hindsight bias in GCRL, and achieving state-of-the-art sample efficiency in IL.

What Problem Does This Paper Address?

The paper tackles two related challenges in reinforcement learning: goal-conditioned reinforcement learning (GCRL) and imitation learning (IL). In GCRL, agents need to learn to achieve various goals, often with sparse reward signals, making learning difficult. A common technique, Hindsight Experience Replay (HER), helps by creating "hindsight" goals from experienced states, but it suffers from "hindsight bias," where failed attempts are discarded, leading to overestimated action values. In IL, agents learn from expert demonstrations, but traditional methods can accumulate errors or require vast amounts of data. The core problem is efficiently learning to reach desired states (or distributions of states) in a robust and unbiased manner, especially in the presence of sparse rewards and noisy environments.

Methods

The paper's core contribution is Universal Value Density Estimation (UVD). UVD bridges the gap between probabilistic long-term dynamics and value functions by using modern density estimation techniques, specifically Normalizing Flows (like RealNVP), to estimate a "Value Density." This Value Density represents the probability of reaching certain goals, which can be directly used as a Q-function approximation for goal-conditioned tasks.

Key aspects of the method include:

  • Value Density: The authors propose that the Q-function in certain goal-conditioned tasks is equivalent to a discounted probability density over achievable goals. This "Value Density" can be learned using density estimators.
  • Combining Estimators: UVD combines a density estimator (for short-term value) with a temporal-difference (TD) learning lower bound (for long-term value). This hybrid approach aims to combat underestimation from density estimation and overestimation from TD learning.
  • Addressing Hindsight Bias: Unlike HER, UVD uses hindsight samples in an unbiased way, allowing the agent to learn from failures and avoid overestimating successful actions.
  • Imitation Learning Extension (Value Density Imitation - VDI): For IL, VDI uses the learned UVD Q-function and samples demonstration states as goals. It then trains the agent to match the expert's state-action distribution by learning a goal-conditioned Q-function and using it to estimate the policy gradient. VDI also incorporates a mechanism to sample demonstration states with a probability inversely proportional to their likelihood of being visited by the agent, ensuring comprehensive imitation.

Datasets

The paper evaluates its methods on:

  • Simulated Manipulation Tasks (Fetch robot arm): These are standard benchmarks for GCRL, used to demonstrate UVD's effectiveness against HER and TD3, including variations like sparse rewards and noisy environments.
  • Locomotion Tasks (OpenAI Gym): Specifically, HalfCheetah-v2 and Humanoid-v2 (with modified versions like "NonExploitable") are used to evaluate VDI's sample efficiency against GAIL. These tasks are known for complex dynamics and proprioceptive state-action spaces.

Key Insights and Ideas

  • The surprising equivalence between Q-functions and goal-density functions: This insight is the foundation of UVD, allowing the application of powerful density estimation techniques to RL problems.
  • Hindsight bias is a fundamental issue with HER, not just an implementation detail: The paper clearly demonstrates how discarding failed transitions leads to an optimistic bias, particularly problematic in stochastic environments.
  • Density estimation can provide an unbiased alternative to HER for learning from sparse rewards: By learning the probability of achieving goals, UVD offers a principled way to handle sparse rewards without the bias introduced by HER.
  • A unified framework for GCRL and IL: The paper shows how UVD can be adapted to both settings, demonstrating a flexible and powerful approach to learning from demonstrations and achieving goals.
  • The importance of state-action distribution matching in IL: VDI's success highlights that effectively matching the expert's behavior, especially in complex environments, requires more than just mimicking actions; it involves understanding the underlying state dynamics.

Key Results

  • Goal-Conditioned Reinforcement Learning:
    • UVD performs comparably to TD3+HER on deterministic Fetch tasks.
  • On a sparse reward version of FetchPush, UVD and HER perform similarly, outperforming TD3 without hindsight updates.
  • Crucially, on a stochastic FetchSlide domain with added noise, UVD significantly outperforms HER, achieving a higher success rate by accurately assessing action risks, whereas HER converges to a suboptimal policy due to hindsight bias.
  • Imitation Learning:
    • VDI achieves state-of-the-art demonstration sample-efficiency on challenging locomotion tasks (HalfCheetah-v2, Humanoid-v2).
  • VDI outperforms GAIL, especially when the number of demonstration trajectories is low. For instance, on Humanoid-v2, VDI can imitate the expert using only a single trajectory, while GAIL struggles with reduced data.

Limitations and Future Work

  • Computational Cost of Density Estimation: The paper acknowledges that applying density estimation in high-dimensional settings (like visual features) presents significant computational challenges, suggesting this as an avenue for future research.
  • Time Horizon Truncation: For practical reasons, the density estimator's time horizon is truncated. While this is mitigated by TD learning, it means the Q-value might be underestimated if the true time-to-recurrence is longer than the truncation point.
  • Exploitable Benchmarks: The authors note that standard locomotion benchmarks can be easily exploited by certain IL methods. They propose modified versions to create more challenging learning problems.
  • Future Work: The paper suggests exploring the application of UVD to high-dimensional, visual domains and further investigating the trade-offs between density estimation and temporal-difference learning for different time horizons.

Summary updated

BibTeX
@misc{schroecker2020universal,
  author = {Yannick Schroecker and Charles Lee Isbell},
  title = {{Universal Value Density Estimation for Imitation Learning and Goal-Conditioned Reinforcement Learning}},
  year = {2020},
  eprint = {2002.06473},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2002.06473},
}
Figure