Skip to main content
Open In Colab A vision-language-action (VLA) model is a robot policy πθ(a∣o,ℓ)\pi_\theta(a \mid o, \ell). It reads a camera observation oo and an instruction ℓ\ell in natural language, and it outputs the next action aa: an end-effector move, a gripper command, or a short sequence of both. Three parts make up most VLAs. A vision encoder, often a vision transformer pretrained on image-text pairs, turns the image into patch features. A language model reads the instruction together with those features. An action head turns the joint representation into motor commands. Large VLAs are built in stages. A vision-language backbone is pretrained on web-scale image-text data, which gives it broad visual and semantic knowledge. The backbone and an action head are then trained by behavioral cloning on robot demonstrations, such as Open X-Embodiment or BridgeData V2 (Brohan et al., 2023). The central difficulty is grounding: the policy has to tie the words of the instruction (“the red cup”) to the right image regions and then to the right motion (Paul et al., 2018; Walsman et al., 2018). More and more systems add a last stage, reinforcement learning (RL) against a task reward. This section builds each of those stages at a scale that trains in minutes. You train a small VLA on demonstrations, watch where behavioral cloning fails, fix one failure with DAgger, and then improve the policy beyond its demonstrations with PPO. The task, the model and the training code stay the same through the rest of the chapter.

The ClawGrab task

ClawGrab is a claw machine seen through its glass front. Three colored squares rest on the floor of the bin. A claw hangs on a cable from a gantry and starts above the chute in the left corner. The instruction names one square (“grab the red square”, “get the blue one”, “pick up the green block”), and the episode pays a reward of 1 only when that square drops into the chute. Everything else pays 0. Each step the policy chooses three things: a horizontal move Δx\Delta x, a vertical move Δz\Delta z, both at most 0.05 in a machine that is 1 wide and 1 tall, and whether the claw is open or closed. Closing the claw over a square catches it with a probability that depends on how well the claw is centered: P(catch)=exp⁡ ⁣(−(o/0.03)2),P(\text{catch}) = \exp\!\big(-(o / 0.03)^2\big), where oo is the horizontal offset between the claw and the center of the square. A caught square can also slip out on any step it is carried, with probability 0.002+0.01 (o/0.02)20.002 + 0.01\,(o/0.02)^2, so an off-center catch is both less likely and less secure. Opening the claw releases the held square. The squares are rigid boxes in a physics simulation (Newton), so a released square falls under gravity and lands on the floor or on another square, from which it can slide off. A square released over the chute is delivered and ends the episode. Many machines run at once as parallel worlds on the GPU, and the camera image is drawn from the simulated poses. An episode has 60 steps of 0.1 s each. A clean grab and delivery takes about 50, so one miss or one slip usually costs the episode, and a well-centered grasp pays off. The demonstrations come from a scripted operator. Like a person at a real machine, it judges the alignment by eye: before each descent it aims to the right of the square’s center by a random amount up to 0.04, and it stops correcting once it is above its aim point. When a catch fails it opens, rises and tries again, and when a square slips it goes back for it.
The figure shows one delivered operator episode, titled with its instruction: the approach, the descent, the catch of the named square, the carry and the drop into the chute.
Six frames of one operator episode, titled with its instruction, grab the red square. The claw moves right, descends, catches the red square, carries it up and to the left, and drops it over the chute in the lower left corner.

MiniVLA

MiniVLA has the parts of a large VLA at a size that trains on one GPU in a few minutes. Three stride-2 convolutions turn the 64 x 64 image into an 8 x 8 grid of patch features. Two extra input channels hold the xx and zz coordinate of every pixel, so that position is easy to read. A transformer then reads a summary token, the 64 patch tokens and the instruction’s word tokens, and its output at the summary token is a vector hh that describes the observation and the instruction together. The action head follows RT-1 and OpenVLA. Each motion axis is split into 21 bins, the grip is a binary token, and the head emits the three tokens one after the other, each conditioned on the ones before it: log⁡πθ(z1:3∣o,ℓ)=∑j=13log⁡pθ(zj∣h,z<j).\log \pi_\theta(z_{1:3} \mid o, \ell) = \sum_{j=1}^{3} \log p_\theta(z_j \mid h, z_{<j}). The same sum of token log-probabilities is what PPO uses later, in the same way RL methods for OpenVLA use the log-probabilities of its action tokens. The instruction also modulates the image features before the transformer sees them, through feature-wise linear modulation (FiLM) (Perez et al., 2017), as in RT-1. After each convolution the feature map xx is rescaled channel by channel, x←(1+γ(ℓ)) x+β(ℓ)x \leftarrow (1 + \gamma(\ell))\,x + \beta(\ell), where γ\gamma and β\beta are linear functions of the mean word embedding. The color word can then decide which features the image encoder emphasizes.

