DART read-along

DART: Noise Injection for Robust Imitation Learning. Laskey, Lee, Fox, Dragan and Goldberg, CoRL 2017.

Paper: DART, arXiv:1703.09327 read-along Video 1:04:54 Watch on YouTube Sketchnote (PDF)

In short

Summary

DART (Disturbances for Augmenting Robot Trajectories) is Behavior Cloning with noise: while the supervisor demonstrates, Gaussian noise is added to the controls it executes, so it has to recover from small errors, and the robot is trained on the supervisor's noise-free controls at the states it reached.

The noise covariance is fit to the current robot policy's error and scaled to a guess of its final error, so the data shows the kind of errors the robot will make while the supervisor stays in control (off-policy).

In four MuJoCo tasks DART matches DAgger and is 3x faster in computation on Humanoid, and on a Toyota HSR task of finding a target in clutter and clearing a path to it, it reaches 79% success against Behavior Cloning's 49%.

Sketchnote

One-page summary

Hand-drawn summary of DART: DART (Disturbances for Augmenting Robot Trajectories) is Behavior Cloning with noise: while the supervisor demonstrates, Gaussian noise is added to the controls it executes, so it has to recover from small errors, and the robot is trained on the supervisor's noise-free controls at the states it reached. The noise covariance is fit to the current robot policy's error and scaled to a guess of its final error, so the data shows the kind of errors the robot will make while the supervisor stays in control (off-policy). In four MuJoCo tasks DART matches DAgger and is 3x faster in computation on Humanoid, and on a Toyota HSR task of finding a target in clutter and clearing a path to it, it reaches 79% success against Behavior Cloning's 49%.
A one-page summary in sketchnote style. Download the PDF (page 1 the sketchnote, page 2 the listening sheet) to annotate it in Concepts or GoodNotes.

Listen for

In class

