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

Francisco Roldán Sánchez, Qiang Wang, David Córdova Bulens, Kevin McGuinness, Stephen J. Redmond, Noel E. O’Connor

TL;DR

This paper introduces QMP-HER, a novel method that leverages previously learned "primitive" robotic skills to guide exploration in reinforcement learning (RL). By intelligently selecting actions from these primitive policies, QMP-HER significantly accelerates learning and improves sample efficiency for complex robotic manipulation tasks compared to standard Hindsight Experience Replay (HER).

What Problem Does This Paper Address?

Reinforcement learning, particularly for robotic manipulation, often requires vast amounts of data to learn effectively. Hindsight Experience Replay (HER) is a popular technique that improves sample efficiency by relabeling failed experiences as successful ones. However, HER still suffers from slow learning, especially during the initial exploration phase, because it lacks guidance on how to explore. This can lead to prohibitively long training times, making it challenging to train robots for complex tasks. The authors aim to address this by providing a more intelligent exploration strategy that leverages existing, simpler skills.

Methods

The core of the proposed method, QMP-HER (Q-switch Mixture of Primitives Hindsight Experience Replay), is to use a set of pre-trained "primitive" policies. These policies, learned on simpler tasks (like basic movement), are used to generate candidate actions. At each step during exploration, the agent considers actions proposed by its main "target" policy and actions from these primitive policies. Crucially, a critic network associated with the target policy decides which action to execute. This decision is based on which action is predicted to yield the highest Q-value (expected future reward). This allows the agent to benefit from the guidance of primitive skills without being rigidly constrained by a pre-defined curriculum. The QMP-HER algorithm integrates this selection mechanism into the standard HER framework.

Datasets

The experiments were conducted using the Fetch robot arm environments from OpenAI, specifically:

  • FetchReach
  • FetchPush
  • FetchPickAndPlace
  • FetchPickObstacle
  • FetchPickAndThrow

The FetchPickAndThrow task introduces a discrete goal space (eight boxes), differentiating it from the continuous goal spaces of the other tasks.

Key Insights and Ideas

  • Leveraging Past Successes: The paper demonstrates that previously learned, simpler skills can be incredibly valuable for accelerating the learning of more complex tasks.
  • Intelligent Exploration, Not Rigid Curriculum: Instead of forcing a specific sequence of actions, the critic network dynamically chooses whether to use primitive actions, allowing for more flexible and efficient exploration.
  • Critic as the Decision Maker: Empowering the critic network to select the best action from a pool of candidates (target policy + primitives) is key to the method's success.
  • Bridging the Gap: QMP-HER effectively bridges the gap between simple, well-understood behaviors and complex, novel tasks.

Key Results

  • Faster Convergence: QMP-HER consistently achieved target success rates with significantly fewer policy updates compared to standard HER and other baseline methods. For example, in FetchPush, it reached 80% success in under 20 updates, while HER took around 60.
  • Improved Sample Efficiency: The reduced number of policy updates directly translates to better sample efficiency.
  • Reduced Computation Time: The method also showed a reduction in computation time per policy update, especially when compared to more complex methods like G-HGG.
  • Handling Difficult Tasks: QMP-HER was able to solve tasks that standard HER struggled with, such as FetchPickObstacle, reaching a 95% success rate.
  • Limitations in Complex Goal Spaces: For the FetchPickAndThrow task, both QMP-HER and G-HGG achieved similar success rates, but both struggled with aiming for distant buckets due to the difficulty of generating relevant hindsight goals.

Limitations and Future Work

  • Manual Objective Definition: A current limitation is the need for manually defined objectives for the primitive policies.
  • Future Directions: The authors suggest exploring automatic objective generation, integrating QMP-HER with other advanced goal generation techniques (like HGG, G-HGG), and investigating low-level parameter policies to dynamically instantiate primitives. They also propose finding better primitives, potentially by clustering environment transitions.

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 Roldán Sánchez and Qiang Wang and David Córdova Bulens and Kevin McGuinness and Stephen J. Redmond and Noel E. 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},
}
Figure