Imitating a human, a chunk at a time
Behaviour cloning trains a policy to copy demonstrations: given what the robot sees, output what the human operator did next. Predicting one action per step works poorly for fine manipulation. Small errors compound, because each mistake puts the robot in states the demonstrations never visited, and human demonstrations pause and hesitate in ways a single-step policy cannot reproduce. The Action Chunking Transformer (ACT) of Zhao et al. predicts a whole sequence of future actions, a chunk, from one observation, which cuts the number of decisions per episode by the chunk length.
This page runs LeRobot's ACT checkpoint for the simulated ALOHA transfer-cube task: two 6-joint arms with grippers, 14 joint targets in all, must pick up a cube with the right arm and hand it to the left. The policy reads the top camera image and the 14 joint positions and returns 100 targets, which the simulator's position controllers follow at 50 per second. The checkpoint has 51.6 M parameters, 17.4 M of them in a training-only encoder.
From pixels to tokens
The Observation panel shows the input: the 480 × 640 camera frame, normalised with ImageNet's channel statistics, and the 14 joint readings. A ResNet-18 turns the image into feature maps at four scales; the page draws each layer's RMS over channels. Its last layer sees the image in 32-pixel cells, cells of 512 channels, and a 1 × 1 convolution makes each cell an image token, with a fixed two-dimensional sine–cosine position.
The joints become one more token through a linear layer, and a style variable (below) a third kind. The transformer therefore reads 302 tokens of width 512: four encoder layers, post-norm with a ReLU MLP of width 3,200, build the memory the decoder reads. The Encoder self-attention card shows what the and joint tokens gather from the image, layer by layer and head by head.
One query per future step
The decoder works like DETR's object queries: 100 queries, one per future step, start from zeros, carry a learned position embedding each, and cross-attend to the encoder's memory. The Decoder cross-attention card shows where action of the chunk looks in the image. Because the queries' inputs are all zero, the decoder's self-attention gives every query the same vector, so in this checkpoint the 100 actions differ only through their positions and what they read from the image. LeRobot builds one decoder layer, matching the original code, which built seven but used only the first.
A linear layer maps each of the 100 outputs to 14 numbers, and multiplying by the dataset's standard deviation and adding its mean gives joint angles in radians and gripper openings. The Action chunk panel draws the chunk as 100 steps × 14 joints, on the normalised scale, and one joint's trajectory below it.
A conditional VAE that collapsed
Human demonstrations of the same situation differ. To keep the policy from averaging different ways of doing the task into one that fits none, ACT is trained as a conditional variational autoencoder. In training a second transformer, the CVAE encoder, reads the joints and the human's next 100 actions and proposes a 32-dimensional ; the decoder must reproduce those actions from the image, the joints and . The loss adds an L1 reconstruction term to a KL term with weight that pulls towards the prior:
At run time there are no future actions, so , the prior's mean, and the token is just a bias. The Style variable z card checks what carries in this checkpoint by running the CVAE encoder on a demonstration from the training set: stays below 0.0031, is about 1 and the KL is at most , and decoding with instead of 0 changes the chunk by at most . The encoder has collapsed to the prior, a known failure of VAEs with powerful decoders: the decoder learned to do without , and the 17.4 M training-only parameters carry no style here.
Executing chunks
The Episode strip plays the episode with its reward stage: 1 when the right gripper touches the cube, 2 when it lifts it, 3 when the left gripper touches it too, 4 when the left gripper holds it off the table. This checkpoint plays each chunk to the end with no feedback, querying the model again every 100 steps. On seed 1001 it hands the cube over at step 236; on seed 1000 the right gripper touches the cube but never lifts it in 400 steps. Over seeds 1000 to 1019, 13 of 20 succeed here, every outcome the same as in the checkpoint's own evaluation, which reports 83 % over 500 seeds.
Zhao et al. also proposed temporal ensembling: query the policy at every step, so that each step is covered by up to overlapping chunks, and average their predictions for that step with weights that favour the oldest,
where is the -th oldest prediction for step . The Chunks over time card shows, for seed 1001, every step's query (recorded, not played) and what LeRobot's ensembler with would have sent, beside the chunks that were actually played.
Where it came from
ACT was introduced with ALOHA, a low-cost bimanual teleoperation rig, by Zhao et al. (2023), whose simulated transfer-cube task this checkpoint was trained on. It combines a CVAE (Kingma and Welling's variational autoencoder, conditioned on the observation) with a DETR-style transformer over ResNet features. Mobile ALOHA trained ACT, among other policies, on a mobile version of the robot. Chunking became standard: Diffusion Policy (the next tab) predicts chunks with a diffusion model, and the vision-language-action tabs predict chunks from a VLM.
Papers
- Learning Fine-Grained Bimanual Manipulation with Low-Cost Hardware Introduces ACT and ALOHA: action chunking with a CVAE transformer, temporal ensembling, and the simulated transfer-cube task.
- End-to-End Object Detection with Transformers DETR: a CNN backbone, a transformer encoder over its feature cells and learned decoder queries, the architecture ACT's policy follows.
- Auto-Encoding Variational Bayes The variational autoencoder and its reconstruction-plus-KL objective, which ACT conditions on the observation.
- Generating Sentences from a Continuous Space Describes the posterior collapse of VAEs with strong decoders, where the KL term drives the latent to carry nothing, as in this checkpoint.
- Deep Residual Learning for Image Recognition ResNet, whose 18-layer version is ACT's image backbone.
- Mobile ALOHA: Learning Bimanual Mobile Manipulation with Low-Cost Whole-Body Teleoperation ACT and other imitation policies on a mobile bimanual robot, co-trained with the static ALOHA data.