wikillm

Paper · 2023-01-31 · cs.AI

Learning Universal Policies via Text-Guided Video Generation

UniPi plans by text-conditioned video diffusion: from the observed image and a text goal it generates future frames, and an inverse-dynamics model reads actions off them, executed open-loop. Author-reported: 59.1% and 53.2% task completion on seen place and relation instructions in simulated manipulation, versus at most 19.4% and 12.8% for baselines.

Diffusion modelsClassifier-free guidanceImitation learningRobot simulation for learningplanningvideo-generationdiffusionrobot-manipulationimitation-learning

arXivPDFMarkdown10 min read

AI-compiled by claude-haiku-5-5 on 2026-10-18, not yet reviewed by a human. Every claim cites its source; check it when a detail matters.

In plain words

Most robot controllers pick the next motor command directly from what the robot sees. This paper does something different: it asks a video generator to imagine the next few seconds of the task, as a short clip that starts from the current camera image and follows a text instruction such as "put a red block right of a cyan block". A second, small model then looks at the imagined frames and works out which motor commands would produce them.

The appeal is that text and video are shared across very different robots and simulators, so one planner can be reused, and the imagined video can be inspected by a person before anything moves. The authors report that this helps the robot handle instructions it was not trained on, and that a video model pretrained on general internet clips can produce plausible plans for a real robot arm.

TL;DR

UniPi plans with a text-conditioned video diffusion model. It is trained to continue an observed first frame into a video of the task, and an inverse-dynamics model turns the generated frames into joint-space actions. The paper reports higher task completion than state-based diffusion and transformer behavior cloning on simulated manipulation, and, for a real robot, a benefit from pretraining on internet video. All numbers are author-reported.

Problem

Standard reinforcement learning formulates a task as a Markov decision process with a reward function and a dynamics model that depend on each environment's state and action space. The authors argue this makes knowledge hard to share across environments, because state spaces differ, rewards are hard to specify and transfer, and the dynamics are tied to one agent §2.1. Their alternative, the Unified Predictive Decision Process (UPDP), treats images as the shared observation space and text as the task specifier, and separates planning (a video generator) from action selection (an inverse-dynamics-style policy) §2.2. The method is motivated by the need to combinatorially generalize to new language goals and to train across many environments §1.

The paper assumes an offline setting: a dataset of observation-action sequences with a text description per episode, from which both the planner and the policy are estimated §2.2. Without video-and-text data, the approach does not apply.

Method

The method has two trained parts. The planner is a diffusion model that generates an image sequence conditioned on the first observed frame and the task text §3.1. The policy is a task-specific inverse-dynamics model that maps generated frames to actions §3.2.

Planner: conditional video synthesis. The planner is a text-to-video diffusion model adapted to start from a given image. Instead of fixing the first frame at test time, as Diffuser-style sampling does, the authors train the model with the first frame as explicit conditioning §3.1. Two other choices are part of the design:

  1. Tiling the observed frame across time. The observed image is repeated at every frame index and concatenated with each noisy frame at every denoising step, which keeps the environment consistent across the video §3.1 app. A.1.
  2. Coarse-to-fine temporal hierarchy. A coarse video is generated at sparse time steps, then a temporal super-resolution model fills in the frames §3.1 app. A.1.

The text is encoded with pretrained T5 features §3.1 app. A.1. Sampling uses classifier-free guidance, with the denoiser formula written inline in §2.3 (not numbered in the source).

Pseudocode
# Guided denoiser for one reverse-diffusion step  [§2.3]
# w sets the strength of text and first-frame conditioning
def guided_denoise(noisy_video, noise_level, text, first_frame):
    # Denoiser with text and first frame as conditioning  [§2.3]
    conditional = denoiser(noisy_video, noise_level, text, first_frame)
    # Denoiser with the conditioning dropped  [§2.3]
    unconditional = denoiser(noisy_video, noise_level)
    # Extrapolate away from the unconditional prediction  [§2.3]
    return (1 + w) * conditional - w * unconditional

