Skip to main content

Reinforcement Learning 06 — Generating Actions with VAEs, Diffusion, and Flow Matching

Why can averaging fail when a scene admits several correct actions? Explore VAEs, VQ-VAEs, DDPM and DDIM, Diffusion Policy, and flow matching through original figures, public captions, and supplementary lectures.

한국어 원문

Going around an obstacle on either side can succeed. Yet averaging the two demonstrations sends the robot straight into it. This chapter explores how to generate executable actions without collapsing several valid answers into one.

Oier Mees · ETH Zurich 2026, Lecture 6 · Official lecture · Original PDF

#P001 · Learning a distribution of possible actions rather than a single average

P001 — Learning a distribution of possible actions rather than a single average. Oier Mees, ETH Zurich Robot Learning 2026.
P001 — Learning a distribution of possible actions rather than a single average

Chapter 05 introduced policy gradients that increase the probability of good actions. Here, we focus on the shape of the distribution the policy can represent. Algorithms for improving policies and models for representing action distributions are different design choices. Generating actions with a diffusion model does not, by itself, constitute reinforcement learning.

A generative model learns a data distribution and produces new samples. It might generate photographs, or generate a sequence of future joint targets conditioned on camera observations and instructions. We consider latent-variable models, diffusion models, and flow matching in turn. The original course is called Robot Learning, and the main robot examples in this chapter use imitation learning from demonstrations.

Original lecture from 0:00.

#P002 · Opening the same drawer allows different joint configurations and approaches

P002 — Opening the same drawer allows different joint configurations and approaches. Oier Mees, ETH Zurich Robot Learning 2026.
P002 — Opening the same drawer allows different joint configurations and approaches

The robot arms in the three photographs adopt different configurations for the same drawer-opening goal. Different grasp positions, elbow orientations, and approach paths can all succeed. A seven-degree-of-freedom arm can move its elbow while maintaining the hand’s position and orientation. This kinematic redundancy means multiple configurations can achieve the same goal.

Demonstrators’ habits introduce further variation into the data. A regression model assuming one correct action per observation can miss these alternatives. Redundancy does not itself imply randomness: a deterministic policy can consistently choose one solution. A generative policy’s advantage is representing the distribution of several valid strategies together.

Original lecture from 0:40.

#P003 · Averaging left and right detours is not a safe compromise

P003 — Averaging left and right detours is not a safe compromise. Oier Mees, ETH Zurich Robot Learning 2026.
P003 — Averaging left and right detours is not a safe compromise

Consider the two paths around the tree in the middle. Both the left and right paths succeed, but averaging their positions at corresponding stages points toward the tree. Here, multimodality means multiple peaks in probability density. This differs from multimodal inputs such as cameras and language.

With sufficient expressive capacity and suitable training conditions, predicting one action by minimizing squared error targets the conditional mean action given the observation. If the region between two strategies is successful, averaging can work; if an obstacle lies between them, it becomes a problem. The precise point is not that averages are always bad, but that the average of separated valid answers is not guaranteed to be valid.

a∗(o)=E[a∣o]a^*(o)=\mathbb E[a\mid o]
Explore the symbols and calculation The conditional mean targeted by squared-error regression

Read the equation in words

A single prediction minimizing squared error is the conditional mean of possible answers for the same observation. Averaging different action strategies can produce a poor action.

Understand each symbol

ata_t
The action chosen at step tt: for example, a torque, a joint target or a movement direction, depending on the setup.
oto_t
The sensor observation at step tt. It is not assumed to equal the full physical state.
a∗(o)a^*(o)
The optimal single-action prediction under this loss.
E\mathbb E
An expectation: an average over possible outcomes weighted by their probabilities.
∣\mid
Conditional notation: the information to the right of the bar is given. This is not a division sign.

Follow the calculation

  1. Consider which actions can occur for the same observation.
  2. Average them according to their probabilities.

Check with a small example

If half the demonstrations go left at −1 and half right at +1, the mean is 0. Even if no demonstration uses 0, it is the optimal single squared-error prediction.

An illustrative example for understanding the equation.

Two paths around an obstacle from above and below, and their average path passing through it
The two paths and their pointwise average were calculated directly. The pink circle represents an obstacle; this is not a collision experiment on a real robot.JJo; directly executed numerical example · Original source

Original lecture from 1:45.

#P004 · Three starting points for modeling complex action distributions

P004 — Three starting points for modeling complex action distributions. Oier Mees, ETH Zurich Robot Learning 2026.
P004 — Three starting points for modeling complex action distributions

The latent-variable model on the left generates complex outcomes from a simple hidden variable. The diffusion model in the middle learns to reverse the addition of noise to data. Flow matching on the right learns a vector field transporting noise samples into the data distribution. All three begin with easily sampled random inputs to represent complex distributions.

For robot applications, condition these models on current images, joint states, and task instructions. The aim is not to generate arbitrary actions but actions that open this drawer in this scene. These three families do not exhaust generative modeling: autoregressive models and GANs also exist. The lecture focuses on three families leading to robot action generation.

Original lecture from 3:00.

#P005 · What it means to generate a sample from noise

P005 — What it means to generate a sample from noise. Oier Mees, ETH Zurich Robot Learning 2026.
P005 — What it means to generate a sample from noise

The figure starts with a vector of numbers sampled from a normal distribution and ends with a cat image. A normal distribution concentrates values in a bell shape around its mean; the standard normal has mean zero and variance one along each axis. A network learns a transformation from random numbers into outputs resembling the data.

Do not understand this solely as memorizing a particular cat photograph assigned to every noise vector. The learning principle should make the overall distribution of transformed samples resemble the data distribution. For robots, output numbers can represent joint targets or hand displacements instead of pixel intensities. Even with the same random input, different observation conditions should produce different actions.

Original lecture from 3:35.

#P006 · A latent variable captures choices among action strategies

P006 — A latent variable captures choices among action strategies. Oier Mees, ETH Zurich Robot Learning 2026.
P006 — A latent variable captures choices among action strategies

A latent variable is not directly given in the data but explains differences in outcomes. Think of approaching a cup from the left or right as a hidden choice. First sample the latent variable, then generate an action from both the observation and that variable.

πθ(a∣o)=∫pθ(a∣o,z)p(z) dz\pi_\theta(a\mid o)=\int p_\theta(a\mid o,z)p(z)\,dz
Explore the symbols and calculation A conditional action distribution obtained by averaging over latent variables

Read the equation in words

Create a different action distribution for each latent value, then combine all latent possibilities into the overall action distribution for the observation.

Understand each symbol

ata_t
The action chosen at step tt: for example, a torque, a joint target or a movement direction, depending on the setup.
oto_t
The sensor observation at step tt. It is not assumed to equal the full physical state.
zz
A latent vector representing factors such as execution style that the model does not directly observe. It is sampled or inferred by an encoder.
p(z)p(z)
The prior distribution of latent values before observing the data.
θ\theta
The parameters collecting the trainable weights of the network or policy.
∣\mid
Conditional notation: the information to the right of the bar is given. This is not a division sign.

Follow the calculation

  1. Calculate action likelihood conditioned on each latent value.
  2. Weight by the latent prior and integrate across latent space.

Check with a small example

With two equally likely discrete modes assigning an action likelihoods 0.8 and 0.2, the mixture likelihood is 0.5. For continuous latent values, this sum becomes an integral.

An illustrative example for understanding the equation.

The integral combines the distributions produced by different latent variables according to their frequency. Even if each conditional distribution is simple, the combined distribution can have several peaks. Distinguish expressive power available with sufficiently flexible networks and latent spaces from performance actually learned from limited data.

Within an action sequence, maintaining the chosen strategy matters. Independently switching between left and right at every control instant can make the hand oscillate. Matching the distribution and producing temporally consistent behavior must be considered together.

Original lecture from 4:10.

#P007 · An autoencoder reconstructs inputs from compressed information

P007 — An autoencoder reconstructs inputs from compressed information. Oier Mees, ETH Zurich Robot Learning 2026.
P007 — An autoencoder reconstructs inputs from compressed information

The encoder on the left compresses a large input into a smaller vector; the decoder on the right reconstructs the input from that vector. For photographs, a representation smaller than the pixel array can capture information such as object shape and arrangement. Reconstruction means producing an output resembling the input.

