Variational Intrinsic Control

Karol Gregor, Danilo Jimenez Rezende, Daan Wierstra

TL;DR

Variational Intrinsic Control (VIC) is an unsupervised reinforcement learning framework that allows agents to discover controllable skills—called intrinsic options—without any external reward. By maximizing the mutual information between an agent's actions and the resulting final states, the agent simultaneously learns a diverse set of closed-loop behaviors and gains an explicit, quantifiable measure of its own "empowerment."

What Problem Does This Paper Address?

Standard reinforcement learning (RL) relies heavily on hand-crafted external reward functions. However, biological entities routinely explore their environments and acquire a wide repertoire of skills purely out of intrinsic motivation, long before applying them to specific goals.

In RL, this concept of measuring and maximizing an agent's potential control over its environment is known as empowerment. Previous methods for learning empowerment were limited to "open-loop" action sequences, where an agent blindly commits to a fixed string of actions. Open-loop control fails catastrophically in stochastic (noisy) environments because the agent cannot adapt to unexpected changes. This paper tackles the challenge of learning closed-loop intrinsic options—where actions are continuously conditioned on the environment's state—and scaling this capability to complex environments using deep neural networks.

Methods

The core objective of Variational Intrinsic Control is to maximize the mutual information $I(\Omega, s_f | s_0)$ between an option $\Omega$ (a policy) and its final termination state $s_f$, given a starting state $s_0$. Maximizing this value means the agent learns options that are maximally diverse and highly reliable.

Because computing the true mathematical posterior of an option given a final state is intractable, the authors introduce a variational lower bound. They train a separate option inference network $q(\Omega|s_0, s_f)$ that attempts to guess which option was executed based solely on where the agent ended up.

The paper instantiates this principle via two policy gradient-based algorithms:

  1. Explicit Options (Algorithm 1): The agent samples an option from a prior distribution, executes a policy conditioned on that option, and receives an intrinsic reward based on how accurately the inference network can identify that option from the final state.
  2. Implicit Options (Algorithm 2): To overcome optimization and exploration difficulties in the explicit setup, this variant treats the action space itself as the option space. A policy network generates trajectories, and the inference network tries to reconstruct the exact sequence of actions given the final state. This grounds the learning targets and stabilizes training with deep neural networks.

Datasets

Rather than using static datasets, the paper evaluates its algorithms on several procedurally generated and simulated environments:

  • Grid World Environments: Includes a standard noisy grid world, a 25×25 "four-room" maze, and a "dangerous" grid world featuring trap states.
  • Block Pushing: A 6×6 grid world where the agent must learn to manipulate blocks to maximize its state space options.
  • MNIST Pairs: A visually complex environment where states consist of pairs of MNIST digits. Actions change the digit classes, while the specific visual instance of the digit is sampled at random.
  • 3D Simulated Environment: A first-person 3D environment where the agent receives 40×40 color image observations.

Key Insights and Ideas

  • The Necessity of Closed-Loop Control: Open-loop agents severely underestimate their own empowerment in noisy environments. Because they cannot correct for drift, they quickly fall into trap states and prefer to hide in "safe," low-empowerment zones. Closed-loop agents actively adapt to noise, allowing them to safely navigate complex spaces.
  • Information Theory as Unsupervised Control: The authors argue that what maximum likelihood is to unsupervised data learning, mutual information between options and final states is to unsupervised control.
  • Ignoring the Uncontrollable: Because the objective function strictly rewards reliable control, VIC naturally incentivizes agents to ignore environmental elements they cannot influence, such as random visual distractors or random variations in the MNIST digit instances.
Figure 1: Learning to navigate through a grid world. Left: Standard grid world with valid actions indicated by green arrows (left, right, up, down) and by a green disc (do nothing). Right: Each square corresponds to a different option, and shows the probability of predicting this option at different locations in the environment. The negative logarithm of these values is proportional to the intrinsic reward that a given option is trying to maximize, and therefore the locations with large intensity show the locations where a given option terminates.

Key Results

  • Navigating Complex Mazes: In the four-room grid world, the implicit options algorithm successfully learned extended trajectories that passed through narrow doors to cover the reachable state space uniformly, achieving an average empowerment of 6.0 nats (equivalent to reliably reaching ~403 distinct states).
  • Object Manipulation: In the block-pushing task, the agent autonomously discovered that it could control the blocks. Its empowerment score rose to 7.1 nats (~1200 states), demonstrating that the agent "realized" manipulating objects yielded far more environmental control than simply moving itself.
  • Closed-Loop Superiority: As shown in the "dangerous" grid world experiments, closed-loop options drastically outperformed open-loop alternatives. In a 25×25 four-room grid with noise, the closed-loop agent achieved an empowerment score of 45.9, compared to a meager 4.7 for the open-loop baseline.
Figure 2: Learning to navigate through a grid world with trap states. Left: Dangerous grid world where cells on different checkerboard sub-lattices have different sets of valid actions (green arrows). Taking the wrong actions (red arrows and red disc) teleports the agent to the top-left corner indicated by a cross, from which there is only a small probability of escaping at each time step. The blue region represents a barrier, forming a narrow corridor on the top left. Furthermore, when a valid action is taken, with some probability the agent actually does not move. Therefore if the agent commits to a sequence of actions, it will quickly lose track as to which sub-lattice it is on, and fall into the low empowerment top left corner state. On the other hand, if it observes the environment it can always take actions to safely navigate the square. Bottom: Classical empowerment, which considers the effect of (open loop) action sequences, has very small empowerment inside the square because each sequence does not respond to changes due to environment noise and the agent instead prefers to sit in the ‘safe’ top left corridor. This is demonstrated in the bottom figure, which shows the exact empowerment at different locations for action sequence lengths 1, . . . , 6. We see that not only does the square area have low empowerment, but that the amount of empowerment goes down with increasing sequence length. With closed loop policies, on the other hand, the agent has learned to navigate to different locations of the square, as shown in the top right figure.
  • Accelerating Downstream Tasks: Pre-training an agent using VIC without any rewards significantly accelerated its ability to later find and exploit a sparse extrinsic reward when one was finally introduced.

Limitations and Future Work

  • Optimization Instability in Explicit Options: The explicit options algorithm (Algorithm 1) proved difficult to stabilize when paired with deep neural networks because the intrinsic reward is noisy and constantly shifting as the agent learns.
  • Observations vs. True States: The current implementation calculates mutual information between options and final observations rather than true environmental states. Disentangling these for partially observable environments remains an open challenge.
  • The Exploration Catch-22: Pushing into entirely new state regions is difficult because the inference network $q$ cannot reliably identify options in unfamiliar territory, initially resulting in low intrinsic rewards that can discourage the agent from exploring further.

Summary updated

BibTeX
@inproceedings{gregor2017variational,
  author = {Karol Gregor and Danilo Jimenez Rezende and Daan Wierstra},
  title = {{Variational Intrinsic Control}},
  booktitle = {Workshops @ ICLR},
  year = {2017},
  url = {https://openreview.net/forum?id=CtAF0Io2jY},
}
Figure