---
title: "Leveraging Demonstrations for Deep Reinforcement Learning on"
description: "How DDPG from Demonstrations learns robotic insertion with sparse rewards, what its experiments establish, and where its evidence stops."
canonical: "https://research.elamur.ai/free/en/papers/mel-2017-leveraging-demonstrations-deep-reinforcement-learning/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/mel-2017-leveraging-demonstrations-deep-reinforcement-learning/)

[home](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2017](https://md.research.elamur.ai/free/en/papers/2017/) / Leveraging Demonstrations for Deep Reinforcement Learning on Robotics Problems with Sparse Rewards

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

Paper · 2017 · Mel Vecerik, Todd Hester, Jonathan Scholz et al.

**Authors:** Vecerik, Mel, Todd Hester, Jonathan Scholz, [Fumin Wang](https://md.research.elamur.ai/free/en/authors/fumin-wang/), [Olivier Pietquin](https://md.research.elamur.ai/free/en/authors/olivier-pietquin/), [Bilal Piot](https://md.research.elamur.ai/free/en/authors/bilal-piot/), [Nicolas Heess](https://md.research.elamur.ai/free/en/authors/nicolas-heess/), Thomas Rothörl, [Thomas Lampe](https://md.research.elamur.ai/free/en/authors/thomas-lampe/) and [Martin Riedmiller](https://md.research.elamur.ai/free/en/authors/martin-riedmiller/) · **Year:** 2017 · **Venue:** arXiv (Cornell University) · **Licence:** [arXiv — non-exclusive license to distribute](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

[**463** citations OpenAlex, 2026-10-14](https://openalex.org/works?filter=cites:W2741122588) · arXiv (Cornell University) · [licence](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

- [arXiv 1707.08817](https://arxiv.org/abs/1707.08817)
- [OpenAlex](https://openalex.org/W2741122588)

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

How DDPG from Demonstrations learns robotic insertion with sparse rewards, what its experiments establish, and where its evidence stops. · about 34 minutes to read

**In this deep dive**

1. [Summary](#dd-summary)
2. [Ideas worth borrowing](#dd-ideas-worth-borrowing)
3. [How Mova uses it](#dd-how-mova-uses-it)
4. [The problem and its context](#dd-the-problem-and-its-context)
5. [The method, step by step](#dd-the-method-step-by-step)
6. [Experiments and results](#dd-experiments-and-results)
7. [What the ablations show](#dd-what-the-ablations-show)
8. [Limitations](#dd-limitations)
9. [What came after](#dd-what-came-after)

### Summary

A robot can be told whether an insertion succeeded without being told how to perform it. Recognizing that a plug has reached its socket is relatively straightforward; designing a reward that guides every movement toward that outcome is much harder. The difficulty becomes especially clear when the object bends, contact changes its shape, or the robot must first find an opening before moving toward the final destination. This paper asks whether human demonstrations can supply the missing guidance while reinforcement learning discovers a policy that responds to feedback and improves through practice.

The proposed method, DDPG from Demonstrations, or DDPGfD, adds recorded demonstrations to an existing approach for learning continuous control. Each demonstration becomes a sequence of transitions: observations of a state, an action, the resulting state, and the reward. These records enter the same replay memory as the robot’s later experience. Training repeatedly draws from that shared memory, with a priority rule that favors informative transitions and gives demonstration records an additional sampling advantage. Longer return targets help carry the information from a successful insertion back towards earlier actions. Repeated learning updates and parameter regularization complete the training procedure.

The experiments cover four simulated insertion problems, including rigid objects, a deformable clip, and a flexible cable. The authors compare learning with demonstrations against learning without them, under both sparse success rewards and carefully designed shaping rewards. Their baseline receives the same general training improvements, so the comparison does more than contrast the new method with an unmodified implementation. Across these tasks, DDPGfD learns more effectively than DDPG, including comparisons where the baseline receives detailed reward guidance. The learned behavior can also improve on the demonstrations: the authors report insertions requiring 2-4x fewer steps. Direct supervised imitation performs poorly across the simulated tasks, suggesting that the demonstrations are most useful as experience from which to learn about task success, rather than as behavior to reproduce exactly.

The strongest demonstration-efficiency result concerns the simulated clip task. DDPGfD can learn it from a single demonstrated trajectory, even though that trajectory contains only one transition carrying a non-zero reward. A physical Sawyer experiment also shows sparse-reward learning of clip insertion, with faster learning than shaped-reward DDPG. These results establish a practical possibility within the tested insertion setups: demonstrations can replace substantial reward engineering while leaving room for improvement through interaction. They do not establish a general solution to robotic manipulation, eliminate the need for a success detector, or show that the learned controller is intrinsically safe. The real experiment uses known geometric information and a separate controller that constrains the robot’s commands.

### Ideas worth borrowing

Use examples as persistent experience. A demonstration need not become a target that the learner must imitate indefinitely. Here it becomes a collection of transitions that remain available during reinforcement learning. This works because the learning procedure can use actions generated by someone other than the current policy. The demonstration supplies evidence about useful states and eventual success, while the task reward determines what counts as improvement. The same design is worth considering whenever an interactive system can record meaningful state changes and verify outcomes, but a small collection of examples cannot describe every situation it will encounter.

Keep the objective simple and move guidance into data. The sparse reward expresses the desired endpoint, while demonstrations provide information about a route towards it. This division matters because a reward based on geometric closeness can favor an inaccessible position outside a socket. A demonstrated trajectory can instead reveal the opening and the sequence of movements needed to reach it. The reusable idea is to separate a trustworthy acceptance condition from the guidance needed during search. Where an outcome can be checked more reliably than progress can be scored, examples may be a better source of guidance than a complicated intermediate reward.

Let useful records compete for attention. The replay procedure mixes demonstration data with self-generated experience through a shared priority mechanism. Demonstrations receive an explicit advantage, but their source is not the only consideration: prediction errors and action-value sensitivity also influence sampling. This avoids treating the amount of expert data as the sole measure of its usefulness. For other [machine learning](https://md.research.elamur.ai/free/en/concepts/machine-learning/) systems that revisit stored examples, the transferable question is which records are currently informative, and how source-based preferences should interact with that information. The paper’s particular priority formula is one implementation of that broader allocation problem.

Carry delayed feedback across sequences. A successful insertion produces feedback near the end of an episode, while many earlier actions are necessary to make success possible. Combining immediate and longer return targets helps the learner connect those earlier decisions with the terminal outcome. The idea applies wherever useful feedback arrives after a sequence rather than after each action. Its scope needs care: the paper demonstrates the mechanism in robotic control, and sequence-based credit assignment elsewhere would require its own definition of states, actions, rewards, and valid trajectories.

Spend computation to conserve interaction. Physical experience has a different cost from replaying a stored transition. The authors therefore perform many learning updates for each fresh environment step. This makes sense when collecting data consumes robot time and exposes hardware to contact, while computation can continue on previously collected records. It also creates a stability problem because old data may poorly represent the current policy. The reusable lesson is to optimize the balance between new evidence and further analysis of existing evidence, rather than assuming that each observation should receive only a brief learning pass.

Separate learned decisions from fast physical constraints. The physical robot’s policy issues commands at a slower rate than the controller that responds to external force. That controller modifies velocity commands and limits acceleration. This arrangement lets the experiment study learned behavior while retaining a distinct mechanism for handling contact safely. A related principle could guide systems with expensive or slow decision processes: let learning choose an intended action, and let a separate, explicit mechanism enforce operational constraints. The paper supports this architecture in its robot setup; transferring it elsewhere requires identifying the relevant constraints instead of copying the control equation.

### How Mova uses it

For Mova, a small transparent language system written in Rust, the useful connection is an approach to learning from examples and outcomes. The robotics experiments do not establish a language-processing result, and they provide no basis for claiming that Mova already implements DDPGfD. The applications discussed here are possibilities. Their value lies in the paper’s separation of demonstration data, task success, replay, and later improvement.

One possible use would be a persistent store of worked interaction traces. Rather than keeping only a final accepted answer, Mova could retain the context in which a decision was made, the action selected, the resulting state, and any available outcome judgment. A language-system trace would need a carefully defined meaning for each of those fields. A state might describe an unresolved task, while an action might record a proposed interpretation or transformation. These are design choices for Mova, not capabilities evaluated by the robotics paper.

The important borrowing would be to preserve useful examples as revisitable evidence. A successful trace should not vanish merely because many newer interactions have arrived. Equally, retaining it should not oblige the system to repeat its wording or internal sequence exactly. The robot experiments show why that distinction matters: the learned policy can use demonstrations to discover success and later perform the task more efficiently. For Mova, an analogous goal would be to use examples as starting evidence while judging later behavior against an explicit task criterion.

That criterion is the central difficulty. Robot insertion has a geometric condition that can terminate an episode and produce a reward. Many language tasks lack an equally dependable signal. An answer can sound plausible while being incorrect, and a complex response can satisfy some requirements while missing others. The closest initial applications would therefore be tasks with explicit acceptance conditions, such as a transformation whose output can be checked against a specification. This is a proposal about where the paper’s logic might transfer; the paper supplies no evidence that open-ended language quality can be reduced to such a signal.

A shared replay store could also fit Mova’s emphasis on transparency. Each retained trace could carry its origin, its observed outcome, and a recorded reason for being selected again. That would make a source preference for human examples visible instead of hiding it inside an unexplained mixture. The robotics priority rule suggests separating a general usefulness score from an explicit demonstration preference. It does not require Mova to adopt neural action-value gradients, and the paper offers no justification for applying that particular numerical rule to a different learning architecture.

The longer-return idea offers another possible connection. When a sequence of decisions leads to a verified result, evaluation should not necessarily attach only to the final decision. Earlier choices may have made the successful path possible. A transparent language system could preserve that relationship in its traces, allowing later analysis of which decisions contributed to the outcome. Implementing this would require a credit-assignment method appropriate to Mova’s own structure. Recording a successful sequence is not, by itself, proof that every step in it was necessary or correct.

Finally, the robot’s separate safety controller suggests an architectural boundary. A learned preference can propose an operation, while explicit checks determine whether it may proceed. For Mova, those checks would have to reflect the task being performed. The paper’s contribution is the concrete example of combining adaptive behavior with a distinct constraint mechanism. It does not demonstrate a language-system safety method. The honest connection is therefore a set of design possibilities: keep traces, preserve successful examples, make replay decisions inspectable, and distinguish learned preferences from enforceable requirements.

### The problem and its context

#### Success is easier to recognize than to reach

Insertion creates a mismatch between the location of a goal and the route required to reach it. The final position may be deep inside a socket, but the robot must first approach an opening. A reward based only on distance to the final position can encourage the wrong behavior. The authors encountered this in preliminary experiments: DDPG moved towards a position outside the socket that was attractive under the distance reward, then failed to explore the opening.

This is more than a poorly chosen coefficient in an otherwise adequate objective. The environment contains contact constraints. Moving closer in a geometric sense does not guarantee that an object can continue toward the goal from its current position. A useful reward must somehow account for the structure of the task: approach, align, enter, and advance. When the object is flexible, its response to contact adds further complications.

A sparse reward avoids describing those intermediate stages. It states that insertion succeeded when the relevant object sites are sufficiently close to the socket’s goal sites. That is an appealing task definition because it directly expresses the desired outcome. Its weakness is informational: an agent that rarely completes an insertion receives little evidence distinguishing promising actions from unproductive ones.

The paper addresses this exploration problem by supplying successful experience at the outset. Demonstrations make it possible for the learner to encounter reward-bearing transitions before it has independently discovered the task. The challenge then becomes using those records effectively enough that success information influences earlier decisions and guides future interaction.

#### Why replay matters

DDPG is suitable for this proposal because it is off-policy. In this setting, off-policy learning means that the learning rule can use transitions produced by behavior other than the current policy. A human demonstration can therefore enter the training data without pretending that the current actor generated it.

Replay memory makes that possibility operational. Rather than updating from a transition once and discarding it, the learner stores transitions and samples them repeatedly. The paper emphasizes the importance of keeping demonstrated experience available long enough for sparse reward information to spread through the estimated action values.

The distinction from an on-policy method is central to the authors’ argument. They contrast their approach with classical policy-gradient learning, where the relationship between the current policy and the data is more restrictive. Their claim is that a replay-based off-policy method provides a natural place to insert demonstration records.

The demonstrations also need a compatible representation. An observation-action recording is not automatically a valid transition for every learner. The experiment addresses this by collecting demonstrations through a controller that uses the same action space as the learning agent. This makes the recorded actions directly usable in replay.

#### Why reproducing the demonstration is insufficient

The paper situates its approach alongside imitation learning. In a direct supervised formulation, the learner receives states from demonstrations and predicts the demonstrated actions. That provides a straightforward route from examples to a policy, but it makes matching the examples the immediate training objective.

The authors want a different outcome. A demonstration should make learning possible without setting the upper limit on performance. Task rewards allow the agent to discover behavior that reaches the same goal more efficiently. This is particularly relevant when demonstrations are imperfect, as the authors describe for the drive-insertion task.

Their discussion of DAGGER highlights another distinction. DAGGER obtains additional expert feedback as training proceeds, including feedback for situations outside the original demonstration distribution. The method in this paper instead uses an initial collection of recorded demonstrations and then learns through its own interaction and reward. The paper does not make continued expert availability part of that learning loop.

Inverse reinforcement learning offers another route from demonstrations to behavior. The authors describe approaches that infer a reward or cost under which expert trajectories are desirable. Their own task already has a reward: successful insertion. They use demonstrations to make that reward learnable, instead of attempting to recover the demonstrator’s hidden objective.

#### Earlier continuous-control approaches

The related-work discussion also considers methods that exploit local approximations of physical dynamics. The authors describe iterative Linear Quadratic Gaussian control as constructing local linear approximations around a trajectory and solving a constrained optimal-control problem. In their account, the reward requirements of that procedure make deliberate shaping necessary.

Guided Policy Search uses previous or expert trajectories to construct local dynamics approximations, derives local control policies, and trains a neural policy to fit the resulting behavior. The paper’s contrast concerns the engineering needed to make those local control procedures work, especially the reward structure they require.

The discussion of Normalized Advantage Functions makes a related point. Its action-value parameterization makes continuous-action maximization tractable, while an acceleration procedure uses locally approximated dynamics and imagined rollouts. The authors distinguish their own proposal by avoiding the need to obtain exploration guidance through such a local control solver.

These comparisons should be read at the scope the paper gives them. They motivate a method that uses task demonstrations and off-policy replay instead of carefully shaped rewards and locally planned rollouts. They are not experimental comparisons against all the methods named in the related-work section.

The closest identified predecessor is DQfD, which combines demonstration data with Deep Q Networks. According to the authors, DQfD additionally uses a supervised term to keep behavior near the demonstrations and addresses discrete actions. DDPGfD adapts the demonstration-and-replay principle to continuous robotic commands without adding that action-matching objective.

### The method, step by step

The method begins with ordinary reinforcement-learning transitions and changes how they are collected, retained, sampled, and used for learning. Its central data structure is a replay buffer shared by demonstrations and later robot experience.

From demonstrations to an improved insertion policy The steps in order.

#### Describe the task as states, actions, and rewards

The paper uses the Markov decision process framework:

```
⟨S, A, R, P, γ⟩
```

S is the set of states, and A is the set of available actions. R is the reward function. P describes how an action in a state leads probabilistically to a subsequent state. The discount factor γ controls the contribution of later rewards relative to earlier ones.

A policy specifies the action to take in a state. Here the policy is deterministic and stationary: its output depends on the current state, and its rule does not explicitly change with the time index during execution. Training changes the policy’s parameters, but that is different from including time as an argument of the deployed decision rule.

The action-value function describes the expected discounted reward after starting from a particular state and action:

```
Qᵖⁱ(s, a) = Eᵖⁱ[Σₜ₌₀^∞ γᵗ R(sₜ, aₜ)]
```

Qᵖⁱ is the value function associated with policy π. The initial state is s and the initial action is a; later states and actions follow the environment and policy. The index t identifies successive steps. R(sₜ, aₜ) is the reward at a step, γᵗ discounts it, and Eᵖⁱ denotes an expectation over trajectories generated under π. The superscript written as “pi” represents the policy, rather than an additional learned quantity.

The actor is the policy network. The critic estimates action values. Training seeks actor parameters that produce actions with high critic estimates:

```
J(θ) = Eₛ∼μ[Q^{π(·|θ)}(s, π(s|θ))]
```

J is the policy objective, θ denotes policy parameters, and μ is the state distribution used in the paper’s background definition. The expression π(s|θ) is the actor’s chosen action. The superscript on Q identifies the policy whose expected return is being considered.

A gradient-ascent update is then:

```
θ ← θ + α ∇θ J(θ)
```

The gradient ∇θJ indicates how the objective changes with the parameters, and α is the learning-rate coefficient in this expression. This use of α is separate from the replay exponent and reward-scaling coefficient introduced later. The notation reuses the same letter for different purposes.

#### Collect experience with the actor

DDPG maintains actor parameters θᵖⁱ and critic parameters θQ. Exploration adds a random process to the actor’s action:

```
a = π(s|θᵖⁱ) + 𝒩
```

The state is s, a is the executed action, π is the actor, and 𝒩 supplies exploratory variation. The resulting record includes the original state, action, reward, and successor state.

```
e = (s, a, r, s′)
```

Here e denotes a transition, r is the reward returned for the action, and s′ is the next state. The replay buffer stores these records. Demonstrations have the same substantive fields, even though the paper sometimes presents them in a different order.

This shared representation is what makes the demonstration mechanism simple. The learner does not need a separate policy-training objective merely because a person generated a transition. It can use that record in the same value-learning process as a transition generated during exploration.

#### Learn an immediate return estimate

The critic learns in part from a target that combines the immediate reward with an estimate of future value:

```
R₁ = r + γ Q′(s′, π′(s′|θᵖⁱ′)|θQ′)
```

R₁ is the one-step target. The reward r comes from the stored transition, and s′ is its successor state. The target actor π′ selects a successor action. The target critic Q′ evaluates that action. Their parameters are θᵖⁱ′ and θQ′, respectively.

Target networks are delayed copies of the actor and critic. The paper uses them to stabilize learning while the main networks change. It describes refreshing the copies every N′ steps, where N′ is the target-update interval.

The immediate critic loss is:

```
L₁(θQ) = E₍ₛ,ₐ,ᵣ,ₛ′₎∼D[(R₁ − Q(s, a|θQ))²]
```

L₁ measures the squared discrepancy between the one-step target and the current critic’s estimate. D is the distribution used to draw transitions from replay. The expectation averages the loss over those draws. The parameters being fitted are θQ.

For a sparse task, a successful transition provides a non-zero target directly. Earlier transitions must acquire useful values through repeated learning and bootstrapping. Keeping success-bearing records available is therefore important even when most subsequent experience is unsuccessful.

#### Improve the actor through the critic

DDPG uses the critic’s sensitivity to actions to adjust the actor:

```
∇θᵖⁱ J ≈ E₍ₛ,ₐ₎∼D[∇ₐ Q(s, a|θQ)|ₐ₌π₍ₛ|θᵖⁱ₎ · ∇θᵖⁱ π(s|θᵖⁱ)]
```

The term ∇ₐQ describes how the critic’s estimate changes when an action changes. It is evaluated at the action currently produced by the actor. The term ∇θᵖⁱπ describes how actor parameters change that action. Their product carries the critic’s action preference back into the policy parameters.

The expression is approximate because the update uses learned value estimates and sampled data. Its practical significance is that the demonstration action is not automatically the actor’s target. A demonstrated state can help train a critic, and the critic can then guide the actor towards an action that differs from the recorded one.

The background equation in the paper places the critic parameter symbol inside the policy at this evaluation point. The surrounding definitions consistently assign θᵖⁱ to the actor. The equation above makes that parameter role explicit rather than treating the inconsistent symbol as a separate procedure.

#### Initialize replay with demonstrations

Before reinforcement learning starts, DDPGfD loads the recorded human transitions into replay. The authors describe retaining transitions throughout training. This ensures that useful demonstration records remain accessible as self-generated experience accumulates.

Retention does not imply equal sampling. The next mechanism determines which records receive learning attention. It also controls the mixture of human and agent data without requiring a fixed sampling ratio throughout training.

There is no separate demonstration-action regression term in the stated DDPGfD objective. That is an important distinction from both the supervised imitation baseline and the paper’s description of DQfD. Demonstrations influence the learned values and the replay distribution; rewards remain the basis for improvement.

#### Prioritize informative transitions

The probability of selecting a transition depends on its priority:

```
P(i) = pᵢ^α / Σₖ pₖ^α
```

P(i) is the probability of drawing transition i. Its priority is pᵢ, and the denominator sums transformed priorities over replay entries indexed by k. The exponent α controls the strength of prioritization. For this use of α, the authors choose 0.3.

DDPGfD calculates priority using several signals:

```
pᵢ = δᵢ² + λ₃ ‖∇ₐ Q(sᵢ, aᵢ|θQ)‖² + ε + εD
```

The last temporal-difference error for transition i is δᵢ. Squaring it favors records on which the critic’s prediction and target disagree. The action-gradient term measures the critic’s sensitivity to the recorded action; λ₃ weights that contribution. The state and action of the transition are sᵢ and aᵢ.

The positive constant ε prevents a transition from becoming impossible to sample. The additional εD applies to demonstration transitions and increases their sampling preference. This demonstration bonus is distinct from the success threshold used in the reward definition.

The priority rule combines a changing estimate of learning relevance with a fixed source preference. As a consequence, a demonstration can remain useful without monopolizing replay, and newly collected transitions can compete for attention as the policy encounters informative situations.

Nonuniform sampling changes the distribution seen by training. The paper compensates with importance weights:

```
wᵢ = ((1/N) · (1/P(i)))^β
```

wᵢ is the update weight for a sampled record, N is the number of replay entries, and P(i) is its selection probability. The exponent β determines the strength of the correction. The authors use β = 1 from the beginning.

The correction addresses sampling bias; it does not make an inaccurate critic reliable or guarantee convergence. Prioritization decides where computation is spent, while importance weighting adjusts the influence of the resulting samples.

#### Add longer return targets

A reward at the end of an insertion must inform actions earlier in the trajectory. DDPGfD therefore supplements the immediate target with an n-step return:

```
Rₙ = Σᵢ₌₀^{n−1} γⁱ rᵢ + γⁿ Q(s′ₙ₋₁, π(s′ₙ₋₁)|θQ′)
```

Rₙ contains rewards rᵢ from a rollout of length n, discounted by γⁱ. The index i runs through the rollout. The state s′ₙ₋₁ is the successor state at its end. A value estimate using target-critic parameters θQ′ accounts for what may happen afterward.

The accompanying loss is:

```
Lₙ(θQ) = ½(Rₙ − Q(s, π(s)|θQ))²
```

Lₙ compares the longer return with the estimated value at the rollout’s starting state s and policy action π(s). The factor ½ scales the squared error. The critic parameters are again θQ.

The paper motivates these rollouts using a policy close to the current actor. That qualification matters because replay can contain older actions and human behavior. The article gives the target and its purpose, but does not provide a full analysis of off-policy error for every possible demonstration trajectory.

The mechanism has an intuitive benefit in the sparse setting: a target can include success encountered later in the recorded sequence. Earlier states then receive learning information without depending completely on successive immediate backups.

#### Reuse each interaction through repeated updates

The authors also increase the amount of learning performed after collecting fresh experience. They report that increasing updates to 20 did not reduce learning efficiency per update in their experiments. Their practical setting is 40 updates per environment step.

This choice reflects the cost of robotic interaction. Once a transition has been collected, additional computation can extract more learning from it. The paper also recognizes the danger: replayed data can become stale as the actor changes, leaving the critic unreliable in states visited by the new policy.

The update count is therefore a tradeoff, not a claim that more computation always helps. The reported setting balances data reuse and stability in these experiments.

#### Regularize the actor and critic

The full critic objective combines immediate targets, longer targets, and parameter regularization:

```
LCritic(θQ) = L₁(θQ) + λ₁ Lₙ(θQ) + λ₂ LregC(θQ)
```

LCritic is the loss minimized for the critic. L₁ is the one-step term, Lₙ is the longer-return term, and LregC is the critic’s L2 parameter penalty. The coefficient λ₁ weights the longer-return contribution, while λ₂ controls regularization.

The actor update is expressed as a loss gradient:

```
∇θᵖⁱ LActor = −∇θᵖⁱ J + λ₂ ∇θᵖⁱ LregA
```

LActor is the actor objective in minimization form. The negative policy-objective gradient makes minimizing the loss increase expected value. LregA is the actor’s L2 parameter penalty, with coefficient λ₂.

The authors introduce regularization to improve final learning stability. The stated procedure thus consists of a package: demonstration replay, priority-based sampling, mixed return targets, repeated updates, and regularized networks.

#### Define sparse success and shaped guidance

For the experimental sparse reward, insertion is recognized through plug-tip and socket-goal geometry:

```
r = { 0, if Σᵢ∈sites Wg ‖gᵢ − xᵢ‖₂ > ε; 10, if Σᵢ∈sites Wg ‖gᵢ − xᵢ‖₂ < ε }
```

The position xᵢ belongs to plug-tip site i, and gᵢ is the corresponding socket-goal site. Wg weights the goal error, ‖·‖₂ denotes Euclidean length, and ε is the proximity threshold. The index set sites identifies the relevant geometric sites. The reward is r.

On reaching the success tolerance, the episode ends immediately. The strict inequalities leave the exact equality case unstated. This is a small specification gap, but it illustrates the difference between the task’s intuitive success condition and a fully executable definition.

The shaped reward uses an insertion-distance term:

```
cg = min(Σᵢ∈sites Wgᵀ ‖gᵢ − xᵢ‖₂, Σᵢ∈sites Woᵀ ‖gᵢ − oᵢ‖₂)
```

cg is the goal-related cost. The position oᵢ is the socket-opening site associated with i. Wg and Wo weight goal and opening errors, respectively, and the superscript T denotes transposition. The second argument to min is the weighted distance between goal and opening sites.

A reaching term is written as:

```
co = I(cg > Σᵢ∈sites Woᵀ ‖gᵢ − oᵢ‖₂) · Σᵢ∈sites Woᵀ ‖oᵢ − xᵢ‖₂
```

co is the opening-related cost, and I is an indicator that activates the following expression when its condition holds. The remaining symbols have the geometric meanings just defined.

The intended design is to guide the object towards the opening before rewarding progress into the socket. However, these displayed equations contain a consistency problem: cg is capped by the same quantity that it must strictly exceed to activate co. Read literally together, the condition cannot activate. The intended staged behavior is clear from the authors’ explanation, but these formulas alone do not specify it consistently.

The final transformation is presented as a clipped logarithmic expression. With the outer clipping interpreted conventionally, its displayed components are:

```
r = min(1, max(0, −α log(β(co + cg)))) − 1
```

Here α and β scale the logarithmic transformation, co + cg is the combined cost, and min and max clip the transformed value. These α and β are separate from the replay parameters. The reward equation’s closing parentheses are incomplete in the paper, and its trailing subtraction does not align cleanly with the accompanying description of the reward range. The expression therefore conveys the intended ingredients more reliably than an exact implementation.

These issues do not justify inventing a corrected reward. They limit how precisely the shaped baseline can be reconstructed from the mathematical description. The authors themselves emphasize that weighting spatial dimensions and balancing the movement stages required careful tuning.

#### Collect demonstrations and constrain physical commands

For simulated demonstrations, a person guides a physical Sawyer arm. A joint-space proportional controller makes the simulated arm follow the physical arm’s joint positions. Because this controller uses the learner’s action space, its transitions can enter replay directly.

For physical demonstrations, the person guides a separate arm from the arm executing the task. The authors use this separation so that the demonstrator does not directly change the task arm’s dynamics by pushing it.

The physical learner also operates through an intermediate impedance controller:

```
ucontrol = uagent ka + fapplied kf
```

uagent is the learner’s command, fapplied represents external force, and ka and kf set their contributions. The resulting command is ucontrol. The controller additionally limits increases in velocity while preserving the ability to stop quickly.

The learned command updates at 5Hz, while force feedback and the resulting control signal update at 1kHz. This arrangement is part of the physical experiment’s operating conditions. It is separate from the replay and learning mechanisms.

### Experiments and results

#### The insertion tasks

The simulated suite contains four tasks with different mechanical difficulties. Peg insertion uses rigid bodies and permits rotation around the insertion axis. Drive insertion also uses rigid bodies, but orientation matters as the drive enters an ATX-style chassis.

The clip task introduces deformation. Its simulated clip contains three bodies, with hinged prongs that are spring-loaded towards an inward resting configuration. Successful behavior must account for how that object responds while entering its housing.

The cable task uses a 20-link chain of capsules connected by ball joints. The paper characterizes it as highly under-actuated. It shares the peg task’s insertion specification, but the object being manipulated can respond to motion in a much less direct way.

All tasks use a vertically mounted Sawyer arm. The robot has 7-DOF torque control, and the simulated system uses Mujoco with publicly available robot geometry and kinematic information. In the experiments, the inserted object is attached to the gripper and the receiving socket is fixed to a table.

Simulation actions are joint velocities. Observations include joint positions, joint velocities, torque feedback, and the global poses of the plug and socket. These are structured control inputs, not a demonstration of learning the task from raw images.

The physical clip experiment uses a deformable nylon clip and a gripper attachment made through 3D printing. The socket position is supplied to the system. Observations include joint positions and velocities, gravity-compensated joint-torque feedback, and relative plug-site poses expressed with respect to socket-opening frames.

#### Demonstration collection and evaluation conditions

For each main experiment, the authors collect 100 demonstration episodes. An episode averages about 25 steps and roughly 5s. Collecting the demonstrations requires 10-15 minutes of robot interaction per task.

These numbers describe the demonstration budget, not the total time needed to train a successful policy. The reinforcement-learning curves use environment interaction time as their horizontal axis. Repeated computation on replay and the earlier demonstration-collection period are distinct components of the overall procedure.

The main simulation figure aggregates 64 trials. It shows the mean and the 10th and 90th percentiles, allowing a reader to see both typical performance and variability. Episodes last at most 5s, and the simulated agent’s control rate is about 6Hz.

These details matter for interpreting the results as [evaluation and benchmarks](https://md.research.elamur.ai/free/en/topics/evaluation-benchmarks/). A learning curve over interaction time addresses data use under a particular control setup. It does not automatically measure wall-clock training cost, hardware utilization, or performance under a different observation interface.

#### Baselines and the common measurement scale

The central comparison crosses the presence of demonstrations with the reward supplied during training. DDPG and DDPGfD are each evaluated with sparse rewards and with shaped rewards.

The DDPG baseline includes the general improvements used by DDPGfD, including prioritized replay, longer returns, and L2 regularization. The results section states that it receives all the incorporated optimizations. This strengthens the interpretation that adding demonstration experience is important under the shared training setup.

The plots also show the rewards achieved by the demonstrations and by a supervised imitator. The imitator predicts demonstrated actions using an L2 loss. It therefore offers a separate comparison: whether merely learning the demonstrated state-to-action mapping is sufficient.

A crucial measurement choice is that every plotted trace uses shaped-reward performance, even when the agent was trained with sparse rewards. The training signal and reporting metric are different. A sparse-trained agent can therefore be compared against a shaped-trained agent on the same vertical scale.

The main experiments use fixed hyper-parameters selected beforehand. This supports comparison under a common configuration, although the article does not provide a complete accounting of the tuning process.

#### Main simulated results

With carefully tuned shaping rewards, the authors report that all the reinforcement-learning variants can solve the tasks. Demonstrations nevertheless improve learning: DDPGfD outperforms DDPG across the reported comparisons.

The important sparse-reward result is that DDPGfD learns nearly as well with the terminal signal as with shaped guidance. This addresses the paper’s central question. The demonstrations make a simple success reward practically useful in settings where unaided exploration is difficult.

The drive result also matters because the authors describe its demonstrations as relatively poor. DDPGfD still outperforms DDPG there. The result is evidence that the method need not depend on near-perfect demonstration behavior in every task.

The authors additionally report that learned insertions typically take 2-4x fewer steps than the demonstrations. This is an efficiency comparison between demonstrated behavior and the learned execution. It should not be read as a numerical ratio of training speed or final success probability.

Variability favors the demonstration-based learner as well. The DDPG percentile bands are broader, which the authors interpret as less reliable learning. The supervised imitator performs poorly on every simulated task, indicating that the demonstration recordings are more effective when combined with reward-driven interaction than when used solely for action prediction.

The paper’s written results do not tabulate final success percentages or exact final shaped-reward values for these comparisons. Those quantities should therefore remain qualitative here. The supported numerical claim about execution efficiency is the authors’ reported step comparison, rather than values estimated from learning-curve images.

#### How much demonstration data is necessary?

A separate clip-insertion experiment changes the number of available expert trajectories. The listed settings use 1, 2, 3, 5, 10, and 100 trajectories, with sparse rewards.

The most striking finding is successful learning from a single trajectory. That result is especially informative because each demonstration contains only one reward-bearing transition. The learner must reuse and propagate very limited success information.

The chart compares the demonstration budgets of successful clip-learning settings. Its metric is the amount of demonstration data supplied, not success rate or learning time.

Simulated sparse-reward clip insertion, demonstration budget Successful learning is possible with a single demonstrated trajectory.

**The numbers**

| System or setting | demonstration trajectories supplied |
| --- | --- |
| Standard demonstration setting | 100 |
| DDPGfD single-trajectory setting (this paper) | 1 |

A smaller budget does not imply identical learning curves. The experiment establishes sufficiency under the tested setting, not that additional demonstrations have no value. The authors describe diminishing returns with 50-100 demonstrations.

There is a minor reporting mismatch worth retaining. The prose enumerates settings that jump from 10 to 100, while the subsequent discussion refers to the 50-100 range. The overall interpretation is unchanged, but the precise intermediate coverage should not be reconstructed beyond what is stated.

#### Physical clip insertion

The final experiment moves to a physical Sawyer performing clip insertion. The figure reports performance from 2 runs. DDPGfD learns a robust insertion policy, according to the authors, and the sparse-reward version learns faster than shaped-reward DDPG.

This is the paper’s clearest evidence that the approach is useful beyond simulation. It demonstrates that the replay-based procedure can operate with physical contact, a flexible object, recorded human guidance, and a practical command-limiting controller.

Its quantitative scope is narrower than the simulation study. The article does not supply a tabulated final physical success rate or a numerical interaction-time threshold for mastery. The physical result supports feasibility and the reported learning advantage, while the small run count limits conclusions about variability.

### What the ablations show

#### Removing demonstration experience

The strongest controlled comparison is between DDPGfD and the enhanced DDPG baseline. Both use the general learning improvements; the demonstration-based system additionally begins with human transitions in replay.

This comparison supports the claim that demonstrations contribute useful information beyond prioritized sampling, longer returns, and regularization alone. It is particularly persuasive where DDPG receives carefully tuned shaping but DDPGfD can learn with sparse success feedback.

The comparison does not show that every component of DDPGfD is independently necessary. It evaluates the value of demonstration experience within the authors’ chosen learning package. A different combination of components might change the size of that advantage.

#### Changing the training reward

The sparse-versus-shaped comparisons ask whether demonstrations reduce dependence on engineered intermediate rewards. DDPGfD’s similar learning behavior across those reward conditions supports that interpretation for the tested tasks.

This analysis is more informative than showing only that sparse-reward DDPGfD eventually succeeds. It compares the same demonstration-based approach under both kinds of guidance, and it includes a non-demonstration baseline that receives shaping.

The conclusion remains task-dependent. The shaping function is a particular hand-tuned construction for insertion, and the sparse success condition uses known geometric information. The experiment does not demonstrate that all useful intermediate rewards are unnecessary in every continuous-control problem.

#### Reducing the demonstration set

The clip data-volume experiment changes a practical resource while holding the task and sparse-reward formulation in view. Successful learning from a single example shows that the method does not invariably require a large demonstration collection.

The terminal feedback structure makes this comparison especially revealing. With only one reward-bearing transition in a demonstration, the learner cannot rely on dense labels throughout the recorded path. Repeated replay and return propagation provide a plausible explanation for how that limited signal becomes useful.

However, the data-volume experiment does not separate those mechanisms. It shows that the complete method can exploit limited demonstrations. It does not quantify how much of that ability comes from the priority bonus, the longer-return term, or repeated updates.

The diminishing-return observation also has a practical interpretation. Increasing demonstration volume eventually provides less improvement in this clip setting. That does not establish an optimal collection policy, because the article does not report a joint comparison of demonstration effort, later robot interaction, and computation.

#### Comparing reward learning with supervised imitation

The supervised baseline isolates a different way to use the same general source of experience. It learns to predict demonstrated actions instead of learning action values from task outcomes.

Its poor performance across the tasks supports the choice to combine demonstrations with reinforcement learning. The recordings are not sufficient, under this supervised setup, to produce a strong policy simply through action matching.

This result should not be extended into a claim against every imitation-learning method. The baseline is a particular supervised imitator with an L2 action loss. The related-work section itself describes richer imitation procedures, including approaches that request additional expert feedback.

#### Missing component ablations

The paper does not present a full component-removal study for prioritized replay, the demonstration bonus, longer returns, repeated updates, and regularization.

The discussion of update counts offers a limited tuning observation: learning efficiency per update remained acceptable at 20, and the authors selected 40 as a practical balance. That is useful implementation evidence, but it does not replace learning curves comparing the full range of components.

Likewise, the priority formula combines temporal-difference error and action-gradient information without a reported comparison that isolates their separate effects. The experimental support is strongest for the overall demonstration-based procedure and its data-efficiency behavior, rather than a complete causal account of every design choice.

### Limitations

#### Limits the authors explicitly recognize

The authors recognize that reusing old experience can destabilize learning. As the policy changes, replayed transitions may represent states unlike those the current actor will visit. Incorrect value estimates in newly encountered regions can then damage both the critic and the policy.

This is directly relevant to their decision to perform many updates per interaction. More replay improves data use only while the stored information remains helpful and the estimates remain sufficiently stable. The chosen update setting is an empirical balance in these experiments, not a general convergence guarantee.

They also explicitly identify reward shaping as delicate. The staged insertion reward requires careful weighting of spatial errors and balancing of movement phases. This motivates the demonstration approach, but it also means the shaped baseline embodies substantial task-specific engineering.

Physical safety is another acknowledged requirement. The appendix introduces a force-sensitive intermediate controller because unconstrained agent commands could apply excessive force. The physical learning result therefore depends on protective control infrastructure outside the learning algorithm.

The introduction presents rapid learning from brief human guidance as a longer-term ambition. That ambition should remain separate from the demonstrated scope. The experiments address insertion tasks under controlled observation, mounting, and reward conditions.

#### Limits visible in the task setup

The task family is deliberately focused. The simulated problems vary rigidity, orientation sensitivity, and deformation, but they remain insertion problems using an attached object and fixed socket. The physical study covers clip insertion rather than the full simulated suite.

This focus makes the experiments coherent: the tasks expose the difference between reaching an opening and reaching a final goal. It also limits generalization. The results do not show performance on arbitrary manipulation, moving receptacles, or tasks with substantially different contact structures.

The observation interface supplies considerable information. Simulation includes global object poses, while the physical experiment receives socket position and uses kinematics to derive plug-site geometry. The study does not establish that a learner could infer those quantities from unstructured sensory input.

Likewise, sparse reward does not mean reward construction is absent. The system still needs geometric sites, a tolerance, and a reliable way to determine when insertion has succeeded. Demonstrations reduce the burden of describing useful intermediate progress; they do not remove the need to recognize the endpoint.

The object is already attached to the gripper. The learner is therefore not required to discover how to acquire or grasp it before insertion. The physical socket is fixed, and the supplied setup does not test arbitrary variation in its placement during learning.

#### Limits on quantitative interpretation

The main numerical evidence is expressed through learning curves, percentile bands, demonstration counts, and the reported step-efficiency comparison. The written account does not provide a table of final success rates for all task and reward combinations.

As a consequence, broad descriptions such as faster, more reliable, or nearly as effective should retain their experimental context. They should not be converted into invented percentages or precise speed comparisons. The stated 2-4x figure concerns insertion steps relative to demonstrations.

The common shaped-reward reporting scale is useful but also requires attention. A curve measured with that score is not automatically a curve of success probability. Improvements may reflect how the evaluator rewards intermediate behavior as well as completed insertions.

The physical result has only 2 runs in its reported figure. That is enough to demonstrate operation and illustrate learning behavior, but it provides limited evidence about repeatability across training conditions.

The demonstration-collection budget is also distinct from later interaction. The paper reports 10-15 minutes per task for collecting its standard demonstrations. A claim about total deployment effort would need to account for that stage as well as reinforcement-learning interaction, computation, and setup work.

#### Limits on explaining why it works

The experiments show that the overall method is effective, but they do not fully identify the contribution of each mechanism. Demonstrations, sampling priorities, longer returns, repeated updates, and regularization operate together.

The enhanced baseline helps separate the value of demonstrations from general algorithmic improvements. It does not isolate interactions among all the components. For instance, the paper does not measure whether the demonstration bonus is essential when only a single successful trajectory is available.

The poor supervised-imitation result is also narrower than a general verdict on learning from examples. It shows that the chosen action-prediction baseline is inadequate in these tasks. It does not determine the performance of every alternative imitation objective or expert-querying procedure.

Imperfect demonstrations are tolerated in the drive experiment, but the paper does not systematically vary demonstration quality. It therefore supports robustness to the particular demonstrations collected, rather than a guarantee for misleading, unsuccessful, or incompatible examples.

#### Limits of exact reconstruction

Some mathematical details are underspecified or inconsistent. The shaped reward’s reaching condition conflicts with the preceding capped cost. The reward transformation also has a parenthesis problem and an unclear relationship to its stated range.

These issues matter because the paper emphasizes careful shaping. A reader can understand what the authors intended to compare, but cannot recover every aspect of the shaping implementation from the equations alone.

The learning description also does not include all parameter values needed to reconstruct a complete implementation. Several coefficients and intervals are named without numerical settings in the article’s account. The conceptual procedure is much more fully specified than every operational detail.

Finally, the method should not be described as learning safe behavior solely from demonstrations. The physical setup includes an explicit command-modifying controller. The learned policy’s performance and the controller’s protective role are separate parts of the demonstrated system.

### What came after

The later-work connections available here point towards dexterous manipulation and interaction with web interfaces. They establish that the paper was cited in those lines of research. Their titles identify the broad direction of each work, but do not establish which DDPGfD components were retained or how much performance those components contributed.

[Dexterous Manipulation with Demonstrations](https://md.research.elamur.ai/free/en/papers/rajeswaran-2017-learning-complex-dexterous-manipulation-deep/) addresses complex dexterous manipulation using deep reinforcement learning and demonstrations. Its 2017 listing places the same broad combination in another manipulation setting: examples provide useful behavior, and reinforcement learning remains part of the learning procedure.

The connection to DDPGfD is therefore clear at the level of the research question. Both concern how demonstrated behavior can help a reinforcement learner acquire difficult control skills. The available account does not justify claiming that the dexterous-manipulation work uses this paper’s replay priority, actor objective, or longer-return formulation. Those are specific implementation claims requiring a fuller account of that later method.

[Workflow-Guided Exploration](https://md.research.elamur.ai/free/en/papers/liu-2018-reinforcement-learning-web-interfaces-using/) studies reinforcement learning for web interfaces and identifies workflow guidance as its exploration mechanism. Its 2018 listing points to a different application domain where unguided interaction can be inefficient and prior structure can help direct learning.

The conceptual relationship is the treatment of exploration as a problem that additional guidance can address. In the robotics paper, recorded transitions expose a learner to routes toward sparse success. The later title identifies workflows as guidance for interface exploration. That supports a thematic connection, without establishing that workflows are stored as DDPGfD-style transitions or sampled with the same priority rule.

Taken at that scope, the later citations show the reach of the underlying question: how can an interactive learner use existing knowledge about successful behavior while continuing to improve from outcomes? This paper provides a concrete answer for continuous robotic insertion. Its lasting, reusable distinction is between examples that help a learner find success and examples that define the behavior it must reproduce.

## Cite

Cite as Mel Vecerik, Todd Hester, Jonathan Scholz, Fumin Wang, Olivier Pietquin, Bilal Piot, Nicolas Heess, Thomas Rothörl, Thomas Lampe and Martin Riedmiller. 2017. Leveraging Demonstrations for Deep Reinforcement Learning on Robotics Problems with Sparse Rewards. arXiv (Cornell University).

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.48550/arxiv.1707.08817](https://doi.org/10.48550/arxiv.1707.08817) · [arXiv 1707.08817](https://arxiv.org/abs/1707.08817)

```bibtex
@misc{mel2017leveraging,
  title = {{Leveraging Demonstrations for Deep Reinforcement Learning on Robotics Problems with Sparse Rewards}},
  author = {Mel Vecerik, Todd Hester, Jonathan Scholz, Fumin Wang, Olivier Pietquin, Bilal Piot, Nicolas Heess, Thomas Rothörl, Thomas Lampe and Martin Riedmiller},
  year = {2017},
  doi = {10.48550/arxiv.1707.08817},
  eprint = {1707.08817},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.1707.08817}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