z=fϕ(x),x^=gθ(z),LAE=∥x−x^∥22z=f_\phi(x),\quad \widehat x=g_\theta(z),\quad \mathcal L_{\mathrm{AE}}=\lVert x-\widehat x\rVert_2^2
Explore the symbols and calculation Autoencoder encoding, reconstruction, and loss

Read the equation in words

Compress an input into a small representation, reconstruct the original, and learn from squared reconstruction differences.

Understand each symbol

zz
A latent vector representing factors such as execution style that the model does not directly observe. It is sampled or inferred by an encoder.
ϕ\phi
Weights of a different network. Read which model they belong to together with the calculation steps.
θ\theta
The parameters collecting the trainable weights of the network or policy.
x,x^x,\widehat x
The original input and its reconstruction estimate.
fϕ,gθf_\phi,g_\theta
Respectively, the encoder compressing the input and the decoder reconstructing it.
∥⋅∥22\lVert\cdot\rVert_2^2
The squared length obtained by squaring and summing all vector components. It combines coordinate-wise errors into one nonnegative quantity.

Follow the calculation

  1. The encoder transforms the input into a latent vector.
  2. Sum componentwise squared differences between the decoder reconstruction and original input.

Check with a small example

Input [1,3] and reconstruction [2,2] give reconstruction loss 12+(−1)2=21^2+(-1)^2=2.

An illustrative example for understanding the equation.

Encoder weights are denoted by ϕ\phi and decoder weights by θ\theta. The bottleneck limits intermediate representation capacity. Too small a bottleneck loses needed information; too large a bottleneck may simply memorize inputs. Good reconstruction does not ensure preservation of contact or safety information essential to robot control. The inputs and reconstruction targets matter.

Original lecture from 5:00.

#P008 · Codes that support reconstruction are not necessarily codes we can sample usefully

P008 — Codes that support reconstruction are not necessarily codes we can sample usefully. Oier Mees, ETH Zurich Robot Learning 2026.
P008 — Codes that support reconstruction are not necessarily codes we can sample usefully

Consider the clusters of colors in latent space. An autoencoder may reconstruct well where training inputs map, yet learn little about the sparsely used areas between them. Sampling an arbitrary point from a standard normal and feeding it to the decoder therefore need not produce a good sample.

The decoder being deterministic is not itself the problem. A deterministic transformation of random input can still generate a probability distribution. The key limitation of an ordinary autoencoder is the lack of a mechanism aligning the distribution used to sample codes later with how the space is populated during training.

Original lecture from 5:55.

#P009 · A VAE learns reconstruction and latent-distribution regularity together

P009 — A VAE learns reconstruction and latent-distribution regularity together. Oier Mees, ETH Zurich Robot Learning 2026.
P009 — A VAE learns reconstruction and latent-distribution regularity together

A variational autoencoder (VAE) encoder outputs a mean and variance rather than a single code. A code sampled from that distribution goes to the decoder. The prior specifies how to sample codes before observing data; the approximate posterior estimates suitable codes after seeing an input.

LELBO=Eqϕ(z∣x)[log⁡pθ(x∣z)]−DKL(qϕ(z∣x)∥p(z))\mathcal L_{\mathrm{ELBO}}=\mathbb E_{q_\phi(z\mid x)}[\log p_\theta(x\mid z)]-D_{\mathrm{KL}}(q_\phi(z\mid x)\Vert p(z))
Explore the symbols and calculation Reconstruction and prior-regularization terms

Read the equation in words

This lower-bound objective explains reconstruction while preventing the encoder's latent distribution from moving too far from the prior. Larger values are better.

Understand each symbol

qϕ(z∣x)q_\phi(z\mid x)
The encoder, or approximate posterior, estimating a latent distribution after seeing the input.
pθ(x∣z)p_\theta(x\mid z)
The decoder describing a distribution over original data given a latent value.
p(z)p(z)
The prior distribution of latent values before observing the data.
DKL(q∥p)D_{\mathrm{KL}}(q\Vert p)
KL divergence comparing two distributions. It is nonnegative and generally changes when the direction is reversed.
LELBO\mathcal L_{\mathrm{ELBO}}
A lower bound on data log likelihood, maximized during training.
E\mathbb E
An expectation: an average over possible outcomes weighted by their probabilities.
log⁡\log
The natural logarithm. It converts products into sums and is defined only for positive inputs.
∣\mid
Conditional notation: the information to the right of the bar is given. This is not a division sign.

Follow the calculation

  1. Average reconstruction log likelihood over latent values proposed by the encoder.
  2. Subtract KL between the encoder distribution and prior to balance the objective.

Check with a small example

A reconstruction term of −2 and KL of 0.5 give ELBO −2.5. Negate it to construct a minimization loss.

An illustrative example for understanding the equation.

log⁡pθ(x)=LELBO+DKL(qϕ(z∣x)∥pθ(z∣x))\log p_\theta(x)=\mathcal L_{\mathrm{ELBO}}+D_{\mathrm{KL}}(q_\phi(z\mid x)\Vert p_\theta(z\mid x))
Explore the symbols and calculation Why the ELBO is a lower bound on log likelihood

Read the equation in words

The gap between the ELBO and actual log likelihood is KL between the approximate and true posteriors. This nonnegative gap prevents the bound from exceeding the actual value.

Understand each symbol

zz
A latent vector representing factors such as execution style that the model does not directly observe. It is sampled or inferred by an encoder.
qϕ(z∣x)q_\phi(z\mid x)
The encoder, or approximate posterior, estimating a latent distribution after seeing the input.
DKL(q∥p)D_{\mathrm{KL}}(q\Vert p)
KL divergence comparing two distributions. It is nonnegative and generally changes when the direction is reversed.
pθ(z∣x)p_\theta(z\mid x)
The true posterior over latent values after observing data, distinct from the prior.
log⁡\log
The natural logarithm. It converts products into sums and is defined only for positive inputs.
∣\mid
Conditional notation: the information to the right of the bar is given. This is not a division sign.

Follow the calculation

  1. Subtract the lower bound from full log likelihood to identify the remaining distribution mismatch.
  2. The gap is zero when the approximate posterior equals the true posterior.

Check with a small example

Actual log likelihood −1 and lower bound −1.4 give a KL gap of 0.4.

An illustrative example for understanding the equation.

The expectation in the first equation evaluates how well a sampled code explains the input. KL divergence is a nonnegative measure of distribution mismatch. Since the second equation’s KL is nonnegative, the ELBO cannot exceed log likelihood. Its name, evidence lower bound, describes precisely this lower bound on observed-data log likelihood. Distinguish the KL against the prior from the KL against the true posterior measuring the bound’s gap.

Berkeley’s VAE lecture, 53:50–56:53 explains the source of this gap. The equation relates increasing the bound to increasing actual likelihood. A conditional action model can use an encoder seeing observations and demonstrated actions, and a decoder reconstructing actions from observations and latent variables. At execution time, future demonstrated actions are unknown and cannot be supplied as answers to the training encoder.

Original lecture from 6:35.

#P010 · Reparameterization creates a gradient path while retaining randomness

P010 — Reparameterization creates a gradient path while retaining randomness. Oier Mees, ETH Zurich Robot Learning 2026.
P010 — Reparameterization creates a gradient path while retaining randomness

Leaving the distribution-sampling operation unchanged makes derivatives through to encoder weights inconvenient. Instead, draw standard-normal noise separately and transform it using the mean and standard deviation.

ϵ∼N(0,I),z=μϕ(x)+σϕ(x)⊙ϵ\epsilon\sim\mathcal N(0,I),\qquad z=\mu_\phi(x)+\sigma_\phi(x)\odot\epsilon
Explore the symbols and calculation Reparameterizing a Gaussian latent variable

Read the equation in words

Transform standard noise using an input-dependent mean and standard deviation to obtain a latent sample. Keep randomness in the noise and differentiate the learnable transformation.

Understand each symbol

ϵ∼N(0,I)\epsilon\sim\mathcal N(0,I)
Sample a Gaussian noise vector with component means 0 and variances 1.
ϕ\phi
Weights of a different network. Read which model they belong to together with the calculation steps.
μϕ(x),σϕ(x)\mu_\phi(x),\sigma_\phi(x)
The latent distribution's mean and standard deviation output by the encoder.
⊙\odot
The symbol for elementwise multiplication.

