Search

Search papers and lessons

Action Chunking

Level 3 · 10 min read

Action chunking makes a robot policy predict a short block of future actions in one call and execute it open-loop, which reduces compounding errors and keeps motion smooth.

On this page

  • Colour = topic mix
  • Probability
  • Calculus
  • Neural network basics
  • Linear algebra
  • Architectures
  • Discrete math
  • Sign in to see your progress

TL;DR

A usual robot policy looks at the current observation and outputs one action, then repeats this every control tick. Action chunking changes the output: the policy outputs a block of HH future actions at once, the robot executes some or all of them, and the policy is called again later.

The block gives smoother motion, fewer decisions where small errors can build up, and a way to model tasks where a human might do the same thing in several different ways. The cost is that the robot acts on a plan that was made from older observations.

Where you'll see it: in imitation-learned manipulation policies such as ACT, and in the robot foundation model π0\pi_0, which predicts chunks of 50 actions.

Intuition

Planning a phrase, not a note

Think of a pianist reading music. They do not decide each finger movement from scratch on every beat. They take in a phrase and play it through, adjusting only when something goes wrong. A chunk policy works the same way: it commits to a short phrase of motion, then looks again.

A one-step policy is like a driver who decides the steering angle fresh every hundredth of a second from a single camera frame. Small noise in the input becomes jitter in the output, and each jitter pushes the car a little further off the planned line. A chunk policy plans a second of steering at once, so the output is a coherent path rather than a sequence of independent guesses.

This matters most in behavior cloning, where the policy learns by copying demonstrations. A demonstration is a smooth human motion. Predicting that motion as a block keeps the learned motion smooth too.

flowchart LR
  O[Observation at time t] --> P[Policy predicts actions t to t plus H minus 1]
  P --> E[Execute the chunk open-loop]
  E --> O2[Observation at the next call]
  O2 --> P

The math

Setup

Let ot\mathbf{o}_t be the observation at time tt, such as camera images and the robot's joint positions. Let at∈Rd\mathbf{a}_t \in \mathbb{R}^d be the action at time tt, a vector of joint targets or end-effector commands. An action chunk is the block of the next HH actions:

At=[at,at+1,…,at+H−1].\mathbf{A}_t = [\mathbf{a}_t, \mathbf{a}_{t+1}, \ldots, \mathbf{a}_{t+H-1}].

Here HH is the chunk length, or horizon. The policy is a conditional distribution πθ(At∣ot)\pi_\theta(\mathbf{A}_t \mid \mathbf{o}_t) over whole chunks, not single actions.

Training objective

The demonstration data gives pairs (ot,At)(\mathbf{o}_t, \mathbf{A}_t) taken from the recorded trajectories. Behavior cloning on chunks is maximum likelihood on these pairs:

θ⋆=arg⁡max⁡θ∑tlog⁡πθ(At∣ot).\theta^\star = \arg\max_\theta \sum_t \log \pi_\theta(\mathbf{A}_t \mid \mathbf{o}_t).

The sum runs over every time step, so each step contributes a training example whose target is the next HH actions. The maximum likelihood view is what lets the model represent more than one answer, as the next section shows.

Why a mean-squared loss fails when there are several good answers

Suppose the output is a single number aa and a regression network minimises squared error to the demonstrations. The best prediction under squared error is the conditional mean E[a∣o]\mathbb{E}[a \mid \mathbf{o}]. If the demonstrations are +1+1 and −1-1 with equal probability in the same situation, the mean is 00:

min⁡f  E[(f−a)2]is solved byf=E[a]=12(+1)+12(−1)=0.\min_f \; \mathbb{E}\big[(f - a)^2\big] \quad \text{is solved by} \quad f = \mathbb{E}[a] = \tfrac{1}{2}(+1) + \tfrac{1}{2}(-1) = 0.

A prediction of 00 is in neither demonstrated mode. For a robot this can mean driving straight into an obstacle that both demonstrations went around, one on each side.

A chunk model that samples from a distribution avoids this. It draws one mode and then produces a whole consistent block. Two common ways to do this are a conditional variational autoencoder with a latent variable z\mathbf{z}, which is the approach of the ACT policy of Zhao et al., and a generative model such as flow matching, which is the approach of π0\pi_0. In both, the chunk is generated from noise or a latent code conditioned on the observation.

Execution

Once a chunk is predicted, the robot can run it open-loop for k≤Hk \le H steps before calling the policy again. The gap kk is set by the control rate and the inference time. For π0\pi_0, the authors report running inference every 25 actions at 50 Hz, which is every 0.5 seconds, and every 16 actions at 20 Hz, which is every 0.8 seconds. They also report that they tried temporal ensembling early on, which averages overlapping predictions from consecutive calls, and found that it hurt performance, so they execute chunks open-loop without aggregating them. ACT reached the opposite conclusion: Zhao et al. query the policy at every step and average the overlapping predictions for each time step with exponential weights, and report that this improves their method and avoids the jerky motion of switching observations every kk steps. Whether to ensemble is therefore a design choice that depends on the policy.

Worked examples

Example
How much motion one call buys

Take a policy with H=50H = 50 running at a control rate of 50 Hz, and suppose one forward pass takes 100 milliseconds. This is an illustrative example, not a measured one.

  1. The chunk covers 50/50=150 / 50 = 1 second of motion.
  2. If the robot executes 25 actions before the next call, a call happens every 25/50=0.525 / 50 = 0.5 seconds.
  3. The inference takes 0.10.1 seconds, which is less than the 0.50.5 seconds of motion between calls. So the robot does not need to stop: the next chunk can be computed while the current one runs, if the system is pipelined.
  4. Calls per second: 50/25=250 / 25 = 2.

