Token LabSearch

← Physical AI
PHYSICAL AI / 4 OF 8

04 · Demonstrations, behavior cloning and ACT

Design a demonstration dataset and explain why action chunks help without hiding distribution shift.

Prerequisites: Supervised learning, sequence models and control frequency.

Understand the mechanism

Behavior cloning learns actions from expert observations. At deployment its own mistakes change the observations it sees, creating compounding error. ACT models chunks of future actions and uses a conditional variational formulation; the paper also studies temporal aggregation. These mechanisms do not remove the need for recovery demonstrations. Split data by full episode, operator or scene before normalizing; adjacent frames from one rollout are strongly related.

Text / 原始公式
L_BC = E[‖a − π(o)‖²]
L_CVAE = reconstruction + β·KL(q(z|a,o) ‖ p(z))
āₜ = Σᵢ wᵢ aₜ⁽ⁱ⁾ / Σᵢ wᵢ
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

Episode-level data split → Learn conditional action chunks → Aggregate / execute prefix → New observation + recovery
Original schematic; read the steps from top to bottom. SVG ↓
Symbols and assumptions
SymbolMeaning
o, a, zObservation, action chunk and latent variable
wᵢExplicitly chosen positive aggregation weights
  1. With at 50 Hz, a chunk spans 0.2 seconds. Executing the entire chunk open-loop delays response to a new disturbance.
  2. Two predictions for the same scalar action are 0.2 and 0.8. With declared weights 0.75 and 0.25, the aggregate is 0.35. State which prediction gets the larger weight.
  3. If only 2 of 100 episodes include failed grasps, random frame sampling cannot create adequate recovery coverage. Collect or simulate a targeted recovery subset.
Experiment checkpoint

Compare single-step BC and chunked prediction on the same demonstrations, compute budget and held-out scenes. Log success, recovery, action smoothness and latency; ablate chunk horizon independently.

Original interview exercises & analysis

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

Why can validation MSE improve while success falls?

MSE averages action errors on expert states. It can obscure contact-critical errors and fails to evaluate the policy-induced state distribution.

What does action chunking trade off?

Temporal coherence and fewer high-level decisions versus stale actions and reduced reactivity. Evaluate execution horizon separately from prediction horizon.

Read the primary sources

ACT / Learning Fine-Grained Bimanual Manipulation ↗ · 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

Action chunks are supervised sequences; temporal ensembling blends overlapping predictions for the same execution time. A low offline regression loss does not eliminate closed-loop distribution shift.

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

Predictions must refer to the same execution time; normalized nonnegative weights form a convex combination.

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 imitation-and-act.mjs. No third-party runtime dependencies.

const solve=()=>{
const predictions=[1,3], weights=[.75,.25];
return predictions.reduce((s,x,i)=>s+weights[i]*x,0);
};
const actual=solve();
const expected=1.5;
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.5

Test and transfer

Predictions must refer to the same execution time; normalized nonnegative weights form a convex combination.

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