Follow the calculation

  1. The encoder calculates the latent mean and standard deviation.
  2. Multiply noise by standard deviation elementwise and add the mean.

Check with a small example

Mean 2, standard deviation 0.5, and noise −1 give latent sample 1.5. If variance is 0.25, the multiplier is standard deviation 0.5, not variance 0.25.

An illustrative example for understanding the equation.

The multiplication symbol in the middle means elementwise multiplication. For one backpropagation pass, hold the sampled noise fixed and differentiate how reconstruction changes with the mean and standard deviation. Randomness is not removed; its source is moved outside the weights.

Also distinguish variance from standard deviation. If the figure’s σ2\sigma^2 denotes variance, its square root σ\sigma belongs in the equation above. If an implementation outputs log variance, halve it and exponentiate to obtain standard deviation. Chapter 05’s SAC uses the same pathwise-derivative idea for action samples.

Original lecture from 8:10.

#P011 · Differentiating probabilities versus the path that generates samples

P011 — Differentiating probabilities versus the path that generates samples. Oier Mees, ETH Zurich Robot Learning 2026.
P011 — Differentiating probabilities versus the path that generates samples

The left side shows the score-function approach, calculating how outcome weights change as a distribution changes. REINFORCE’s log-probability derivative belongs here. The right side shows the pathwise approach, differentiating directly through the function generating an outcome from fixed noise.

∇ϕEqϕ(z)[f(z)]=Eϵ[∇ϕf(gϕ(ϵ))]\nabla_\phi\mathbb E_{q_\phi(z)}[f(z)]=\mathbb E_{\epsilon}[\nabla_\phi f(g_\phi(\epsilon))]
Explore the symbols and calculation Pathwise derivatives through differentiable reparameterization

Read the equation in words

Instead of differentiating a direct distribution-sampling operation, follow the path transforming independent noise through a differentiable function.

Understand each symbol

ϕ\phi
Weights of a different network. Read which model they belong to together with the calculation steps.
zz
A latent vector representing factors such as execution style that the model does not directly observe. It is sampled or inferred by an encoder.
gϕ(ϵ)g_\phi(\epsilon)
A differentiable transformation from noise to a latent sample.
f(z)f(z)
The objective function evaluated at the latent sample.
E\mathbb E
An expectation: an average over possible outcomes weighted by their probabilities.
∇\nabla
A gradient collects componentwise derivatives describing how much the result changes when a variable changes.

Follow the calculation

  1. Express the sample as a function of weights and noise.
  2. Hold the noise fixed, differentiate the function's weight dependence, then average over noise.

Check with a small example

If the latent value is weight plus noise and the output function squares it, weight 1 and noise 0 give derivative 2. This method cannot be applied unchanged to every stochastic sampling operation.

An illustrative example for understanding the equation.

This expression requires a noise distribution independent of the weights and conditions permitting interchange of expectation and differentiation. Linearity of expectation alone does not make every random computation differentiable. Pathwise methods are useful for many continuous latent models, but do not universally guarantee lower variance or apply directly to discrete samples. They require a differentiable path to the output.

Original lecture from 9:10.

#P012 · Generation starts from the prior without a training input

P012 — Generation starts from the prior without a training input. Oier Mees, ETH Zurich Robot Learning 2026.
P012 — Generation starts from the prior without a training input

The upper part shows training, which passes an input through the encoder; the lower part shows generation, which samples a code from the prior and sends it to the decoder. A VAE aims to create a shared latent space connecting these processes. Similar codes yielding similar outputs can help interpolation and sampling.

KL regularization does not guarantee that every code is meaningful or every intermediate output natural. In particular, whether interpolation between action codes produces collision-free motion requires separate checks against the physical environment and constraints. Latent-space smoothness and real-robot trajectory safety are different properties.

Original lecture from 10:50.

#P013 · The model may ignore latent variables or mismatch the prior

P013 — The model may ignore latent variables or mismatch the prior. Oier Mees, ETH Zurich Robot Learning 2026.
P013 — The model may ignore latent variables or mismatch the prior

Posterior collapse occurs when the decoder barely uses the latent variable. If other conditions already support good reconstruction, or regularization pressure is strong, different codes may yield little variation. This does not necessarily make the decoder deterministic: it can have other sources of randomness.

Prior mismatch is a difference between the latent distribution actually used by training inputs and the prior sampled during generation. Think of aggregating the approximate posteriors across all inputs. A standard-normal sample landing in a region rarely used during training can reconstruct poorly. Low Gaussian density and being mathematically outside the support are different statements. Balancing reconstruction and regularization is a central VAE design issue.

Original lecture from 11:45.

#P014 · VQ-VAE replaces a continuous code with its nearest codebook entry

P014 — VQ-VAE replaces a continuous code with its nearest codebook entry. Oier Mees, ETH Zurich Robot Learning 2026.
P014 — VQ-VAE replaces a continuous code with its nearest codebook entry

VQ stands for vector quantization. After the encoder produces a continuous vector, select the nearest representative from a fixed-size collection. The codebook is this list of representative vectors. The colored points denote codebook vectors, and each region contains inputs selecting the same representative.

k∗=arg⁡min⁡k∈{1,…,K}∥ze(x)−ek∥22,zq=ek∗k^*=\arg\min_{k\in\{1,\ldots,K\}}\lVert z_e(x)-e_k\rVert_2^2,\qquad z_q=e_{k^*}
Explore the symbols and calculation Selecting the nearest codebook entry

Read the equation in words

Find the codebook vector nearest the continuous encoder vector and replace the latter with that code. Subsequent stages can use finite code indices.

Understand each symbol

ze(x)z_e(x)
The continuous vector produced by the encoder.
ek,Ke_k,K
The kkth codebook vector and total number of codes.
k∗,zqk^*,z_q
The selected code index and its vector.
∥⋅∥22\lVert\cdot\rVert_2^2
The squared length obtained by squaring and summing all vector components. It combines coordinate-wise errors into one nonnegative quantity.
arg max⁡/arg min⁡\operatorname{arg\,max}/\operatorname{arg\,min}
Select the input attaining the largest or smallest value, rather than the value itself.

Follow the calculation

  1. Compute squared distances from the encoder vector to every codebook vector.
  2. Select the index with the smallest distance and retrieve its vector.

Check with a small example

For codebook [−1,1,3] and encoder output 0.7, select the nearest value, 1.

An illustrative example for understanding the equation.

The index is discrete, but the selected vector has real-valued components. “Code 7” and “a seven-dimensional vector” mean entirely different things. Codebook size and vector dimension are separate as well. Images can select codes by location and be represented by multiple tokens. Basic VQ-VAE training differs from a VAE that outputs Gaussian means and variances for each input and computes a KL term.

Original lecture from 13:00.

#P015 · Nearest-entry selection uses a surrogate gradient

P015 — Nearest-entry selection uses a surrogate gradient. Oier Mees, ETH Zurich Robot Learning 2026.
P015 — Nearest-entry selection uses a surrogate gradient

As the encoder output moves slightly, the quantized result stays unchanged while the same representative remains nearest. Its true derivative is therefore zero within that region and may be undefined at boundaries. Simply backpropagating reconstruction error through this operation would give the encoder an inadequate learning signal.

zST=ze+sg⁡(zq−ze)z_{\mathrm{ST}}=z_e+\operatorname{sg}(z_q-z_e)
Explore the symbols and calculation A computational expression for the straight-through estimator

Read the equation in words

Use the quantized code forward, but pass an approximate gradient back to the encoder before quantization. This is not the exact derivative of true nearest-neighbor selection.

Understand each symbol

sg⁡\operatorname{sg}
The stop-gradient operation preserves the value while treating its derivative as zero.
ze,zq,zSTz_e,z_q,z_{\mathrm{ST}}
The encoder output, selected code, and straight-through expression.

Follow the calculation

  1. Adding the parenthesized difference during the forward pass leaves the quantized vector.
  2. During backpropagation, treat the stop-gradient term as constant and use only the encoder path.

Check with a small example

Encoder value 0.7 and code value 1 produce forward output 1. A nonzero surrogate gradient is nevertheless passed to the encoder despite discontinuous code-selection boundaries.

An illustrative example for understanding the equation.