Denoiser input with tiling. How the first frame enters the video U-Net, as described in the appendix:

Pseudocode
# Build the denoiser input from noisy frames and the observed frame  [app. A.1]
def denoiser_input(noisy_frames, first_frame):
    # Repeat the first observed frame at every future frame index  [app. A.1]
    tiled = repeat_over_time(first_frame, num_frames)
    # Concatenate channel-wise with each noisy frame  [app. A.1] [§3.1]
    return concat_channels(noisy_frames, tiled)

Policy: inverse dynamics and open-loop execution. An inverse-dynamics model is trained separately, on a smaller and possibly suboptimal dataset from a simulator, to regress the actions behind an observed image §3.2 app. A.2. At run time the planner produces H frames, the inverse-dynamics model predicts H actions, and the actions are executed in order without re-planning. The authors use this open-loop mode in all experiments for speed, though a closed-loop (model predictive control) mode is described §3.2.

Pseudocode
# Plan a video, infer actions, execute open-loop  [§3.2] [§3]
# Input: observed image and task text; Output: none (acts in the env)
def plan_and_act(observed_image, task_text):
    # Encode the text with pretrained T5 features  [§3.1] [app. A.1]
    text_features = t5_encode(task_text)
    # Generate H frames conditioned on the observed image  [§3.1]
    video_plan = sample_video(observed_image, text_features)
    # Infer one action per planned frame  [§3.2] [app. A.2]
    actions = [inverse_dynamics(frame) for frame in video_plan]
    # Execute the whole sequence open-loop, without re-planning  [§3.2]
    for action in actions:
        env_step(action)

Training of the video model (as stated). Two diffusion models are trained per setting: a first-frame-conditioned video model and a temporal super-resolution model. The architecture follows the video diffusion work of Ho et al. (2022) with temporal convolutions rather than temporal attention app. A.1.

Hyperparameters

Values are as stated in the paper or its appendix. Where the paper is silent, the table says so.

NameValueWhereNotes
Video U-Net blocks3 residual blocks per level, 512 base channelsapp. A.1from Ho et al. (2022) setup
Channel multiplier[1, 2, 4]app. A.1
Attention resolutions[6, 12, 24]app. A.1
Attention head dimension64app. A.1
Conditioning embedding dimension1024app. A.1
Noise schedulelog-SNR in [-20, 20]app. A.1
Frame conditioningfirst frame replicated and concatenated channel-wiseapp. A.1
Temporal mixingtemporal convolutions, not temporal attentionapp. A.1
Text encoderT5-XXL, 4.6B parametersapp. A.1
Training steps2Mapp. A.1
Batch size2048app. A.1
Learning rate1e-4app. A.1
Warmup10k linear stepsapp. A.1
Hardware256 TPU-v4 chipsapp. A.1for the first-frame and temporal SR models
Simulated video resolution, base model10 x 48 x 64, frame skip 8, 1.7B paramsapp. A.1the axis order is not defined in the paper
Simulated temporal SR20 x 48 x 64, frame skip 4, 1.7B paramsapp. A.1
Real-world SR models (finetuned)16x40x24 (1.7B), 32x40x24 (1.7B), 32x80x48 (1.4B), 32x320x192 (1.2B)app. A.1pretrained on the Imagen data; finetuned on Bridge
Real-world pretraining data14M video-text, 60M image-text, LAION-400M§4.3
Real-world finetuning dataBridge, 7.2k video-text pairs, 80/20 train/test§4.3task IDs used as text
Synthetic training videos (combinatorial)200k§4.170% of instructions seen in training, 30% held out
Synthetic training videos (multi-task)200k from a scripted oracle, 10 training tasks, 3 test tasks§4.2
Inverse-dynamics output7 controls (6 joints plus a discrete contact action in simulation)app. A.2 app. A.4the 7th is continuous in the model and thresholded at 0.5 in simulation
Inverse-dynamics architecture3x3 conv, 3 residual 3x3 conv layers, mean pooling, MLP (128, 7)app. A.2
Inverse-dynamics optimizerAdam, gradient-norm clip 1, lr 1e-4, 2M steps, 10k warmupapp. A.2
Inverse-dynamics lossmean squared errorapp. A.2
Inverse-dynamics data (combinatorial)action labels from 20k generated videosapp. A.4only a subset of videos had action annotations
Inverse-dynamics data (CLIPort)action labels across 200k generated videosapp. A.5
Simulator timeout per action2 sapp. A.4for physically infeasible actions
Classifier-free guidance weight wnot stated§2.3
Sampler and step countnot stated§2.3ancestral or numerical integration both cited
Noise schedule for alpha, sigmanot stated§2.3"predefined schedules"
Conditioning dropout ratenot stated§2.3needed for classifier-free guidance training
Horizon H used in each experimentnot stated§2.2 §3.2only the frame counts in app. A.1
Baseline transformer10M model of Lee et al. (2022); 4 attention layers, 8 heads, hidden 512; context length 4; frame skip 4app. A.3context 8 tried, no gain
Trajectory Transformer baselinepredicts next 8 controls (frame skip 4)app. A.3
Diffuser baselinestate-based diffusion, same U-Net, actions tiled across pixel locationsapp. A.3
Baseline traininglearning rate, warmup, gradient clip as the inverse-dynamics modelapp. A.3

