On the Generalization of Representations in Reinforcement Learning

Charline Le Lan, Stephen Tu, Adam Oberman, Rishabh Agarwal, Marc G. Bellemare · DOI

Abstract

In deep reinforcement learning (RL), representations are typically learned through high-dimensional neural networks, yet the mechanisms governing their ability to generalize to unseen states remain poorly understood. This paper introduces a theoretical framework based on the concept of effective dimension ($d_{eff}$) to quantify the generalization error of state representations. By deriving a novel excess risk bound that scales with $1/n$ rather than the traditional $1/\sqrt{n}$, the authors demonstrate that representations with lower coherence and lower effective dimension facilitate superior generalization. This theory is validated through extensive experiments across synthetic environments and the Arcade Learning Environment (ALE), leading to a practical auxiliary loss that improves performance in offline RL settings.

Introduction

Deep Reinforcement Learning has achieved remarkable success by using neural networks to map raw, high-dimensional inputs into feature representations ($\phi$). However, these representations are often treated as "black boxes." While we know that a representation must be expressive enough to approximate a value function, we lack a precise understanding of why certain representations generalize effectively while others fail, even when their architectures (e.g., the number of hidden units) are identical.

This research addresses this gap by investigating the statistical efficiency of representations. The authors move beyond simple feature counts to propose a metric called effective dimension, which captures the underlying structure of how information is distributed across the state space. Their findings suggest that the geometry of the environment and the "spikiness" of the features are the primary determinants of an agent's ability to generalize.

The Problem: Approximation vs. Generalization

In RL, a representation $\phi$ must balance two competing objectives:

  1. Approximation: The features must be rich enough to represent the optimal value function $V^*$.
  2. Generalization: The features must allow the agent to accurately estimate values for states not encountered during training.

Standard learning theory often relies on the dimensionality of the feature vector ($k$). However, in deep RL, $k$ is usually a fixed hyperparameter (e.g., 512 units), which fails to explain the variance in performance between different agents. The authors hypothesize that the true bottleneck is not the number of features, but how those features correlate across the state space.

Theoretical Framework: Effective Dimension and Coherence

The core of the paper's theoretical contribution is the definition of effective dimension ($d_{eff}$), derived from the concept of coherence in matrix completion.

Effective Dimension ($d_{eff}$)

Intuitively, $d_{eff}$ measures how "spread out" a representation is. If a representation is highly coherent or "spiky," knowing the value of one state provides little information about others, necessitating a massive number of samples to learn a global value function. Conversely, a representation with low effective dimension spreads information more uniformly, allowing for better interpolation between states.

The Excess Risk Bound

The authors derive a new bound for excess risk—the difference between the learned value function and the best possible approximation within the feature space. Their theorem (Theorem 1) shows that the generalization error is bounded by a term proportional to $d_{eff}/n$, where $n$ is the number of samples. This $1/n$ rate is significantly tighter than the $1/\sqrt{n}$ rates common in standard RL theory, providing a more optimistic and accurate view of how representations scale with data.

Feature Regularization in Practice

To bridge the gap between theory and practice, the authors propose an auxiliary loss function designed to minimize the effective dimension during training:

$$\mathcal{L}_\phi = \log \sum_i \exp(\|\phi(s_i)\|_2^2)$$

This loss penalizes "spiky" representations by regularizing the norm of the feature vectors, effectively forcing the network to learn smoother, more distributed representations that are more conducive to generalization.

Experimental Validation

The researchers tested their framework across a diverse set of environments:

  • Synthetic Graphs: Using structures like Grids, Toruses, and Star graphs, they demonstrated that symmetric environments (like the Torus) naturally lead to representations with lower effective dimension compared to less structured environments.
  • Four-Room Domain: A comparison of different representation types (Successor Representations, Krylov bases, and Bisimulation metrics) confirmed that $d_{eff}$ is a reliable predictor of value estimation error.
  • Arcade Learning Environment (ALE): The authors analyzed five state-of-the-art agents (DQN, Rainbow, IQN, etc.) across 60 Atari games. They found a strong correlation: top-performing agents like M-IQN consistently maintained lower effective dimensions throughout training.
  • Offline RL (Atari-Replay): By adding their proposed $\mathcal{L}_\phi$ regularization to the IQN agent, they achieved significantly higher average returns across 17 Atari games, proving that explicitly controlling $d_{eff}$ improves performance in data-constrained settings.

Key Insights

  • Environment Geometry Matters: The transition structure of an environment dictates the inherent difficulty of learning a good representation. Symmetric transition matrices lead to lower coherence and better generalization.
  • Representation Overfitting: The authors observed that in the later stages of training, the effective dimension often increases. This suggests that the network begins to "overfit" its features to the specific value function of the current policy, which can be detrimental if the policy or task changes.
  • Rank Preservation: While standard agents often suffer from "rank collapse" (where the feature matrix loses dimensionality), the proposed regularization helps maintain a robust, high-rank feature space that still possesses low effective dimension.

Conclusion and Future Work

This work provides a rigorous mathematical foundation for understanding generalization in RL. By identifying effective dimension as a key metric, the authors offer a way to move beyond the "black box" nature of deep RL representations.

Future research directions include extending this analysis from Batch Monte Carlo evaluation to Temporal Difference (TD) learning and exploring the computational trade-offs of these regularized representations. Ultimately, this framework paves the way for new RL algorithms that explicitly optimize for the structural properties that enable agents to truly understand and navigate complex worlds.

Summary updated

BibTeX
@inproceedings{lan2022generalization,
  author = {Charline Le Lan and Stephen Tu and Adam Oberman and Rishabh Agarwal and Marc G. Bellemare},
  title = {{On the Generalization of Representations in Reinforcement Learning}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2022},
  url = {https://openreview.net/forum?id=hFqgGQqvL0O},
}
Figure