DAgger: let the learner drive, let the expert label
DAgger
Learn how DAgger collects expert labels on the states the learner itself visits, why retraining on all data is Follow-The-Leader in online learning, what its uTε and existence guarantees assume, and how it compares with behavior cloning at equal label budgets on a synthetic lane-keeping task.
daggerAsk the expert about the learner’s own mistakes
DAgger, short for Dataset Aggregation, trains a policy by imitation. A policy is the rule that picks an action in each situation. DAgger lets the learner drive and asks an expert what it would have done in each state the learner reached. Those answers are added to all earlier ones, and the learner is retrained. For example, a learner car drifts toward the edge of the lane. The expert labels each drifted position with the correct steering, so the next version can learn how to come back. Algorithm
The weakness it targets is that of behavior cloning, covered in behavior cloning. Behavior cloning trains only on states the expert visited. Once the learner makes a small mistake, it reaches states the demonstrations never showed, and errors can pile up. Ross, Gordon and Bagnell note that a classifier with error rate ε on the expert’s states can make as many as T²ε mistakes over T steps. Introduction
DAgger’s answer is to train on the states the learner actually reaches. It collects data mostly with the learner in control and asks the expert for labels there. A label is the expert’s action for a state, whatever action was actually executed. Algorithm 3.1
The price is access to the expert. DAgger needs an expert who can be asked about any state during training, such as a planner in simulation or a person teleoperating a robot. A fixed log of past demonstrations is not enough. Interactive setting
The basics, a two-lane comparison with behavior cloning and the rule “store the expert’s label, not the executed action”, are in imitation learning. This article goes further. It covers the methods DAgger replaced, its link to online learning, the exact guarantees with their assumptions, and the schedule for mixing in the expert. It ends with a comparison on a toy task in which both methods get the same number of expert labels.
The algorithm, its online-learning view, and what is guaranteed
This section states the problem DAgger solves, the methods before it, the algorithm, why it counts as a no-regret method, and exactly what its theorems promise.
The problem
The policy we want minimises the loss on its own states, not the expert’s. Ross, Gordon and Bagnell write this ideal as choosing the policy whose average surrogate loss, under its own state distribution , is smallest. A surrogate loss is an easy-to-optimise stand-in for task cost, such as the 0-1 loss against the expert, a squared loss or a hinge loss. The trouble is that depends on and can only be sampled by running . So the data are not independent and identically distributed (i.i.d.), and the objective is non-convex even when the loss is convex. Eq. (1)
What came before
Ross and Bagnell’s forward training trains one policy per time step, each on the states produced by the policies already trained. It needs iterations, cannot stop early and is impractical when is large or undefined. Forward training Algorithm 3.1
SMILe, stochastic mixing iterative learning, trains a random mixture of policies. Each iteration adds a new policy with a small weight and shrinks the expert’s share, so after iterations the expert acts with probability . Ross and Bagnell showed that of order with of order iterations gives near-linear regret on some problems. Its drawbacks are a stochastic final policy, some poor mixture components and many iterations. SMILe SMILe
SEARN-style methods estimate the remaining cost of each action by resetting the system to the same state many times. Ross and Bagnell estimate the number of expert queries as of order , over of order iterations. They note that such resets are impractical in the physical world. SEARN queries Resets
DAgger, by contrast, returns one deterministic policy that does not depend on time. The authors also note that it has no free parameters apart from the choice of learner. Introduction
The algorithm
Start with an empty dataset. In iteration , run a mixture of the expert and the current learner and record the visited states. Ask the expert for its action at each, add them to the dataset and retrain on everything. At the end, return the policy that does best on validation runs. Algorithm 3.1
In words: the policy that collects data, , uses the expert with probability and the current learner otherwise. Every visited state is stored with the expert’s action . The next learner is the policy in the class with the lowest total loss on all stored pairs. The paper says “train classifier on D”; writing it as this minimum is our reading.
Why mix in the expert at all? Early policies are trained on little data and make many mistakes. They visit states that become irrelevant as the policy improves. Letting the expert act part of the time keeps early data collection closer to useful states. Mixture motivation
The schedule for is flexible. Typically , so no initial policy is needed. One option is , an exponentially fading expert share like SMILe’s. The only requirement for the analysis is that the average over iterations goes to 0. The authors report that the parameter-free choice for and 0 afterwards “often performs best in practice”. That is their empirical remark, not a theorem. β schedule
Why aggregation is Follow-The-Leader
Retraining on all data so far picks the policy that would have done best on everything seen. In online learning this rule is called Follow-The-Leader (FTL). See online learning for the setting. FTL Osa and coauthors call DAgger an “on-policy” approach: the expert supplies the actions and the learner’s behaviour supplies the input distribution. They credit this phrasing to Laskey and coauthors. On-policy
DAgger’s analysis treats each iteration as one round of an online game. The loss of round is , the expected loss of a policy on the states visited by . Eq. (3)
In words: take the average loss of the policies actually played and subtract the average loss of the single best policy chosen in hindsight. That gap is at most , and shrinks to zero. An algorithm with this property is called no-regret. Regret is the gap between what you got and what the best fixed choice would have got.
Many no-regret algorithms reach of order (up to log factors), for example when the loss is strongly convex. §4.1 The analysis relies only on FTL being no-regret for strongly convex losses. §4 opening A strongly convex loss curves upward at least as much as a parabola, so it has a single clear minimum. Any other no-regret learner, such as online gradient descent, can replace plain aggregation and keep the guarantees. Any no-regret method Fig. 3.3 and p. 64 Osa and coauthors stress that this is online, not stochastic, gradient descent, because the data are not i.i.d. Footnote 2, p. 64
From loss to task cost
Loss on the learner’s own states is not yet task cost. Theorem 2.2 links them through a constant , which we call the recoverability constant (our gloss, not the paper’s name). Theorem 2.2
In words: on the left, if a policy’s loss on its own states is , its total cost exceeds the expert’s by at most . On the right is Theorem 3.2. Run iterations, with of order up to log factors. Then at least one policy in the sequence costs at most the expert’s cost plus plus a constant.
Three symbols need care. on the left is the loss under the policy’s own distribution. That loss must be the 0-1 loss or an upper bound on it, and costs must lie in [0, 1]. bounds how much the expert’s remaining cost can rise if one action is replaced by any other, at any step and any reachable state. is the true loss of the best single policy in hindsight across the distributions visited during training. It is not behavior cloning’s ε on the expert’s states. Theorem 2.2 and assumptions
The proof replaces the expert by the learner one step at a time and adds up the differences. The imitation learning article shows this telescoping sum. Proof of Theorem 2.2
“Linear in ” holds only when is small. The authors say is of order 1 when the expert can recover within a few steps. For example, for a rapidly mixing Markov chain with decay rate , is of order . If the cost is itself the 0-1 loss against the expert, . In the worst case is of order , and then nothing is gained over behavior cloning’s . u discussion and footnote 2
Exactly what the theorems promise
The main results rest on stated assumptions. Assumptions
- The surrogate loss is strongly convex and bounded over the policy class. The 0-1 loss is not strongly convex, which is why the cost bound needs a surrogate that upper-bounds it.
- The mixing schedule decays: for some that does not depend on .
- Theorems 3.1 and 3.2 assume infinitely many sample trajectories per iteration.
Theorem 3.1 assumes of order up to log factors. Then some policy in the sequence has loss on its own states at most plus a term of order . Theorem 3.2 is the cost version above. If the task cost equals the loss or is bounded by it, the cost bound becomes plus a constant. Theorems 3.1–3.2
These guarantees are existential. They say some policy in the sequence is good, not that the last one is. The same guarantee holds for picking one policy at random from the sequence and running it for steps. That is why the algorithm returns the best policy on validation. Footnote 3 Never read them as “the final DAgger policy is guaranteed”.
With finitely many samples, trajectories per iteration, the results use , the training loss of the best policy in hindsight on the sampled data. Theorem 3.3 says that with of order and of order 1, with probability at least some policy has loss at most plus order . Theorem 3.4 is the cost version, with of order . The authors suggest that strong convexity could reduce to about . Theorems 3.3–3.4
The cost of mixing in the expert
The data are collected with , but the policy we keep is . Lemma 4.1 bounds how different their state distributions can be, and Theorem 4.1 folds that gap into the guarantee. Lemma 4.1, Theorem 4.1
In words: on the left, the L1 distance (sum of absolute differences) between the mixture’s state distribution and the learner’s is at most . On the right, the best policy in the sequence has loss at most the best-in-hindsight loss , plus the regret , plus a mixing penalty. In the penalty, bounds the loss and is the last iteration at which is still above .
Why ? With probability the mixture runs the learner on all steps, so only the remaining fraction of episodes can look different. Two distributions are at most 2 apart in L1 distance, so the gap is at most . Since , this is at most . Proof of Lemma 4.1
Here is a plain point about this lemma. Two probability distributions can never be more than 2 apart in L1 distance; that is total disagreement. So the lemma says something only when is below 2, that is when . Before that, it is no better than the trivial bound. Lemma 4.1
Theorem 4.1 assumes the do not increase. For , the authors show the bracket divided by is at most , which is negligible once is of order up to log factors. Theorem 4.1 They also stress that this analysis is weaker than reductions needing only a good classifier: DAgger’s guarantee needs a no-regret method or a strongly convex surrogate loss. Remark Theorem 4.2 adds a finite-sample term of size from the Azuma–Hoeffding inequality. So of order keeps that term of order . Theorem 4.2
Equal label budgets on a synthetic lane-keeping task
This section compares DAgger with behavior cloning at equal numbers of expert labels on a toy task, over one seed in detail and five seeds in summary, and evaluates the Lemma 4.1 term. The program is an original synthetic simulation, numpy only, with fixed seeds. The learner is a lookup table, not a neural network, and there is no real vehicle.
The environment is the one used in behavior cloning. The state is the car’s sideways offset from the lane centre and its sideways velocity . Each step the offset grows by the velocity, and the velocity changes by one of five steering actions plus small random noise. Leaving the lane () is a permanent crash costing 1 per step, so per-step costs lie in [0, 1]. is the expected number of crash-steps per episode of steps.
The state space is cut into a 20 × 20 grid. The expert’s action is constant in each cell, and the learner is a table filled by majority vote that goes straight in cells it never saw. Each iteration collects 5 trajectories and labels every visited, non-crashed state with the expert’s action. There are 8 iterations.
Three methods share the same first iteration of 500 expert labels. bc adds 5 more expert trajectories each iteration, the same label budget. dagger-I uses for and 0 afterwards. dagger-0.5 uses . The mixing coin has its own random stream, and the stored label is always the expert’s.
import numpy as np
# Synthetic lane-keeping toy for DAgger versus behaviour cloning (no real vehicle or data).
# Same environment, expert and table learner as the behaviour-cloning article's example.
# State: lateral offset y (m) and lateral velocity v (m/step).
# y[t+1] = y[t] + v[t], v[t+1] = v[t] + u[t] + w[t], w ~ N(0, 0.02^2)
# Actions u: 5 steering values. |y| > 1 is a crash: absorbing, cost 1 on that step and on
# every later step, so the per-step cost lies in [0, 1].
# The state is cut into a 20 x 20 grid of cells (0.1 m in y, 0.05 m/step in v).
# Expert: the action closest to -(0.3*y_c + 0.8*v_c) at the centre (y_c, v_c) of the cell,
# so it is constant on each cell and a table can copy it exactly.
# Learner: lookup table over cells, fitted by majority vote; unseen cells default to u = 0.
ACTIONS = np.array([-0.1, -0.05, 0.0, 0.05, 0.1])
Y_EDGES = np.linspace(-1.0, 1.0, 21)
V_EDGES = np.linspace(-0.5, 0.5, 21)
NB = 20
def index(y, v):
iy = np.clip(np.digitize(y, Y_EDGES) - 1, 0, NB - 1)
iv = np.clip(np.digitize(v, V_EDGES) - 1, 0, NB - 1)
return iy, iv
def cell(y, v):
iy, iv = index(y, v)
return iy * NB + iv
def expert(y, v):
iy, iv = index(y, v)
yc, vc = Y_EDGES[iy] + 0.05, V_EDGES[iv] + 0.025
return np.argmin(np.abs(ACTIONS[None, :] + (0.3 * yc + 0.8 * vc)[:, None]), axis=1)
def fit_table(cells, labels):
counts = np.zeros((NB * NB, ACTIONS.size))
np.add.at(counts, (cells, labels), 1)
table = np.full(NB * NB, 2)
seen = counts.sum(axis=1) > 0
table[seen] = np.argmax(counts[seen], axis=1)
return table, seen
def rollout(table, n_ep, T, seed, beta=0.0):
# table=None runs the expert. beta = per-step probability of executing the expert's
# action instead of the table's (DAgger's mixture). The stored label is always the
# expert's action at the visited state, whichever action was executed.
rng = np.random.default_rng(seed)
coin = np.random.default_rng(seed + 777)
y, v = rng.normal(0.0, 0.1, n_ep), np.zeros(n_ep)
crashed = np.zeros(n_ep, dtype=bool)
cost = np.zeros(n_ep)
cells, labels, mistakes, steps = [], [], 0, 0
for t in range(T):
a = expert(y, v) if table is None else table[cell(y, v)]
if beta > 0.0:
a = np.where(coin.random(n_ep) < beta, expert(y, v), a)
live = ~crashed
cells.append(cell(y[live], v[live]))
labels.append(expert(y[live], v[live]))
mistakes += np.sum(a[live] != labels[-1])
steps += live.sum()
y_next = y + v
v_next = v + ACTIONS[a] + rng.normal(0.0, 0.02, n_ep)
y = np.where(crashed, y, y_next)
v = np.where(crashed, v, v_next)
crashed |= np.abs(y) > 1.0
cost += crashed
return cost.mean(), np.concatenate(cells), np.concatenate(labels), mistakes / max(steps, 1)
T, M, N = 100, 5, 8 # horizon, trajectories per iteration, iterations
def run(method, data_seed, n_test, eval_iters=range(1, N + 1), n_val=0):
# method: "bc" (more expert trajectories each iteration), "dagger-I" (beta_i = I(i=1))
# or "dagger-0.5" (beta_i = 0.5^(i-1)). Iteration 1 is expert data for every method.
rows = []
C_all, L_all = np.zeros(0, dtype=int), np.zeros(0, dtype=int)
table = None
for i in range(1, N + 1):
if method == "bc" or i == 1:
policy, beta = None, 1.0
else:
policy = table
beta = 0.0 if method == "dagger-I" else 0.5 ** (i - 1)
_, C, L, _ = rollout(policy, M, T, 100 * data_seed + i, beta=beta if policy is not None else 0.0)
C_all, L_all = np.concatenate([C_all, C]), np.concatenate([L_all, L])
table, seen = fit_table(C_all, L_all)
if i in eval_iters:
j_test, _, _, eps_own = rollout(table, n_test, T, 200)
j_val = rollout(table, n_val, T, 5000)[0] if n_val else float("nan")
rows.append((i, beta, C_all.size, int(seen.sum()), j_val, j_test, eps_own))
return rows
print(f"T = {T}; each iteration collects {M} trajectories and labels every visited state "
f"with the expert; {N} iterations. J = expected crash-steps per episode.")
print("1) Data seed 0; J_test on 2000 test episodes (seed 200), J_val on 500 validation episodes")
for method in ("bc", "dagger-I", "dagger-0.5"):
rows = run(method, 0, 2000, n_val=500)
print(f" {method}")
print(" iter beta labels cells J_val J_test eps_own")
for i, beta, n, nc, jv, jt, eo in rows:
print(f" {i:<4d} {beta:.4f} {n:6d} {nc:5d} {jv:6.3f} {jt:6.3f} {eo:.4f}")
best = min(rows, key=lambda r: (r[4], r[0]))
print(f" picked on validation: iteration {best[0]} (J_test {best[5]:.3f}); "
f"last iteration J_test {rows[-1][5]:.3f}")
print("2) Five data seeds, 1000 test episodes: mean J_test at equal label budgets (min-max)")
its = (1, 2, 4, 8)
res = {m: np.array([[r[5] for r in run(m, s, 1000, eval_iters=its)] for s in range(5)])
for m in ("bc", "dagger-I", "dagger-0.5")}
for k, i in enumerate(its):
cells = [f"{m} {res[m][:, k].mean():.3f} ({res[m][:, k].min():.3f}-{res[m][:, k].max():.3f})"
for m in res]
print(f" iteration {i} (~{M * T * i} labels): " + "; ".join(cells))
for k, i in enumerate(its[1:], start=1):
wins = int(np.sum(res["dagger-I"][:, k] < res["bc"][:, k]))
print(f" iteration {i}: dagger-I lower than bc on {wins} of 5 seeds")
print("3) Lemma 4.1 term 2*T*beta_i with beta_i = 0.5^(i-1), T = 100 (informative only below 2)")
print(" " + ", ".join(f"i={i}: {2 * T * 0.5 ** (i - 1):g}" for i in range(1, 10)))
Part 1 follows one data seed. is measured on 2000 test episodes and on 500 separate validation episodes. is the learner’s 0-1 error on the states it visits itself.
| iteration | bc: labels, cells, J_test, ε_own | dagger-I: labels, cells, J_test, ε_own | dagger-0.5: β, labels, cells, J_test, ε_own |
|---|---|---|---|
| 1 | 500, 14, 9.209, 0.0419 | 500, 14, 9.209, 0.0419 | 1.0, 500, 14, 9.209, 0.0419 |
| 2 | 1000, 19, 1.686, 0.0074 | 917, 35, 1.151, 0.0056 | 0.5, 1000, 24, 1.009, 0.0053 |
| 3 | 1500, 22, 0.658, 0.0029 | 1417, 39, 0.416, 0.0018 | 0.25, 1500, 28, 0.229, 0.0016 |
| 8 | 4000, 22, 0.658, 0.0029 | 3917, 39, 0.416, 0.0018 | 0.0078, 4000, 28, 0.229, 0.0016 |
Iteration 1 is the behavior-cloning policy from the companion article, with . From iteration 2, DAgger’s labels land in the cells the learner actually reaches. dagger-I ends with 39 cells and dagger-0.5 with 28, against 22 for bc. Final costs are 0.416 and 0.229 against 0.658. Iterations 4 to 7 match iteration 3 except for the label counts.
dagger-I has fewer labels, 917 at iteration 2, because crashed episodes stop producing states. Validation costs are 8.042, 1.692 and 0.798 for bc over the first three iterations, and 8.042, 0.614 and 0.308 for both DAgger variants, flat afterwards. Validation picks iteration 3 for all three methods, and here the last iteration happens to be the same. After iteration 3 nothing changes on this seed. The learner now matches the expert on the cells it visits, so it stops finding new cells.
Part 2 repeats the comparison over five data seeds, with 1000 test episodes each. Entries are mean with the minimum and maximum over seeds.
| iteration (about labels) | bc | dagger-I | dagger-0.5 |
|---|---|---|---|
| 1 (~500) | 9.152 (5.437–12.980) | 9.152 (same data) | 9.152 (same data) |
| 2 (~1000) | 3.949 (1.967–6.479) | 2.406 (0.500–6.584) | 2.673 (0.462–6.584) |
| 4 (~2000) | 1.904 (0.954–4.090) | 1.559 (0.267–4.521) | 1.369 (0.005–4.521) |
| 8 (~4000) | 0.670 (0.198–0.954) | 0.237 (0.005–0.509) | 0.222 (0.005–0.492) |
On average DAgger reaches a given cost with fewer expert labels and ends lower: at about 4000 labels its means, 0.237 and 0.222, are roughly a third of bc’s 0.670. But it is not better on every seed at every budget. dagger-I beats bc on 4 of 5 seeds at iteration 2, on only 3 of 5 at iteration 4, and on 5 of 5 at iteration 8. At about 2000 labels the worst seed is worse for DAgger, 4.521 against 4.090. On this toy, neither schedule clearly wins. Five seeds are few, so treat these as illustrations.
Part 3 evaluates the Lemma 4.1 term for and . It is 200, 100, 50, 25, 12.5, 6.25, 3.125, 1.5625 and 0.78125 for to 9. Since an L1 distance between distributions can never exceed 2, the term says nothing until . For the first seven iterations, the lemma cannot rule out that the mixture visits completely different states from the learner.
What DAgger needs and does not promise
This section lists DAgger’s practical requirements, the limits of its guarantees and the limits of the example.
An expert on call. The learner must be able to act in the system, and the expert must be able to label any state the learner reaches. Interactive setting With only a fixed log, DAgger does not apply. A planner in simulation is an easy expert. A human is harder: every label costs time. The sources we read do not measure human labelling delay or accuracy, so we state these only as practical concerns.
Unsafe early policies. Early learners drive poorly and can reach dangerous states. A larger early keeps the expert in control more often, but Lemma 4.1 shows the collected data may then differ from the learner’s own states. Safety measures are a separate topic, robot safety; training first in simulation is sim-to-real transfer.
Existence, not the last iterate. The theorems promise that some policy in the sequence is good. A validation set is needed to find it, and validation runs cost interaction too.
Assumptions that may fail. The analysis needs a strongly convex, bounded surrogate loss, a decaying , and many iterations: of order or more. can be of order when one mistake is unrecoverable, as with the permanent crash in the example. And can be large if the policy class cannot imitate the expert on the visited states.
Not uniformly better. In the example DAgger wins on average, but at about 2000 labels dagger-I beats bc on only 3 of 5 seeds. The authors’ remark that for and 0 afterwards often works best is empirical; our toy shows no clear winner between the two schedules.
The example is a toy. The learner is a table with a “go straight” default, and the expert is constant per cell. A neural network would generalise differently. The numbers illustrate the mechanism, not real driving performance.
Exercises
These exercises cover why data are aggregated, a hand calculation with the mixing term, a misreading of the theorem and method choice.
-
Why does DAgger retrain on the union of all datasets instead of only the newest iteration’s data? Relate your answer to the analysis.
Answer: Training only on the newest data would fit the current policy’s states and could forget states that earlier policies visited. The next policy might then drift back there with no advice. Fitting the best policy on everything seen is Follow-The-Leader, a no-regret online algorithm for strongly convex losses. The guarantee rests on that property: the sequence’s average loss approaches that of the best single policy in hindsight across all visited distributions. Any other no-regret learner, such as online gradient descent, would also do.
-
Take , and . (a) Find and the first at which Lemma 4.1 is non-trivial. (b) For , evaluate and compare it with the paper’s bound , with and natural log. (c) What is the extra term of Theorem 4.1 for ?
Answer: (a) means , that is , so . The term first drops below 2 at : and , matching Part 3. (b) ; times gives 1.5625; . The bound is , which is indeed larger. (c) , so the term is . That is large: with only 8 iterations the penalty is not small, which is why must be of order up to log factors.
-
A colleague reads Theorem 3.2 as: “After of order iterations, DAgger’s final policy costs at most ; is a constant, so DAgger always beats behavior cloning.” Find three problems.
Answer: (i) The theorem is existential. Some policy in the sequence meets the bound, or a policy picked at random from it, not necessarily the last one; the algorithm returns the best on validation. (ii) is not a constant in general. It bounds the extra remaining cost after one deviating action and can be of order . That happens, for example, when one wrong action causes an unrecoverable crash, as in the example where a crash costs 1 on every remaining step. (iii) The assumptions may not hold: a strongly convex bounded surrogate loss, infinite samples or the finite-sample conditions, and a decaying . And can itself be large if the policy class cannot imitate the expert on the visited states. The data agree: in the toy, dagger-I beat bc at iteration 4 on only 3 of 5 seeds.
-
Is DAgger applicable, and what would you do? (a) The expert is a model-predictive controller in simulation. (b) The expert is a human teleoperator who can watch the robot and give corrective commands. (c) Only a fixed log of past demonstrations exists. (d) The learner’s early policies could damage the robot.
Answer: (a) Ideal: the expert can label any state cheaply. Run DAgger, for example with only at , and select the policy on validation runs. (b) Possible: Ross and Bagnell note that a teleoperated robot fits the interactive setting, and the Super Tux Kart experiment used a human expert. But labels cost human time. Budget them, and consider asking only in uncertain states, as in confidence-based autonomy. Confidence-based autonomy (c) Not applicable: DAgger needs new labels on the learner’s states. Use behavior cloning, see behavior cloning, or offline reinforcement learning if rewards are logged. (d) Keep the expert in control more often early with a larger , which the paper motivates by early mistakes; add safety limits (robot safety); or train in simulation first (sim-to-real transfer). Remember that by Lemma 4.1 the collected states can then differ from the learner’s own by up to .
Experiments and further reading
This section summarises the original experiment we read, related methods described by Osa and coauthors, and where to read next.
Ross, Gordon and Bagnell’s first experiment was the kart racing game Super Tux Kart. The policy steered at 5 Hz from LAB colour features of a 25 × 19 resized image. It was a linear controller fitted by ridge regression with . A human expert gave analog steering between −1 and 1 for each observed image. Each iteration was one lap, about 1000 data points, for 20 iterations. SMILe used and DAgger used only at . §5.1, Fig. 2
The supervised baseline did not improve as more expert data were collected. After 20 iterations SMILe still fell off the track about twice per lap. DAgger’s policy almost never fell off after 5 iterations and never after 15. §5.1 The paper also reports experiments on Super Mario Bros. and handwriting recognition, which we did not read, so we give no numbers from them.
Osa and coauthors place DAgger among teacher–student methods that correct the learner where it goes. One is confidence-based autonomy, due to Chernova and Veloso: the learner asks for a demonstration when its confidence falls below a threshold, and the expert can correct wrong actions. §3.4.3.2 Another is Data as Demonstrator (DaD), due to Venkatraman and coauthors, which applies data aggregation to multi-step prediction, where errors also cascade. DaD, p. 65 We know these works only through the survey.
For the original statements, read the DAgger paper’s Sections 3 and 4. Paper Ross and Bagnell’s 2010 paper explains forward training and SMILe. Reductions Osa and coauthors’ §3.4.3 gives a readable overview. §3.4.3 The no-regret machinery is in online learning. Learning a reward instead of a policy is inverse reinforcement learning, and learning from rewards by trial and error is reinforcement learning. Human experts on call usually means teleoperation.
Make a prediction, then check
Theorem 3.2 of the DAgger paper says: if the number of iterations N is Õ(uT), there exists π̂ in π̂₁:N with J(π̂) ≤ J(π*) + uTε_N + O(1). Which reading is correct?
Learning objectives
- Write DAgger's mixture policy, expert labelling and dataset aggregation, explain what the β schedule does, and interpret the procedure as Follow-The-Leader, a no-regret algorithm in online learning.
- State the uTε bound, Theorems 3.1–3.4 and Lemma 4.1 with their assumptions (strongly convex bounded surrogate loss, decaying β, sample counts, recoverability constant u), and distinguish 'a good policy exists in the sequence' from 'the last iterate is guaranteed'.
Prerequisites & connections
Explore related knowledge →References
- A Reduction of Imitation Learning and Structured Prediction to No-Regret Online Learning — scoped conference paper
Stephane Ross; Geoffrey Gordon; Drew Bagnell · 2011 - Efficient Reductions for Imitation Learning — AISTATS 2010, scoped
Stéphane Ross; J. Andrew Bagnell · 2010 - An Algorithmic Perspective on Imitation Learning — Foundations and Trends in Robotics 7(1–2), arXiv v1, scoped
Takayuki Osa; Joni Pajarinen; Gerhard Neumann; J. Andrew Bagnell; Pieter Abbeel; Jan Peters · 2018
Version1 · Editorial status: Recorded technical checks completed
View technical check record (AI)
Claude · 2026-12-03 · Independent AI check (Claude subagent, not the author; not a human or expert review). Research was done by a separate research subagent (facts.md) and the prose by a writer subagent. No Gemini style edits were logged for this topic in gemini-edits-016a.json, so I did the D012 readability pass on the intuition section myself in both languages. I ran example.py with the pinned interpreter (numpy 1.26.4); its output is byte-identical to example.stdout.txt, both python blocks are byte-identical to example.py, and every number in the prose, tables, exercises and quiz matches the output. I re-derived the Lemma 4.1 terms, n_β = 7, the N = 100 bracket 0.0856 against the bound 0.112, the N = 8 penalty 1.945, and the 'about a third' comparison (0.237 and 0.222 against 0.670). I fetched the sources myself and extracted text with pdftotext: Ross, Gordon & Bagnell 2011, official PMLR PDF, journal pp. 627–632 (abstract, §1 including 'stationary deterministic policy' and 'no free parameters except the supervised learning algorithm sub-routine', eq. (1) and non-convexity, §2.2 forward training, §2.3 SMILe update and α = O(1/T²), N = O(T² log T), Theorem 2.2 and its proof, the u discussion with footnote 2 and the O(T) worst case, Algorithm 3.1 and the FTL reading, the β discussion including 'often performs best in practice', the assumptions, Theorems 3.1–3.4 and footnote 3, §4 opening, eq. (3) and the Õ(1/N) remark, Lemma 4.1 and its proof, the non-increasing β assumption and n_β, Theorem 4.1 and the (log T + 1)/(Nα) bound, the 'weaker' remark, Theorem 4.2 setup, §5.1 Super Tux Kart text, footnote 4 and Fig. 2 caption); Ross & Bagnell 2010 pp. 661–664 (interactive setting and teleoperated robot, forward training, SEARN resets and the O(mAkT⁴ log T) query count); Osa et al. arXiv v1 printed pp. 61–64 (confidence-based autonomy algorithm, DAgger as 'on-policy' with footnote 1 crediting Laskey et al., any no-regret algorithm, footnote 2 on online versus stochastic gradient descent) and the DaD paragraph. I did not read §5.2 Super Mario Bros. beyond its start, §5.3 OCR, §6 or the references of the 2011 paper (the article gives no numbers from them), Ross & Bagnell's supplement, or any of the works known only through citing texts (SEARN, Chernova & Veloso, Venkatraman et al., Laskey et al.). I compared zh and en section by section, checked that all wiki links point to published topics (behavior-cloning, sim-to-real, teleoperation and robot-safety stay inline code), that the source ID set matches across languages, and that prerequisites and related IDs exist in src/data/catalogue.txt. I compared the article with the published imitation-learning article: it links to that article for the two-lane comparison, the label-storage rule and the telescoping sum, and does not reuse its example or exercises.
- The example was rerun with the pinned interpreter and matches example.stdout.txt byte for byte; both code blocks equal example.py; every number in the prose, tables, exercises and quiz matches the output, and the hand calculations were re-derived.
- DAgger's guarantees are stated as existential (some policy in the sequence, or a uniform random pick; the algorithm selects on validation), with the strongly convex bounded loss, decaying β and sample assumptions; u can be O(T) in the worst case; 'recoverability constant' is marked as our gloss.
- Super Tux Kart details (25×19 LAB features, ridge λ = 10⁻³, 5 Hz, one lap ≈ 1000 points per iteration, 20 iterations, SMILe α = 0.1, β_i = I(i = 1), results) match §5.1; 'no free parameters apart from the choice of learner' matches the introduction.
- zh and en compared section by section: same claims, definitions, numbers, exercises, answers and caveats; unpublished topics appear only as inline code.
Source locations checked:
- A Reduction of Imitation Learning and Structured Prediction to No-Regret Online Learning — scoped conference paper · Official PMLR PDF (journal pp. 627–635), pdftotext plus UTF-8 extraction for the dropped ε glyph; arXiv:1011.0686v3 abstract compared. p. 627: abstract, §1 (T²ε mistakes; forward training and SMILe drawbacks). p. 628: §1 end (stationary deterministic policy, no free parameters except the learner, FTL link, Super Tux Kart/Mario/OCR), §2 notation, ℓ examples, eqs. (1)–(2), Theorem 2.1, footnote 1. p. 629: Ross & Bagnell's (1 − Tε)J(π*) + T²ε example, §2.2 forward training, §2.3 SMILe update and α = O(1/T²), N = O(T² log T), Theorem 2.2 and proof, footnote 2 (α-mixing, u = O(1/(1 − exp(−δ)))), u ≤ 1 for 0-1 cost, u = O(T) worst case, §3 simplest DAgger. p. 630: Algorithm 3.1, FTL interpretation, β discussion (β1 = 1, β_i = p^{i−1}, β̄_N → 0, β_i = I(i = 1) often best), assumptions, Theorems 3.1–3.4, footnote 3, §4 intro (any no-regret algorithm; minibatches as online examples). p. 631: §4.1 eq. (3) and γ_N = Õ(1/N), §4.2 Lemma 4.1 and proof, n_β, Theorem 4.1 and proof, β_i = (1 − α)^{i−1} term ≤ (1/(Nα))[log T + 1], 'weaker than' remark, finite-sample setup, Theorem 4.2 statement. p. 632: Theorem 4.2 proof end, Nm = O(T² log(1/δ)), §5 intro, §5.1 Super Tux Kart (features, ridge λ = 1e-3, 5 Hz, 1 lap ≈ 1000 points, 20 iterations, α = 0.1, β_i = I(i = 1), never falls after 15 iterations), Fig. 2, footnote 4, §5.2 heading. NOT read: rest of §5.2, §5.3, §6, references (pp. 633–635).
- Efficient Reductions for Imitation Learning — AISTATS 2010, scoped · PMLR PDF pp. 661–665 (full locator under behavior-cloning). For this topic: p. 662 interactive setting (query the expert at any state; teleoperated robot); p. 663 §3 forward training (Algorithm 3.1, non-stationary, T iterations); p. 664 §4 SMILe idea, Lemma 4.2 J(π̃^n) ≤ J(π^n) + p_n T², SEARN cost-to-go needs resets, O(mAkT⁴ log T) queries over O(T³ log T) iterations; p. 665 Algorithm 4.1 (skimmed). NOT read: experiments, supplementary material.
- An Algorithmic Perspective on Imitation Learning — Foundations and Trends in Robotics 7(1–2), arXiv v1, scoped · arXiv v1, printed pp. 59–65 for this topic (PDF = printed + 7): §3.4.3 (errors cascade, i.i.d. violated, focus corrections), §3.4.3.1 SEARN (resets, many demonstrations; DAgger/AggreVaTe/LOLS in modern search-based structured prediction), §3.4.3.2 confidence-based autonomy and Algorithm 2, §3.4.3.3 DAgger ('on-policy', footnote 1 crediting Laskey et al. 2017), Fig. 3.3 caption (any no-regret method achieves the same guarantees), Algorithm 3, p. 64 (any no-regret algorithm; footnote 2: online, not stochastic, gradient descent), p. 65 DaD.
Related topics