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

A Theoretical and Empirical Comparison of Gradient Approximations in Derivative-Free Optimization

Albert S. Berahas, Liyuan Cao, Krzysztof Choromanski, Katya ScheinbergFound. Comput. Math 2022 · DOI

In the world of Derivative-Free Optimization (DFO), we often find ourselves flying blind, trying to minimize a function without knowing its gradient. To compensate, we use "proxies"—gradient approximations built from function evaluations. This paper provides a rigorous theoretical and empirical "bake-off" between classic deterministic methods (like finite differences) and the randomized smoothing techniques that have recently surged in popularity within the Reinforcement Learning (RL) community.

TL;DR

This paper proves that while randomized gradient smoothing (e.g., Evolution Strategies) is popular, it generally requires significantly more function samples than traditional finite differences or linear interpolation to achieve the same level of accuracy. While randomization provides robustness in complex RL landscapes, deterministic methods remain the efficiency champions for standard noisy optimization.

What Problem Does This Paper Address?

Many real-world optimization problems are "black boxes": we can compute a value $f(x)$, but we don't have a formula for the gradient $\nabla f(x)$. Furthermore, the values we get are often noisy due to measurement errors or internal discretizations.

To solve these problems using efficient "gradient-descent-like" algorithms, we must estimate the gradient. Two main schools of thought exist:

  1. Deterministic: Sample points in a structured way (e.g., along coordinate axes).
  2. Randomized: Sample points in random directions (Gaussian or sphere smoothing).

The "gap" the authors address is the lack of a head-to-head theoretical comparison. Specifically, how many samples ($N$) and what sampling radius ($\sigma$) do you need for these different methods to guarantee that your estimated gradient is "good enough" to ensure the optimization algorithm actually converges?

Methods

The authors analyze four primary gradient approximation families:

  • Forward/Central Finite Differences (FFD/CFD): The classic approach of perturbing one variable at a time.
  • Linear Interpolation (LI): Fitting a linear model to a set of points. This is powerful because it allows for "point reuse" from previous iterations.
  • Gaussian Smoothed Gradients (GSG): Estimating the gradient by sampling directions from a normal distribution (popularized by "Evolution Strategies" in RL).
  • Sphere/Ball Smoothing (BSG): Similar to Gaussian smoothing, but sampling uniformly from a unit sphere or ball.

The core of their analysis revolves around the norm condition: ensuring the error in the gradient estimate is smaller than a fraction of the true gradient's magnitude.

Datasets

The authors evaluated these methods across three distinct environments:

  1. Synthetic Functions: A custom-built sin/cos-based function designed to allow precise control over the dimension ($n$), noise level ($\epsilon_f$), and curvature ($L, M$).
  2. Schittkowski Test Set: A standard benchmark consisting of 69 diverse non-linear programming problems.
  3. OpenAI Gym (Reinforcement Learning): Three classic control tasks—Swimmer, HalfCheetah, and Reacher—to test how these methods perform in high-dimensional, highly non-linear "policy optimization" settings.

Key Insights and Ideas

  • The "Sample Size" Reality: A common misconception is that randomized methods are "cheaper." The authors show that to get a gradient estimate comparable in accuracy to finite differences, randomized methods still require $O(n)$ samples. If you use fewer samples, the "noise" in your gradient estimate becomes so high that the optimization may stall.
  • The Bias-Variance Tradeoff in Sampling: The sampling radius $\sigma$ is a double-edged sword. If $\sigma$ is too small, the noise in the function evaluations overwhelms the calculation (high variance). If $\sigma$ is too large, the linear approximation becomes invalid because of the function's curvature (high bias).
  • Randomization as a Feature, Not a Bug: In RL tasks, the deterministic Finite Difference method often performed worse than randomized methods. Why? Because FD is "brittle"—it can get stuck in tiny local minima. The randomness in smoothing acts as a natural "explorer," helping the algorithm skip over small bumps in the landscape.

Key Results

  • Accuracy King: Central Finite Differences (CFD) consistently provided the most accurate gradient estimates, but at the cost of $2n$ samples.
  • Efficiency Winner: Linear Interpolation (LI) proved highly effective because it can achieve high accuracy with only $n$ samples, especially when points are reused across iterations.
  • Smoothing Overhead: For Gaussian and Sphere smoothing to satisfy the convergence conditions with high probability, the required number of samples $N$ often needs to be much larger than $n$ (sometimes $4n$ or $8n$ in practice).
  • RL Performance: In the OpenAI Gym experiments, the Interpolation method (using random but orthonormal directions) outperformed standard Gaussian Smoothing, suggesting that structured randomness is better than pure Gaussian noise.

Limitations and Future Work

  • Bounded Noise Assumption: The theory assumes noise is bounded ($|\epsilon(x)| \leq \epsilon_f$). While realistic for many engineering problems, it doesn't cover cases with "heavy-tailed" stochastic noise.
  • Static Sampling: The paper focuses on fixed sample sizes. The authors suggest that adaptive sampling—changing the number of samples or the radius $\sigma$ based on the progress of the optimization—is a promising but complex next step.
  • Second-Order Info: The study is limited to first-order (gradient) approximations. Extending this rigorous comparison to Hessian (second-order) approximations remains an open challenge.

Summary updated

BibTeX
@article{berahas2022theoretical,
  author = {Albert S. Berahas and Liyuan Cao and Krzysztof Choromanski and Katya Scheinberg},
  title = {{A Theoretical and Empirical Comparison of Gradient Approximations in Derivative-Free Optimization}},
  journal = {Found. Comput. Math.},
  year = {2022},
  doi = {10.1007/s10208-021-09513-z},
}
Figure