# Diffusion Policy and imitation learning, explained

> What imitation learning is, how ACT and Diffusion Policy (Chi et al. 2023) generate robot actions, and how flow matching carries over to π0 and SmolVLA.

OpenRobotics · December 1, 2026

**Diffusion Policy** is a way of teaching a robot from demonstrations in which the policy generates actions the way an image diffusion model generates pictures: it starts from random noise and denoises it, step by step, into a sequence of future actions, conditioned on what the robot's cameras see. It was introduced by Cheng Chi and colleagues in [Diffusion Policy: Visuomotor Policy Learning via Action Diffusion](https://arxiv.org/abs/2303.04137) (2023), and its core idea, generating action chunks with a denoising model, now sits inside most open vision-language-action models.

This guide builds up to it in order: what imitation learning is, why plain behavior cloning struggles, how ACT fixed part of the problem, how Diffusion Policy works, and how flow matching carried the idea into VLAs like π0 and SmolVLA. Sources are the original papers and code, linked inline.

## What is imitation learning?

**Imitation learning** trains a robot policy from examples of an expert doing the task. A person teleoperates the robot, or moves it by hand, while the system records what the cameras saw and what the robot did. The learned policy then maps new observations to actions that look like the expert's.

It is old. [ALVINN](https://proceedings.neurips.cc/paper/1988/hash/812b4ba287f5ee0bc9d43bbf5bbe87fb-Abstract.html), presented at NIPS 1988, trained a small neural network to steer Carnegie Mellon's test vehicle along real roads. What changed recently is scale and hardware: cheap teleoperation rigs such as ALOHA and the SO-101, shared dataset formats such as [LeRobot](https://www.openrobotics.dev/blog/lerobot)'s, and model architectures that handle messy human demonstrations.

### Imitation learning vs reinforcement learning

The two differ in where the learning signal comes from.

| | Imitation learning | Reinforcement learning |
| --- | --- | --- |
| Learns from | Expert demonstrations | Trial and error, scored by a reward |
| Needs | Recorded episodes of the task | A reward function and many attempts |
| Typical cost | Human time to collect demos | Robot or simulator time to explore |
| Main risk | Can only be as good as the demos; drifts on unseen states | Reward design; unsafe or slow exploration on real hardware |

On real robots imitation learning is usually the starting point, because writing a reward for "fold this towel" is hard and letting a robot explore freely is slow and risky. Reinforcement learning often comes later to improve on a demonstrated policy. LeRobot ships both kinds, from ACT and Diffusion Policy to HIL-SERL.

## Behavior cloning and its problems

The simplest form of imitation learning is **behavior cloning**: treat the demonstrations as a supervised dataset of (observation, action) pairs and train a network to predict the action from the observation. It is easy to set up and works surprisingly often. It has two well-known failure modes.

**Compounding errors.** A cloned policy makes small mistakes, and each one pushes the robot into states the demonstrations never covered, where it makes bigger mistakes. Ross, Gordon and Bagnell's [DAgger paper](https://arxiv.org/abs/1011.0686) frames the root cause: in imitation learning, "future observations depend on previous predictions", which violates the i.i.d. assumption supervised learning relies on.

**Multimodal demonstrations.** People don't do a task the same way every time. If half the demos go around an obstacle on the left and half on the right, a network trained with a mean-squared-error loss learns to predict the average, which drives straight into the obstacle. A good policy has to represent several valid actions and commit to one.

Both problems shaped the next generation of methods.

## ACT: Action Chunking with Transformers

[ACT](https://arxiv.org/abs/2304.13705) (Zhao et al., April 2023) came from the ALOHA low-cost bimanual robot project. The paper names the same two issues directly: "errors in the policy can compound over time, and human demonstrations can be non-stationary."

ACT's answers:

- **Action chunking.** Instead of one action per step, it predicts a chunk of future actions. Fewer decisions per episode means fewer chances to compound errors.
- **A generative model.** It is trained as a conditional variational autoencoder (CVAE) with a transformer, so it models a distribution over action sequences rather than a single average.
- **Temporal ensembling.** Overlapping chunks predicted at successive steps are averaged for smoother motion.

With about 10 minutes of demonstrations per task, ACT reached 80–90% success on fine manipulation tasks such as slotting a battery. It remains the default first policy in the LeRobot tutorial. Note that ACT the method is different from "action chunking" the general idea; our [VLA request guide](https://www.openrobotics.dev/blog/how-act-works) covers chunks from the API side.

## What is Diffusion Policy?

[Diffusion Policy](https://arxiv.org/abs/2303.04137) by Cheng Chi, Zhenjia Xu, Siyuan Feng, Eric Cousineau, Yilun Du, Benjamin Burchfiel, Russ Tedrake and Shuran Song (Columbia, Toyota Research Institute and MIT) was first submitted to arXiv on March 7, 2023 and presented at RSS 2023; an extended version appeared in the International Journal of Robotics Research (IJRR) in 2024, per the [project page](https://diffusion-policy.cs.columbia.edu/). Its abstract describes "representing a robot's visuomotor policy as a conditional denoising diffusion process."

### How it works

Diffusion Policy uses a DDPM, the same family of model behind image diffusion, but the thing being generated is an action sequence, and the condition is the robot's recent observations. Training is simple:

1. Take a demonstrated action sequence.
2. Add a random amount of Gaussian noise.
3. Train a noise-prediction network, conditioned on the observations and the noise level, to predict the noise that was added.

At inference the policy starts from pure noise and repeatedly subtracts the predicted noise until a clean action sequence remains. The paper describes this as learning the gradient of the action distribution's score function and following it with Langevin dynamics steps.

Because sampling can land in any mode of the learned distribution, each rollout commits to one valid way of doing the task instead of averaging them. The authors list three advantages: it handles multimodal action distributions gracefully, it suits high-dimensional action spaces (it predicts whole sequences), and it trains stably, since unlike energy-based policies such as IBC it doesn't need negative sampling.

### Receding horizon control

Diffusion Policy predicts more actions than it executes. The paper defines three horizons:

| Symbol | Meaning | Default in the reference config |
| --- | --- | --- |
| T_o | Observation horizon: how many past observations the policy sees | 2 |
| T_p | Prediction horizon: how many actions it predicts | 16 |
| T_a | Action horizon: how many it executes before replanning | 8 |

The defaults are from the [official repo](https://github.com/real-stanford/diffusion_policy)'s `train_diffusion_unet_hybrid_workspace.yaml` (`n_obs_steps: 2`, `horizon: 16`, `n_action_steps: 8`). The robot runs 8 actions, takes a new observation, and generates a fresh 16-step plan. That is **receding horizon control**: committing to a sequence gives temporally consistent motion, and replanning keeps it reactive. The paper reports T_a = 8 worked best for most tasks.

Images go through a ResNet-18 trained from scratch, with spatial softmax pooling instead of global average pooling and GroupNorm instead of BatchNorm, one encoder per camera.

### CNN vs transformer variants

The paper offers two noise-prediction networks:

- **CNN-based.** A 1D temporal convolutional U-Net over the action sequence, conditioned on observations with FiLM. It works well out of the box on most tasks, but tends to over-smooth when actions change quickly and sharply, such as velocity commands.
- **Time-series diffusion transformer.** A transformer over action tokens that reduces the over-smoothing. It did best on tasks with rapid action changes but is more sensitive to hyperparameters.

The authors' advice: "we recommend starting with the CNN-based diffusion policy implementation as the first attempt at a new task," and switch to the transformer if the task is complex or the actions change fast. They also found Diffusion Policy works better with **position control** than velocity control, the opposite of most baselines they tested.

Inference cost was the obvious worry. Using DDIM, the paper reports that 100 training iterations and 10 inference iterations give 0.1 s latency on an NVIDIA RTX 3080.

### Results

The abstract reports results on 12 tasks from 4 manipulation benchmarks, with "an average improvement of 46.9%" over prior state-of-the-art methods (LSTM-GMM, IBC and BET among them). In the real world, on the Push-T task, Diffusion Policy reached 95% success versus 0% for the best IBC variant and 20% for the best LSTM-GMM. It also flipped mugs (90% over 20 trials) and poured and spread sauce close to human coverage.

## 3D Diffusion Policy

[3D Diffusion Policy (DP3)](https://arxiv.org/abs/2403.03954) by Ze et al., presented at RSS 2024, keeps the diffusion action head but replaces images with **sparse point clouds**, encoded by an efficient point encoder into a compact 3D representation. The abstract reports that DP3 handles most of 72 simulation tasks with just 10 demonstrations, a 24.2% relative improvement over baselines, and 85% success on 4 real-robot tasks with 40 demonstrations each. The authors also note it "rarely violates safety requirements" on the real robot compared with baselines. The [code](https://github.com/YanjieZe/3D-Diffusion-Policy) is MIT-licensed.

## From diffusion to flow matching in VLAs

ACT and Diffusion Policy are **single-task, language-free** policies: you train one per task, per robot, on a few dozen demonstrations. Vision-language-action models keep the action-generation idea and attach it to a pretrained vision-language model, so one network can follow instructions across many tasks. See [VLA models explained](https://www.openrobotics.dev/blog/vla-models) for the bigger picture.

Most of them generate actions with **flow matching** ([Lipman et al., 2022](https://arxiv.org/abs/2210.02747)), a close relative of diffusion. Instead of predicting noise, the network predicts a velocity field that carries a noise sample to a data sample, which can be integrated in a handful of steps.

| Model | VLM backbone | Action generation | Chunk |
| --- | --- | --- | --- |
| Diffusion Policy | None (ResNet-18 image encoder, no language) | DDPM / DDIM denoising | 16 predicted, 8 executed |
| [π0](https://www.openrobotics.dev/models/physical-intelligence/pi0) | PaliGemma 3B | Flow-matching action expert (~300M), 10 steps | 50 |
| [SmolVLA](https://www.openrobotics.dev/models/huggingface/smolvla) | SmolVLM2 | Flow-matching action expert (~100M), 10 steps | 50 |
| [GR00T N1.7](https://www.openrobotics.dev/models/nvidia/gr00t-n1.7) | Cosmos-Reason2-2B | Flow-matching diffusion transformer | Model horizon 40 |

Sources: the [π0 paper](https://arxiv.org/abs/2410.24164), the [SmolVLA paper](https://arxiv.org/abs/2506.01844) and the [Isaac-GR00T README](https://github.com/NVIDIA/Isaac-GR00T). Our [π0 guide](https://www.openrobotics.dev/blog/pi0), [SmolVLA guide](https://www.openrobotics.dev/blog/smolvla) and [GR00T guide](https://www.openrobotics.dev/blog/gr00t) go deeper on each.

The lineage is direct: predict a chunk of actions (ACT), generate it with a denoising model so multimodal demos don't average out (Diffusion Policy), then condition that generator on a pretrained VLM so it follows language and transfers across tasks (π0, SmolVLA, GR00T).

## How to train Diffusion Policy with LeRobot

LeRobot implements Diffusion Policy as the `diffusion` policy type. Hugging Face's [`lerobot/diffusion_pusht`](https://huggingface.co/lerobot/diffusion_pusht) checkpoint was trained on the Push-T simulation dataset, and its model card compares it with a model trained in the original Diffusion Policy code. To train your own with the current CLI:

```bash
pip install 'lerobot[training,diffusion]'

lerobot-train \
  --policy.type=diffusion \
  --dataset.repo_id=lerobot/pusht \
  --env.type=pusht \
  --batch_size=64 \
  --steps=200000 \
  --output_dir=outputs/train/diffusion_pusht
```

For your own robot, replace the dataset with one you recorded and drop `--env.type`. Note that LeRobot's defaults differ from the paper's reference config: its `DiffusionConfig` uses `n_obs_steps=2`, `horizon=64` and `n_action_steps=32`, so set them explicitly if you want to reproduce the paper.

## Diffusion Policy on OpenRobotics

[Diffusion Policy](https://www.openrobotics.dev/models/lerobot/diffusion-policy) and [ACT](https://www.openrobotics.dev/models/lerobot/act) are listed in the OpenRobotics catalog but **not served**. The catalog's reason: each is "a per-task policy architecture; no public general-purpose checkpoint". A Diffusion Policy trained on Push-T only does Push-T, and one trained on your arm only knows your arm, so there is nothing general to host. Train them with LeRobot for your setup.

What you can call is the generation of models that grew out of them. [π0](https://www.openrobotics.dev/models/physical-intelligence/pi0), [SmolVLA](https://www.openrobotics.dev/models/huggingface/smolvla) and [GR00T N1.7](https://www.openrobotics.dev/models/nvidia/gr00t-n1.7) are live through [POST /v1/act](https://www.openrobotics.dev/docs/api/act), and the full list is in the [VLA hub](https://www.openrobotics.dev/models/category/vla):

```bash
curl https://api.openrobotics.dev/v1/act \
  -H "Authorization: Bearer $OPENROBOTICS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "huggingface/smolvla",
    "instruction": "put the black bowl on the plate",
    "observation": { "image": "<base64 JPEG>", "state": [0.12, -0.48, 0.33, 0, 1.57, 0, 0.04, 0.04] },
    "action_horizon": 50
  }'
```

The response's `actions` array is the chunk, one row per time step. Execute part of it, observe, and call again: the same receding-horizon loop Diffusion Policy uses. To start, [create an API key](https://www.openrobotics.dev/keys).

## FAQ

### What is diffusion policy?

Diffusion Policy is a robot imitation learning method that represents the policy as a conditional denoising diffusion process. Starting from noise, it iteratively denoises a sequence of future actions conditioned on recent camera observations. It was introduced by Chi et al. in 2023.

### What is imitation learning?

Imitation learning trains a robot policy from expert demonstrations instead of a reward signal. The simplest version, behavior cloning, is supervised learning on recorded (observation, action) pairs.

### What is the difference between imitation learning and reinforcement learning?

Imitation learning copies demonstrations; reinforcement learning improves by trial and error against a reward. Imitation learning is usually faster to get working on a real robot, while reinforcement learning can exceed the demonstrator but needs a reward function and a lot of exploration.

### What is the difference between ACT and Diffusion Policy?

Both predict chunks of future actions from demonstrations. ACT uses a transformer trained as a conditional VAE and averages overlapping chunks. Diffusion Policy generates the chunk by iterative denoising and replans with receding horizon control. Neither takes language input.

### What is 3D Diffusion Policy?

3D Diffusion Policy (DP3), presented at RSS 2024, is a variant that conditions the diffusion action head on compact features from sparse point clouds instead of images. Its authors report it handles most of 72 simulation tasks with only 10 demonstrations.
