Skip to main content
QUICK REVIEW

[Paper Review] Vision-Language Models are Zero-Shot Reward Models for Reinforcement Learning

Juan Rocamonde, Victoriano Montesinos|arXiv (Cornell University)|Oct 19, 2023
Reinforcement Learning in RoboticsComputer Science6 citations
TL;DR

This paper proposes VLM-RM, a method that uses vision-language models like CLIP as zero-shot reward models for reinforcement learning by computing cosine similarity between CLIP embeddings of environment states and natural language prompts. It successfully trains a MuJoCo humanoid to perform complex tasks—such as kneeling, doing the splits, and sitting in a lotus position—using only single-sentence text prompts with no reward engineering or fine-tuning, demonstrating strong scaling with model size and robustness in zero-shot settings.

ABSTRACT

Reinforcement learning (RL) requires either manually specifying a reward function, which is often infeasible, or learning a reward model from a large amount of human feedback, which is often very expensive. We study a more sample-efficient alternative: using pretrained vision-language models (VLMs) as zero-shot reward models (RMs) to specify tasks via natural language. We propose a natural and general approach to using VLMs as reward models, which we call VLM-RMs. We use VLM-RMs based on CLIP to train a MuJoCo humanoid to learn complex tasks without a manually specified reward function, such as kneeling, doing the splits, and sitting in a lotus position. For each of these tasks, we only provide a single sentence text prompt describing the desired task with minimal prompt engineering. We provide videos of the trained agents at: https://sites.google.com/view/vlm-rm. We can improve performance by providing a second "baseline" prompt and projecting out parts of the CLIP embedding space irrelevant to distinguish between goal and baseline. Further, we find a strong scaling effect for VLM-RMs: larger VLMs trained with more compute and data are better reward models. The failure modes of VLM-RMs we encountered are all related to known capability limitations of current VLMs, such as limited spatial reasoning ability or visually unrealistic environments that are far off-distribution for the VLM. We find that VLM-RMs are remarkably robust as long as the VLM is large enough. This suggests that future VLMs will become more and more useful reward models for a wide range of RL applications.

Motivation & Objective

  • To develop a sample-efficient, zero-shot method for specifying reward functions in vision-based reinforcement learning using pretrained vision-language models.
  • To eliminate the need for costly human feedback or task-specific reward engineering by leveraging the zero-shot capabilities of VLMs.
  • To evaluate whether large-scale VLMs like CLIP can serve as effective, general-purpose reward models for complex robotic control tasks.
  • To investigate the scaling behavior of VLM-based reward models with respect to model size and training data.
  • To identify failure modes and limitations of VLM-RMs in RL, particularly related to spatial reasoning and distributional shift.

Proposed method

  • The method uses CLIP as a vision-language model to compute a reward via cosine similarity between the CLIP embedding of the current environment observation and a text prompt describing the desired task.
  • A baseline prompt describing a neutral or default state is optionally used to project out irrelevant directions in the CLIP embedding space, improving reward discrimination.
  • The reward function is defined as R(s, a, s') = cos(clip_img_enc(s), clip_text_enc(prompt)) for a given state s and task prompt.
  • Standard off-policy deep reinforcement learning algorithms (e.g., SAC) are used to train policies using the VLM-derived reward signal.
  • Experiments are conducted in MuJoCo environments with realistic rendering to improve alignment between VLM perception and environment states.
  • Performance is evaluated via training success rates, trajectory quality, and correlation with ground-truth rewards in benchmark tasks.
Figure 1: We use CLIP as a reward model to train a MuJoCo humanoid robot to (1) stand with raised arms, (2) sit in a lotus position, (3) do the splits, and (4) kneel on the ground (from left to right). We specify each task using a single sentence text prompt. The prompts are simple (e.g., “a humanoi
Figure 1: We use CLIP as a reward model to train a MuJoCo humanoid robot to (1) stand with raised arms, (2) sit in a lotus position, (3) do the splits, and (4) kneel on the ground (from left to right). We specify each task using a single sentence text prompt. The prompts are simple (e.g., “a humanoi

Experimental results

Research questions

  • RQ1Can a vision-language model like CLIP be used as a zero-shot reward model for vision-based reinforcement learning without fine-tuning?
  • RQ2How does the performance of VLM-RMs scale with the size and training data of the underlying vision-language model?
  • RQ3What is the impact of using a baseline prompt to regularize the reward signal in VLM-RM?
  • RQ4How robust are VLM-RMs to distributional shifts and visual realism in the environment rendering?
  • RQ5What are the primary failure modes of VLM-RMs, and how do they relate to known limitations of current VLMs?

Key findings

  • VLM-RM successfully trains a MuJoCo humanoid to perform complex, non-trivial tasks such as kneeling, doing the splits, and sitting in a lotus position using only a single sentence prompt per task.
  • The method achieves high performance in standard RL benchmarks like CartPole and MountainCar, with strong correlation between VLM-RM rewards and ground-truth rewards.
  • Larger VLMs trained with more compute and data show a strong scaling effect, with only the largest publicly available CLIP model enabling successful training of complex humanoid tasks.
  • Using a baseline prompt to project out irrelevant embedding directions improves reward discrimination and performance, especially in complex tasks.
  • Failure modes are primarily due to known VLM limitations such as poor spatial reasoning and sensitivity to out-of-distribution visual inputs, not inherent flaws in the VLM-RM framework.
  • The approach is remarkably robust as long as the VLM is sufficiently large, suggesting future VLMs will be increasingly effective as zero-shot reward models.
(a) CartPole
(a) CartPole

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.