Skip to main content
QUICK REVIEW

[Paper Review] Hindsight Expectation Maximization for Goal-conditioned Reinforcement Learning

Yunhao Tang, Alp Kucukelbir|arXiv (Cornell University)|Jun 13, 2020
Reinforcement Learning in RoboticsComputer Science57 references7 citations
TL;DR

This paper introduces Hindsight Expectation Maximization (hEM), a probabilistic reinforcement learning framework that formulates goal-conditioned RL as a variational inference problem, enabling stable policy optimization via supervised learning updates. By interpreting hindsight experience replay as importance sampling, hEM significantly outperforms baseline methods—especially on high-dimensional image inputs—demonstrating superior sample efficiency and stability in sparse-reward environments.

ABSTRACT

We propose a graphical model framework for goal-conditioned RL, with an EM algorithm that operates on the lower bound of the RL objective. The E-step provides a natural interpretation of how 'learning in hindsight' techniques, such as HER, to handle extremely sparse goal-conditioned rewards. The M-step reduces policy optimization to supervised learning updates, which greatly stabilizes end-to-end training on high-dimensional inputs such as images. We show that the combined algorithm, hEM significantly outperforms model-free baselines on a wide range of goal-conditioned benchmarks with sparse rewards.

Motivation & Objective

  • Address the challenge of training goal-conditioned reinforcement learning agents in environments with sparse binary rewards, where traditional methods fail due to lack of credit assignment.
  • Overcome the instability of temporal difference learning with high-dimensional inputs (e.g., images) by reformulating policy optimization as supervised learning.
  • Formalize hindsight experience replay as a special case of importance sampling within a probabilistic graphical model framework.
  • Develop a stable, end-to-end training procedure for goal-conditioned RL that generalizes across diverse tasks and input modalities, including image-based observations.

Proposed method

  • Formulate the goal-conditioned RL objective as maximizing the evidence of a probabilistic model, leading to a tractable lower bound (ELBO) for optimization.
  • Design an EM algorithm where the E-step reweights trajectories using hindsight goals, effectively treating failed trajectories as successes for alternative goals—equivalent to importance sampling for rare events.
  • The M-step performs policy optimization via supervised learning updates on the reweighted trajectories, stabilizing training on high-dimensional inputs like images.
  • Introduce a hybrid algorithm combining hEM and HER, using a weighted loss that blends TD-based Q-learning and hEM’s supervised policy update for improved sample efficiency.
  • Use a variational posterior $ q_{\phi}(z \mid x) $ to approximate the true posterior, enabling differentiable optimization of the evidence lower bound (ELBO).
  • Collect trajectories using a policy, then apply hindsight relabeling to generate diverse goal-conditioned experience, which is used to train the policy via supervised learning in the M-step.

Experimental results

Research questions

  • RQ1Can hindsight experience replay be formally interpreted through the lens of importance sampling in probabilistic inference?
  • RQ2How can the stability of policy optimization in high-dimensional observation spaces (e.g., images) be improved in goal-conditioned RL with sparse rewards?
  • RQ3Does formulating goal-conditioned RL as a variational inference problem lead to better sample efficiency and convergence than standard off-policy RL methods?
  • RQ4Can the EM framework be extended to combine the strengths of HER and supervised learning for improved performance on complex robotic tasks?

Key findings

  • hEM consistently outperforms HER across all benchmark tasks, with significant gains on image-based inputs where HER’s TD-based updates degrade due to high-dimensional observations.
  • On the Fetch robot and Sawyer robot tasks with image-based goals, hEM achieves performance comparable to state-based goal representations, demonstrating robustness to input modality.
  • The hybrid hEM-HER algorithm with $ \eta = 0.1 $ achieves marginal improvements in learning speed over HER alone, particularly on challenging Fetch tasks with complex goal spaces.
  • Larger trajectory collection size $ N $ leads to better performance, confirming that sufficient coverage of the goal space is critical for stable learning.
  • hEM’s supervised learning-based M-step provides significantly more stable training than HER’s TD-learning updates, especially when training end-to-end on raw pixels.
  • The method achieves state-of-the-art performance on a suite of goal-conditioned RL benchmarks, particularly excelling in sparse reward settings with high-dimensional inputs.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.