Vision Pretraining for Efficient Online Reinforcement Learning

Kuo-Han Hung* Perry Dong* Dorsa Sadigh Chelsea Finn
Stanford University
*Equal contribution
VRP overview: an offline critic and actor share a visual encoder trained with TD and action-contrastive losses; the encoder and first critic layer transfer to online RL, where VRP reaches higher success faster than IL or random initialization.
Overview of VRP. Left: VRP pretrains the representation with a TD objective and an action-contrastive objective, then transfers the visual encoder and the first critic layer to online RL. Right: success rate during online RL with EXPO initialized with VRP, imitation-learned, or random representations, averaged over 15 RLBench and 3 robomimic tasks.
2.08×
fewer environment steps than a randomly initialized encoder to reach the same success rate (EXPO)
81.0% → 91.7%
average success across 18 tasks with off-policy EXPO, vs. random init

Abstract

Can we pretrain visual representations that are better suited to RL fine-tuning?

Visual representations play a central role in the sample efficiency of vision-based online reinforcement learning (RL), yet current methods mostly initialize the encoder from general-purpose vision models or from imitation learning. We find that these pretrained representations often fail to help online RL, performing similarly to or worse than a randomly initialized encoder.

We present Value Representation Pretraining (VRP), a visual representation pretraining method for online RL. VRP combines TD learning with an action-contrastive loss to learn representations that capture task progress and how each action changes the expected future return, information the critic needs during fine-tuning. With the off-policy algorithm EXPO, VRP improves sample efficiency over a randomly initialized encoder by 2.08× across 3 robomimic and 15 RLBench tasks, whereas encoders pretrained with non-RL methods like imitation learning, time-contrastive learning, or DINOv2 provide little to no improvement. With the on-policy algorithm PPO, VRP also achieves the highest average success rate on robomimic, raising it from 86.4% to 96.8% over random initialization.

Our Method

Offline value learning transfers through its representation, not its Q-values.

Pretrained Q-values grow stale as the policy improves, but features that track task progress and rank actions stay useful. VRP pretrains a soft actor-critic offline on the same small set of successful demonstrations used for fine-tuning, and adds a loss that forces the critic to look at the scene.

Results

Every method uses the same online RL algorithm and differs only in how the encoder is initialized.

robomimic

Online RL learning curves on robomimic Square, Can and Lift with ViT-2M and ViT-20M encoders. VRP is above IL, offline EXPO, TCN, DINOv2 and random init on average.
Online RL with EXPO on robomimic (ViT-2M and ViT-20M). Mean over 3 seeds; shaded regions show standard error. VRP outperforms all baselines, including offline EXPO (offline RL alone), and keeps its lead with the larger encoder.

RLBench

Online RL learning curves on 15 RLBench tasks plus their average. VRP leads most clearly on Push buttons, Open drawer and Insert USB in computer.
Online RL with EXPO on RLBench (ViT-2M). Mean over 3 seeds; shaded regions show standard error. VRP raises the average final success rate from 79.1% (random init) to 90.5%. The largest gains come on tasks that need fine-grained perception of task-relevant objects, such as insert USB in computer.

What Does VRP Learn?

Critics and representations on robomimic square, compared across pretraining objectives.

The proprioception shortcut

We swap either the proprioception q or the image latent between demo states and measure how much Q follows the swap. SAC and SAC+IL critics follow q almost entirely and barely respond to the image, and offline EXPO still relies mainly on q. VRP's critic relies more on the image than on proprioception.

Bar charts. Swap proprioception: SAC 0.90, SAC+IL 0.94, Offline EXPO 0.62, VRP 0.35. Swap image: SAC 0.09, SAC+IL 0.06, Offline EXPO 0.33, VRP 0.53.
1 means Q fully follows the swapped input; 0 means Q ignores it.

Organized by task progress

In the IL embedding, observations from different stages of the task are interleaved. DINOv2 clusters do not follow task stage, and TCN separates individual trajectories. VRP arranges observations along a smooth progression from early to late timesteps shared across episodes.

t-SNE plots for IL, TCN, DINOv2 and VRP features, colored by normalized timestep; VRP shows a smooth light-to-dark gradient.
t-SNE of learned representations. Each dot is one observation, colored by its timestep t/T within the episode; darker dots are later.

Attends to the object and the gripper

IL attends to the object but captures little about its relation to the gripper. DINOv2 spreads attention across every object in the scene. VRP concentrates on the object and its contact with the gripper.

Grad-CAM saliency maps on the agentview camera for IL, TCN, DINOv2 and VRP; VRP highlights the nut and the gripper.
Grad-CAM on the agentview camera, computed for each encoder's own target (IL: predicted action; TCN: goal distance; DINOv2: object pose probe; VRP: Q(s, a)).

Encodes the object–gripper relation

A linear probe on VRP features predicts the object's yaw relative to the gripper with R2 = 0.81. IL reaches only 0.50, barely above a randomly initialized encoder at 0.45. This object-centric information is what the critic needs to judge which actions lead to success.

Bar chart of relative yaw probe R squared: IL 0.50, TCN 0.60, DINOv2 0.60, VRP 0.81; random init about 0.45.
Linear-probe R2 on held-out demonstrations. Dashed line: random init.

BibTeX