Keep these in mind while the presenter talks. Tick them on page 2 of the PDF as they come up.

  1. Where the noise goes (the control the supervisor executes) and what the label is (the supervisor's clean control)
  2. Who is in control while data is collected, and why that keeps DART off-policy
  3. How the noise covariance is fit to the learner's error, and what the α term does
  4. What Lemma 4.1 and Proposition 4.1 assume, and what the proof actually compares
  5. Which results use an algorithmic TRPO supervisor in simulation, and which use human supervisors on a real robot

Questions worth asking

  1. Proposition 4.1 assumes the supervisor acts the same under noise, and α = 6 did worse than α = 3 with humans. How would you measure how much noise a human teleoperator can absorb?
  2. DART fits one state-independent Gaussian to the learner's error. Where would a real robot's errors depend on the state, such as near contact, and how would you inject noise there?
  3. With a pretrained policy and some supervisor-labeled states, the learner's error could be estimated before any new demonstrations. Would that estimate predict the final policy's error on its own states well enough to skip DART's iterations?

In class, on an iPad

  1. Before: watch or listen to the read-along (the chapters are below) and skim the questions below.
  2. Open the sketchnote PDF in Concepts or another note app. Page 1 is the summary drawing, with room to annotate. Page 2 is the listening sheet.
  3. During the talk: tick each "listen for" item as it comes up, and write one line in each box of the sheet.
  4. After: mark the one answer below that the talk changed for you, and ask your question.

Common questions and misunderstandings

FAQ

Are the training labels noisy?

No. The noise changes which states the supervisor visits, not the targets. Eq. 2 trains on J(θ, θ* | ξ), which compares the robot's control with the supervisor's control π_θ*(x_t) at each visited state, not with the noisy control that was executed. The paper states this through the equation, not in words. (Sec. 3, Sec. 4, Eq. 2)

Who controls the robot while DART collects data?

The supervisor, with noise added to its controls. The robot's own policy is never executed during collection; it is used only to estimate how much noise to inject. That is why DART is off-policy, while DAgger is on-policy: DAgger rolls out the robot's policy and asks for labels at the states the robot visits. In the experiments, DAgger mixed the robot's policy with the supervisor's (β = 0.5). (Sec. 1, Sec. 4, Fig. 1, Appendix 4.3)

How does DART choose the noise?

From the learner's current error. After each round it trains a policy, compares that policy's controls with the supervisor's on states from the noisy supervisor's demonstrations, and averages the outer products of the differences, without subtracting their mean, to fit zero-mean noise (the closed form of Eq. 3). Eq. 4 then rescales this covariance so that the squared deviation the noise causes over a demonstration, T·tr(Σ), equals α. In MuJoCo the covariance was estimated on held-out demonstrations from earlier iterations. (Sec. 4.1, Eq. 3–4, Algorithm 1, Appendix 4.3)

What is α, and what do α = 3 and α = 6 mean?

α is a guess of the final robot's error, the target for T·tr(Σ). In MuJoCo the authors set α = T·tr(Σ̂_k), which adds no prior knowledge: the noise is just the learner's current error. On the HSR, α = 3 means three times the error measured after the first 10 demonstrations, T·tr(Σ̂_1), because with few demonstrations in image space the authors expected the robot's error on its own states to be much larger. The text prints both HSR choices as 3T·tr(Σ̂_1); the shorthand α = 6 shows the second is meant to be 6T·tr(Σ̂_1). (Sec. 4.1, Sec. 5.2, Appendix 4.3)

What does the bound in Lemma 4.1 say, and what does it need?

It bounds the covariate shift: the gap between the robot's loss on the noisy supervisor's trajectories and its loss on its own trajectories is at most T·√(½·KL), where KL is the divergence between the robot's and the noisy supervisor's trajectory distributions. It needs a surrogate loss between 0 and 1, for example discrete actions or bounded, normalized controls. The proof uses total variation and Pinsker's inequality. Minimizing this KL over the noise reduces to making the robot's controls likely under the noisy supervisor, which DART approximates round by round (Eq. 3). (Sec. 4, Lemma 4.1, Appendix 8.1)

Does Proposition 4.1 show that DART's tuned noise level is the best one?

No. It shows only that, when the robot makes any error, the KL divergence in the bound is smaller with Gaussian noise than without it. The proof is short: with a deterministic supervisor and no noise the divergence is infinite, and Gaussian noise that gives every control a non-zero probability (a full-rank Σ) makes it finite. The argument needs only that support, so it says nothing about which noise level is best, and it assumes the noise does not change how the supervisor behaves. (Sec. 4.2, Proposition 4.1, Appendix 8.1)

When does noise injection not help?

When the robot can represent the supervisor perfectly and has enough data. Then its error is zero, there is no error to simulate, and the condition of Proposition 4.1 (error greater than 0) fails. The paper argues that in practice there is rarely enough data to represent the supervisor perfectly, and notes a similar result for when DAgger beats Behavior Cloning (Laskey et al. 2016). (Sec. 4.2)

Does DART beat Behavior Cloning in every MuJoCo task?

No. DART matches DAgger in all four tasks, but the paper says Behavior Cloning and DAgger-B fall below that level in Walker and Humanoid, and names no gap in Hopper or Half-Cheetah. The supervisor is a TRPO policy (two hidden layers of 64 units), and each demonstration is cut to 50 sampled state–control pairs to make imitation harder. (Sec. 5.1, Fig. 2)

Where do "3x faster" and "5% vs 80%" come from?

From Humanoid, the largest task (376-dimensional state, 17-dimensional control). DART needed 3x less computation time than DAgger, because there DART first collects 50 supervisor demonstrations and then retrains every 25 iterations, while DAgger retrains after every demonstration. While collecting data, DART's noisy supervisor earned 5% less reward than the clean supervisor, but the policies DAgger executed earned over 80% less. The abstract's "up to 3x" refers to this task. (Abstract, Sec. 5.1, Fig. 2, Appendix 4.3)

What do 79% and 49% mean, and where does 62% come from?

They are HSR task-success rates: DART with α = 3 reached 79% and Behavior Cloning 49%, where success means the robot found the goal object and cleared a path to it (then a human, blind to which policy ran, triggered an open-loop grasp). The abstract's 62% is a relative increase, not 62 points: the rounded rates give about 61% (1.6 times), or 30 points, and the paper does not show its calculation. Each policy was tested 20 times from sampled initial states, and the paper reports the results as averages for its four supervisors; 79, 49 and 72 are not multiples of 5, so they are not one set of 20 trials. (Abstract, Sec. 1, Sec. 5.2, Fig. 3, Appendix 4.5)

Why did α = 6 do worse than α = 3 on the real robot?

The paper does not test why. The authors suggest this much noise may have been too high for the human supervisors. If it changed how they demonstrated, Proposition 4.1's assumption that the noise does not change the supervisor would fail, but the experiment does not show that. Only two values of α were tried: each supervisor gave 10 noise-free demonstrations, then 30 more with each method, and each final policy was trained on 40. (Sec. 4.2, Sec. 5.2)

Does the direction of the noise matter, or only its size?

In MuJoCo, the size seems to matter most. Random covariance matrices (Wishart samples) scaled to a well-chosen trace, 0.5, matched DART's losses, while traces of 0.005 and 5.0 (10.0 for Humanoid) could give much higher losses. Isotropic noise with Σ = I did poorly and led to unsafe policies. The paper's point is that the right size is not known before training, and DART estimates it from the learner. (Sec. 5.1, Appendix 4.3, Appendix 4.4, Fig. 5)

Chapters

Video

  1. 0:00Abstract
  2. 2:011. Introduction
  3. 7:142. Related Work
  4. 10:283. Problem Statement
  5. 18:034. Off-Policy Imitation Learning with Noise Injection
  6. 32:055. Experiments
  7. 41:316. Conclusion
  8. 42:10Appendix

Key terms

Glossary

Behavior Cloning
Supervised regression from states to the supervisor's controls, on noise-free demonstrations.
Covariate shift
The robot's own states differ from the training states, so its errors compound.
Off-policy / on-policy
Training data comes from the supervisor's trajectories / from the robot's current policy.
DAgger
On-policy method: the robot rolls out, the supervisor labels visited states, retrain on all data.
Surrogate loss
A loss between two controls, here squared L2; J sums it over a trajectory.
Noise covariance Σ
Covariance of the Gaussian added to the supervisor's control; T·tr(Σ) is the expected squared error it causes per demonstration.
α
A guess of the final robot's error; DART scales Σ so that T·tr(Σ) = α.
Algorithmic supervisor
A trained policy used as the expert; in MuJoCo, the deterministic mean of a TRPO policy.
Pinsker's inequality
Bounds total variation by √(½·KL); it turns Lemma 4.1 into a KL bound.