Stop-gradient passes a value unchanged in the forward calculation but treats that path’s gradient as zero during backpropagation. The expression above outputs the quantized code forward and passes gradients to the encoder output as if through an identity. The STE is a surrogate gradient for learning, not the exact derivative of quantization. It permits training through discrete choices but should not be claimed to be unbiased.

Original lecture from 14:25.

#P016 · Reconstruction, codebook, and commitment terms update different components

P016 — Reconstruction, codebook, and commitment terms update different components. Oier Mees, ETH Zurich Robot Learning 2026.
P016 — Reconstruction, codebook, and commitment terms update different components

Separating the three losses reveals what each learns. Reconstruction recovers the original input from the code. The codebook term pulls the selected representative toward the encoder output. The commitment term keeps the encoder near its chosen representative.

L=∥x−D(zq)∥2+∥sg⁡(ze)−ek∥2+β∥ze−sg⁡(ek)∥2\mathcal L=\lVert x-D(z_q)\rVert^2+\lVert\operatorname{sg}(z_e)-e_k\rVert^2+\beta\lVert z_e-\operatorname{sg}(e_k)\rVert^2
Explore the symbols and calculation The three VQ-VAE training terms

Read the equation in words

Separate reconstruction, codebook movement, and encoder commitment into distinct training terms. Stop-gradient placement determines which weights each term changes.

Understand each symbol

x,D(zq)x,D(z_q)
The original input and its reconstruction from the selected code.
ze,ekz_e,e_k
The encoder output and selected codebook vector.
β\beta
The commitment weight keeping the encoder near its code, distinct from diffusion noise variance later.
sg⁡\operatorname{sg}
An indication that this term does not pass derivatives to that variable.
∥⋅∥22\lVert\cdot\rVert_2^2
The squared length obtained by squaring and summing all vector components. It combines coordinate-wise errors into one nonnegative quantity.

Follow the calculation

  1. Reconstruction error trains the decoder and reaches the encoder through the STE.
  2. The second term moves the codebook toward encoder outputs; the third moves the encoder toward selected codes.

Check with a small example

Encoder value 0.7 and code value 1 have squared difference 0.09. A third-term weight of 0.25 gives that term value 0.0225.

An illustrative example for understanding the equation.

The middle term holds the encoder side fixed and changes the codebook. The last term holds the codebook side fixed and changes the encoder. Reconstruction error directly trains the decoder and reaches the encoder through the STE. Here, β\beta weights commitment; its role differs from the noise-variance symbol used later for diffusion.

A learned codebook alone does not determine which index combinations to sample or how often. That question leads to the next generation stage. Variants can also update codebooks through moving averages rather than direct loss gradients.

Original lecture from 15:55.

#P017 · Generating new codes also requires learning their index distribution

P017 — Generating new codes also requires learning their index distribution. Oier Mees, ETH Zurich Robot Learning 2026.
P017 — Generating new codes also requires learning their index distribution

After training the encoder, codebook, and decoder in the first stage, convert data into arrays of code indices. A second-stage model can learn the distribution of these arrays. At generation time, sample indices, retrieve their corresponding vectors, and pass them to the decoder.

p(k1,…,kM)=∏j=1Mp(kj∣k1,…,kj−1)p(k_1,\ldots,k_M)=\prod_{j=1}^{M}p(k_j\mid k_1,\ldots,k_{j-1})
Explore the symbols and calculation An autoregressive distribution over code arrays

Read the equation in words

Factor a long code array's probability into next-code probabilities conditioned on preceding codes. Previously generated outputs condition later ones.

Understand each symbol

k1,…,kMk_1,\ldots,k_M
The array of code indices to generate and its length.
jj
The position of the code currently being generated in the array.
∏\prod
Multiply every term in the indicated range. This appears when computing the joint probability of successive choices.
∣\mid
Conditional notation: the information to the right of the bar is given. This is not a division sign.

Follow the calculation

  1. Calculate the first code's probability.
  2. Condition each next code on preceding codes and multiply probabilities to the end of the array.

Check with a small example

Three conditional code probabilities 0.5, 0.8, and 0.2 give overall array probability 0.08.

An illustrative example for understanding the equation.

Predicting each next index from preceding indices preserves relationships between tokens. Sampling codes independently and uniformly at different positions can produce combinations absent from the training data. For example, if two tokens always described the same approach direction, sampling one as left and the other as right would create an inconsistent action sequence. Quantization discretizes the representation; learning its correct joint distribution remains a separate requirement.

Original lecture from 17:10.

#P018 · Discretization changes latent-space problems without removing them all

P018 — Discretization changes latent-space problems without removing them all. Oier Mees, ETH Zurich Robot Learning 2026.
P018 — Discretization changes latent-space problems without removing them all

The table contrasts reconstruction-focused AEs, VAEs with continuous probabilistic latent spaces, and VQ-VAEs with discrete code lists. VQ-VAE can learn a distribution over code indices instead of fitting a prior across every point of a continuous space. Problems remain, however, including codebook collapse, where only a few codes are selected, and poorly learned code distributions. “No gaps” does not guarantee the quality of every code combination.

The FSQ paper rounds continuous values along each axis to a limited set of scalar levels, forming an implicit grid codebook. This reduces the need for a separate learned list of representative vectors and nearest-neighbor search. Networks before and after discretization, and the distribution of code use, still require learning. Representation resolution, compression, and distribution-learning difficulty must still be evaluated together.

Original lecture from 18:30.

#P019 · Distinguishing visual tokens, latent actions, and real action tokens

P019 — Distinguishing visual tokens, latent actions, and real action tokens. Oier Mees, ETH Zurich Robot Learning 2026.
P019 — Distinguishing visual tokens, latent actions, and real action tokens

The three columns show different uses of discrete representations. First, tokenizing images or videos supports world models generating future scenes. Second, compressing changes between consecutive images into latent actions can teach patterns of change from videos without action labels. Third, tokenizing actual joint commands or action sequences represents robot-control outputs as discrete sequences.

A latent action in the middle column encodes visual change; it is not immediately a physical command specifying motor voltages. A learned mapping or decoder must connect it to actual robot actions. The left and right columns also have different aims: generating the visible world versus generating executable actions. Names such as GAIA-1, Cosmos, Genie, and VQ-BeT should not all be understood as copies of one VQ-VAE architecture.

Original lecture from 20:15.

#P020 · Diffusion learns how to reverse the progressive corruption of data

P020 — Diffusion learns how to reverse the progressive corruption of data. Oier Mees, ETH Zurich Robot Learning 2026.
P020 — Diffusion learns how to reverse the progressive corruption of data

The top row, where the cat gradually becomes noise, shows how training inputs are constructed. The bottom row generates data starting from noise. During training, the original sample is known, so we can create an input at a chosen noise level and its target. During generation, the original is unknown, requiring repeated use of learned predictions.

Where latent-variable models emphasize generating outputs from a small code, diffusion constructs reconstruction problems across several noise levels. This does not mean all diffusion operates on original pixels or avoids latent spaces. Diffusion can operate on compressed latent representations too. For robot policies, the object being denoised can be an action sequence instead of an image.

Original lecture from 21:40.

#P021 · One noise-addition step combines signal attenuation with noise

P021 — One noise-addition step combines signal attenuation with noise. Oier Mees, ETH Zurich Robot Learning 2026.
P021 — One noise-addition step combines signal attenuation with noise

At each step, slightly shrink the current value and add independent Gaussian noise. Unlike simply accumulating noise on an unchanged signal, this also controls signal magnitude.

q(xi∣xi−1)=N(1−βixi−1,βiI)q(x_i\mid x_{i-1})=\mathcal N(\sqrt{1-\beta_i}x_{i-1},\beta_i I)
Explore the symbols and calculation A single forward diffusion transition

Read the equation in words

Starting with clean data, forward diffusion slightly attenuates the signal and adds Gaussian noise at each step.

Understand each symbol

II
The identity matrix: diagonal entries are 1 and others 0. Multiplying a compatible vector by it leaves the vector unchanged.
xi−1,xix_{i-1},x_i
Noisy samples before and after one step. Here, ii indexes diffusion steps.
βi\beta_i
The noise variance added at this step.
N(m,Σ)\mathcal N(m,\Sigma)
A Gaussian distribution specified by its mean and covariance.
∣\mid
Conditional notation: the information to the right of the bar is given. This is not a division sign.

