Sample Complexity of Estimating the Policy Gradient for Nearly Deterministic Dynamical Systems

Osbert Bastani

Abstract

While the Policy Gradient Theorem (PGT) provides a mathematically principled foundation for reinforcement learning, simple finite-difference (FD) methods often prove surprisingly competitive in robotics benchmarks. This paper investigates this phenomenon by analyzing the sample complexity of gradient estimators as a function of system noise. We demonstrate that PGT estimators suffer from a "noise floor" where variance remains high even as system stochasticity vanishes. In contrast, FD estimators scale with the system noise, becoming increasingly efficient in the nearly deterministic regimes typical of modern robotics.

Introduction

Reinforcement Learning (RL) has achieved remarkable success in training complex robot controllers. Most state-of-the-art algorithms, such as PPO or REINFORCE, rely on the Policy Gradient Theorem (PGT) to estimate gradients. However, a persistent observation in the field is that "derivative-free" or "black-box" methods—specifically those using Finite-Difference (FD) approximations—often match or exceed the performance of PGT-based methods on standard benchmarks like MuJoCo.

This paper addresses the theoretical gap between the mathematical elegance of PGT and the empirical effectiveness of FD. We argue that the key lies in the nature of robotics tasks: they are often nearly deterministic, characterized by small stochastic perturbations (e.g., sensor noise, friction, or wind). We analyze how the sample complexity—the number of trials required to obtain a reliable gradient estimate—scales with this system noise.

Methodology and Estimators

The study compares three distinct classes of gradient estimators:

  1. Model-Based Gradient: This represents the theoretical upper bound of efficiency. It assumes full knowledge of the system dynamics, allowing for direct backpropagation through the trajectory.
  2. Finite-Difference (FD) Estimator: A black-box approach that estimates the gradient by perturbing policy parameters $\theta$ by a small amount and observing the resulting change in total reward.
  3. Policy Gradient Theorem (PGT) Estimator: The standard RL approach that utilizes the "likelihood ratio" method. It injects noise into the actions to explore the environment and weights rewards by the log-probability of those actions.

The authors derive upper and lower bounds for the sample complexity ($n$) required to achieve an estimation error $\epsilon$, focusing on dependencies on system noise ($\sigma_\zeta$), error tolerance ($\epsilon$), and parameter dimensionality ($d_\theta$).

Theoretical Insights: The Noise Floor

The central theoretical contribution is the identification of a fundamental difference in how these estimators handle vanishing noise.

  • The PGT Noise Floor: PGT estimators require action-space noise to function. Consequently, the variance of the gradient estimate does not vanish even if the underlying system becomes perfectly deterministic. The sample complexity is bounded by $n = \tilde{\Omega}(1/\epsilon)$, independent of the system noise $\sigma_\zeta$.
  • FD Scaling: Conversely, the variance of FD estimates scales directly with the system noise. As the system becomes more deterministic ($\sigma_\zeta \to 0$), the number of samples needed for a good estimate decreases. The complexity is $n = \tilde{\Theta}(\sigma_\zeta^2 d_\theta / \epsilon^4)$.

While FD scales better with noise, it faces a "dimensionality trade-off." Its complexity depends linearly on the number of policy parameters ($d_\theta$), whereas PGT's complexity is less sensitive to parameter count. This suggests FD is optimal for low-noise systems with compact policies, while PGT may be preferable for high-noise environments or extremely large neural networks.

Experimental Results

The theoretical bounds were validated using a simulated Inverted Pendulum environment. The authors varied the system noise $\sigma_\zeta$ across six orders of magnitude ($10^{-6}$ to $10^{-1}$) to observe convergence rates.

Comparison of convergence rates for Model-Based, Finite-Difference, and Policy Gradient Theorem estimators across varying levels of system noise.

As shown in the figure above, both Model-Based and FD algorithms exhibit significantly faster convergence as the system noise decreases (indicated by the various colored lines reaching lower cost values more quickly). In sharp contrast, the PGT algorithm shows almost no improvement in convergence speed as the system becomes more deterministic, confirming the existence of the theoretical "noise floor."

Conclusion

This research provides a rigorous explanation for the competitiveness of simple random search and finite-difference methods in robotics. In nearly deterministic regimes, the ability of FD to leverage low system noise outweighs its disadvantage in high-dimensional parameter spaces. For practitioners, these results highlight that the choice of RL algorithm should be informed by the expected noise levels of the target system and the complexity of the controller. Future work remains to extend this analysis to non-smooth dynamics, such as systems involving hard contacts and impacts.

Summary updated

BibTeX
@inproceedings{bastani2020sample,
  author = {Osbert Bastani},
  title = {{Sample Complexity of Estimating the Policy Gradient for Nearly Deterministic Dynamical Systems}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2020},
}
Figure