Learning and reusing primitive behaviours to improve Hindsight Experience Replay sample efficiency

Francisco Roldan Sanchez, Qiang Wang, David Cordova Bulens, Kevin McGuinness, Stephen Redmond, Noel O'Connor

TL;DR

This paper introduces QMP-HER, a method that accelerates robotic reinforcement learning by reusing pre-trained "primitive" skills to guide exploration. By using a critic network to dynamically select the best actions from an ensemble of these primitives, agents learn complex manipulation tasks significantly faster and with higher sample efficiency than standard Hindsight Experience Replay (HER).

What Problem Does This Paper Address?

Training robots to perform complex manipulation tasks (like picking up an object and throwing it into a specific bin) using Reinforcement Learning (RL) is notoriously difficult. A major hurdle is the sparse reward problem: if a robot only gets a "point" when it perfectly completes a task, it might spend millions of steps flailing randomly before it accidentally succeeds.

Hindsight Experience Replay (HER) was a breakthrough that allowed agents to learn from failure by pretending that whatever state they reached was actually their intended goal. However, HER still suffers from "blind" exploration. The agent has no guidance on how to interact with objects initially, leading to prohibitively long training times. While some methods try to generate better intermediate goals, they are often computationally expensive and slow down the learning process.

Methods

The authors propose Q-switch Mixture of Primitives Hindsight Experience Replay (QMP-HER). The core idea is to give the learning agent a "toolbox" of simple, pre-learned primitive behaviors (e.g., a policy that just knows how to reach for a coordinate) and let the agent decide when to use them.

Key components include:

  • Primitive Ensemble: A set of fixed policies learned on simpler tasks. For a complex task like "Pick and Place," primitives might include "Reach for the object" or "Reach for the goal."
  • The Q-Filter: Instead of a manually designed schedule (a curriculum), the agent uses its own critic network. At every timestep, the target policy and all primitive policies suggest an action. The critic evaluates these candidates and selects the one with the highest predicted value (Q-value).
  • Natural Evolution: Early in training, the target policy is random, so the critic will likely favor the "sensible" actions suggested by primitives. As the agent learns, the target policy's Q-values improve, and the agent naturally transitions from relying on primitives to using its own specialized strategy.

Datasets

The researchers evaluated their method using the standard OpenAI Fetch robot arm environments and two more challenging variations:

  1. FetchReach: Moving the gripper to a 3D point.
  2. FetchPush: Moving a block to a target on a table.
  3. FetchPickAndPlace: Lifting a block and moving it to a 3D target.
  4. FetchPickObstacle: Picking and placing a block while avoiding a physical barrier.
  5. FetchPickAndThrow: Lifting a cube and throwing it into one of eight distant boxes.
Fig. 1: Visual representation of (a) FetchReach, (b) FetchPush, (c) FetchPickAndPlace, (d) FetchPickObstacle and (e) Fetch- PickAndThrow tasks.

Key Insights and Ideas

  • Guidance without Micro-management: Unlike traditional hierarchical RL or manual curricula, QMP-HER doesn't force the agent to follow a specific sequence. The critic acts as an automated selector, choosing the most promising "hint" from the primitives based on the current state.
  • Computational Efficiency: Many advanced HER variants (like G-HGG) require complex trajectory sampling to generate goals, which is slow. QMP-HER simply evaluates a few extra actions per step, making it much faster in terms of wall-clock time.
  • Knowledge Scaffolding: The paper demonstrates that very simple primitives (like a basic "Reach" policy) can provide enough of a "nudge" to help an agent solve much more complex tasks that standard HER fails to solve entirely.

Key Results

The results show that QMP-HER consistently outperforms standard HER and matches or beats state-of-the-art variants like G-HGG in both speed and success rate.

  • FetchPush: QMP-HER reached a 90% success rate in just 25 policy updates, whereas standard HER required roughly 70 updates.
  • FetchPickObstacle: Standard HER failed this task completely. QMP-HER achieved a 95% success rate in about 60 updates, significantly faster than G-HGG, which took 175 updates.
  • FetchPickAndThrow: Both QMP-HER and G-HGG reached a 50% success rate (failing only on the furthest bins). However, QMP-HER was nearly 5.5x faster in computation time per update (72.8s vs 396.5s).
Success rates across different tasks, showing QMP-HER (blue) converging faster than standard HER and other variants.

Limitations and Future Work

Despite its success, the authors note a few areas for improvement:

  • Manual Objective Definition: Currently, a human must define the "objectives" for the primitives (e.g., telling the Reach primitive to target the block's location).
  • Exploration Limits: In the "Pick and Throw" task, the agent still struggled with distant targets because the block rarely landed in those bins during exploration, giving HER no "successful" hindsight goals to learn from.
  • Future Directions: The authors suggest automating the discovery of primitives using techniques like Decision Transformers or combining QMP-HER with automated goal-generation methods to further boost exploration in extremely complex environments.

Summary updated

Abstract

Hindsight Experience Replay (HER) is a technique used in reinforcement learning (RL) that has proven to be very efficient for training off-policy RL-based agents to solve goal-based robotic manipulation tasks using sparse rewards. Even though HER improves the sample efficiency of RL-based agents by learning from mistakes made in past experiences, it does not provide any guidance while exploring the environment. This leads to very large training times due to the volume of experience required to train an agent using this replay strategy. In this paper, we propose a method that uses primitive behaviours that have been previously learned to solve simple tasks in order to guide the agent toward more rewarding actions during exploration while learning other more complex tasks. This guidance, however, is not executed by a manually designed curriculum, but rather using a critic network to decide at each timestep whether or not to use the actions proposed by the previously-learned primitive policies. We evaluate our method by comparing its performance against HER and other more efficient variations of this algorithm in several block manipulation tasks. We demonstrate the agents can learn a successful policy faster when using our proposed method, both in terms of sample efficiency and computation time. Code is available at https://github.com/franroldans/qmp-her.
BibTeX
@misc{sanchez2023learning,
  author = {Francisco Roldan Sanchez and Qiang Wang and David Cordova Bulens and Kevin McGuinness and Stephen Redmond and Noel O'Connor},
  title = {{Learning and reusing primitive behaviours to improve Hindsight Experience Replay sample efficiency}},
  year = {2023},
  eprint = {2310.01827},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2310.01827},
}

Loading related content...

Figure