Source-linked AI summary

Overcoming Exploration in Reinforcement Learning with Demonstrations

Ashvin Nair, Bob McGrew, Marcin Andrychowicz, Wojciech Zaremba, Pieter Abbeel

arXiv:1709.10089v2cs.LGcs.AIcs.NEcs.RO

TL;DR

Sparse-reward robotics tasks are difficult to explore, especially when they involve long horizons and complex contacts. The paper integrates demonstrations with DDPG and HER to guide exploration, and reports faster learning and successful block-stacking tasks beyond reinforcement learning or behavior cloning alone. Its main practical boundary is that harder tasks require substantial experience and demonstrations that may be difficult to collect.

  • Problem

    Sparse rewards make exploration difficult in long-horizon robotics tasks, where useful reward signals are rarely encountered.

  • Method

    The method combines demonstrations with reinforcement learning through an auxiliary behavior-cloning objective, demonstration-state resets, and replay-based training built on DDPG and HER.

  • Results

    The method learns tasks that reinforcement learning and behavior cloning alone cannot solve, including stacking 6 blocks with demonstrations and reinforcement learning.

  • Takeaways & Limitations

    Demonstrations can guide exploration sufficiently to solve complex multi-step continuous-control tasks and accelerate learning relative to reinforcement learning baselines.

  • Takeaways & Limitations

    Harder tasks require substantial experience that is impractical outside simulation, and demonstrations are not easy to collect for all tasks.

Abstract

from arXiv · show

Exploration in environments with sparse rewards has been a persistent problem in reinforcement learning (RL). Many tasks are natural to specify with a sparse reward, and manually shaping a reward function can result in suboptimal performance. However, finding a non-zero reward is exponentially more difficult with increasing task horizon or action dimensionality. This puts many real-world tasks out of practical reach of RL methods. In this work, we use demonstrations to overcome the exploration problem and successfully learn to perform long-horizon, multi-step robotics tasks with continuous control such as stacking blocks with a robot arm. Our method, which builds on top of Deep Deterministic Policy Gradients and Hindsight Experience Replay, provides an order of magnitude of speedup over RL on simulated robotics tasks. It is simple to implement and makes only the additional assumption that we can collect a small set of demonstrations. Furthermore, our method is able to solve tasks not solvable by either RL or behavior cloning alone, and often ends up outperforming the demonstrator policy.

I. INTRODUCTION

Sparse rewards make robotics exploration difficult because long horizons, high-dimensional control, contact dynamics, and varying task instances rarely produce useful reward signals. The paper uses demonstrations within RL to address this challenge and evaluates the approach on multi-block stacking.

  • Motivation: Sparse rewards are natural for binary robotics objectives but make random exploration unlikely to encounter any reward.The paper contrasts robotics objectives with game rewards that can be directly optimized.
  • Motivation: Long horizons, high-dimensional control, contact sensitivity, and varying task instances can prevent learning when rewards are rarely observed.Contact dynamics are difficult to model and small errors can significantly affect outcomes.
  • Experimental setting: The study tests demonstrations on block stacking from random initial states using 100 human teleoperation demonstrations.The task requires stacking several blocks at a specified location and exhibits long horizons, contacts, and task-instance variation.
  • Contribution: The method combines demonstrations with reinforcement learning to solve complex tasks where exploration is difficult.It introduces an auxiliary demonstration objective, annealing, and resets from demonstration states.
  • Related work: Unlike methods requiring more than 100,000 demonstrations or heavily shaped rewards, the method handles several-block stacking with fully sparse rewards.Prior forward-model methods struggle with grasping because contact dynamics are sharply discontinuous.
  • Related work: The approach extends prior work by incorporating demonstrations throughout training rather than only initializing already-solvable tasks.The paper positions this as an extension of reinforcement learning for longer-horizon and sparser-reward tasks.

III. BACKGROUND

The paper formulates reinforcement learning as optimizing expected discounted returns in a fully observable Markov Decision Process. The action-value function provides a recursive basis for estimating future returns.

  • Markov Decision Process: The framework models an agent choosing actions over discrete timesteps in a fully observable environment.At each timestep, the agent observes a state, acts, receives a reward, and transitions to a new state.
  • Objective: The objective is to maximize expected return from the initial state distribution.The policy determines actions as a function of the current state.
  • Objective: The return sums future rewards with discount factor γ over the optimization horizon.The return begins at timestep t and weights later rewards by γ^(i−t).
  • Value estimation: The action-value function estimates expected return after taking an action in a given state.The Bellman equation expresses this estimate recursively and supports dynamic-programming-like methods.

B. DDPG