Results

Author-reported. All results are task completion accuracy in the authors' simulated or real environments, with the ± values as printed in the source tables (the paper does not define them).

Combinatorial generalization (simulated robot, 70/30 split of instructions; Place = "put X in Y", Relation = "put X left of Y") tab. 1 §4.1:

ModelSeen PlaceSeen RelationNovel PlaceNovel RelationSource
State + Transformer BC19.4 ± 3.78.2 ± 2.011.9 ± 4.93.7 ± 2.1tab. 1
Image + Transformer BC9.4 ± 2.211.9 ± 1.89.7 ± 4.57.3 ± 2.6tab. 1
Image + TT17.4 ± 2.912.8 ± 1.813.2 ± 4.19.1 ± 2.5tab. 1
Diffuser (state-based)9.0 ± 1.211.2 ± 1.012.5 ± 2.49.6 ± 1.7tab. 1
UniPi59.1 ± 2.553.2 ± 2.060.1 ± 3.946.1 ± 3.0tab. 1

Ablation on seen Place and Relation tasks tab. 2 §4.1:

Frame conditionFrame consistency (tiling)Temporal hierarchySeen PlaceSeen Relation
NoNoNo13.2 ± 3.212.4 ± 2.4
YesNoNo52.4 ± 2.934.7 ± 2.6
YesYesNo53.2 ± 3.039.4 ± 2.8
YesYesYes59.1 ± 2.553.2 ± 2.0

Multi-environment transfer (10 training tasks, 3 unseen test tasks, CLIPort-style suite) tab. 3 §4.2:

ModelPlace BowlPack ObjectPack PairSource
State + Transformer BC9.8 ± 2.621.7 ± 3.51.3 ± 0.9tab. 3
Image + Transformer BC5.3 ± 1.95.7 ± 2.17.8 ± 2.6tab. 3
Image + TT4.9 ± 2.119.8 ± 0.42.3 ± 1.6tab. 3
Diffuser (state-based)14.8 ± 2.915.9 ± 2.710.5 ± 2.4tab. 3
UniPi51.6 ± 3.675.5 ± 3.145.7 ± 3.7tab. 3

Real-world video generation (Bridge data, 24x40 model, 32 samples for FID/FVD, success from a separately trained success classifier on the last frame) tab. 4 §4.3:

ModelCLIP score ↑FID ↓FVD ↓Success ↑Source
No pretraining24.43 ± 0.0417.75 ± 0.56288.02 ± 10.4572.6%tab. 4
Pretraining on internet data24.54 ± 0.0314.54 ± 0.57264.66 ± 13.6477.1%tab. 4

The paper reports generalization to novel task commands that are absent from the Bridge data and some robustness to background edits, shown only as figures §4.3.

