TL;DR
Robots need many skills, and labelling demonstrations for each one is slow. Lynch and colleagues show that a robot can learn a large set of skills from unlabelled "play": long, unscripted teleoperation logs in which a person explores freely. Their method, Play-LMP, compresses short windows of play into a latent "plan" and trains one policy that reaches any goal image it is given. One such policy beat 18 policies, each trained on expert demonstrations for its own task.
Where you'll see it: learning general-purpose robot skills from cheap, unlabelled teleoperation data, and the template of "encode a behaviour as a latent variable, then decode it under a goal" that later robot-learning work reused.
The problem
Suppose you want a robot that can open a drawer, push a button, close a door and pick up a block. The usual recipe collects expert demonstrations for each task, segments them, labels them, and trains one Behavior Cloning policy per task. Each new skill costs a new batch of demonstrations. Each variation costs more: opening a drawer from the top is a different demonstration from opening it from the side.
Reinforcement learning avoids demonstrations but needs a reward function per task, and designing rewards for raw camera input is hard. Exploration is hard too, so people often add scripted primitives to get any reward at all.
The authors frame the goal differently. Instead of a list of tasks, the agent should be able to reach any reachable goal from any current state. A task is then a pair (current state, goal state), and the continuum of tasks is covered by one goal-conditioned policy. Writing the policy as , the question becomes: what data lets you learn it well?
Ideal data covers the whole space of (current state, goal state) pairs densely. Random exploration covers it cheaply but too thinly to learn fine manipulation. Expert demonstrations are rich but narrow: they visit only the states a skilled operator visits. A policy trained on them drifts into states it never saw during training, a failure known as Covariate Shift.
Two more facts make the problem hard. First, the same start and goal can be connected by many valid behaviours. A ball next to a cup can end up in the cup by being placed, tossed or bounced. A plain regressor trained to output one action averages these options and produces an action that is valid for none of them. The paper calls this the multimodality problem. Second, the data must be cheap, or the approach does not scale.
Key idea
The paper's answer has two parts.
Play is cheap and dense. A human teleoperator who plays with a robot is not acting randomly. They pick a goal they find interesting, such as "block in the drawer", and act to reach it. Play needs no task segmentation, no labels and no resets. The authors measure that, for the same collection time, play covers about 4.2 times more of the interaction space than 18 tasks' worth of expert demonstrations, and about 14.4 times more than random exploration.
Any window of play is a labelled example. Take a random stretch of play, from time to time . The observation at the start is a valid current state. The observation at the end is a goal that is guaranteed to be reachable, because the robot actually reached it. The recorded actions are a valid answer to "how do I get there?" So every window labels itself. This is the self-supervised step, and it is what makes play usable without human labels.
The multimodality problem then suggests a second move. If the policy were told which high-level plan to follow, it would not need to infer the plan itself. The plan is a choice among several behaviours, so it can live in a latent variable . Learn a space of plans, sample one that connects the current and goal states, and let the policy execute it. The policy becomes unimodal: given , there is one clear action to take at each step.
flowchart LR W["play window tau"] --> V["plan recognition encoder"] V --> Z["latent plan z"] CS["current state"] --> P["plan proposal encoder"] SG["goal state"] --> P P -. "KL term pulls together" .-> Z Z --> PI["policy"] CS --> PI SG --> PI PI --> A["actions"]
During training, the recognition encoder sees the whole window and proposes the plan. The proposal encoder sees only the start and goal and learns to predict the same plan. At test time only the proposal encoder and the policy are used.
The method
Play-GCBC: the baseline without plans
The simpler method, Play-GCBC, is goal-conditioned Behavior Cloning on play. Each training example is a random window of length . The final observation in the window becomes the goal. A recurrent policy reads the current state and goal at each step and predicts a distribution over the next action. Encoders for the camera image and the robot's joint state are trained jointly with the policy. The loss is the average negative log-likelihood of the recorded actions:
Here is the window's start, is the encoded state at step , is the encoded goal and is the logged action. Play-GCBC is a clean baseline, but it has the multimodality problem: the policy must represent every valid behaviour that joins the start and goal, and it has to do so implicitly.
Play-LMP: a conditional VAE over plans
Play-LMP makes the plan explicit. It is a sequence-to-sequence conditional variational autoencoder (CVAE), trained on random play windows. Three networks are trained together.
- Plan recognition. A bidirectional sequence encoder reads the whole window and outputs the mean and spread of a Gaussian in latent space: . This is the learned posterior . It sees the full behaviour, so it can tell which plan was actually executed.
- Plan proposal. A feedforward encoder reads only the start and goal states and outputs . This is the learned conditional prior . It has to cover every plan that could connect the two states, not just the one that was executed.
- Plan-conditioned policy. A recurrent policy reads the current state, the goal and a sampled plan , and predicts the next action.
Both posterior and prior are diagonal Gaussians, . The training loss has two terms. The first is the action reconstruction loss:
The second is a Kullback–Leibler Divergence that pulls the proposal toward the recognition encoder:
The total objective is
The weight balances the two. The authors found that was enough to avoid posterior collapse, a common failure in which the model learns to ignore because the policy is strong enough to predict actions without it. Gradients flow through the policy, the sampling step and both encoders, so the whole stack is trained end to end.
The sampling step is the reparameterization trick: with . It moves the randomness into , so gradients can flow through and .
Take a single latent dimension. The recognition encoder says , . The proposal encoder says , . For one-dimensional Gaussians the KL divergence has a closed form:
- Ratio of spreads: .
- Numerator of the second term: .
- Denominator of the second term: , so the term is .
- Sum: .
The proposal and recognition disagree by about 0.44 nats. Training pushes that number down, so the proposal moves toward the recognition distribution.
Suppose the recognition encoder outputs and for one plan dimension. Draw from a standard normal. Then
- Scale the noise by the spread: .
- Shift by the mean: .
So . A different draw of gives a different plan near 0.5. Because is a deterministic function of , and , the loss can be differentiated with respect to the encoder's outputs.
Using the plan at test time
At test time is discarded. The agent is given a current observation and a goal observation , usually a picture of the desired outcome. Both are encoded, concatenated, and passed to the proposal encoder. That gives a distribution over plans that should connect them. The agent samples one plan, then runs the policy in closed loop at 30 Hz. Every steps it samples a new plan from the current state and goal. Replanning matches the window length used in training.
An episode lasts 320 control steps at 30 Hz, which is about 10.7 seconds.
- Replan every steps.
- Number of plans in the episode: .
- Replanning rate: Hz, which the paper rounds to about 1 Hz.
Each plan is held for about one second of motion. If the robot knocks something over, the next replan can choose a plan that starts from the new situation. This is the mechanism behind the retrying behaviour reported below.
Results
The experiments use a simulated playground: an 8-degree-of-freedom arm and gripper in front of a desk with a sliding door, a drawer, a block and three light buttons. The authors define 18 test tasks and collect 100 expert demonstrations per task, about 90 minutes of task data in total, for the baseline. The play data is unscripted and much larger: several hours of teleoperation in the same room (up to about 7 hours in total), with a data ablation that uses as little as 30 minutes of it.
Two experiment families are run. In state experiments the policy receives the true positions and orientations of all objects. In pixel experiments it receives a camera image and learns its own visual features, so Representation Learning is part of the problem. Success is measured on the 18 tasks.
In the state experiments, the averaged results are:
- One Play-LMP policy, trained on unlabelled play and given no task labels, succeeds on 85.5 percent of the 18 test tasks with no fine-tuning.
- The 18 separate behaviour-cloning policies, each trained on its own expert demonstrations, average 70.3 percent.
- Play-LMP trained on only 30 minutes of play still reaches 71.8 percent, above the 18 expert policies.
The authors note that the 30-minute comparison is fair: the baseline gets three times as much data (90 minutes), and that data is curated expert behaviour, while play carries no guarantee that it contains any optimal task demonstration. In the pixel experiments, Play-LMP (69.4 percent) also beats Play-GCBC (58.7 percent) and the per-task expert baseline (66.5 percent). Per-task gains over Play-GCBC and the expert-trained policies reach up to 50 percentage points in the state experiments. Play-LMP beats Play-GCBC on the same play data, which supports the claim that separating plan inference from plan execution helps.
Three further findings matter for the argument:
- Robustness. When the starting position of the end effector is perturbed by up to 0.4 metres, policies trained on play degrade more slowly than policies trained only on demonstrations. The authors attribute this to play's wider coverage of states, which limits compounding drift.
- Unsupervised task structure. The latent space learned by Play-LMP is organised by function even though it never saw task labels. Some regions of the space correspond to drawer manipulation and others to button presses.
- Emergent retrying. Play-trained policies sometimes fail, reset their plan through replanning, and try again. One example is a sliding-door task that succeeds on the third attempt. Demonstration-only policies did not show this.
Why it mattered
The paper changed how people thought about robot data. Expert demonstrations were the standard fuel for skill learning, and the paper showed that unlabelled, self-directed play could train a more general policy. It also showed that a conditional latent variable is a clean way to handle the multimodal behaviours that a single policy otherwise averages.
The "any window labels itself" idea is closely related to Hindsight Experience Replay, which relabels failed attempts with the goal they actually reached. Both use the fact that a trajectory is always a valid example of reaching its own endpoint. Play-LMP applies it to offline logs rather than to online rollouts.
The paper is also honest about its limits. A goal is one state, so it cannot express "open the drawer slowly". The generalization tested is within one room, and the authors list moving to a new room as future work. The method assumes play is balanced across objects, which lifelong learning may not satisfy. And the latent plans are unimodal Gaussians, which the authors flag as a possible bottleneck. Later latent-variable work on robot skills has taken up each of these points, but that is beyond this paper.
Reading guide
Read the paper in this order and pick up these prerequisites at the matching point.
- Introduction and Section 2 (related work). Needs Behavior Cloning for the demonstration baseline, Covariate Shift for why demonstrations fail under drift, and [[goal-conditioned-reinforcement-learning|goal-conditioned policies]] for the task formulation.
- Section 3 opening, "What is Play?". Needs only the idea of a conditional distribution, which the reader has from Behavior Cloning.
- Section 3.1, Play-GCBC. Needs Behavior Cloning and Recurrent Neural Network, since the policy is recurrent.
- Section 3.2, Play-LMP. The core. Needs Variational Autoencoder for the encoder-decoder structure, Kullback–Leibler Divergence for the prior-matching loss, Reparameterization Trick for sampling , and Latent Variable Model for the idea of an unobserved plan. The conditional prior is the same device as in a sequence-to-sequence conditional model.
- Section 4, Experiments. Needs Representation Learning for the pixel setting. The results compare against alternatives to a single unimodal decoder, such as Mixture Density Network. Imitation Learning and Structured Prediction as No-Regret Online Learning explains the distribution-shift argument behind the robustness results.
- Appendix A.1, theory. Needs the evidence lower bound, Variational Lower Bound (ELBO), which the authors use to derive the CVAE objective.
Check yourself
QuestionRecall. In one sentence, what is the self-supervised label that a random play window provides?Show answer
The start of the window is the current state, the end of the window is a goal state that is known to be reachable, and the recorded actions are a valid sequence that reaches it. No human labelling is needed, because the robot's own trajectory is the answer.
QuestionComputation. Let the recognition encoder output mu = 0 and sigma = 1, and the proposal encoder output mu = 0 and sigma = 2, for one latent dimension. What is the KL term?Show answer
Use . Substituting: .
QuestionWhy. Play-GCBC trains one policy with no latent plan. Why does Play-LMP's latent plan help when many behaviours connect the same start and goal?Show answer
A single policy that must output one action per step, given only start and goal, has to average over all valid behaviours, and the average can be an action that works for none of them. Play-LMP samples a plan first. Conditioned on , the policy has only one behaviour to produce, so its prediction is unimodal. The planning difficulty moves into the choice of , which the proposal encoder learns from start and goal.
QuestionApplied. A training run uses beta = 1 and the model learns to ignore the latent plan, so every plan decodes to the same behaviour. What is the failure called, and what change does the paper suggest?Show answer
This is posterior collapse: the decoder is strong enough to predict actions without , and the KL term, weighted too heavily, pulls the recognition distribution onto the proposal until the plan carries no information. The paper reports that setting (a lower KL weight) avoided the problem.
Sources
- Lynch, C., Khansari, M., Xiao, T., Kumar, V., Tompson, J., Levine, S., Sermanet, P. (2019). Learning Latent Plans from Play. arXiv:1903.01973
- Kingma, D. P. and Welling, M. (2013). Auto-Encoding Variational Bayes. arXiv:1312.6114