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.
Code
Code
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 , a vertical move , 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: where 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 , 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.Code
Code
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 and 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 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: 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 is rescaled channel by channel, , where and are linear functions of the mean word embedding. The color word can then decide which features the image encoder emphasizes.Code
Code
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 over the dataset 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 , as is common with real demonstrations. You train the same model twice, with and without FiLM.Code
Code
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.Code
Code
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.Code
Code
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 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 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 , a reward steps ahead is weighted by , so the policy effectively looks about steps ahead. The delivery reward arrives roughly 50 steps after the start. With it is weighted by , the steps of the approach receive almost no signal, and PPO turns them into noise until delivery collapses. With the weight is . Rollouts sample the policy at temperature 0.5, from , 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 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.Code
Code
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.