Behavioral cloning

Behavioral cloning (BC) treats the demonstrations as labeled data: given the observation and the instruction, predict the operator’s action tokens. You minimize the cross-entropy L(θ)=− E(o,ℓ,z)∼D[log⁡πθ(z∣o,ℓ)]\mathcal L(\theta) = -\,\mathbb E_{(o,\ell,z) \sim \mathcal D}\big[\log \pi_\theta(z \mid o, \ell)\big] over the dataset D\mathcal D of operator steps, which is the BC objective from Behavioral cloning with a token head. The motion targets are smoothed: 10% of the target probability is spread evenly over the bins, which keeps some probability on neighboring moves for RL to explore later. The grip target is not smoothed, because a sampled grip error opens the claw in the middle of a carry and drops the square. Only the operator’s successful episodes go into D\mathcal D, as is common with real demonstrations. You train the same model twice, with and without FiLM.
The operator delivered 70% of its episodes, and its 66,823 successful steps form D\mathcal D. Without FiLM, BC delivers only 16%: the transformer can attend from the word tokens to the image, but in practice the policy learns to go to a square, often the wrong one. With FiLM it delivers 74%, close to the operator it copies. RT-1 grounds language the same way, by conditioning the image features on the instruction.

Covariate shift

BC learns from the states the operator visited. When the policy makes an error, or starts somewhere the operator never started, it reaches states that the dataset covers poorly. Its errors there are larger, which takes it further from the data. This compounding is called covariate shift (Ross et al., 2010). Every demonstration starts with the claw above the chute. A real machine starts wherever the previous player left the claw, so the test below starts the claw at a random position above the squares. The operator is unaffected, because it reacts to where the claw is: it delivers 83% from random starts. The cloned policy has seen few images with the claw in those places.
Four claw machines with the claw starting at random positions. Black lines trace the claw path of the cloned policy, dotted while the claw is empty and solid while it holds a square. A cross marks the start, and each panel title says whether the episode delivered a square. From the usual start BC delivers 74%. From a random start it delivers 4%. The paths show what goes wrong: from a position the demonstrations never showed, the policy often fails to move toward the named square at all.

DAgger

Dataset aggregation (DAgger) (Ross et al., 2010) collects data in the states that the policy itself visits. Each round runs the current policy from random starts and asks the operator what it would have done in every state the policy reached. Those labeled states join the dataset, and a new policy is trained on the whole aggregate. The training data then covers the states that the policy’s own behavior leads to.
Top: delivery rate of the cloned policy and of three DAgger rounds, from the usual start above the chute and from a random start, with a dashed line for the operator from a random start. Bottom: claw paths of the final DAgger policy on four machines with random starts, drawn as in the previous figure. After three rounds DAgger delivers 47% from random starts, up from 4% for BC, with 148,237 labeled steps in the dataset. Most of the gain came in the first round. Delivery from the usual start fell at the same time, from 74% to 61%. This run does not show why. One possibility is that the aggregated dataset now holds many states from the policy’s failed episodes and fewer clean operator runs, so the model fits the clean runs less closely. The operator’s labels are the other price: someone has to say what the right action is in every state the policy visits.

Improving on the demonstrations with RL

