Imitation Learning
Learning from demonstrations — BC, DAgger, diffusion policies.
Prerequisites
Why it matters in robotics
Imitation learning — training a policy from demonstrations — is the dominant paradigm behind today's real-robot manipulation and vision-language-action policies. Naive supervised training on demonstrations suffers from a mismatch between the situations the policy was trained on and the situations it encounters once it's acting on its own, causing small errors to compound over a task; a range of techniques address this by refining how demonstrations are collected and how actions are predicted, especially when a single instant could reasonably be followed by more than one correct next move. These ideas underpin many current real-robot systems, alongside practical concerns like collecting demonstrations via teleoperation.
What to study
- ✓Behavior cloning as supervised learning, and why covariate shift causes compounding errors that grow with the task horizon.
- ✓DAgger and interactive imitation: aggregating expert labels on the learner's own state distribution to break the i.i.d. assumption.
- ✓Action chunking and temporal ensembling (ACT) to reduce compounding error, and diffusion/flow policies for multimodal action distributions.
- ✓How imitation learning underpins modern VLA policies (OpenVLA, pi-0) and the practicalities of demonstration collection via teleoperation.
Where to study
Cheatsheet
Symbols used below
Behavior cloning
Supervised learning on expert (state, action) pairs: minimize .
It only sees states the expert visits. Once makes a small error and drifts to a state the expert rarely visited, it has no training signal there — errors compound and worst-case regret grows like with the horizon.
Covariate shift
The training distribution (expert's state visitation) and the test-time distribution (the learned policy's own state visitation) diverge as soon as — this mismatch, not a lack of model capacity, is the core failure mode of naive BC.
DAgger
Interactive imitation breaks the mismatch: roll out the current , query the expert for the correct action on the states it actually visits, aggregate those labels into the dataset, and retrain.
Because training data now comes from the learner's own distribution, regret grows linearly in instead of quadratically — at the cost of needing a queryable expert online rather than a fixed offline dataset.
Action chunking
Predicting a short sequence of future actions per inference step (instead of one action at a time) and blending overlapping chunks at execution time (temporal ensembling) smooths the trajectory and reduces how often compounding error gets a chance to accumulate, without needing an online expert.
Multimodal actions
A single instant can have more than one reasonable next move (go left or right around an obstacle). Averaging those modes under an MSE loss produces an invalid action in between them.
Diffusion and flow-matching policies model the full action distribution instead of its mean, so they can represent and sample from genuinely multimodal behavior.
Demonstration collection
Real-robot demonstrations are usually gathered via teleoperation (joystick, VR controller, or a kinesthetic/leader-follower rig). Teleop data quality — smoothness, coverage of recovery behavior, consistency across operators — directly bounds how good any imitation-learned policy can be.
| Behavior cloning | DAgger | Diffusion / flow policy | |
|---|---|---|---|
| Data source | Fixed offline expert demos | Online expert queries on learner states | Fixed offline expert demos |
| Fixes | Nothing — baseline | Covariate shift | Multimodal actions |
| Regret vs. horizon | Same as BC unless combined with DAgger | ||
| Requires | Just logged data | A queryable expert at train time | More inference compute (iterative denoising) |