The method builds on DDPG, an off-policy actor-critic algorithm for continuous control. DDPG learns a critic that estimates action values and an actor that maximizes those estimates, while demonstrations can be used as replay data.

  • DDPG: DDPG is an off-policy, model-free algorithm for continuous control that uses neural-network function approximators.It combines policy-gradient and value-approximation ideas through an actor-critic structure.
  • Actor-critic learning: DDPG learns the critic by minimizing Bellman error while updating the actor to maximize the estimated action-value function.The critic estimates Q(s,a), and the actor directly optimizes the critic’s estimate.
  • Training loop: The algorithm maintains actor and critic networks plus a replay buffer of state-action-reward-next-state transitions.Policy rollouts include additional noise for exploration.
  • Training loop: DDPG updates the critic by minimizing its loss on minibatches sampled from replay data.The supplied passage introduces the critic update without specifying the displayed loss.
  • Training loop: The actor parameters are updated using a policy gradient based on the critic’s action-value estimates.The actor update is described separately from the critic loss.
  • Demonstrations: Demonstration data can be used as off-policy training data because DDPG can learn from replayed transitions.The learned action-value function also helps exploit demonstration data.

C. Multi-Goal RL

The method combines goal-conditioned learning, HER, and demonstration data to improve exploration. It adds demonstration transitions to actor and critic updates, while the behavior-cloning loss improves learning but can constrain improvement beyond the demonstrator.

  • Multi-Goal RL: Goal-conditioned policies receive desired object positions as additional inputs and sample a goal at the start of each episode.Parameterized goals are used to obtain more general policies and facilitate sparse-reward learning.
  • Multi-Goal RL: HER relabels failed rollouts with goals corresponding to states actually achieved, converting them into successful training examples.This requires identifying a goal associated with each achieved state that yields positive reward.
  • Multi-Goal RL: Each episode is stored with both its original goal and a final-state goal treated as the intended goal.This doubles the goal interpretations represented in replay for each experienced episode.
  • Demonstration integration: The method combines DDPG and demonstrations through multiple mechanisms designed to maximize the usefulness of demonstration data.The supplied passage introduces the method before detailing its components.
  • Demonstration integration: A separate demonstration replay buffer supplies extra examples to both actor and critic updates.The additional examples are sampled alongside ordinary replay data in each minibatch.
  • Behavior Cloning Loss: The auxiliary behavior-cloning loss improves reinforcement-learning performance but directly applying it can prevent substantial improvement beyond demonstrations.The policy remains tied to demonstration actions unless the method accounts for suboptimal demonstrations.

C. Q-Filter

The method combines behavior cloning with a Q-filter and demonstration-state resets to use demonstrations without forcing the learned policy to copy suboptimal actions. These components expose higher-reward states and can accelerate training.

  • C. Q-Filter: The behavior cloning loss applies only when the critic estimates the demonstrator action is better than the actor action.This Q-filter accounts for suboptimal demonstrations.
  • C. Q-Filter: Training episodes can restart from sampled states and goals taken from demonstrations, exposing the agent to higher-reward states.At evaluation time, demonstration-state resets are not used.
  • C. Q-Filter: The reported “Ours, Resets” variant combines behavior cloning, the Q-filter, and resets from demonstration states.The authors use this label in subsequent experiments.

V. EXPERIMENTAL SETUP

The experiments use a simulated 7-DOF Fetch arm with continuous control to test sparse-reward manipulation tasks and demonstration-based learning against baselines.

  • V. EXPERIMENTAL SETUP: Experiments use a simulated 7-DOF Fetch arm with parallel grippers to manipulate objects on a table.The environments are simulated MuJoCo tasks.
  • V. EXPERIMENTAL SETUP: The agent observes object positions and controls 4 continuous action dimensions at 50Hz.Three dimensions specify end-effector position and one specifies finger distance.
  • V. EXPERIMENTAL SETUP: Demonstrations are collected through a virtual-reality HTC Vive interface, accepted only when judged mostly correct, and are not optimal.In the sliding task, only 7 of 100 demonstrations succeed, but HER still exposes the agent to those rewards.
  • V. EXPERIMENTAL SETUP: The study runs comparisons to previous work, block-stacking experiments, and ablations of individual method components.The block-stacking task is described as difficult, multi-step, and contact-rich.
  • V. EXPERIMENTAL SETUP: The initial benchmark includes pushing, sliding, and pick-and-place tasks with fully sparse rewards.Pushing and sliding move objects to table targets, while pick-and-place moves a block to a target in the air.
  • V. EXPERIMENTAL SETUP: Figure 2 compares the method with HER without demonstrations and behavior cloning on the benchmark tasks.The figure shows frames from the learned policy above each task.

B. Results

On the benchmark manipulation tasks, the method learns faster than HER, performs better than behavior cloning, and solves pick-and-place where HER does not.

  • B. Results: 4x speedup over HER occurs in pushing, while 2x speedup over HER occurs in sliding.The comparison uses timesteps to convergence.
  • B. Results: The method solves pick-and-place while the HER baseline cannot solve it at all.The authors attribute the difficulty to the rarity of grasping under random actions and use demonstrations to guide exploration toward grasping.
  • B. Results: The method achieves significantly better policies than behavior cloning on the evaluated tasks.The same comparison reports significantly faster learning than HER.
  • B. Results: Demonstrations guide exploration toward grasping without requiring expert knowledge of the learning system.The paper presents this as a more compelling way to provide prior information than requiring such expertise.
  • B. Results: HER solved pick-and-place in prior work by initializing half of rollouts with the gripper already grasping the block.The paper contrasts that favorable-state initialization with its demonstration-guided exploration.

