NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Sample-efficient Policy Optimization with Stein Control Variate

Hao Liu, Yihao Feng, Yi Mao, Dengyong Zhou, Jian Peng, Qiang Liu

Abstract

Policy gradient methods have achieved remarkable successes in solving challenging reinforcement learning problems. However, they still often suffer from the large variance issue on policy gradient estimation, which leads to poor sample efficiency during training. In this work, we propose a control variate method to effectively reduce variance for policy gradient methods. Motivated by Stein's identity, our method extends the previous control variate methods used in REINFORCE and advantage actor-critic by introducing more general action-dependent baseline functions. Empirical studies show that our method significantly improves the sample efficiency of the state-of-the-art policy gradient approaches.

Introduction

Policy gradient (PG) methods are a cornerstone of modern reinforcement learning, enabling agents to learn complex behaviors in continuous action spaces. However, these methods are notoriously data-hungry due to the high variance of gradient estimates. Because rewards are often derived from stochastic rollouts, the resulting "signal" is frequently drowned out by noise, requiring massive amounts of interaction with the environment to achieve convergence.

To mitigate this, researchers typically employ "control variates" or baselines. A standard baseline—such as the state-value function $V(s)$ used in Advantage Actor-Critic (A2C)—subtracts the average expected reward from the observed reward. While effective, traditional baselines are limited because they only depend on the state ($s$). They cannot account for the specific variance introduced by the choice of a particular action ($a$). This paper introduces the Stein Control Variate, a mathematically rigorous framework that allows for flexible, non-linear, action-dependent baselines to significantly reduce variance and boost sample efficiency.

Methodology

The Stein Control Variate

The core innovation of this work is the application of Stein’s Identity to policy gradients. Stein’s Identity provides a way to construct a broad class of functions that have an expected value of zero under a specific probability distribution. By subtracting a "Stein term" from the gradient estimator, the authors can reduce variance without introducing bias, as the term analytically equals zero in expectation.

Bridging Gradients with Reparameterization

To apply Stein’s Identity—which involves derivatives with respect to actions—to Policy Gradients—which involve derivatives with respect to policy parameters $\theta$—the authors utilize the "reparameterization trick." This connection allows the estimator to act as a bridge between the Likelihood Ratio gradient (which is flexible but high-variance) and the Pathwise Derivative gradient (which is low-variance but requires a differentiable environment model).

Flexible Baseline Architectures

Unlike previous attempts at action-dependent baselines (such as Q-prop), which were often restricted to linear approximations, the Stein Control Variate allows the baseline function $\phi(s, a)$ to be any differentiable function, including deep neural networks. The authors propose two primary strategies for optimizing these baselines:

  1. FitQ: The baseline is trained to approximate the state-action value function $Q(s, a)$.
  2. MinVar: The baseline is trained directly to minimize the variance of the resulting gradient estimate, an objective involving second-order derivatives.

Experimental Setup

The researchers evaluated the Stein Control Variate across the OpenAI Gym benchmark suite, utilizing the MuJoCo physics engine for high-dimensional continuous control. The tasks included standard benchmarks such as Walker2d-v1, Hopper-v1, Ant-v1, and HalfCheetah-v1, as well as the highly challenging Humanoid-v1 and HumanoidStandup-v1 environments.

Key Results and Insights

Enhanced Variance Reduction

In controlled experiments on the Walker2d environment, the Stein control variate—particularly when implemented with Multi-Layer Perceptron (MLP) architectures—achieved significantly lower Mean Squared Error (MSE) in gradient estimation compared to traditional state-only value function baselines. This confirms that capturing the relationship between specific actions and rewards is vital for noise cancellation.

Superior Sample Efficiency

When integrated into Proximal Policy Optimization (PPO), the Stein method demonstrated a marked increase in learning speed. On the difficult Humanoid-v1 task, Stein-enhanced PPO achieved an average reward of 3847, whereas the standard PPO baseline only reached 2207 within the same training budget. Furthermore, the method consistently outperformed Q-prop, proving that the flexibility of non-linear Stein baselines provides a tangible advantage over linear models.

Theoretical Safety

Because the Stein term is mathematically guaranteed to be zero in expectation, researchers can implement complex, high-capacity neural networks as baselines without the risk of biasing the policy gradient. This allows for "the best of both worlds": the representational power of deep learning combined with the theoretical guarantees of classical variance reduction.

Conclusion and Future Work

The Stein Control Variate represents a significant step forward in making policy gradient methods more sample-efficient. By moving beyond state-dependent baselines and leveraging the power of action-dependence through Stein's Identity, the authors provide a robust tool for solving complex control tasks.

While the method introduces some computational overhead due to the training of an additional baseline network, the gains in sample efficiency often outweigh these costs in environments where data collection is expensive. Future research may explore the use of off-policy data to train the Stein baseline more efficiently or apply these techniques to other domains such as Variational Inference and Bayesian Optimization.

Summary updated

BibTeX
@misc{liu2017sample,
  author = {Hao Liu and Yihao Feng and Yi Mao and Dengyong Zhou and Jian Peng and Qiang Liu},
  title = {{Sample-efficient Policy Optimization with Stein Control Variate}},
  year = {2017},
  eprint = {1710.11198},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1710.11198},
}
Figure