In Supervised Learning (SL), we have grown accustomed to a strange paradox: making a neural network much larger than necessary—a concept known as overparameterization—often helps it generalize better to new, unseen data. In Reinforcement Learning (RL), however, conventional wisdom has frequently dictated the opposite: keep models small to avoid "overfitting."
A team from Google and MIT challenged this notion in their paper, "Observational Overfitting in Reinforcement Learning." They argue that RL agents often fail to generalize not because they misunderstand the underlying "physics" or dynamics of an environment, but because they become distracted by spurious visual features—such as a timer in the corner of the screen or a specific cloud in the background.
The Challenge: Isolating Observational Overfitting
Generalization in RL is notoriously difficult to diagnose. When an agent fails on a new level, is it because the gravity changed (the dynamics), or because the floor is now blue instead of green (the observations)?
Most RL benchmarks conflate these two issues. This paper seeks to isolate observational overfitting. This phenomenon occurs when the underlying Markov Decision Process (MDP) dynamics remain identical across levels, but the observations contain "distractor" information. These distractors might correlate with progress during training but do not actually help solve the task in a generalizable way.
For example, in the game Sonic the Hedgehog, an agent might learn to use the on-screen timer to decide when to jump, rather than looking at the actual obstacles. Since the timer's state is different in every new level, a policy relying on it will fail immediately upon transfer.
Methodology: The $(f, g)$-Scheme
To study this in a controlled manner, the authors introduced the $(f, g)$-scheme. They take a standard environment state $s$ and project it into a high-dimensional observation space using two distinct functions:
- $f(s)$: Captures the "true" invariant features necessary for the task (e.g., the player's position and velocity).
- $g_\theta(s)$: Captures "spurious" features that change per level (parameterized by $\theta$) but might still spuriously correlate with the state during training.
The final observation is a combination of both. By fixing the underlying physics but swapping out the $g_\theta$ "noise" for different levels, the researchers could measure exactly how much an agent overfits to visual fluff.
They tested this framework across three regimes:
- Linear Quadratic Regulators (LQR): A classic control theory setup used as a mathematical sandbox to prove that gradient descent naturally biases models toward simpler, more general solutions.
- Projected Gym Environments: Taking MuJoCo tasks (like HalfCheetah or Hopper) and projecting their low-dimensional states into high-dimensional "noisy" observations.
- CoinRun & Sonic: Popular RL generalization benchmarks featuring procedurally generated platformer levels and real-world game dynamics.
Key Findings
Implicit Regularization is Real in RL: The most striking finding is that "bigger is better." In both LQR and complex Gym tasks, increasing the width and depth of neural networks (MLPs and CNNs) reduced the generalization gap. Gradient descent implicitly biases these large models toward simpler solutions that rely on the invariant $f(s)$ features rather than the noisy $g_\theta(s)$ features. For instance, on tasks like Swimmer-v2, increasing MLP width from $2^7$ to $2^{11}$ hidden units led to a steady increase in test reward, even when training reward remained constant. Similarly, deeper networks in CoinRun consistently outperformed shallower ones on unseen levels.
The "Timer" Trap in Sonic: In Sonic the Hedgehog, the authors found that "blacking out" the timer and score on the screen actually improved test performance. Using the IMPALA architecture, removing the scoreboard increased test rewards from $1130 \pm 40$ to $1250 \pm 40$. This confirms that agents were actively using the timer as a crutch to memorize training levels.
SL Theory Doesn't Quite Fit: The authors attempted to apply standard Supervised Learning generalization bounds (like Rademacher complexity) to RL. They found these bounds are currently too "loose" to be useful predictors of RL performance. This suggests that RL needs its own unique theoretical framework for generalization.
Activation Functions Matter: Interestingly, the choice of activation function had a significant impact on generalization in control tasks. Tanh often proved more robust during overparameterization compared to ReLU.
Limitations and Future Work
While the $(f, g)$-scheme provides a rigorous way to study observational overfitting, it mostly assumes a static relationship between state and noise. In real games, noise (like moving backgrounds or dynamic lighting) is time-dependent, adding another layer of complexity. Furthermore, the experiments primarily utilized PPO, an on-policy algorithm. It remains an open question whether off-policy methods like Q-learning benefit from overparameterization in the exact same way.
Ultimately, because current SL bounds failed to predict RL performance, this work highlights the urgent need for new theoretical tools to understand why certain architectures generalize better than others in non-linear control environments.
Summary updated