Interpretation: a long chunk makes the control loop tolerant of slow inference. The price is that the second half of the chunk was planned from an observation that is now half a second old.

Example
Why fewer decisions help: a toy error model

Suppose each policy decision independently has a chance e=0.01e = 0.01 of going wrong in a way that matters. Compare two schemes over a motion of T=50T = 50 steps.

  1. One decision per step, so 5050 decisions. Chance of at least one error: 1−0.99501 - 0.99^{50}.
  2. Using 0.9950=e50ln⁡0.99≈e−0.5025≈0.60500.99^{50} = e^{50 \ln 0.99} \approx e^{-0.5025} \approx 0.6050, so the chance is about 1−0.6050=0.3951 - 0.6050 = 0.395.
  3. One chunk of 5050 actions, so one decision. Chance of an error at the decision point: 0.010.01.

Interpretation: this model is crude, since errors are not independent and a chunk can be wrong in ways that keep compounding inside the open-loop execution. But it shows the mechanism: fewer decisions give fewer chances to drift, and the policy is not corrected in the middle of a chunk. The chunk length is the tradeoff between these two effects.

Example
Modes in a chunk

A robot must reach a cup with the left or the right hand, and the demonstrator picks each with probability 1/21/2. A single-step regression predicts the average, which is the empty middle. A chunk model that samples one mode predicts a whole consistent reach to the left, with probability 1/21/2, or to the right, with probability 1/21/2. Each sample is a valid plan, and each is internally consistent from the first step to the last.

Interpretation: the chunk makes the commitment at the start, so the later steps do not contradict it. Without the chunk and a sampling model, the policy can alternate between modes from one step to the next.

Tradeoffs and failure modes

SituationWhat goes wrongBetter choice
Fast, precise contact tasksA long open-loop chunk misses changes such as a slipping objectShorter chunks, or more frequent inference
Slow inferenceA short chunk leaves the robot waiting for the next planLonger chunks, pipelined inference
Several valid ways to do a taskA regression output averages them into an invalid motionA generative chunk model that samples one mode
Observations change quickly during a chunkThe plan uses stale imagesRe-plan on a schedule, or accept the latency and check the gap
Executing chunks back to backNew observations enter abruptly every kk steps, which can make motion jerkyTemporal ensembling as in ACT, or execute without aggregation as π0\pi_0 chose; π0\pi_0 reports ensembling hurt it

Action chunking inherits the weaknesses of behavior cloning. A policy trained only on expert data can drift into states the expert never visited. The chunk reduces how often this can happen, but it does not remove it, because the robot still runs a long plan without seeing what happened in between. That is the distribution shift problem in a new form.

History

Learning control by copying human demonstrations goes back to neural-network driving work in the late 1980s and early 1990s. Its main weakness, that errors compound because the learner visits states the expert did not, was analysed by Ross, Gordon and Bagnell (2011). Their DAgger algorithm fixes it by collecting data from states the learner reaches, labelled by the expert. Action chunking is a separate idea, borrowed by Zhao et al. from the psychology concept of grouping actions into one unit: predicting a block of actions reduces the effective horizon of the task by a factor of kk, rather than fixing distribution shift.

The approach became prominent in robot manipulation around 2023, when Zhao et al. showed that a transformer policy trained to output chunks could learn fine bimanual manipulation on low-cost hardware. π0\pi_0 (Black et al., 2024), a vision-language-action model, uses chunks of 50 actions with a flow-matching output and reports the inference schedule described above.

Check yourself

QuestionIn one sentence, what does a chunk policy output at each call, and what does the robot do with it?Show answer

It outputs a block of HH future actions conditioned on the current observation. The robot executes some or all of them open-loop, then calls the policy again with a new observation.

QuestionA policy has chunk length H=40H = 40 and a control rate of 20 Hz. It executes 20 actions per call. How long is one chunk of motion, and how often does the policy run?Show answer

One chunk covers 40/20=240 / 20 = 2 seconds of motion. Each call executes 20 actions, which is 20/20=120 / 20 = 1 second, so the policy runs once per second.

QuestionTwo demonstrations go around an obstacle, one on each side, equally often. Why does a squared-error regression policy fail here?Show answer

Its best prediction under squared error is the conditional mean of the two modes. For opposite choices with equal weight, that mean is the straight path through the obstacle, which neither demonstration took. A sampling model, such as a CVAE or flow-matching output, keeps one mode and produces a consistent plan around the obstacle.

QuestionWhat is temporal ensembling, and why did ACT and π0\pi_0 make different choices about it?Show answer

It queries the policy more often than once per chunk and averages the overlapping predictions made for the same time step. ACT uses it, with exponential weights, to avoid jerky switching between chunks. π0\pi_0 reports that it tried temporal ensembling early on and found it hurt performance, so it executes chunks open-loop. Consecutive calls see different observations and can disagree, so the average can fall between plans, which is one plausible reason it can hurt a policy whose chunks are multimodal.

QuestionGive one reason a larger chunk length can hurt even when the policy is accurate.Show answer

A longer open-loop chunk commits the robot to a plan built from an older observation, so it cannot react to changes during the chunk, such as an object slipping or moving. The later actions in the chunk depend on a state that may no longer hold.

Sources