Universal Value Function Approximators

Tom Schaul, Daniel Horgan, Karol Gregor, David SilverICML 2015

Introduction

Value functions are a core component of reinforcement learning (RL). Traditionally, an agent learns a value function $V(s)$ to estimate the long-term reward from any state $s$ to reach a specific, fixed goal. However, if the goal changes, the agent typically has to start learning from scratch. While architectures like "Horde" allow agents to learn many "General Value Functions" (GVFs) for different goals simultaneously, these separate networks do not share parameters.

This lack of parameter sharing leads to two major issues:

  1. Scalability: It is impractical to maintain a separate function for every possible coordinate or objective in a large environment.
  2. Generalization: If an agent knows how to navigate to point A and point B, it should theoretically have a head start on learning how to reach a nearby point C. Standard GVFs fail to exploit this shared environmental structure.

To address this, researchers introduced Universal Value Function Approximators (UVFAs). UVFAs extend standard RL by learning a single, unified value function $V(s, g)$ that generalizes across both states and goals, effectively unifying an infinite "Horde" of specialized agents into one scalable model.

Architectures and Training

The core challenge of building a UVFA is structuring the neural network to handle two distinct inputs—state and goal—effectively. The authors explored several architectural approaches:

Architectures for Universal Value Function Approximators
  • Concatenated Architecture: A standard Multi-Layer Perceptron (MLP) where the state and goal vectors are simply concatenated into a single input.
  • Two-Stream (Factored) Architecture: The state $s$ passes through one network $\phi$ to produce a state embedding, while the goal $g$ passes through a separate network $\psi$ to produce a goal embedding. The final value is computed via a functional $h$ (such as a dot product) of these two embeddings: $V(s, g) \approx \phi(s) \cdot \psi(g)$.

Two-Stage Training

Training a factored architecture end-to-end using standard Stochastic Gradient Descent (SGD) can be slow. To accelerate learning, the paper introduces a novel Two-Stage Training approach:

  1. Matrix Factorization: The system treats observed values as a sparse table (rows = states, columns = goals) and uses low-rank matrix factorization to discover "ideal" embedding vectors for each state and goal.
  2. Supervised Learning: The $\phi$ and $\psi$ networks are then trained via supervised learning to map raw inputs (like pixels or coordinates) to these ideal embeddings.

This factoring acts as a powerful "hint" to the network. By first solving the relationship problem (via matrix factorization) and then the perception problem (via supervised learning), the agent learns significantly faster.

Key Insights and Results

The authors evaluated UVFAs on three primary environments: a 4-Rooms grid-world (testing extrapolation), LavaWorld (testing interpolation), and Ms. Pacman (testing high-dimensional visual scaling).

Topological Discovery and Generalization

One of the most striking findings is that UVFAs naturally recover the layout of the environment. Visualizing the learned embeddings reveals that nearby points in the embedding space correspond to states that are "close" in terms of travel time, rather than just Euclidean distance.

Learned embeddings recovering the topological structure of the room layout

Because of this topological awareness, UVFAs exhibit impressive zero-shot generalization. A UVFA can suggest a reasonable policy for a goal it has never been trained to reach simply by interpolating between known goals in the embedding space. In the 4-Rooms task, an agent trained only on goals in three rooms successfully reached goals in the unseen fourth room with a 24% policy quality—vastly outperforming a random agent.

Efficiency and Scaling

  • Training Speed: In LavaWorld, the two-stage training method reached high policy quality 10 to 100 times faster than the concatenated end-to-end architecture.
  • Scaling to Pixels: In the Atari 2600 game Ms. Pacman, a UVFA trained on just 29 pellet locations successfully generalized to all 150 pellets on the map, producing coherent value maps for the entire game board directly from raw pixel inputs.
  • Transfer Learning: Pre-training a UVFA on a broad set of goals allows for near-instant fine-tuning when a new, specific goal is introduced.

Limitations and Future Work

While UVFAs represent a significant step forward for generalized RL, several challenges remain:

  • Goal Representation: The paper primarily defines goals as "reaching a specific state." Representing more abstract or symbolic goals (e.g., "find any power-up") requires further research.
  • Bootstrapping Stability: Training UVFAs via direct Q-learning (bootstrapping) can be unstable. The authors suggest that carefully choosing the output function $h$ (such as a distance-based metric rather than a simple dot product) is necessary to maintain stability.
  • Exploration: UVFAs excel at representing and generalizing value, but they do not inherently solve the exploration problem. Integrating UVFAs with intrinsic motivation mechanisms is a natural next step to help agents discover those goals in the first place.

Summary updated

BibTeX
@inproceedings{schaul2015universal,
  author = {Tom Schaul and Daniel Horgan and Karol Gregor and David Silver},
  title = {{Universal Value Function Approximators}},
  booktitle = {International Conference on Machine Learning},
  year = {2015},
  url = {https://openreview.net/forum?id=B1-OgsZdZH},
}
Figure