Paper vs code

No official code.

Searched, in order: the paper's linked project page (universal-policy.github.io, which returned no content on two fetches); GitHub repository search for unipi, universal policies video and universal-policy; a search for unipi restricted to the first author's account and to google-deepmind; and the first page of the first author's public repositories (truncated, no UniPi-like name). No repository belonging to the authors was found.

Pitfalls

  • First-frame conditioning is trained, not applied at test time only. The paper says test-time clamping of the first frame performed poorly and trains the model with the first frame as context instead §3.1. Re-implementations that only clamp the first frame deviate from the reported method.
  • Frame-count notation is undefined. "10x48x64" and "20x48x64" with "frame skip 8" and "frame skip 4" are given in app. A.1, but the paper does not state the axis order or the exact subsampling rule. Read them as (frames, height, width) only after confirming with the authors.
  • Inverse-dynamics input is ambiguous. app. A.2 describes the model as predicting controls "from an image observation", while §3.2 applies it to a generated video of H frames, and the baseline text uses "context length 4 and skip every 4 frames similar to the inverse dynamics". Whether the model takes a single frame or a short frame stack is not stated explicitly.
  • Unconditional branch of guidance. The guidance formula in §2.3 writes the unconditional denoiser as s(τ_k, k), dropping the text. Whether the first frame is also dropped in that branch is not stated.
  • Guidance and sampling hyperparameters are missing. The guidance weight ω, the sampler, step count, noise schedule and conditioning dropout rate are not stated in the paper or appendix. Any reimplementation has to choose them.
  • Open-loop execution. All experiments run open-loop §3.2, so errors in the generated plan are not corrected during execution. The paper does not report closed-loop results.
  • Reported differences from prior baselines. The authors predict continuous joint actions for their baselines, unlike the pick-and-place primitives of the PDSketch environment §4.1. Numbers are not directly comparable with prior work on that benchmark.
  • Text and figures disagree on the real-world metrics. §4.3 says pretraining gives "significantly higher FID and FVD", but tab. 4 marks FID and FVD as lower-is-better and the pretrained row has the lower values. Read the table.
  • ± values are undefined. The tables print ± for every result, but the paper does not say whether these are standard deviations over seeds, episodes or instructions, nor how many trials were run.
  • Success classifier for real-world results. The 72.6% and 77.1% success rates depend on a classifier the authors trained on the last generated frame §4.3. The classifier's own accuracy is not reported.
  • Compute. Training used 256 TPU-v4 chips for the first-frame and temporal super-resolution models app. A.1. The paper says the diffusion process "can take a minute to generate highly photorealistic videos" and that distilling it into a faster sampler gave a 16x speed-up in initial experiments, which is not part of the reported method §5.
  • Partially observable settings are not covered. The authors note that video models may hallucinate objects or motion in partially observable environments §5.

Lineage

  • Builds on: video diffusion models of Ho et al. (2022), including the video U-Net and temporal super-resolution setup app. A.1; classifier-free guidance of Ho and Salimans (2022) §2.3; the T5 text encoder §3.1 app. A.1.
  • Compared against: Diffuser, a state-based diffusion planner of Janner et al. (2022) §4.1; transformer behavior cloning of Lee et al. (2022) and Brohan et al. (2022) app. A.3; Trajectory Transformer of Janner et al. (2021) app. A.3; CLIPort §4.2; PDSketch of Mao et al. (2022) §4.1.
  • Superseded by: not known from the content of this wiki.

Source and license

Adapted from “Learning Universal Policies via Text-Guided Video Generation” by Yilun Du, Mengjiao Yang, Bo Dai, Hanjun Dai, Ofir Nachum, Joshua B. Tenenbaum, Dale Schuurmans, Pieter Abbeel (arXiv:2302.00111), used under CC BY 4.0. Changes: condensed and restructured for implementation, with tables, equations and algorithms taken from the paper and its code, each cited to its source. Not affiliated with or endorsed by the authors.