Follow the calculation

  1. Scale the previous sample by the square root of the signal-retention coefficient.
  2. Add Gaussian noise with the specified noise variance.

Check with a small example

Noise variance 0.36 gives signal coefficient 0.8 and standard-noise multiplier 0.6. Previous value 1 with standard noise 0 gives next value 0.8.

An illustrative example for understanding the equation.

Here, β\beta is the variance of the added noise, so its square root multiplies the actual noise sample. Repeated small β\beta values gradually weaken the original features. The list specifying noise amounts at each step is the noise schedule.

The step index here is not physical robot time. Generating one action sequence at a control instant may require dozens of internal denoising calculations. Do not confuse the horizon of future robot actions with the number of neural-network denoising calls.

Original lecture from 22:40.

#P022 · The reverse process estimates the unknown original while moving backward

P022 — The reverse process estimates the unknown original while moving backward. Oier Mees, ETH Zurich Robot Learning 2026.
P022 — The reverse process estimates the unknown original while moving backward

Training provides the original and the noise added to it, but execution provides only a noisy input. The model therefore estimates what to remove from the current input and noise level. Multiple originals can generally correspond to one noisy input, making denoising uncertain as well.

A common training parameterization predicts the accumulated noise from the original to the current level, rather than just the noise added in the last step. Nor does subtracting a prediction once from the current input define every diffusion sampler. Actual updates include signal and noise coefficients and next-step variance.

Conditioned on the known original, the reverse posterior can be expressed as a tractable Gaussian. At execution, however, the original is unknown, so a neural reverse process is trained to approximate it. Knowing the forward noising rule alone therefore does not solve generation.

Original lecture from 24:10.

#P023 · DDPM learns to predict noise at different noise levels

P023 — DDPM learns to predict noise at different noise levels. Oier Mees, ETH Zurich Robot Learning 2026.
P023 — DDPM learns to predict noise at different noise levels

The upper equation uses a log-likelihood lower bound as in a VAE, but with multiple intermediate noisy states. The first KL aligns the final noisy distribution with the starting prior. The middle terms fit individual reverse-step distributions, and the final reconstruction term explains clean data. A rigorous bound includes expectations over the corresponding intermediate states.

A widely used simplified training objective selects a random noise level and reduces squared error between predicted and actual noise.

Lsimple=Ex0,i,ϵ[∥ϵ−ϵθ(xi,i)∥22]\mathcal L_{\mathrm{simple}}=\mathbb E_{x_0,i,\epsilon}[\lVert\epsilon-\epsilon_\theta(x_i,i)\rVert_2^2]
Explore the symbols and calculation DDPM's simplified noise-prediction loss

Read the equation in words

Train the network to predict the noise actually used in corruption. The objective learns through noise prediction rather than directly outputting the clean original.

Understand each symbol

ϵ∼N(0,I)\epsilon\sim\mathcal N(0,I)
Sample a Gaussian noise vector with component means 0 and variances 1.
θ\theta
The parameters collecting the trainable weights of the network or policy.
x0,xi,ix_0,x_i,i
The clean sample, noisy sample, and selected diffusion step.
ϵθ(xi,i)\epsilon_\theta(x_i,i)
Noise predicted by the model from the sample and step.
E\mathbb E
An expectation: an average over possible outcomes weighted by their probabilities.
∥⋅∥22\lVert\cdot\rVert_2^2
The squared length obtained by squaring and summing all vector components. It combines coordinate-wise errors into one nonnegative quantity.

Follow the calculation

  1. Add noise at the chosen level to a clean sample to construct the input.
  2. Average componentwise squared differences between predicted and actual noise.

Check with a small example

Actual noise [1,−1] and prediction [0.8,−0.5] give summed squared difference 0.22+(−0.5)2=0.290.2^2+(-0.5)^2=0.29.

An illustrative example for understanding the equation.

Deriving the original variational objective can produce step-dependent weights. The simplified loss above should not be called term-for-term identical to the original likelihood objective. Notice that this model also uses MSE. The earlier averaging problem did not prohibit MSE itself; it concerned predicting an entire action directly as a mean. Repeatedly applying noise-level-dependent predictions during generation can produce multimodal distributions. Original DDPM paper.

Original lecture from 25:50.

#P024 · Constructing a training sample at any noise level in one step

P024 — Constructing a training sample at any noise level in one step. Oier Mees, ETH Zurich Robot Learning 2026.
P024 — Constructing a training sample at any noise level in one step

Repeated substitution of the one-step noising equation expresses the original-signal coefficient as a product of per-step signal coefficients. Independent Gaussian noises can be combined into one Gaussian by adding their variances.

αi=1−βi,αˉi=∏j=1iαj\alpha_i=1-\beta_i,\quad \bar\alpha_i=\prod_{j=1}^{i}\alpha_j
Explore the symbols and calculation Definition of the cumulative signal coefficient

Read the equation in words

Multiplying per-step signal-retention ratios shows how much original signal remains. Distinguish individual step coefficients from their cumulative product.

Understand each symbol

βi,αi\beta_i,\alpha_i
The per-step noise variance and signal-retention ratio.
αˉi\bar\alpha_i
The cumulative product of retention ratios through the current step. The bar does not indicate an average.
∏\prod
Multiply every term in the indicated range. This appears when computing the joint probability of successive choices.

Follow the calculation

  1. Subtract noise variance from 1 to obtain each step's retention ratio.
  2. Multiply retention ratios from the first step through the current one.

Check with a small example

Noise variances 0.1 and 0.2 give retention ratios 0.9 and 0.8 and cumulative ratio 0.72.

An illustrative example for understanding the equation.

xi=αˉix0+1−αˉiϵ,ϵ∼N(0,I)x_i=\sqrt{\bar\alpha_i}x_0+\sqrt{1-\bar\alpha_i}\epsilon,\quad\epsilon\sim\mathcal N(0,I)
Explore the symbols and calculation Direct sampling at a chosen noise level

Read the equation in words

Construct a sample at the desired noise level directly instead of executing every preceding step. Use cumulative signal and noise coefficients.

Understand each symbol

ϵ∼N(0,I)\epsilon\sim\mathcal N(0,I)
Sample a Gaussian noise vector with component means 0 and variances 1.
x0,xix_0,x_i
The original and a sample at noise step ii.
αˉi\bar\alpha_i
The cumulative coefficient determining how much original signal remains.

Follow the calculation

  1. Prepare clean data and one standard-noise sample.
  2. Multiply them by square roots of the cumulative ratio and its complement, then add.

Check with a small example

Cumulative ratio 0.64 gives coefficients 0.8 and 0.6. Original 2 and noise −1 give current sample 1.

An illustrative example for understanding the equation.

This equation avoids computing the first 799 steps merely to construct one training sample at step 800. Precomputed cumulative coefficients allow direct access to the chosen level. The computational advantage concerns noise-step count; it does not eliminate data dimensionality or network computation.

Direct and sequential samples have matching marginal distributions at each level. Independently drawn sample values need not be identical. Sampling noise independently for several times also does not reproduce the joint path of the original Markov chain.

Histograms comparing sequential and direct noising, with signal and noise coefficients
Each method generated 80,000 samples from the same fixed original. Overlapping histograms check agreement of marginal distributions, rather than identical individual paths.JJo; directly executed numerical example · Original source

Original lecture from 27:50.

#P025 · DDPM sampling combines a predicted mean with per-step randomness

P025 — DDPM sampling combines a predicted mean with per-step randomness. Oier Mees, ETH Zurich Robot Learning 2026.
P025 — DDPM sampling combines a predicted mean with per-step randomness

Generation begins with Gaussian noise and proceeds backward from high noise levels. Move toward a predicted mean and add noise matching the chosen reverse-process variance.

Unlike DDPM’s per-step noise addition, deterministic DDIM can follow a fixed path once the initial noise is selected. Different initial noise can still yield different outputs, so omitting per-step noise does not imply collapse to one result.

xi−1=1αi(xi−βi1−αˉiϵθ(xi,i))+σizx_{i-1}=\frac{1}{\sqrt{\alpha_i}}\left(x_i-\frac{\beta_i}{\sqrt{1-\bar\alpha_i}}\epsilon_\theta(x_i,i)\right)+\sigma_i z
Explore the symbols and calculation The DDPM reverse sampling update

