Efficient covariance matrix update for variable metric evolution strategies

Thorsten Suttorp, Nikolaus Hansen, Christian IgelMachine Learning 2009 · DOI

Abstract

This paper introduces a method to update the Cholesky factors of the covariance matrix in the Covariance Matrix Adaptation Evolution Strategy (CMA-ES) directly in $O(n^2)$ time. By bypassing the traditional $O(n^3)$ decomposition bottleneck, the algorithm scales to high-dimensional problems while maintaining the critical evolution path information, achieving significant speedups without sacrificing optimization performance.

The Computational Bottleneck in CMA-ES

In black-box optimization scenarios like reinforcement learning or hyperparameter tuning, CMA-ES is considered a "gold standard" due to its ability to learn the search space's shape by adapting a covariance matrix. However, sampling from this distribution requires decomposing the covariance matrix (e.g., via Cholesky or Eigen-decomposition), a process that typically scales at $O(n^3)$ complexity for $n$ dimensions.

When $n$ is large, the computational cost of matrix math often dwarfs the time spent evaluating the objective function. A common workaround is to perform updates less frequently, but this comes at a measurable cost to optimization efficiency.

Performance loss relative to the frequency of covariance matrix updates. Delaying updates to mitigate $O(n^3)$ costs results in a linear degradation of optimization performance.

As shown in the figure above, the loss in performance increases linearly with the number of steps between updates. This highlights the need for a more efficient update mechanism that allows for frequent adaptation without the $O(n^3)$ penalty.

The $O(n^2)$ Cholesky Update

The core innovation presented by the authors is a mathematical shortcut that operates directly on the Cholesky factors ($A$, where $C = AA^T$) and their inverses.

  1. Incremental Rank-One Update: Instead of updating the full covariance matrix $C$ and then factorizing it, the authors derived a way to update the matrix $A$ directly using a rank-one update rule.
  2. Maintaining the Inverse: Using the Sherman-Morrison formula, they maintain the inverse of the Cholesky factor ($A^{-1}$) in $O(n^2)$ time. This is crucial for transforming successful steps back into the required coordinate system for the next update.
  3. Algorithmic Integration: This "Cholesky update" was integrated into several major frameworks, including the Elitist (1+1)-CMA-ES, Multi-Objective CMA-ES (MO-CMA-ES), and a simplified non-elitist population-based version.

Key Insights and Results

The Importance of the Evolution Path

A critical finding of this research is that the "evolution path"—a weighted sum of past successful steps—can be maintained within the $O(n^2)$ framework. Previous attempts to simplify CMA-ES often discarded this path to save time, but the authors demonstrate that keeping it makes the algorithm roughly 4x faster in terms of function evaluations on difficult landscapes.

Massive Speedups and Scaling

The numerical results demonstrate the efficiency of the new approach:

  • Dimensional Scaling: For a 20-dimensional problem, the new update is approximately 10x faster than the original. At 1,000 dimensions, it is roughly 500x faster.
  • Linear Scaling: On specific benchmark functions like the "Cigar" function, the version utilizing an evolution path scales linearly with dimension ($300n$), whereas versions without it scale almost quadratically ($150n^{1.8}$).
  • Numerical Stability: Despite the iterative nature of the updates, the method is remarkably stable, often proving more accurate than performing a fresh matrix inversion at every step.

Conclusion

The Cholesky-CMA-ES provides a mathematically equivalent alternative to traditional $O(n^3)$ implementations while reaching the theoretical lower bound of $O(n^2)$ for matrix updates. This allows researchers to apply the full power of CMA-ES to high-dimensional problems that were previously computationally prohibitive, without losing the optimization power provided by the evolution path.

Summary updated

BibTeX
@article{suttorp2009efficient,
  author = {Thorsten Suttorp and Nikolaus Hansen and Christian Igel},
  title = {{Efficient covariance matrix update for variable metric evolution strategies}},
  journal = {Machine Learning},
  year = {2009},
  doi = {10.1007/s10994-009-5102-1},
}
Figure