A policy that samples its actions
A demonstrator facing the same scene does not always do the same thing: a T-shaped block can be pushed round its left side or its right. A policy trained to regress the mean action averages the two and pushes straight into the block. Diffusion Policy (Chi et al.) instead learns the whole distribution of action sequences given the observation and draws one sample from it with a denoising diffusion model, the same kind of model that generates images, applied to a short trajectory.
This page runs LeRobot's Diffusion Policy for PushT: a round agent moves on a 512 × 512 board and must push a T-shaped block onto a target pose, which counts as done when the block covers at least 95 % of it. The policy has 263 M parameters, 252 M of them in its denoising U-Net and 11.2 M in its image encoder. It reads the last 2 observations, plans 16 actions and plays 8 of them.
Observations and conditioning
Each observation is a 96 × 96 image of the board, centre-cropped to 84 × 84, and the agent's position, scaled to −1 … 1 by the training data's range (the Observations panel). The Image encoder is a ResNet-18 with GroupNorm in place of batch normalisation; a 1 × 1 convolution turns its last 3 × 3 feature map into 32 maps, and a spatial softmax turns each map into a keypoint, the softmax-weighted mean of the cell coordinates:
A linear layer and a ReLU map the 32 keypoints to 64 image features. Position and features of both observations make the Global conditioning, numbers, which every residual block of the U-Net reads.
Denoising a plan
The plan is , 16 actions of two numbers each (target positions for the agent), normalised to . Training corrupts it with Gaussian noise at a random step of 100,
and trains the network to predict the noise, with the loss . The Noise schedule panel draws and for the squared-cosine schedule of Nichol and Dhariwal, which removes signal more evenly across steps than a linear one.
Sampling starts from pure noise and runs all 100 steps of DDPM. At each step the predicted noise gives a guess of the clean plan, clipped to , and the next state mixes that guess with the current one and adds fresh noise:
with , and fixed by the schedule. The Denoising the plan strip shows one step at a time, every step recorded, and the page recomputes each in float64 against the recording; xₜ on the board draws the noisy plan and its guessed over the board, so the path can be watched condensing out of noise.
A 1-D U-Net with FiLM
The denoiser is a U-Net over time rather than over pixels: 1-D convolutions with kernel 5 along the 16 steps of the plan, with 512, 1,024 and 2,048 channels at its three levels and skip connections from the down path to the up path, the design Janner et al. used for planning with diffusion. Every residual block is told the step and the observation through FiLM, a per-channel scale and shift computed from the timestep embedding and the global conditioning:
The FiLM residual block panel opens the first block stage by stage (convolution, GroupNorm, Mish, the FiLM modulation, a second convolution, GroupNorm and Mish, then the residual) for four of its 512 channels. One quirk is visible in the graph: the first level's second residual block is pushed onto the skip list like the others, but the decoder reads only two skips, so its output is never used.
Receding horizon
A plan covers 16 steps, from the older observation to 14 steps ahead. The policy plays its actions 2 to 9, one per step at 10 Hz, then observes again and plans afresh (the Receding horizon row). Playing 8 of 16 keeps the motion consistent within a stretch, as action chunking does, while still reacting to where the block actually went.
The Episode strip runs the start state that seed 1002 gave in the version of the environment the checkpoint was evaluated with, with sampling noise from seed 0. The block covers 96 % of the target after 136 steps and 17 plans; the checkpoint's own evaluation succeeded on 65.4 % of 500 start states.
Where it came from
Denoising diffusion probabilistic models (Ho et al., 2020) made diffusion practical for images. Janner et al. (2022) diffused whole trajectories with a temporal U-Net for planning, and Chi et al. (2023) conditioned such a model on camera images to get a visuomotor policy, comparing it with implicit behaviour cloning on PushT, a task adapted from Florence et al.'s work. The keypoint encoder goes back to Levine et al.'s end-to-end visuomotor policies. Octo's action head (a later tab) uses a small diffusion model on a transformer's readout, and π0 and SmolVLA replace diffusion with flow matching.
Papers
- Diffusion Policy: Visuomotor Policy Learning via Action Diffusion Introduces Diffusion Policy: a conditional denoising model over action sequences with receding-horizon execution, evaluated on PushT among other tasks.
- Denoising Diffusion Probabilistic Models DDPM: the noise-prediction loss and the sampling step this policy runs 100 times per plan.
- Improved Denoising Diffusion Probabilistic Models The squared-cosine noise schedule the checkpoint uses.
- Planning with Diffusion for Flexible Behavior Synthesis Diffuser: denoising whole trajectories with a 1-D temporal U-Net, the network Diffusion Policy's denoiser follows.
- FiLM: Visual Reasoning with a General Conditioning Layer Feature-wise linear modulation, the per-channel scale and shift that brings the timestep and observation into each block.
- Implicit Behavioral Cloning Energy-based policies for multimodal actions, and the pushing task that PushT was adapted from.
- End-to-End Training of Deep Visuomotor Policies Visuomotor policies with a spatial-softmax keypoint layer, the layer the image encoder ends in.