Leveraging Demonstrations for Deep Reinforcement Learning on Robotics Problems with Sparse Rewards

Matej Vecerík, Todd Hester, Jonathan Scholz, Fumin Wang, Olivier Pietquin, Bilal Piot, Nicolas Heess, Thomas Rothörl, Thomas Lampe, Martin A. RiedmillerarXiv 2017

Abstract

Deep reinforcement learning (RL) often struggles with sparse reward environments where agents must discover complex behaviors through trial and error. This paper introduces DDPGfD (Deep Deterministic Policy Gradient from Demonstrations), a framework that integrates a small amount of human demonstration data into the RL process. By utilizing prioritized replay and n-step returns, DDPGfD effectively navigates the "exploration desert" of sparse rewards, enabling robots to learn intricate manipulation tasks—including those involving deformable objects—without the need for manual reward shaping.

Introduction

In robotics, the most natural way to define success is through a sparse reward (e.g., +1 for task completion, 0 otherwise). However, for high-dimensional robotic systems, the probability of randomly achieving a goal state is extremely low. Traditionally, researchers have relied on "reward shaping"—hand-crafting complex functions to provide incremental feedback. This process is often brittle, time-consuming, and can lead to unintended "lazy" behaviors where the agent optimizes for the mathematical proxy rather than the actual task.

This work explores whether a limited set of human demonstrations can serve as a more effective prior than manual reward shaping, guiding the agent toward success in environments where rewards are only given upon completion.

Methodology: DDPG from Demonstrations (DDPGfD)

The proposed DDPGfD algorithm builds upon the Deep Deterministic Policy Gradient (DDPG) actor-critic method, incorporating four key enhancements to handle sparse rewards and limited data:

  1. Demonstration Replay Buffer: A set of human demonstrations, typically collected via kinesthetic teaching, is loaded into a permanent replay buffer. This ensures the agent always has access to successful trajectories.
  2. Prioritized Experience Replay (PER): To balance self-generated data with expert demonstrations, a modified PER mechanism is used. It automatically prioritizes transitions that are more informative for learning, effectively bridging the gap between initial exploration and successful task execution.
  3. N-step Returns: By looking $n$ steps ahead rather than just one, the algorithm propagates the sparse success signal backward through the action chain significantly faster, accelerating the learning of value functions.
  4. High Update-to-Interaction Ratio: To maximize data efficiency on physical hardware, the agent performs a high number of learning updates (e.g., 40) for every environment step taken.

Experimental Evaluation

The researchers evaluated DDPGfD across four simulated tasks and one real-world task. The simulated environments included rigid peg insertion, orientation-sensitive hard-drive insertion, and tasks involving deformable objects like plastic clips and flexible cables.

The four simulated robotic manipulation tasks used for evaluation: (a) Peg Insertion, (b) Hard-drive Task, (c) Clip Insertion, and (d) Cable Insertion.

For each task, only 100 human demonstrations (approximately 10–15 minutes of data) were provided. The cable insertion task was particularly challenging, featuring a highly under-actuated 20-link chain.

Results and Discussion

DDPGfD demonstrated significant improvements over standard RL baselines. Notably, it solved the "Hard-drive" task where standard DDPG failed even with shaped rewards. The system proved highly data-efficient, solving the clip-insertion task with as few as one demonstration, though performance scaled with more data.

The Cable Insertion task involves a highly under-actuated 20-link chain, representing a significant challenge for sparse reward RL.

Key insights from the results include:

  • Sparse Rewards Outperform Shaped Rewards: DDPGfD with sparse rewards often surpassed standard methods using hand-tuned shaped rewards, suggesting that demonstrations provide a superior task prior.
  • Path Optimization: The agent did not merely mimic humans; it learned to solve tasks in 2–4x fewer steps than the original demonstrators.
  • Real-World Transfer: On a physical Sawyer robot, the algorithm successfully learned to insert a flexible nylon clip, a task difficult to model due to complex deformations.

Conclusion and Future Work

DDPGfD provides a robust path for applying RL to complex robotics problems without the "dark art" of reward shaping. While the method requires human demonstrations, the time investment is minimal compared to engineering complex reward functions. Future research may focus on reducing human effort further by learning from video data and improving hyperparameter stability across diverse task categories. Safety remains a primary concern for real-world deployment, currently addressed through impedance control during the learning phase.

Summary updated

BibTeX
@misc{vecerik2017leveraging,
  author = {Matej Vecerík and Todd Hester and Jonathan Scholz and Fumin Wang and Olivier Pietquin and Bilal Piot and Nicolas Heess and Thomas Rothörl and Thomas Lampe and Martin A. Riedmiller},
  title = {{Leveraging Demonstrations for Deep Reinforcement Learning on Robotics Problems with Sparse Rewards}},
  year = {2017},
  eprint = {1707.08817},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1707.08817},
}
Figure