Read the equation in words

Remove part of the predicted noise from the current sample, then add fresh noise matching the chosen reverse variance to reconstruct one step.

Understand each symbol

θ\theta
The parameters collecting the trainable weights of the network or policy.
xi,xi−1x_i,x_{i-1}
The current sample and its one-step reconstruction.
αi,αˉi,βi\alpha_i,\bar\alpha_i,\beta_i
The per-step retention coefficient, cumulative retention coefficient, and per-step noise variance.
ϵθ,σi,z\epsilon_\theta,\sigma_i,z
Predicted noise, reverse standard deviation, and newly sampled standard noise.

Follow the calculation

  1. Calculate the reconstruction mean using step coefficients and predicted noise.
  2. Add fresh noise scaled by the reverse standard deviation. The final step uses a setting without fresh noise.

Check with a small example

With predicted and fresh noise both zero and retention ratio 0.81, the mean update changes current value 0.9 to 0.9/0.9=10.9/0.9=1.

An illustrative example for understanding the equation.

Fresh noise is sampled from a standard normal and set to zero at the final step. Here, σ\sigma is the reverse-process standard deviation; it may use the square root of β\beta or another variance choice from the original paper. Using the predicted mean alone differs from sampling around it.

Do not generalize that diverse outputs require fresh noise at every step. A deterministic transformation can produce different outputs from different initial noise, as DDIM illustrates next. Nor is deleting the noise term from this DDPM equation equivalent to every deterministic sampler. Each sampler has an update matching the reverse process it approximates. Here, score means the spatial gradient of data log density, not a reinforcement-learning reward score.

Original lecture from 31:00.

#P026 · DDIM estimates a clean sample and moves to a lower noise level

P026 — DDIM estimates a clean sample and moves to a lower noise level. Oier Mees, ETH Zurich Robot Learning 2026.
P026 — DDIM estimates a clean sample and moves to a lower noise level

First estimate the clean original from the current input. Then combine that estimate with the predicted noise direction to construct an input at a lower noise level. Skipping intermediate steps separates the training schedule’s length from the number of predictions during execution.

x^0=xi−1−αˉiϵθ(xi,i)αˉi\widehat x_0=\frac{x_i-\sqrt{1-\bar\alpha_i}\epsilon_\theta(x_i,i)}{\sqrt{\bar\alpha_i}}
Explore the symbols and calculation Estimating the original from the current sample

Read the equation in words

Rearrange the equation mixing original signal and noise to solve for the original. More accurate noise predictions yield more accurate original estimates.

Understand each symbol

x^0\widehat x_0
The clean original estimated at the current step.
xi,αˉi,ϵθx_i,\bar\alpha_i,\epsilon_\theta
The current sample, cumulative retention coefficient, and predicted noise.

Follow the calculation

  1. Subtract the predicted accumulated-noise component from the current sample.
  2. Divide the remainder by the original-signal coefficient.

Check with a small example

Current sample 1.1, cumulative coefficient 0.64, and predicted noise 0.5 give (1.1−0.6×0.5)/0.8=1(1.1-0.6\times0.5)/0.8=1.

An illustrative example for understanding the equation.

xj=αˉjx^0+1−αˉjϵθ(xi,i),j<ix_j=\sqrt{\bar\alpha_j}\widehat x_0+\sqrt{1-\bar\alpha_j}\epsilon_\theta(x_i,i),\quad j<i
Explore the symbols and calculation A DDIM update without fresh noise

Read the equation in words

Remix the estimated original and the same predicted noise using coefficients for a cleaner step. This DDIM update adds no fresh noise.

Understand each symbol

i,ji,j
The current and destination diffusion steps, with jj smaller.
αˉj\bar\alpha_j
The destination step's cumulative signal-retention ratio.
x^0\widehat x_0
The original estimated at the current step.

Follow the calculation

  1. Estimate the original and noise from the current sample.
  2. Recombine them using cumulative coefficients for a cleaner step.

Check with a small example

Original estimate 1, predicted noise 0.5, and new cumulative coefficient 0.81 give new sample 0.9+0.19×0.5≈1.1180.9+\sqrt{0.19}\times0.5\approx1.118.

An illustrative example for understanding the equation.

The expression above is deterministic DDIM with η\eta set to zero. The same conditions and initial noise produce the same output. Changing the initial noise can produce a different output, so multimodality is not lost. Fewer steps are faster, but change the effects of prediction and discretization error. Reducing 1,000 steps to 20 does not guarantee unchanged quality on every task.

Berkeley’s diffusion lecture from 52:11 distinguishes the training objective from the execution sampler. Sharing DDPM’s forward marginal distributions does not imply identical generated distributions and sample paths under every finite-step procedure. Original DDIM paper.

Original lecture from 34:00.

#P027 · Conditional generation models the distribution of outcomes needed now

P027 — Conditional generation models the distribution of outcomes needed now. Oier Mees, ETH Zurich Robot Learning 2026.
P027 — Conditional generation models the distribution of outcomes needed now

In the astronaut illustration, a text instruction constrains the image to generate. Robots can condition on camera images, proprioception—their own joint-state sensing—and language instructions. Even for the same cup, “grasp it” and “push it aside” require different action distributions.

Adding conditions to the noise-prediction network teaches observation-dependent reconstruction. The condition is not the target action itself and has a different role from a reinforcement-learning reward received afterward. Earlier diffusion equations omit conditioning only to introduce the noise process first. The latent-variable policies introduced earlier could already be conditioned on observations too.

Original lecture from 35:52.

#P028 · CFG uses the difference between conditional and unconditional predictions

P028 — CFG uses the difference between conditional and unconditional predictions. Oier Mees, ETH Zurich Robot Learning 2026.
P028 — CFG uses the difference between conditional and unconditional predictions

During training, replace some conditions with an empty token so the same model learns both conditional and unconditional predictions. At execution, scale the difference between those predictions to the desired strength.

ϵ^=ϵu+w(ϵc−ϵu)\widehat\epsilon=\epsilon_u+w(\epsilon_c-\epsilon_u)
Explore the symbols and calculation Combining predictions with classifier-free guidance

Read the equation in words

Start from an unconditional noise prediction and scale the change induced by conditioning. Stronger conditioning does not guarantee better results.

Understand each symbol

ϵu,ϵc\epsilon_u,\epsilon_c
Respectively, predictions with an empty condition and with conditioning. Subscripts identify these two prediction types.
ww
The guidance weight amplifying the conditioning effect.

Follow the calculation

  1. Calculate the difference between conditional and unconditional predictions.
  2. Scale that difference and add it to the unconditional prediction.

Check with a small example

Unconditional prediction 0.2, conditional prediction 0.5, and weight 2 give 0.8. Weight 0 gives the unconditional prediction; 1 gives the original conditional prediction.

An illustrative example for understanding the equation.

Here, ϵu\epsilon_u is the noise prediction with an empty condition and ϵc\epsilon_c the prediction with conditioning. The subscripts uu and cc distinguish the two predictions. Under this convention, ww equal to 0 gives the unconditional prediction, 1 gives the original conditional prediction, and values above 1 extrapolate farther along their difference. This can emphasize the desired condition while reducing diversity or introducing distortions.

Unlike classifier guidance, which trains a separate classifier, CFG handles both cases within one prediction model through condition dropout. “Classifier-free” does not mean generating without conditioning. Nor does every Diffusion Policy necessarily use CFG. Robot applications must choose which conditions to drop; indiscriminately removing necessary state information does not make actions safe. CFG paper.

Original lecture from 36:40.

#P029 · Diffusion Policy generates future action sequences instead of pixels

P029 — Diffusion Policy generates future action sequences instead of pixels. Oier Mees, ETH Zurich Robot Learning 2026.
P029 — Diffusion Policy generates future action sequences instead of pixels

Consider pushing a TT-shaped object on a table to match a target outline. Bringing the object center close is insufficient; orientation and contact location also matter. Several contact sequences can lead toward the same goal, making it useful to represent multimodality in demonstrations.

Diffusion Policy adds noise to demonstrated action sequences and learns to predict that noise conditioned on the current observation. An action sequence concatenates commands for several future control instants. This basic training is imitation learning from demonstrations; it does not automatically perform reward-maximizing reinforcement learning.

