Rethinking Value Function Learning for Generalization in Reinforcement Learning

Seungyong Moon, JunYeong Lee, Hyun Oh Song

TL;DR

Reinforcement Learning (RL) agents often struggle to generalize to new environments because their value functions "memorize" training data rather than learning underlying patterns. This paper introduces Delayed-Critic Policy Gradient (DCPG), which improves generalization by updating the value network less frequently but with more data than the policy network, alongside a novel self-supervised dynamics task.

The "Glass House" Problem in Deep RL

Deep RL has seen massive success in games and robotics, but it suffers from observational overfitting. An agent trained to perfection in one environment often fails miserably when the background color changes or an obstacle moves slightly.

The authors identify a specific culprit: the value function. In multi-environment settings (like the Procgen benchmark), the value network is prone to memorizing specific states rather than learning a general mapping of "how good" a situation is. Previous state-of-the-art methods like Phasic Policy Gradient (PPG) tried to fix this by using separate networks for the policy and the value function. However, this paper argues that the issue isn't just about network architecture—it’s about the optimization process itself.

Methods: Delaying the Critic

To combat value function memorization, the authors propose two main contributions:

1. Delayed-Critic Policy Gradient (DCPG)

Unlike standard algorithms that update the policy and value networks simultaneously, DCPG introduces a "delay." * Policy Phase: The policy is updated frequently using fresh data to maximize rewards. During this phase, the value network is constrained to stay close to its previous version (regularization). * Auxiliary Phase: The value network is updated less frequently but uses a much larger buffer of historical data. This "delayed" and "batch" approach prevents the network from over-focusing on recent, specific experiences, forcing it to learn more robust features that apply across many states.

2. Dynamics-aware DCPG (DDCPG)

The authors add a self-supervised auxiliary task. They train a single discriminator to distinguish between real transitions $(s, a, s')$ and "fake" ones (where the next state or the action is swapped with a random one). This forces the agent's internal representation to understand both forward dynamics (what happens next?) and inverse dynamics (what action caused this change?), providing a richer training signal than rewards alone.

Network architectures for PPO, PPG, and the proposed DDCPG.

Datasets

The researchers evaluated their methods on the Procgen Benchmark, a suite of 16 procedurally generated environments (like BigFish, StarPilot, and Chaser) specifically designed to test generalization. Agents are trained on a limited set of levels (200) and then tested on entirely unseen levels to see if they truly "learned the game" or just memorized the training paths.

Key Insights and Ideas

  • The "Stiffness" Metric: The authors use a mathematical concept called "stiffness" to measure memorization. High stiffness means an update at one state helps the network learn about similar states; low stiffness means the network is just memorizing individual data points. They found that standard methods have very low stiffness in multi-environment settings, while DCPG significantly increases it.
Stiffness measurements across different Procgen environments. DCPG maintains higher stiffness, indicating less memorization.
  • Implicit Regularization is Better: While explicit tools like L2 weight decay or lowering the discount factor can help, they often lead to "premature convergence"—the agent stops learning before it gets good. DCPG’s delayed updates act as a "soft" regularizer that prevents memorization without killing the agent's ability to eventually reach high performance.
  • Unified Architectures Work: Contrary to recent trends suggesting policy and value networks must be separate to avoid interference, the authors show that with the right training schedule (DCPG), a single shared encoder actually performs better and is more efficient.

Key Results

  • Superior Generalization: DCPG outperformed the previous state-of-the-art (PPG) by a wide margin. On the PPO-normalized score across all 16 games, DCPG achieved 184.5%, compared to PPG’s 160.3%.
  • The Dynamics Boost: Adding the self-supervised dynamics task (DDCPG) pushed the score even higher to 202.2%.
  • Sample Efficiency: The proposed methods reached the final performance levels of previous algorithms using significantly fewer environment interactions, making training faster and cheaper.

Limitations and Future Work

  • Computational Overhead: While DCPG uses a unified architecture, the auxiliary phase requires storing a large buffer of data and performing extra optimization steps, which increases memory usage.
  • Difficulty Scaling: The experiments were conducted on the "easy" difficulty of Procgen. While this is standard for generalization research, it remains to be seen how these specific dynamics-aware tasks scale to "hard" modes or high-fidelity 3D simulations.
  • Hyperparameter Sensitivity: The "delay" frequency ($N_\pi$) is a new hyperparameter that might need tuning depending on the complexity of the environment.

In summary, by simply slowing down the "critic" and giving it a broader view of the data, the authors have provided a powerful, intuitive way to stop RL agents from "cramming" for the training set and start learning for the real world.

Summary updated

BibTeX
@inproceedings{moon2022rethinking,
  author = {Seungyong Moon and JunYeong Lee and Hyun Oh Song},
  title = {{Rethinking Value Function Learning for Generalization in Reinforcement Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=JkEz1fqN3hX},
}
Figure