Are Deep Policy Gradient Algorithms Truly Policy Gradient Algorithms?

Andrew Ilyas, Logan Engstrom, Shibani Santurkar, Dimitris Tsipras, Firdaus Janoos, Larry Rudolph, Aleksander Madry

In the world of Reinforcement Learning (RL), Policy Gradient methods like PPO and TRPO are the workhorses of the field. They are backed by elegant mathematics that promises a clear path to optimization: estimate the gradient of the reward, take a step in that direction, and repeat. However, as any practitioner knows, these algorithms are notoriously finicky and sensitive to hyperparameters.

In their ICLR 2020 paper, "A Closer Look at Deep Policy Gradients," Andrew Ilyas and his colleagues from MIT and Two Sigma perform a "stress test" on the theoretical foundations of these methods. Their findings are startling: the internal mechanics of these algorithms often bear little resemblance to the theoretical framework that supposedly motivates them.

TL;DR

This paper reveals a significant "theory-practice gap" in deep policy gradient algorithms, showing that state-of-the-art methods like PPO and TRPO often succeed despite having poor gradient estimates, inaccurate value functions, and misleading optimization landscapes. It argues that our current understanding of why these algorithms work is fundamentally incomplete, necessitating a shift toward more fine-grained evaluation metrics beyond simple reward curves.

What Problem Does This Paper Address?

Deep RL has achieved stunning successes, from mastering Go to controlling complex robotic systems. Yet, the field suffers from a reproducibility crisis. Algorithms are often "brittle," meaning a small change in a random seed or a hyperparameter can lead to total failure.

The authors argue that this instability stems from a lack of understanding of the "primitives" of RL. We assume that because an agent’s reward is going up, the underlying math—gradient estimation, value prediction, and landscape optimization—is working as intended. This paper asks the hard question: To what degree does current practice in deep RL actually reflect the principles informing its development?

Methods

The authors don't propose a new algorithm; instead, they propose a fine-grained analysis framework to audit existing ones. They focus on three key pillars:

  1. Gradient Estimation: They compare the "estimated" gradient (calculated using standard sample sizes like 2,048 state-action pairs) against a "true" gradient computed using a massive number of samples ($10^6$ to $10^7$).
  2. Value Prediction: They investigate whether the value networks (used as baselines to reduce variance) actually learn the true value function or just solve a narrow supervised learning task.
  3. Optimization Landscapes: They visualize the "surrogate" objective functions (which the algorithms actually optimize) against the "true" reward landscape to see if they are actually aligned.

Datasets

The study utilizes the standard MuJoCo continuous control benchmarks, specifically:

  • Humanoid-v2: A high-dimensional, "hard" task.
  • Walker2d-v2: A medium-complexity locomotion task.
  • Hopper-v2: A simpler locomotion task.

These environments are industry standards for testing how well RL agents can learn complex physical movements.

Key Insights and Ideas

  • The "True" Gradient is a Ghost: In standard training regimes, the correlation between the estimated gradient and the true gradient is shockingly low—often near zero or even negative. As tasks get harder (like Humanoid) or as training progresses, the quality of the gradient estimate actually decays.
  • Value Networks are "Good Students, Bad Scientists": Value networks are trained to minimize a specific loss (like Generalized Advantage Estimation). The authors found that while these networks get very good at minimizing that specific loss, they remain wildly inaccurate (off by ~50%) when compared to the true value function of the policy.
  • The Surrogate Trap: Algorithms like PPO use a "surrogate objective" to make optimization easier. However, the paper shows that later in training, the surrogate landscape and the true reward landscape become misaligned. In many cases, taking a step that improves the surrogate objective actually decreases the true reward.
  • Success Despite Failure: The most counterintuitive finding is that agents continue to improve in reward even when their gradient estimates are poor and their landscapes are misaligned. This suggests that the "signal" driving deep RL might be much coarser than the fine-grained policy gradient theory suggests.

Key Results

  • Gradient Quality: For the Humanoid task, the average pairwise cosine similarity between gradient estimates is extremely low in the standard sample regime (2K samples), only reaching high confidence when samples are increased by orders of magnitude.
  • Variance Reduction: While value networks do help reduce variance compared to using no baseline, they are significantly less effective than using the "true" value function would be.
  • Landscape Jaggedness: The true reward landscape is incredibly "jagged" and noisy in low-sample regimes. Large sample sizes reveal a smooth underlying landscape, but current algorithms are forced to navigate the jagged version, leading to "barriers" in optimization.

Limitations and Future Work

The authors acknowledge that their work identifies the "what" but not necessarily the "why." They have uncovered a massive gap between theory and practice, but they don't yet have a new theory to replace the old one.

Future directions include: * Developing new optimization primitives that are robust to the high-noise, low-correlation environments identified here. * Moving away from "benchmark-centric" evaluation (just looking at the final reward) toward "unit testing" RL algorithms on their internal primitives. * Investigating other components not covered here, such as the role of entropy regularization in smoothing these jagged landscapes.

This paper serves as a sobering reminder for RL researchers: just because the reward curve is going up doesn't mean the algorithm is doing what you think it is.

Summary updated

BibTeX
@misc{ilyas2018are,
  author = {Andrew Ilyas and Logan Engstrom and Shibani Santurkar and Dimitris Tsipras and Firdaus Janoos and Larry Rudolph and Aleksander Madry},
  title = {{Are Deep Policy Gradient Algorithms Truly Policy Gradient Algorithms?}},
  year = {2018},
  eprint = {1811.02553},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1811.02553},
}
Figure