The Principle of Unchanged Optimality in Reinforcement Learning Generalization.

Alex Irpan, Xingyou SongarXiv 2019

Abstract

Several recent papers have examined generalization in reinforcement learning (RL), by proposing new environments or ways to add noise to existing environments, then benchmarking algorithms and model architectures on those environments. We discuss subtle conceptual properties of RL benchmarks that are not required in supervised learning (SL), and also properties that an RL benchmark should possess. Chief among them is one we call the principle of unchanged optimality: there should exist a single $\pi$ that is optimal across all train and test tasks. In this work, we argue why this principle is important, and ways it can be broken or satisfied due to subtle choices in state representation or model architecture. We conclude by discussing challenges and future lines of research in theoretically analyzing generalization benchmarks.

Introduction

In Supervised Learning (SL), the concept of generalization is relatively intuitive: if a model is trained to recognize a "dog," a previously unseen image of a dog in the test set remains a dog. The mapping from input to label is static. However, in Reinforcement Learning (RL), the "ground truth" is often a moving target. If an agent is trained to navigate on flat terrain and then tested on a low-gravity lunar surface, the optimal sequence of actions changes fundamentally.

In "The Principle of Unchanged Optimality in Reinforcement Learning Generalization," researchers Alex Irpan and Xingyou Song argue that many current RL generalization benchmarks are conceptually murky because they conflate two different problems: learning to generalize and learning to adapt. To clarify this, they propose the Principle of Unchanged Optimality (PUO) as a guiding framework for designing and analyzing RL benchmarks.

The Generalization Gap in RL

RL agents are notorious for overfitting to specific environmental seeds or visual textures. To combat this, researchers often use "domain randomization," where an agent is trained on a wide distribution of environments. The goal is to minimize the generalization gap—the difference between the average reward on a finite set of training environments and the expected reward over the entire distribution of possible environments.

However, the authors point out a fundamental divergence from SL. In SL, the Bayes optimal classifier is consistent across the data distribution. In RL, if environmental parameters (like friction or gravity) are varied without being explicitly revealed to the agent, the optimal action for a given state observation changes. This transformation turns a standard Markov Decision Process (MDP) into a Partially Observable MDP (POMDP). The agent becomes "blind" to the very parameters required for success, leading to a performance gap that stems from missing information rather than a failure of intelligence.

The Principle of Unchanged Optimality (PUO)

The core contribution of this work is the formalization of the Principle of Unchanged Optimality. A benchmark satisfies PUO if there exists a single policy $\pi^*$ that is optimal for every MDP within the distribution $\mathcal{D}$.

When PUO is satisfied, the task is a pure generalization problem. When PUO is broken, the task shifts. The agent cannot be optimal across all scenarios simultaneously; instead, it is forced to find a "robust" policy that performs adequately on average but is sub-optimal for any specific instance. This ambiguity often leads to a "memorization limit," where the agent's performance plateaus because it cannot resolve the underlying physics of the environment from its limited observations.

Case Studies: MuJoCo vs. CoinRun

The authors use several prominent benchmarks to illustrate how PUO is either maintained or violated:

  • MuJoCo (Physics Variation): If gravity or joint friction is randomized but the agent only receives position and velocity as input, PUO is broken. A feedforward neural network cannot simultaneously be optimal for both high and low gravity. To achieve optimality, the agent would need to "infer" the gravity, which requires memory or state augmentation.
  • CoinRun (Visual Variation): In benchmarks like CoinRun, where textures and backgrounds are randomized but the underlying platforming physics remain constant, PUO is generally satisfied. A platform is still a platform regardless of its color, and the optimal jump timing remains unchanged.
  • Atari (Frame Stacking): The use of frame-stacking in Atari is a classic example of providing the "necessary information" to satisfy PUO, as a single frame does not contain velocity information needed for optimal play.

Strategies for Recovery

When a benchmark breaks PUO, the authors suggest two primary ways to restore it:

  1. State Augmentation: Explicitly providing the hidden parameters (e.g., the gravity constant $\theta$) to the agent. This ensures the agent has all the information required to determine the optimal action.
  2. Recurrent Architectures (RNNs/LSTMs): Using memory allows the agent to implicitly infer hidden parameters from the history of transitions. This effectively turns the problem into a meta-learning task, where the agent "learns to adapt" to the specific physics of the current episode.

Theoretical Implications and Future Work

The paper provides a formal bridge between generalization and meta-learning. It suggests that while robust policies are practically useful, benchmarks that break PUO complicate theoretical analysis because true optimality becomes unreachable. The authors also introduce a "cryptography analogy," noting that even if an agent can predict environment dynamics perfectly, it may still fail to generalize if the observations are "obfuscated" in a way that is computationally impossible to invert.

Ultimately, the Principle of Unchanged Optimality serves as a sanity check for the RL community. By distinguishing between tasks that require robust generalization and those that require online adaptation, researchers can design more rigorous benchmarks and better understand why certain architectures succeed where others fail.

Summary updated

BibTeX
@misc{irpan2019principle,
  author = {Alex Irpan and Xingyou Song},
  title = {{The Principle of Unchanged Optimality in Reinforcement Learning Generalization.}},
  year = {2019},
  eprint = {1906.00336},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1906.00336},
}
Figure