VII. MULTI-STEP EXPERIMENTS

The multi-step experiments evaluate stacking up to six blocks under sparse and step rewards, using imperfect demonstrations and success-rate comparisons against baselines.

  • VII. MULTI-STEP EXPERIMENTS: The approach solves the full stacking task and learns to stack 6 blocks with demonstrations and reinforcement learning.The task is designed to test longer horizons and sparser rewards.
  • VII. MULTI-STEP EXPERIMENTS: Stacking 6 blocks requires 5 pick-and-place actions within 250 actions, or 5 seconds.The first block begins in position, so stacking N blocks requires N −1 pick-and-place actions.
  • VII. MULTI-STEP EXPERIMENTS: The experiments use 100 demonstrations for stacking 6 blocks, including occasional dropped blocks, while rejecting demonstrations that knocked down the tower.The method is evaluated with demonstrations that are not perfect.
  • VII. MULTI-STEP EXPERIMENTS: The sparse reward gives reward only when all blocks reach their goal positions, with a 5cm threshold.The paper calls this the “sparse” reward.
  • VII. MULTI-STEP EXPERIMENTS: Figure 3 reports the median best success rate across randomly seeded runs for each method.The comparison covers the method and baselines on stacking tasks.
  • VII. MULTI-STEP EXPERIMENTS: The step reward changes only when a block moves into its target location, remaining very sparse for longer-horizon stacking.Subtracting 1 makes the reward more interpretable because the first block starts at its target.

C. Network architectures

The experiments use task-dependent network architectures and compare several demonstration-based and reinforcement-learning methods under limited random-seed budgets.

  • The actor and critic use four-layer networks with 256 hidden units per layer for HER tasks and stacking tasks with three or fewer blocks.
  • For stacking four or more blocks, the actor uses attention with a larger downstream network to process states and goals.The attention module has three layers with 128 hidden units, followed by a five-layer network with 256 hidden units per layer.
  • The comparison includes the proposed method, its reset variant, behavior cloning, HER, and BC+HER baselines.
  • Because of computational constraints, evaluations used five seeds for stacking 3 blocks, two for 4 and 5 blocks, and one for 6 blocks.Reported results use the median of the random seeds where applicable.

E. Results

The ablations show that demonstrations and specific components are important for learning longer-horizon stacking tasks, especially as task difficulty increases. Behavior cloning loss and demonstration-state resets address distinct training difficulties, while the experiments evaluate tasks from 3 to 6 blocks.

  • The ablation experiments evaluate the method on stacking tasks ranging from 3 to 6 blocks.
  • D. Resets from Demonstrations: Resets from demonstration states become more important as the stacking horizon grows, although they can hurt training on shorter tasks.They help the agent repeatedly experience higher-reward states, but learning initially takes off faster without resets in some settings.
  • D. Resets from Demonstrations: For stacking 3 blocks with a fully sparse reward, the method without resets learns faster, while the reset variant initially learns faster but converges to a worse success rate.
  • A. Behavior Cloning Loss: Without the behavior cloning loss, the method is significantly worse across tasks and achieves no success on longer-horizon tasks.For stacking 3 blocks with a fully sparse reward, learning is about 2x slower without this loss.
  • A. Behavior Cloning Loss: The behavior cloning loss keeps the policy from stopping at a safer local optimum after stacking only one additional block.Explicitly weighting behavior-cloning steps encourages the policy to continue the task despite the risk of lowering shaped reward by knocking over placed blocks.

B. Q-Filter

The method combines demonstration guidance with reinforcement learning to accelerate exploration, while Q-Filter and demonstration-state resets address different training challenges. These techniques improve learning in some settings but introduce scope limitations and practical assumptions.

  • Q-Filter: Q-Filter accelerates learning and can achieve optimal performance by disabling the behavior-cloning loss when a better action is found.Its benefits are mixed on longer-horizon tasks, where stronger reward signals reduce reliance on demonstrations.
  • Resets From Demonstrations: Initializing rollouts from demonstration states greatly helps stacking five and six blocks but hurts training with fewer blocks.The technique exposes the agent to higher-reward states, although learning can initially take off faster without such resets.
  • Motivation and scope: The demonstration-assisted system is designed to solve complicated multi-step continuous-control tasks, especially when sparse rewards make exploration difficult.It combines demonstrations with reinforcement learning to reach nonzero rewards more directly.
  • Limitations: The method requires substantial experience on harder tasks and demonstrations that are not easy to collect for all tasks.The authors identify sample efficiency as a major limitation for deployment outside simulation.
  • Limitations: Resets from demonstration states require an environment that can reset to arbitrary states, so other curriculum methods are needed when that capability is unavailable.The authors report that this technique is especially effective for the hardest tasks.
Loading 1709.10089v2…