Warm Starting of CMA-ES for Contextual Optimization Problems

Yuta Sekino, Kento Uchida, Shinichi ShirakawaarXiv 2025 · DOI

TL;DR

CMA-ES-CWS is a new approach that speeds up evolutionary optimization by "learning" from past tasks. By using Gaussian Process Regression to map external contexts to optimal solutions, it provides a high-quality "warm start" for the Covariance Matrix Adaptation Evolution Strategy (CMA-ES), significantly outperforming methods that rely on simple linear models or context-blind initializations.

What Problem Does This Paper Address?

In many real-world engineering problems, we aren't just optimizing a function once; we are optimizing it for different "contexts." Imagine tuning a robot controller: the optimal parameters ($x$) will change depending on the target walking speed or the terrain slope (the context, $\alpha$). These are contextual optimization problems.

The challenge is efficiency. Standard optimization starts from scratch every time a new context appears. Existing "contextual" versions of CMA-ES often use simple linear models to predict the best starting point, which fails when the relationship between context and the optimum is complex or non-linear. Conversely, traditional "warm starting" methods look at past successful solutions but ignore the context entirely, missing out on the predictive power of environmental data.

Methods

The authors propose CMA-ES with Contextual Warm Starting (CMA-ES-CWS). The workflow consists of two main phases:

  1. Learning from the Past: The algorithm maintains a dataset of pairs: (past context, past optimal solution). It uses this data to train a Multi-output Gaussian Process Regression (GPR). Specifically, they use a Linear Model of Coregionalization (LMC) to handle the multi-dimensional nature of the design variables.
  2. The Warm Start: When a new context ($\alpha_{new}$) is received, the GPR provides a predictive distribution (a mean and a covariance).
  3. The Mean of the GPR becomes the starting mean vector ($m^{(0)}$) for CMA-ES.
  4. The Uncertainty (trace of the GPR covariance) is used to set the initial step-size ($\sigma^{(0)}$), ensuring the search starts wide enough to account for prediction error but narrow enough to be efficient.
  5. Crucially, they initialize the CMA-ES covariance matrix ($C^{(0)}$) as the identity matrix, arguing that the GPR predicts where the optimum is, not the shape of the local landscape.

Datasets

The researchers evaluated their method on two fronts:

  • Synthetic Benchmarks: They used the Sphere, Rosenbrock, and Easom functions. To simulate contextual problems, they applied three types of transformations to the search space based on the context vector: Linear Shifts, Nonlinear Shifts, and Noisy Shifts.
  • Robot Control Tasks: They utilized the FetchPush-v2 and FetchSlide-v2 environments from OpenAI Gym. These involve controlling a robot arm to move a box to a target position, where the initial box position and target coordinates serve as the context.

Key Insights and Ideas

  • GPR vs. Linear Models: The "aha moment" here is that linear policy models (used in previous contextual CMA-ES variants) are a major bottleneck. By switching to GPR, the algorithm can capture complex, non-linear dependencies between the environment and the optimal solution.
  • Location vs. Shape: A subtle but important insight is the decision not to use the GPR’s predictive covariance to initialize the CMA-ES covariance matrix. The authors note that the GPR tells you about the uncertainty of the optimum's location, whereas CMA-ES needs its covariance matrix to adapt to the shape of the objective function's landscape. Mixing these two can actually hinder performance.
  • Smart Step-Sizing: By clipping the initial step-size based on GPR uncertainty, the method avoids the "too small to move" trap that often plagues warm-started evolutionary strategies.

Key Results

  • Speedup: On the Rosenbrock function (a notoriously difficult "banana-shaped" valley), CMA-ES-CWS reached the target evaluation value in roughly 1/4 the time required by standard CMA-ES or context-blind warm starting.
  • Robustness to Complexity: In nonlinear and noisy shift scenarios, CMA-ES-CWS significantly outperformed the linear policy model. The GPR was able to "see through" the noise and non-linearity that blinded simpler models.
  • Robotics Success: In the FetchPush task, CMA-ES-CWS was the only method that consistently started its search within the valid range of design variables, leading to much faster convergence compared to competitors that wasted evaluations searching outside the feasible space.

Limitations and Future Work

While powerful, the authors acknowledge a few hurdles:

  • Noise Sensitivity: While better than linear models, the performance still dipped in high-noise scenarios. The authors suggest that developing specific noise-handling capabilities for the warm-start phase is a priority.
  • Discrete Spaces: The current iteration is strictly for continuous optimization. Extending this to discrete or mixed-integer problems (common in hardware design) remains an open challenge.
  • Covariance Initialization: While they currently use the identity matrix for the initial covariance, they are looking for ways to leverage past "landscape shapes" to initialize the covariance matrix more intelligently without confusing it with location uncertainty.

Summary updated

Abstract

Several practical applications of evolutionary computation possess objective functions that receive the design variables and externally given parameters. Such problems are termed contextual optimization problems. These problems require finding the optimal solutions corresponding to the given context vectors. Existing contextual optimization methods train a policy model to predict the optimal solution from context vectors. However, the performance of such models is limited by their representation ability. By contrast, warm starting methods have been used to initialize evolutionary algorithms on a given problem using the optimization results on similar problems. Because warm starting methods do not consider the context vectors, their performances can be improved on contextual optimization problems. Herein, we propose a covariance matrix adaptation evolution strategy with contextual warm starting (CMA-ES-CWS) to efficiently optimize the contextual optimization problem with a given context vector. The CMA-ES-CWS utilizes the optimization results of past context vectors to train the multivariate Gaussian process regression. Subsequently, the CMA-ES-CWS performs warm starting for a given context vector by initializing the search distribution using posterior distribution of the Gaussian process regression. The results of the numerical simulation suggest that CMA-ES-CWS outperforms the existing contextual optimization and warm starting methods.
BibTeX
@misc{sekino2025warm,
  author = {Yuta Sekino and Kento Uchida and Shinichi Shirakawa},
  title = {{Warm Starting of CMA-ES for Contextual Optimization Problems}},
  year = {2025},
  eprint = {2502.12555},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.12555},
}
Figure