Weakly-Supervised Reinforcement Learning for Controllable Behavior.

Lisa Lee, Benjamin Eysenbach, Ruslan Salakhutdinov, Shixiang Gu, Chelsea FinnarXiv 2020

TL;DR

Weakly-Supervised Control (WSC) leverages simple binary comparisons of images to learn a semantically meaningful, disentangled latent space for reinforcement learning. By using this learned space to guide exploration and define rewards, agents can ignore irrelevant environment "chaff"—like lighting changes or distractor objects—and learn complex visual manipulation tasks significantly faster than purely unsupervised methods.

What Problem Does This Paper Address?

Reinforcement learning (RL) agents, especially in goal-conditioned settings, often struggle with the sheer size of the state space. If you ask a robot to "reach a goal state" based on raw pixels, the agent might waste millions of steps trying to match irrelevant details, such as the exact position of a shadow or the placement of a distractor object that has nothing to do with the task at hand.

Traditionally, researchers solve this by manually engineering dense reward functions or providing expert demonstrations, both of which are expensive and difficult to scale. Purely unsupervised methods (like training a VAE) try to learn a compressed representation, but they often fail to distinguish between meaningful factors (like the position of a target object) and "chaff" (like background noise). This paper asks: can we use weak supervision—information that is easier to collect than demonstrations—to help an agent focus only on what matters?

Methods

The authors introduce Weakly-Supervised Control (WSC), a two-phase framework:

  1. Representation Learning: The agent is provided with an offline dataset of image pairs $\{s_1, s_2\}$ and weak binary labels $y$. These labels simply indicate if a specific factor (e.g., "door angle" or "object x-position") is greater in the first image than the second. WSC uses these to train a disentangled representation where each dimension of the latent space $z$ corresponds to a specific semantic factor of variation.
  2. Reinforcement Learning: During the RL phase, the agent uses this learned latent space in two ways. First, it samples its own goals directly from the latent distribution, ensuring it practices meaningful behaviors. Second, it calculates rewards based on the $\ell_2$ distance between the current state and the goal within the disentangled latent space.
The WSC framework: Phase 1 learns the representation from weak labels, and Phase 2 uses it for goal generation and reward computation.

WSC builds upon Hindsight Experience Relabeling (HER) but replaces the standard VAE latent space with this semantically structured one. The agent effectively "filters" the world, only caring about the axes of variation the user has flagged as relevant via the weak labels.

Datasets

The authors evaluated WSC on several challenging vision-based manipulation tasks using a simulated Sawyer robot arm:

  • Push, Pickup, and Door: Standard tasks extended with significant "chaff," including up to three distractor objects, randomized lighting, and randomized colors for the table and objects.
  • Real-World Dataset: A dataset of 1,285 images from a Franka robot interacting with five blocks, captured under varying lighting and viewpoints to test robustness to occlusion and noise.
Figure 2: Our method uses weak supervision to direct exploration and accelerate learning on visual manipulation tasks. We extend the environments from [57] to make the tasks considerably harder by adding distractor objects (Push n > 1), randomized lighting (e.g., PickupLights), and randomized colors (e.g. PickupColors). Each data sample consists of a pair of image observations {s1, s2} and factor labels yk = 1(fk(s1) < fk(s2)) that indicate whether the kth factor of image s1 has smaller value than that of image s2. Example factors include the gripper position, object positions, brightness, and door angle. While these factors of variation could be directly measured with additional sensors in a controlled environment, weak supervision will be more useful in complex domains where such instrumentation is challenging. We only need to collect labels for the axes of variation that may be relevant for future downstream tasks (see Appendix A.2). Bolded factors correspond to the user-specified factor indices I indicating which of the factors are relevant for solving the class of tasks (see Sec. 3)

Key Insights and Ideas

  • Disentanglement is the Secret Sauce: The authors found that simply predicting labels (a standard supervised approach) isn't enough. Explicitly disentangling the factors in the latent space is what allows the agent to generalize and ignore distractors effectively.
  • Efficiency of Weak Labels: You don't need millions of labels. The experiments showed that as few as 1,024 pairwise comparisons were often sufficient to learn a representation that significantly boosted RL performance.
  • Interpretable Control: Because the latent space is disentangled based on human-understandable factors, the resulting policy is highly interpretable. You can manually set a latent goal (e.g., "increase dimension 1") and see the robot move the object along a specific physical axis.

Key Results

WSC consistently outperformed state-of-the-art unsupervised methods like RIG and SkewFit.

  • Performance Gap: In complex environments with distractors and lighting changes (e.g., PushLights n=3), WSC achieved significantly lower goal distances compared to baselines, which often failed to learn at all.
  • Sample Efficiency: WSC typically reached high performance levels in 1 million environment steps, whereas unsupervised methods often required far more data or plateaued at much higher error rates.
Figure 4: Performance vs. training steps on visual goal-conditioned tasks. Weakly-supervised control (WSC) learns more quickly than prior state-of-the-art goal-conditioned RL methods (HER, RIG, SkewFit), particularly as the complexity of the environment grows. Thus, we see that doing directed exploration and goal sampling in a (learned) semantically-disentangled latent space can be more effective than doing purely unsupervised exploration in the VAE latent space.

Limitations and Future Work

  • Factor Specification: While weak labels are cheap, a human still needs to decide which factors are relevant for the task. If a critical factor is ignored during the labeling phase, the agent might be "blinded" to it.
  • Offline Pre-training: Currently, the representation is learned offline before RL begins. The authors suggest that incorporating weak supervision online (in the loop of RL) could help the agent adapt to new interactions it encounters.
  • Spurious Labels: The framework assumes the provided factors are meaningful. Future work could investigate how to automatically discover which weak labels are actually useful for solving tasks and which are spurious.

Summary updated

BibTeX
@misc{lee2020weakly,
  author = {Lisa Lee and Benjamin Eysenbach and Ruslan Salakhutdinov and Shixiang Gu and Chelsea Finn},
  title = {{Weakly-Supervised Reinforcement Learning for Controllable Behavior.}},
  year = {2020},
  eprint = {2004.02860},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2004.02860},
}
Figure