Ai=αˉiA+1−αˉiϵ,ϵθ(Ai,i,o)A_i=\sqrt{\bar\alpha_i}A+\sqrt{1-\bar\alpha_i}\epsilon,\quad \epsilon_\theta(A_i,i,o)
Explore the symbols and calculation Noise prediction for an observation-conditioned action sequence

Read the equation in words

Add noise to a sequence of actions across multiple times, rather than one action, and predict it using the current observation.

Understand each symbol

oto_t
The sensor observation at step tt. It is not assumed to equal the full physical state.
ϵ∼N(0,I)\epsilon\sim\mathcal N(0,I)
Sample a Gaussian noise vector with component means 0 and variances 1.
θ\theta
The parameters collecting the trainable weights of the network or policy.
A,AiA,A_i
The clean and noisy action sequences.
i,αˉii,\bar\alpha_i
The diffusion step and cumulative signal coefficient.
ϵθ(Ai,i,o)\epsilon_\theta(A_i,i,o)
The noise-prediction model that also uses observations.

Follow the calculation

  1. Add noise at the chosen step to the clean action sequence.
  2. Provide the noisy sequence, step, and observation together to predict conditional noise.

Check with a small example

Three future joint commands can form one sequence. During execution, run part of the generated sequence and replan from a fresh observation.

An illustrative example for understanding the equation.

The slide’s “add noise to actions” abbreviates the coefficient-weighted process above. Outputs are future actions, not necessarily predictions of future images or world states. A receding-horizon approach can predict a long action sequence, execute only part of it, then replan from a fresh observation. Diffusion Policy paper, videos, and code.

Original lecture from 38:44.

#P030 · Share observations within one planning cycle while repeatedly updating the action array

P030 — Share observations within one planning cycle while repeatedly updating the action array. Oier Mees, ETH Zurich Robot Learning 2026.
P030 — Share observations within one planning cycle while repeatedly updating the action array

The images on the left show camera observations and joint states conditioning the transformation of noise into a coherent action sequence. The middle timeline separates prediction and execution horizons. Observing again after execution allows responses to environmental changes.

Camera and robot-state encoding is paid once per planning cycle, and the representation is shared across denoising steps. In the temporal U-Net variant, FiLM adjusts internal feature scales and shifts using the observation; the Transformer variant attends to observations. Diffusion Policy project

The U-Net’s 1D axis on the right is the action sequence’s time axis. Downsampling gathers broader context, then upsampling reconstructs actions at each time, with skip connections preserving detail. FiLM derives feature-specific scales and shifts from conditioning to modulate intermediate activations. In a Transformer variant, action tokens can attend to observation tokens.

Computing observation features once means reusing them across denoising steps within one action-sequence generation cycle. It does not mean reading the camera only once during the entire robot run. Normalizing action units and ranges also matters. Treating translations in meters and rotations in radians as if they shared a numerical scale changes the balance of learning.

Original lecture from 40:14.

#P031 · Extending a task-specialized policy to multiple tasks

P031 — Extending a task-specialized policy to multiple tasks. Oier Mees, ETH Zurich Robot Learning 2026.
P031 — Extending a task-specialized policy to multiple tasks

Different objects, tools, and contact modes in the photographs call for different action distributions. A specialist trained for one task does not readily transfer unchanged to another task or robot. Beyond dataset size, observation formats, task conditions, action dimensions, and units must be handled together.

The original lecture discusses training sensitivity and scaling difficulties in the early Transformer version of Diffusion Policy. This does not mean diffusion policies are fundamentally unable to learn multiple tasks. Octo and DiT Policy, discussed next, extend in that direction through changes to data and architecture. Successful single-task demonstrations and generalization under varied conditions require separate evaluation.

Original lecture from 41:08.

#P032 · Octo connects multiple robot datasets through shared representations and an action-generation head

P032 — Octo connects multiple robot datasets through shared representations and an action-generation head. Oier Mees, ETH Zurich Robot Learning 2026.
P032 — Octo connects multiple robot datasets through shared representations and an action-generation head

The architecture below separates language or goal images, observation tokens, readout tokens, and an action head. A token is one information slot processed by the model. Readout tokens gather task and observation information into a representation for action output. A small diffusion head then generates an action sequence conditioned on that representation.

The Octo paper studies a general robot policy trained on approximately 800,000 trajectories from Open X-Embodiment. Each trajectory contains multiple control steps, so this is not 800,000 individual actions. Its diffusion action head is a small MLP. Do not conflate the readout’s attention-based information aggregation with the action head receiving that result, as if both were the same cross-attention block.

The point is that pretrained representations can be adapted to new robots, not that a download instantly matches every robot’s joint ordering and units. Input/output adapters and additional training conditions are required.

Original lecture from 42:00.

#P033 · DiT Policy injects conditions through normalization-layer scales and shifts

P033 — DiT Policy injects conditions through normalization-layer scales and shifts. Oier Mees, ETH Zurich Robot Learning 2026.
P033 — DiT Policy injects conditions through normalization-layer scales and shifts

The observation encoder combines images and robot states, while the action generator updates noisy action tokens. AdaLN means adaptive layer normalization. It conveys observations and noise levels by conditioning how normalized features are scaled and shifted. This connects to FiLM’s idea of modulating internal features with conditions.

The DiT Policy paper reports stability and complex manipulation performance under particular architectural changes and training choices. This is not proof that cross-attention is unnecessary in every Transformer. A long task such as sushi cutting may span 1,500 control steps, which is different from the number of diffusion steps generating one action sequence. One measures control time in the environment; the other measures internal generation computation.

Original lecture from 42:43.

#P034 · Flow matching learns a velocity field from noise to data

P034 — Flow matching learns a velocity field from noise to data. Oier Mees, ETH Zurich Robot Learning 2026.
P034 — Flow matching learns a velocity field from noise to data

Sample one noise value and one data example, then connect them with a straight line. Mixing them so that time 0 is noise and time 1 is data produces training examples anywhere along the path.

xτ=(1−τ)ϵ+τxdata,u=xdata−ϵx_\tau=(1-\tau)\epsilon+\tau x_{\mathrm{data}},\quad u=x_{\mathrm{data}}-\epsilon
Explore the symbols and calculation A straight probability path and the paired samples' target velocity

Read the equation in words

Construct a straight path connecting noise and actual data and define its target velocity. Generation time 0 denotes noise and 1 denotes data.

Understand each symbol

ϵ∼N(0,I)\epsilon\sim\mathcal N(0,I)
Sample a Gaussian noise vector with component means 0 and variances 1.
τ\tau
Generation time running from 0 to 1, distinct from robot execution time or a trajectory label.
xdata,xτx_{\mathrm{data}},x_\tau
The actual data and intermediate path sample.
u=xdata−ϵu=x_{\mathrm{data}}-\epsilon
The target velocity along the path joining a sample pair, not an RNN memory vector or control torque.

Follow the calculation

  1. Choose endpoints and linearly mix them according to time.
  2. Differentiating with respect to time makes target velocity the endpoint difference.

Check with a small example

Noise −1 and data 3 give intermediate value 1 at time 0.5 and target velocity 4.

An illustrative example for understanding the equation.

LFM=E[∥vθ(xτ,τ)−u∥2]\mathcal L_{\mathrm{FM}}=\mathbb E[\lVert v_\theta(x_\tau,\tau)-u\rVert^2]
Explore the symbols and calculation The flow-matching velocity-regression objective

Read the equation in words

Train the model to predict target path velocity from an intermediate sample and generation time. Regression reduces squared differences between target and predicted vectors.

Understand each symbol

θ\theta
The parameters collecting the trainable weights of the network or policy.
vθ(xτ,τ)v_\theta(x_\tau,\tau)
The predicted velocity vector field over intermediate position and generation time.
uu
The target velocity formed from data minus noise in the preceding equation.
LFM\mathcal L_{\mathrm{FM}}
The flow-matching loss: mean velocity-prediction error.
E\mathbb E
An expectation: an average over possible outcomes weighted by their probabilities.
∥⋅∥22\lVert\cdot\rVert_2^2
The squared length obtained by squaring and summing all vector components. It combines coordinate-wise errors into one nonnegative quantity.

