An Empirical Analysis of Measure-Valued Derivatives for Policy Gradients

João Carvalho, Davide Tateo, Fabio Muratore, Jan Peters · DOI

Abstract

In reinforcement learning (RL), the efficiency of policy gradient methods depends heavily on the quality of the gradient estimator. While the Score Function (SF) estimator and the Reparameterization Trick (Rep-trick) are the standard choices, they both possess inherent limitations regarding variance and sensitivity to critic approximation errors. This paper investigates the Measure-Valued Derivative (MVD) as a robust alternative. We demonstrate that MVD provides an unbiased, low-variance gradient estimate that does not require a differentiable critic, making it uniquely resilient to high-frequency noise in value function approximations. Our empirical results across Linear-Quadratic Regulator (LQR) problems and high-dimensional PyBullet benchmarks show that MVD-based agents can match or exceed the performance of state-of-the-art methods while offering superior stability in the presence of imperfect critics.

Introduction

Calculating the gradient of an objective function is the cornerstone of policy optimization in reinforcement learning, especially for robotics and continuous control. Currently, practitioners primarily rely on two methods: the Score Function (SF) estimator (e.g., REINFORCE) and the Reparameterization Trick (Rep-trick) used in algorithms like Soft Actor-Critic (SAC).

However, these methods represent a significant trade-off. The SF estimator is highly flexible and unbiased but suffers from extreme variance, often requiring complex baselines to be viable. Conversely, the Rep-trick offers much lower variance but necessitates a differentiable value function (the "critic"). In practice, neural network critics often contain high-frequency approximation errors—"wiggly" surfaces—that can lead to wild, inaccurate gradient estimates when using the Rep-trick. This research explores the Measure-Valued Derivative (MVD) as a "middle ground" that combines the unbiased nature of SF with the low-variance benefits of the Rep-trick, without the strict requirement for critic differentiability.

The Measure-Valued Derivative (MVD) Approach

The core mathematical intuition behind MVD is to treat the derivative of a probability distribution not as a single function, but as the difference between two distinct probability distributions (a positive and a negative component), scaled by a constant.

For a Gaussian policy, instead of shifting the mean (as in the Rep-trick) or weighting by log-probabilities (as in SF), the MVD estimator samples actions from two specialized distributions—such as a Double-sided Maxwell distribution and a standard Gaussian. By evaluating the difference in rewards between these samples, the MVD provides a gradient estimate. The authors introduce SAC-MVD, a variant of the Soft Actor-Critic algorithm that replaces the standard Rep-trick gradient estimator with this MVD approach.

Experimental Methodology

The researchers evaluated MVD across two primary settings to test both theoretical robustness and practical scalability:

  1. Linear-Quadratic Regulator (LQR): A 2-state, 1-action environment where the optimal gradient is known analytically. This allowed for precise measurement of how "wiggly" (high-frequency) approximation errors in the value function impact different estimators.
  2. Deep RL (PyBullet): High-dimensional continuous control tasks, including Ant, HalfCheetah, Hopper, and Walker2D. These benchmarks tested whether MVD could scale to the complexities of modern robotics simulations.

Key Insights and Results

Robustness to "Wiggly" Critics

A primary finding of this research is the Rep-trick's vulnerability to high-frequency noise. Because the Rep-trick relies on the gradient of the critic ($∇_a Q$), even small local oscillations in the Q-function can lead to catastrophic gradient estimates. MVD and SF, which only sample the value of $Q$ rather than its derivative, are significantly more robust. In LQR tests with high-frequency error, SAC (using the Rep-trick) failed to converge, while MVD-based agents reached the optimal policy unaffected.

Performance and Scalability

In high-dimensional PyBullet tasks, SAC-MVD achieved performance comparable to standard SAC. This is a significant result, as it proves that MVD is a viable alternative even in complex action spaces where it was previously considered too computationally expensive. Furthermore, MVD consistently outperformed SF-based versions of SAC, even when the SF version was given additional samples to compensate for MVD's computational requirements.

Differentiability and Efficiency

Unlike the Rep-trick, MVD does not require the critic to be differentiable. This allows for the potential use of non-neural network function approximators, such as decision trees or random forests, within an actor-critic framework. While MVD requires more forward passes—scaling with the number of distributional parameters ($2|ω|$)—the authors found that wall-clock time remained comparable to standard SAC because MVD avoids the computational overhead of backpropagating through the critic.

Conclusion and Future Work

Measure-Valued Derivatives offer a compelling alternative for policy gradient estimation, providing a robust balance between variance and flexibility. While the scaling of function evaluations remains a potential bottleneck for policies with extremely large parameter sets, the benefits of robustness to critic noise and the ability to use non-differentiable models make MVD a powerful tool for stable reinforcement learning. Future research may focus on reducing computational complexity by computing derivatives only along the most critical dimensions or exploring MVD's performance with truly non-smooth function approximators.

Summary updated

BibTeX
@inproceedings{carvalho2021empirical,
  author = {João Carvalho and Davide Tateo and Fabio Muratore and Jan Peters},
  title = {{An Empirical Analysis of Measure-Valued Derivatives for Policy Gradients}},
  booktitle = {IJCNN},
  year = {2021},
  doi = {10.1109/ijcnn52387.2021.9533642},
}
Figure