Improving Gradient Estimation in Evolutionary Strategies With Past Descent Directions

Florian Meier, Asier Mujika, Marcelo Matheus Gauy, Angelika StegerarXiv 2019

Abstract

Evolutionary Strategies (ES) are known to be an effective black-box optimization technique for deep neural networks when the true gradients cannot be computed, such as in Reinforcement Learning. We continue a recent line of research that uses surrogate gradients to improve the gradient estimation of ES. We propose a novel method to optimally incorporate surrogate gradient information. Our approach, unlike previous work, needs no information about the quality of the surrogate gradients and is always guaranteed to find a descent direction that is better than the surrogate gradient. This allows to iteratively use the previous gradient estimate as surrogate gradient for the current search point. We theoretically prove that this yields fast convergence to the true gradient for linear functions and show under simplifying assumptions that it significantly improves gradient estimates for general functions. Finally, we evaluate our approach empirically on MNIST and reinforcement learning tasks and show that it considerably improves the gradient estimation of ES at no extra computational cost.

Introduction

Evolutionary Strategies (ES) have emerged as a powerful alternative to gradient-based optimization in domains where backpropagation is infeasible, such as Reinforcement Learning (RL) with sparse rewards. By estimating gradients through random parameter perturbations, ES offers a highly parallelizable, black-box approach. However, the primary bottleneck of ES is the high variance of its gradient estimates, especially in high-dimensional parameter spaces where random sampling often fails to capture the steepest descent direction.

Recent advancements have attempted to mitigate this noise by incorporating "surrogate gradients"—biased approximations of the true gradient—to guide the search. A significant limitation of existing surrogate methods is their reliance on prior knowledge of the surrogate's quality. If the surrogate is poor and the algorithm over-trusts it, performance can drop below that of standard random search. This paper introduces a robust estimator that safely incorporates past descent directions as surrogates without requiring hyperparameter tuning for surrogate quality.

Methodology

The proposed method optimizes the gradient estimation process by combining a surrogate direction with orthogonal random search. The approach follows three key steps:

  1. Orthogonal Sampling: Instead of purely random perturbations, the algorithm evaluates the objective function along the surrogate direction and then samples $P$ random directions that are strictly orthogonal to it.
  2. Optimal Combination: The estimator calculates the alignment of the true gradient with both the surrogate and the orthogonal subspace. It then determines the optimal weights to combine these directions, ensuring the resulting descent vector is the best possible within the evaluated subspace.
  3. Iterative Refinement: Because the estimator is mathematically guaranteed to produce a direction more aligned with the true gradient than the surrogate itself, the algorithm can use its previous update direction as the surrogate for the next step. This creates a momentum-like effect that refines the gradient estimate over time.

To ensure robustness against stochastic noise (e.g., from mini-batch sampling), the authors extend this to a multi-dimensional surrogate subspace by utilizing the last $k$ update directions.

Experimental Evaluation

The authors benchmarked the method using MNIST digit classification—allowing for direct comparison with exact backpropagated gradients—and continuous control tasks in the Roboschool RL environment.

Comparison of training loss curves for Default ES (a) versus the proposed method using one (b) and four (c) past samples. The proposed method (red) shows significantly faster initial convergence.

On MNIST, the proposed method demonstrated a dramatic increase in convergence speed. When using the Adam optimizer, standard ES required 433 steps to reach a training log-likelihood of 0.6, while the proposed method reached the same milestone in only 182 steps. Similar performance gains were observed when using SGD, where the proposed method outperformed standard ES by a factor of nearly 2.5.

Key Insights

Gradient Alignment and Momentum

A core finding is that momentum principles from deep learning translate effectively to the ES search space. Consecutive gradients in neural network training are often highly correlated; by treating past updates as free surrogate gradients, the algorithm achieves superior alignment with the true gradient.

The ratio of gradient alignment (cosine similarity) between the proposed method and standard ES. A ratio above 1.0 indicates superior alignment.

As shown in the alignment analysis, the proposed estimator consistently maintains a higher cosine similarity to the true gradient than standard ES throughout the training process. This improved alignment is particularly pronounced in the early stages of training, where the ratio of alignment can be up to twice as high as the baseline.

Robustness Through Memory

In environments with high evaluation noise, such as stochastic mini-batches, a single past direction can be unreliable. The authors found that maintaining a small history (e.g., $k=4$) of past directions provides the necessary stability to maintain high-quality gradient estimates even in noisy settings.

Discussion and Future Work

While the method shows exceptional results in supervised learning, the improvements in complex RL tasks like RoboschoolAnt were more modest. The authors identify a fundamental tension: complex RL requires large perturbations for exploration, whereas this gradient estimator performs best with smaller steps that keep past gradients relevant. Future research will focus on decoupling exploration strategies from gradient estimation to fully leverage these improved descent directions in complex, non-convex RL landscapes.

Summary updated

BibTeX
@misc{meier2019improving,
  author = {Florian Meier and Asier Mujika and Marcelo Matheus Gauy and Angelika Steger},
  title = {{Improving Gradient Estimation in Evolutionary Strategies With Past Descent Directions}},
  year = {2019},
  eprint = {1910.05268},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1910.05268},
}
Figure