Token LabBuscar

← IA física
PHYSICAL AI / 5 OF 8

05 · Diffusion Policy and multimodal actions

Explain why averaging demonstrations can fail and how conditional denoising represents alternatives.

Prerequisites: Behavior cloning, Gaussian noise and sequence prediction.

Technical posts currently have English and Chinese editions. This locale displays the English article with localized navigation.

Understand the mechanism

When a robot can go left or right around an obstacle, the average path may collide. A conditional diffusion policy represents an action distribution through iterative denoising instead of a single regression mean. The paper combines action-sequence prediction with receding-horizon execution. Sampling cost matters: compare quality under an actual inference deadline rather than counting denoising steps alone. Different samplers and schedules are not interchangeable without measurement.

Text / 原始公式
a_k = √ᾱ_k · a₀ + √(1−ᾱ_k) · ε
L = E[‖ε − εθ(a_k, k, o)‖²]
ε ~ N(0,I)
Study guide & lesson outlineLEARNING CONTRACT

Understand → implement → investigate

Goal: explain the mechanism in this lesson, reproduce one example and test a failure case. Reading alone does not mark mastery.

  • Understand: state assumptions, shapes/units and a counterexample.
  • Implement: reproduce a numerical example and inspect boundaries.
  • Investigate: compare one alternative under a matched budget.

Mechanism map & worked derivation

Observation + Gaussian sequence → Conditional denoising iterations → Feasible action-sequence candidate → Execute prefix → observe again
Original schematic; read the steps from top to bottom. SVG ↓
Symbols and assumptions
SymbolMeaning
a₀, a_kClean action sequence and noisy sequence at diffusion step k
ᾱ_k, oCumulative signal coefficient and conditioning observation
  1. Two equally likely valid scalar actions are −1 and +1. Their squared-error regression optimum is 0, which may correspond to the obstacle.
  2. For clean , α and sampled ε, the noisy action is 0.8−0.3=0.5. This is forward corruption, not an executed motor command.
  3. At 4 ms per model evaluation, 10 serial evaluations take 40 ms before preprocessing and transfer. A 20 ms deadline is already missed.
Experiment checkpoint

Build a synthetic two-route dataset and compare regression with a conditional sampler. Count obstacle intersections and mode coverage, not only MSE. Label this as a toy test, not a reproduction of manipulation benchmarks.

Original interview exercises & analysis

Answer aloud before revealing the analysis. Add assumptions, a counterexample and a test you would run.

Does stochastic generation guarantee diverse safe actions?

No. Training coverage, conditioning and sampler behavior matter; generated trajectories still need feasibility and collision checks.

Why predict longer than you execute?

A longer prediction supplies temporal context while a shorter executed prefix allows feedback. The best ratio depends on latency and disturbance rate.

Read the primary sources

Diffusion Policy ↗ · arXiv PDF ↗

Original Token Lab explanations and synthetic calculations; not measured robot performance. Source links checked 2026-10-25. Unversioned arXiv links may change; record a version for reproduction.

MATHEMATICAL REVIEW · 2026-10-26

Assumptions, implementation & acceptance

Noise is added in normalized action coordinates. The forward noise example is not a reverse sampler or a motor command. Enforce physical constraints after decoding, and evaluate closed-loop interventions.

Formula conditions, units and worked arithmetic reviewed. The implementation isolates one numerical mechanism; it does not train a policy or control real hardware.

Before running: predict a boundary case

recovers clean normalized action; gives noise. This is forward diffusion only.

Hint: isolate the assumption

Keep the baseline input fixed, change one parameter or boundary, and compare both the numerical result and the claimed units. A passing example verifies this fixture only.

Minimal executable example

Save the example and linked modules in one folder. Use Node.js 22 or newer, then run node diffusion-policy.mjs. No third-party runtime dependencies.

const solve=()=>{
const alphaBar=.64, action=2, noise=-1;
return Math.sqrt(alphaBar)*action+Math.sqrt(1-alphaBar)*noise;
};
const actual=solve();
const expected=1;
if(JSON.stringify(actual)===JSON.stringify(expected)){console.log('PASS',actual)}else{
const a=[actual].flat(), b=[expected].flat();
if(a.length!==b.length||a.some((v,i)=>!Number.isFinite(v)||Math.abs(v-b[i])>1e-10))throw Error('Numerical mismatch');
console.log('PASS within 1e-10',actual);
}
Reference output — reveal after predicting
1

Test and transfer

recovers clean normalized action; gives noise. This is forward diffusion only.

Record input, code version, expected result and observed result in the notebook below. Then construct a counterexample that violates the assumption above and explain why the original conclusion no longer follows.

Download complete kit (.tar.gz) · Complete reference kit and regression checks

Predict, test and keep evidence

Before revealing an answer, predict one result. After the exercise, record the discrepancy and a transfer test. Saved locally across language editions.

Open notebook / export / clear →

The mathematical review scope is recorded per lesson. It does not establish empirical paper reproduction; report suspected errors in your notes. Review scope