DAgger fixes states the operator never showed, but it cannot make the policy better than the operator: the labels still aim off center. To improve on the operator you need a training signal that measures the outcome itself. That signal is the reward. RL fine-tuning maximizes the expected discounted return J(θ)=Eπθ[∑t=0Tγtrt]J(\theta) = \mathbb E_{\pi_\theta}\Big[\sum_{t=0}^{T} \gamma^t r_t\Big] starting from the BC policy. RL post-training of VLAs follows this recipe. Imitation gives a policy that already succeeds part of the time, and RL raises how often. The update is PPO (Schulman et al., 2017) with the clipped surrogate objective, where the probability ratio πθ(z∣o,ℓ)/πθold(z∣o,ℓ)\pi_\theta(z \mid o, \ell) / \pi_{\theta_{old}}(z \mid o, \ell) is computed from the sum of the three token log-probabilities. Four details make it work on a BC policy. The discount has to reach across the task. With γ\gamma, a reward kk steps ahead is weighted by γk\gamma^k, so the policy effectively looks about 1/(1−γ)1/(1 - \gamma) steps ahead. The delivery reward arrives roughly 50 steps after the start. With γ=0.9\gamma = 0.9 it is weighted by 0.950≈0.0050.9^{50} \approx 0.005, the steps of the approach receive almost no signal, and PPO turns them into noise until delivery collapses. With γ=0.99\gamma = 0.99 the weight is 0.9950≈0.610.99^{50} \approx 0.61. Rollouts sample the policy at temperature 0.5, from πθ∝exp⁡(logits/0.5)\pi_\theta \propto \exp(\text{logits}/0.5), and the ratio uses the same temperature. The cloned distribution is wide, because the operator chose a new aim point for every attempt; sampled at temperature 1 the BC policy jitters, closes the claw too early and delivers only a few percent of the time, so RL would start with almost no successes to learn from. The critic reads hh with its gradient stopped, so fitting the value function cannot reshape the features that the pretrained policy relies on, and during the first five iterations only the critic learns. Finally, the epochs of an iteration stop early once the approximate KL divergence from the rollout policy exceeds 0.01.
Left: greedy delivery on new machines and sampled delivery during rollouts over 100 PPO iterations, with a dashed line for the operator and a dotted line for the centered operator. Right: histograms of the catch offset, claw x minus square x, for the operator, the cloned policy and the policy after PPO. The PPO histogram sits closer to zero.

What each method fixed

BC copied the operator, including its habit of aiming right of center, and delivered 74%. PPO, starting from that policy and trained only on the delivery reward, raised greedy delivery to 80%. The curve is not monotone: delivery dipped between iterations 20 and 50, while the critic and the policy adjusted to each other, was back at the BC level by iteration 60, and rose above it in the last 40 iterations. The catch offset histogram shows how. The operator caught squares at a mean offset of +0.015 and BC copied it at +0.016. After PPO the mean offset is +0.003, and the policy misses 0.33 catches per episode instead of 1.01. Nothing in the reward mentions centering. The policy found that centered grabs are delivered more often before the deadline. The same controller aimed at the center delivers 93%, so PPO recovered part of the gap between the operator and a centered operator, but not all of it. DAgger and RL fixed different things. DAgger extended the policy to states the demonstrations did not cover, and it needed an expert to label them. RL improved the policy in states it already handled, beyond the quality of the demonstrations, and it needed only a reward. RL post-training of large VLAs follows the same order as this section: clone first, so that the policy succeeds often enough for the reward to say something, then optimize the reward. The task itself is simple: one gantry, three squares, and grasp physics reduced to two probabilities. The deadline, the stochastic grasp and the gap between the operator and a centered controller were chosen so that BC and RL behave differently. A real claw, a learned grasp model or a long-horizon task would change the numbers. The next sections keep the claw machine and change one part at a time: the action representation, the action head, and the RL algorithm. microvla is a single-file RT-2 style VLA on a related 2D reaching task, and a good place to read a minimal implementation. TorchRL’s VLA module (torchrl.modules.vla) has a reference token policy and a GRPO objective for RL fine-tuning of action tokens.

References

  • Brohan, A., Brown, N., Carbajal, J., Chebotar, Y., Chen, X., et al. (2023). RT-2: Vision-language-action models transfer web knowledge to robotic control. arXiv [cs.RO]. Link
  • Paul, R., Barbu, A., Felshin, S., Katz, B., Roy, N. (2018). Temporal Grounding Graphs for Language Understanding with Accrued Visual-Linguistic Context. arXiv [cs.RO]. Link
  • Perez, E., Strub, F., Vries, H., Dumoulin, V., Courville, A. (2017). FiLM: Visual Reasoning with a General Conditioning Layer. arXiv [cs.CV]. Link
  • Ross, S., Gordon, G., Andrew Bagnell, J. (2010). A Reduction of Imitation Learning and Structured Prediction to No-Regret Online Learning. arXiv [cs.LG]. Link
  • Schulman, J., Wolski, F., Dhariwal, P., Radford, A., Klimov, O. (2017). Proximal Policy Optimization Algorithms. arXiv [cs.LG]. Link
  • Walsman, A., Bisk, Y., Gabriel, S., Misra, D., Artzi, Y., et al. (2018). Early Fusion for Goal Directed Robotic Vision. arXiv [cs.CV]. Link

Found an error on this page? Report an issue.