Variance Reduction Techniques for Gradient Estimates in Reinforcement Learning

Evan Greensmith, Peter L. Bartlett, Jonathan BaxterNeurIPS 2001

In the world of Reinforcement Learning (RL), policy gradient methods are a staple for finding optimal behaviors in complex environments. However, they harbor a notorious secret: they are incredibly "noisy." Estimating the gradient of a reward signal from a few sample paths is like trying to determine the slope of a mountain while standing in a blizzard—the variance is often so high that the true signal gets lost.

In this classic paper, the authors take a rigorous mathematical look at how to quiet that noise using two primary tools: baselines and actor-critic methods.

The Problem: High Variance in Policy Gradients

When training an agent using policy gradients (specifically the GPOMDP algorithm), researchers use Monte Carlo simulations to estimate which direction to move the policy parameters to increase rewards. Because these rewards are stochastic and depend on long sequences of actions, the estimates suffer from high variance.

High variance means the agent needs a massive amount of data to learn anything useful, and parameter updates can be erratic. To fix this, researchers use "control variates"—additive terms that don't change the expected value (keeping the estimate unbiased) but "soak up" some of the noise. The central challenge addressed in this paper is determining the absolute best control variate to use.

Methods: Baselines and Critics

The paper explores two main architectures for variance reduction:

  1. The Baseline Method: This involves adding a function of the current state (a baseline) to the discounted value estimate. The authors treat this as a quadratic optimization problem to find the specific baseline function that minimizes variance.
  2. The Actor-Critic Method: This replaces the noisy sample-path estimates with an approximate value function (the "critic").

To implement these theoretical findings, the authors introduce two new algorithms:

  • GDORB (Gradient Descent for Optimal Reward Baseline): An algorithm that learns the parameters of a baseline function specifically to minimize the variance of the gradient estimate.
  • GBTE (Gradient-Based Temporal-difference Error): An algorithm designed to learn an approximate value function that minimizes the expected squared error of the gradient.

Key Insights

  • The "Average" isn't Optimal: A very common trick in RL is to subtract the average reward from the current reward. The authors mathematically prove that while this helps, it is suboptimal. They provide a formula for the "optimal constant baseline" that performs strictly better.
  • The Distance Rule: They show that the variance of any baseline is simply the optimal variance plus a weighted squared distance to the optimal baseline. This provides a clear geometric intuition for why some baselines work better than others.
  • The Critic Paradox: In actor-critic methods, conventional wisdom dictates making the critic as close to the "true" value function as possible. The authors flip this on its head, showing a counter-example where the true value function results in positive variance, but a different (technically "wrong") value function yields an unbiased estimate with zero variance.

Key Results

The authors evaluated their theories on a controlled three-state Markov Decision Process (MDP). This allowed them to calculate exact value functions and compare their proposed optimal baselines against theoretical limits.

Comparison of variance reduction methods showing relative norm difference for exact value functions (top) and online learning (bottom).
  • Performance Gains: As seen in the exact value function comparisons, the "Optimal Baseline" ($BL-A^*$) significantly outperformed the standard GPOMDP and the popular "Expected Value" baseline ($BL-E[J_\beta]$).
  • Online Learning: The online algorithms (like GDORB, denoted as $BL-online$) showed a clear and rapid improvement in the quality of gradient estimates compared to traditional methods, proving that these theoretical gains are achievable in practice without knowing the exact environment dynamics upfront.

Limitations and Future Work

  • Complexity of Mixing Times: The mathematical proofs rely on the "mixing time" of the Markov chain (how fast the system reaches a steady state). In very complex or "slow" environments, these bounds might become less practical.
  • Scalability: The experiments were limited to a small 3-state system. While the math holds for larger systems, the performance of the online algorithms on high-dimensional, real-world problems remains a task for future research.
  • Function Approximation: While the paper suggests how to parameterize these baselines, the specific choice of the function approximator (e.g., neural network architectures) is left for future exploration.

Summary updated

BibTeX
@inproceedings{greensmith2001variance,
  author = {Evan Greensmith and Peter L. Bartlett and Jonathan Baxter},
  title = {{Variance Reduction Techniques for Gradient Estimates in Reinforcement Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2001},
  url = {https://openreview.net/forum?id=H1EATI-dbH},
}
Figure