Follow the calculation

  1. Sample a noise–data pair and intermediate generation time to construct a path sample.
  2. Compare predicted velocity against that pair's target velocity.

Check with a small example

Target velocity 4 and prediction 3 give one-dimensional squared loss 1. Where different paths overlap, the optimal regressor at a location is conditional mean velocity.

An illustrative example for understanding the equation.

A vector field specifies which direction and how far to move given the current position and generation time. Generation starts from fresh noise and integrates this field. The simplest Euler method adds current velocity multiplied by a small time interval to the position.

xτ+Δτ=xτ+Δτ vθ(xτ,τ)x_{\tau+\Delta\tau}=x_\tau+\Delta\tau\,v_\theta(x_\tau,\tau)
Explore the symbols and calculation One Euler integration step

Read the equation in words

Move for a short time using the velocity predicted at the current location. This is the simplest numerical integration of a learned field from noise to data.

Understand each symbol

θ\theta
The parameters collecting the trainable weights of the network or policy.
xτx_\tau
The sample at the current generation time.
Δτ\Delta\tau
The time interval for one integration step.
vθv_\theta
The model's predicted velocity along the generation path.

Follow the calculation

  1. Predict velocity from the current generation time and sample.
  2. Multiply velocity by a small time interval and add it to the current sample.

Check with a small example

Current value −1, predicted velocity 4, and time interval 0.1 give new value −0.6. Repeated large steps can increase integration error.

An illustrative example for understanding the equation.

A particular noise–data pair has constant target velocity, but the overall learned velocity field is not constant everywhere. When several pairs pass near the same intermediate location, the model learns their conditional mean velocity, and paths obtained by integrating the field can curve. Although this also uses MSE, its generative structure differs from directly outputting one mean action. Generation time is not physical robot-motion time: the robot does not execute every intermediate action array along the generation path.

Straight interpolation is the path selected in this lecture; flow matching as a whole need not use only this path. Original Flow Matching paper.

Original lecture from 43:41.

#P035 · Rectified flow retrains on generated pairs to straighten paths

P035 — Rectified flow retrains on generated pairs to straighten paths. Oier Mees, ETH Zurich Robot Learning 2026.
P035 — Rectified flow retrains on generated pairs to straighten paths

Randomly pairing arbitrary noise and data can produce crossing straight lines. When different target directions overlap at an intermediate location, representing them with one smooth vector field can lead to curved flow. The difference between the left and right curves illustrates an attempt to simplify this transport.

First train a flow, then follow it from fresh noise to an endpoint. Pair that initial noise with the reached endpoint and train again. This recoupling and retraining is called reflow. It uses pairs connected by the current model instead of the original independently sampled pairs.

Straighter paths can be easier to approximate with fewer integration steps. This does not make every flow exactly straight or guarantee equal quality in one step. Learning error, integration error, and representational limits remain. Also distinguish crossings of straight training pairs from crossings at the same space–time point by actual solution paths of a smooth ODE satisfying uniqueness conditions. Rectified Flow paper.

Original lecture from 46:18.

#P036 · π₀ generates continuous action sequences conditioned on visual and language representations

P036 — π₀ generates continuous action sequences conditioned on visual and language representations. Oier Mees, ETH Zurich Robot Learning 2026.
P036 — π₀ generates continuous action sequences conditioned on visual and language representations

The left side shows robot data and Internet pretraining data; the middle contains a vision–language model; the right contains an action expert. It uses representations interpreting camera images and instructions such as “fold the shirt,” while robot-specific weights process joint states and noisy actions. The dual-arm, mobile, and single-arm robots illustrate its intended range of embodiments.

Rather than sampling every flow time equally often, the π₀ introduced in the lecture gives greater weight to high-noise regions. Which noise levels are practiced frequently during training and how many integration steps are used at execution are separate choices. π₀ paper

In Section 4 and Appendix B of the original π₀ paper, generation time runs from 0 for noise to 1 for clean actions, matching this chapter’s straight-flow equations. Mixing this with diffusion notation that uses zero for clean data can reverse the integration direction in code. Hold observations fixed, start from noisy actions, integrate from 0 to 1, execute part of the resulting action sequence, and observe again.

Instead of uniform training-time sampling, the model uses a shifted Beta distribution emphasizing smaller times with more noise. The appendix specifies an upper bound of 0.999 and a transformed Beta(1.5,1). This allocates training effort to regions where predicting actions from observations is difficult; it is not a mandatory rule for every flow model.

Model sizes and module names in the figure describe the original π0\pi_0 configuration cited by this lecture. Vision–language pretraining does not mean Internet images carry actual motor-command labels. Robot action data and flow training provide that connection. Joint training across robots also requires aligning action dimensions, normalization, and input/output mappings.

Original lecture from 48:01.

#P037 · Comparing distribution representations and execution procedures together

P037 — Comparing distribution representations and execution procedures together. Oier Mees, ETH Zurich Robot Learning 2026.
P037 — Comparing distribution representations and execution procedures together

Rather than asking which family is newest, first ask what it predicts and how it generates samples.

FamilyCore learning targetGeneration procedureRobot-specific question
VAEProbabilistic latent representations and a decoder explaining inputsSample a prior code and reconstructCan codes be sampled without target actions at execution?
VQ-VAEDiscrete codebook and reconstruction, plus a separate code distributionSample indices, retrieve vectors, and reconstructHow do code combinations map to actual actions?
DDPM and DDIMPredictions at multiple noise levelsIteratively recover data from noiseAre generation steps, latency, and action horizon distinguished?
Flow matchingA velocity field over position and generation timeIntegrate the field from noiseAre time direction and integration intervals consistent?

Diffusion noise prediction and flow velocity prediction can be connected through transformations under selected probability paths and time parameterizations. This does not make finite-step DDPM, DDIM, and every flow sampler identical algorithms or guarantee identical quality. Consider discretization, objective weights, conditioning, and computation together.

The ability to generate diverse actions does not guarantee good actions. A dataset with many failures can teach their distribution too, and a model unaware of constraints can generate dangerous commands. Generative models provide policy representations; deciding what they learn and how they are evaluated remains a design problem for imitation learning, reinforcement learning, and control systems.

Original lecture from 48:55.

#Calculations run and checked for this article

The executable code and results are available so the equations can be explored without a robot. Calculations cover collision by averaging two detours, the ELBO and KL gap in a Gaussian latent model, reparameterization derivatives, true quantization derivatives versus STE, diffusion marginals, DDIM clean-sample reconstruction algebra, CFG weights, and flow integration error.

Paths of an analytical velocity field transporting Gaussian distributions, with standard-deviation error versus integration-step count
The conditional mean velocity field from straight interpolation between independent Gaussian pairs was integrated directly. Although training pairs follow straight lines, paths through the overall field can curve.JJo; directly executed numerical example · Original source

These examples are numerical calculations using known probability distributions. The DDIM check uses ground-truth noise and therefore does not evaluate a learned noise predictor. They also do not represent training VAE or Diffusion Policy networks, completing the official assignment, running robot physics simulation, or executing hardware. For executable robot examples, consult the official Diffusion Policy code and the project paper’s simulation and experimental settings.

  • Berkeley CS294-158, Deep Unsupervised Learning 2024: Lecture 4 on latent variables and VAEs, and Lecture 6 on diffusion. These supplement the ELBO-gap explanation and distinction between training and sampling.
  • Original VAE paper · VQ-VAE: starting points for probabilistic latent representations, reparameterization, and codebook learning.
  • DDPM · DDIM · CFG: read noise-prediction objectives separately from generation procedures.
  • Diffusion Policy · Octo · DiT Policy: compare action sequences, conditioning, and multitask scaling.
  • Flow Matching · Rectified Flow · π₀: learning velocity fields and connecting them to action generation.
  • Cheng Chi’s invited talk: at 4:30–7:31, hardware, data, components, and procurement are discussed as essential system conditions alongside algorithms. This recording supplements implementation context beyond the model; it is not assumed to be an additional lecture deriving Diffusion Policy equations.

Copyright in the slides and lecture belongs to Oier Mees and the rights holders of each cited resource. This English edition translates JJo’s Korean explanation of the original materials; JJo generated the article’s numerical figures. Figures and videos from cited papers and models remain subject to their original authors’ rights. Oier Mees · ETH Computer Vision and Geometry Group.

Connect