Are Deep Policy Gradient Algorithms Truly Policy Gradient Algorithms?

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

Deep Reinforcement Learning (RL) has achieved legendary status by mastering complex games and robotic tasks. We often attribute this success to the elegant mathematical framework of Policy Gradients. However, does the code we actually run follow the theory we write on the whiteboard? In this ICLR 2020 paper, researchers from MIT and Two Sigma take a "fine-grained" look under the hood of state-of-the-art algorithms like PPO and TRPO, revealing a startling disconnect between theory and practice.

The Problem: A Lack of Conceptual Fidelity

In supervised learning, we generally understand why a model improves: we calculate a gradient on a loss function and move in that direction. In Deep RL, the Policy Gradient Theorem provides a similar roadmap. However, Deep RL is notoriously brittle, sensitive to hyperparameters, and difficult to reproduce. The authors suspect that the "conceptual primitives"—the basic building blocks like gradient estimation and value prediction—might not be functioning as intended in real-world implementations.

Methodology

The researchers performed a diagnostic "stress test" on two of the most popular RL algorithms: Proximal Policy Optimization (PPO) and Trust Region Policy Optimization (TRPO). They focused on three key areas:

  1. Gradient Estimation: Comparing noisy gradients used during training against a "true" gradient calculated using a massive number of samples (up to 10 million state-action pairs).
  2. Value Prediction: Analyzing whether value networks (used to reduce variance) actually learned the true value function of the environment.
  3. Optimization Landscapes: Visualizing the 3D terrain of the surrogate objectives that these algorithms maximize, comparing them to the actual reward landscape.

The study utilized standard MuJoCo benchmarks for continuous control, specifically Humanoid-v2, Walker2d-v2, and Hopper-v2.

Key Insights: The Gradient and Value Gap

One of the most surprising findings is that the gradients used to update the agent often have near-zero or even negative correlation with the "true" expected gradient.

Average pairwise cosine similarity of gradient estimates across training iterations. Standard sample regimes (dashed line) show near-zero correlation that often decays over time.

As shown in the figure above, at the sample sizes typically used in practice (around 2,000 state-action pairs, indicated by the dashed vertical line), the average pairwise cosine similarity of gradient estimates is nearly zero. This indicates that the update directions are essentially random noise relative to the true gradient. Furthermore, as the agent's reward improves over iterations, the gradient quality often decays rather than improves.

Beyond gradient estimation, the researchers found that value networks are often "solving the wrong problem." While they minimize training loss effectively, they remain off by about 50% when compared to the true underlying value function. Interestingly, while the learned value network only marginally reduces variance compared to a "zero" baseline, it remains essential for learning, suggesting it performs a critical role not yet fully captured by current theory.

Optimization Landscapes and Results

The "surrogate" objectives used by PPO and TRPO are intended to be easier-to-optimize proxies for the true reward. However, the authors found that later in training, the directions that increase the surrogate objective often lead to a decrease in the actual reward.

Key results from the study include:

  • Sample Regime: Standard RL implementations use roughly 2,000 samples per update. The authors show that to get a truly accurate gradient estimate, you would need orders of magnitude more samples—far more than is practical.
  • PPO vs. TRPO: In high-sample regimes, TRPO's update direction matches the true reward more closely than PPO's. In PPO, the step direction frequently leads to lower true reward even when estimated accurately.
  • Task Complexity: The "harder" the task (e.g., Humanoid vs. Hopper), the worse the gradient quality and the more misaligned the optimization landscapes become.

Conclusion

This diagnostic study proves that modern deep policy gradient algorithms are "theoretically non-compliant." They frequently succeed despite violating the principles they are based on. The authors suggest the RL community must move beyond benchmark-centric evaluation and develop robust theoretical foundations that reflect the high-variance reality of practice. Future work should focus on understanding the hidden mechanisms—such as the specific role of the value network—that drive performance despite these noisy signals.

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