Learning values across many orders of magnitude

Hado van Hasselt, Arthur Guez, Matteo Hessel, Volodymyr Mnih, David Silver

This NIPS 2016 paper from DeepMind addresses a fundamental hurdle in training neural networks: scale. While we often take for granted that our data is nicely normalized, in real-world scenarios—especially Reinforcement Learning (RL)—the values we try to predict can span many orders of magnitude and change unpredictably over time.

TL;DR

The authors introduce Pop-Art, an algorithm that adaptively normalizes the targets of a neural network while mathematically ensuring that the network’s unnormalized output remains unchanged during the update. This allows RL agents (like DQN) to learn from raw, unclipped rewards across diverse tasks without sacrificing stability or performance.

The Problem: The "Clipping Trap"

Most deep learning algorithms are highly sensitive to the scale of the signal they are trying to approximate. If the targets are too large, gradients explode; if they are too small, learning stalls.

In the landmark 2015 DQN paper, researchers solved this by "clipping" rewards to a range of $[-1, 1]$. While this made the algorithm stable across dozens of different Atari games, it introduced a major flaw: the agent became "blind" to the actual value of rewards. In a game like Ms. Pac-Man, eating a ghost (worth 1,600 points) looked exactly the same to the agent as eating a single pellet (worth 10 points).

This clipping changes the very objective of the game. It often leads to suboptimal or "myopic" behavior where the agent prioritizes the frequency of rewards over their actual magnitude. Clipping isn't just a minor heuristic; it fundamentally alters the underlying Markov Decision Process (MDP).

Methods: Introducing Pop-Art

To remove this domain-specific heuristic without losing stability, the authors propose Pop-Art (Preserving Outputs Precisely, while Adaptively Rescaling Targets).

  1. Adaptive Rescaling (ART): The algorithm tracks the mean ($\mu$) and variance ($\sigma^2$) of the targets using incremental updates (moving averages). It uses these statistics to normalize the targets used for the network's loss function.
  2. Preserving Outputs (POP): This is the "secret sauce." Normally, if you change the normalization parameters ($\mu$ and $\sigma$) in the middle of training, the network's output would instantly jump, causing a massive spike in error. Pop-Art prevents this by performing a precise linear transformation on the weights ($W$) and biases ($b$) of the network's final output layer whenever the normalization statistics are updated.

By "undoing" the change in the weights, the network’s actual prediction (in the original unnormalized scale) stays exactly the same. This allows the normalization to change "under the hood" without disrupting the learning process. The paper also proves a mathematical equivalence between normalizing the targets and scaling the gradients of the lower layers, ensuring updates remain at a manageable scale regardless of target magnitude.

Experiments and Key Results

The paper evaluates Pop-Art on two main benchmarks: a synthetic regression task and the Atari 2600 benchmark.

Stability in Non-Stationary Environments

In a synthetic binary regression task, the network must predict integers, but every 1,000 samples, a "spike" occurs where the target value is orders of magnitude larger than usual.

Pop-Art maintains stability despite massive target spikes.

As shown above, Pop-Art is uniquely capable of handling sudden spikes in target magnitude. While standard SGD and even standard adaptive rescaling (Art) suffer from skyrocketing errors during these spikes, Pop-Art maintains stability and recovers almost instantly.

Atari 2600 Performance

The authors compared a "Double DQN" agent using reward clipping against one using Pop-Art with raw, unclipped rewards across 57 Atari games. Pop-Art successfully learned across all games using a single set of hyperparameters.

Normalized performance differences between Pop-Art and clipped DQN across Atari games.

Across the board, Pop-Art showed a median improvement of +0.4% and a mean improvement of +34% in normalized scores compared to the clipped baseline. On 32 out of 57 games, Pop-Art performed as well as or better than the clipped version. Most notably, in Ms. Pac-Man, the Pop-Art agent actually learned to hunt ghosts for high scores, whereas the clipped agent largely ignored them.

Limitations and Future Work

While Pop-Art solves the scaling issue, it doesn't entirely solve the "myopia" caused by the discount factor ($\gamma$). Even with unclipped rewards, the agent might still ignore a massive reward if it is too far in the future.

Additionally, some games (like Time Pilot or Video Pinball) actually performed worse with unclipped rewards. The authors suggest this might be because the "safer" strategy encouraged by clipping happened to be more effective for those specific games' reward landscapes. Future work could involve combining Pop-Art with more advanced exploration strategies to better handle these high-variance environments.

Summary updated

BibTeX
@inproceedings{hasselt2016learning,
  author = {Hado van Hasselt and Arthur Guez and Matteo Hessel and Volodymyr Mnih and David Silver},
  title = {{Learning values across many orders of magnitude}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2016},
  url = {https://openreview.net/forum?id=hXRk1L29gYz},
}
Figure