ArticleslgStudy

biology

CMA-ES

CMA-ES is a biology topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand CMA-ES rather than just read about it. In short: Covariance matrix adaptation evolution strategy (CMA-ES) is a particular kind of strategy for numerical optimization. Evolution strategies (ES) are stochastic, derivative-free methods for numerical optimization of non-linear or non-convex continuous optimization problems.

CMA-ES — main illustration
CMA-ES — illustration

Key takeaways

  • CMA-ES belongs to biology; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect CMA-ES to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of CMA-ES from memory before moving on to harder problems.

Reference excerpt

Covariance matrix adaptation evolution strategy (CMA-ES) is a particular kind of strategy for numerical optimization. Evolution strategies (ES) are stochastic, derivative-free methods for numerical optimization of non-linear or non-convex continuous optimization problems. They belong to the class of evolutionary algorithms and evolutionary computation. An evolutionary algorithm is broadly based on the principle of biological evolution, namely the repeated interplay of variation (via recombination and mutation) and selection: in each generation (iteration) new individuals (candidate solutions, denoted as x) are generated by variation of the current parental individuals, usually in a stochastic way. Then, some individuals are selected to become the parents in the next generation based on their fitness or objective function value f(x). Like this, individuals with better and better f-values are generated over the generation sequence. In an evolution strategy, new candidate solutions are usually sampled according to a multivariate normal distribution in ℝn. Recombination amounts to selecting a new mean value for the distribution. Mutation amounts to adding a random vector, a perturbation with zero mean. Pairwise dependencies between the variables in the distribution are represented by a covariance matrix. The covariance matrix adaptation (CMA) is a method to update the covariance matrix of this distribution. This is particularly useful if the function f is ill-conditioned. Adaptation of the covariance matrix amounts to learning a second order model of the underlying objective function similar to the approximation of the inverse Hessian matrix in the quasi-Newton method in classical optimization. In contrast to most classical methods, fewer assumptions on the underlying objective function are made. Because only a ranking (or, equivalently, sorting) of candidate solutions is exploited, neither derivatives nor even an (explicit) objective function is required by the method. For example, the ranking could come about from pairwise competitions between the candidate solutions in a Swiss-system tournament.

Principles

Two main principles for the adaptation of parameters of the search distribution are exploited in the CMA-ES algorithm. First, a maximum-likelihood principle predicated on the idea that increasing (though not necessarily maximizing) the sample probability of successful candidate solutions or search directions is beneficial. The mean of the distribution is updated such that the likelihood of previously successful candidate solutions is maximized. The covariance matrix of the distribution is updated (incrementally) such that the likelihood of previously successful search steps is increased. Both updates can be interpreted as a natural gradient descent. Also, in consequence, the CMA conducts an iterated principal components analysis of successful search steps while retaining all principal axes. Estimation of distribution algorithms and the Cross-Entropy Method are based on very similar ideas, but generally estimate (non-incrementally) the covariance matrix by maximizing the likelihood of successful solution points rather than successful search steps. Second, two paths of the time evolution of the distribution mean of the strategy are recorded, called search or evolution paths. These paths contain significant information about the correlation between consecutive steps. Specifically, if consecutive steps are taken in a similar direction, the evolution paths become long. The evolution paths are exploited in two ways. One path is used for the covariance matrix adaptation procedure in place of single successful search steps and facilitates a possibly much faster variance increase of favorable directions. The other path is used to conduct an additional step-size control. This step-size control aims to make consecutive movements of the distribution mean orthogonal in expectation. The step-size control effectively prevents premature convergence yet allowing fast convergence to an optimum.

Algorithm In the following the most commonly used (μ/μw, λ)-CMA-ES is outlined, where in each iteration step a weighted combination of the μ best out of λ new candidate solutions is used to update the distribution parameters. The main loop consists of three main parts: 1) sampling of new solutions, 2) re-ordering of the sampled solutions based on their fitness, 3) update of the internal state variables based on the re-ordered samples. A pseudocode of the algorithm looks as follows.

set λ // number of samples per iteration, at least two, generally > 4 initialize m, σ, C=I, pσ=0, pc=0 // initialize state variables while not terminate do // iterate for i in {1…λ} do // sample λ new solutions and evaluate them xi=sample_multivariate_normal(mean=m, covariance_matrix=σ2C) fi=fitness⁡(xi) x1…λ ← xs(1)…s(λ) with s(i)=argsort⁡(f1…λ,i) // sort solutions m′=m // we need later m−m′ and xi−m′ m ← update_m(x1,…,xλ) // move mean to better solutions pσ ← update_ps(pσ,σ−1C−1/2(m−m′)) // update isotropic evolution path pc ← update_pc(pc,σ−1(m−m′),‖pσ‖) // update anisotropic evolution path C ← update_C(C,pc,(x1−m′)/σ,…,(xλ−m′)/σ) // update covariance matrix σ ← update_sigma(σ,‖pσ‖) // update step-size using isotropic path length return m or x1

The order of the five update assignments is relevant: m must be updated first, pσ and pc must be updated before C, and σ must be updated last. The update equations for the five state variables are specified in the following. Given are the search space dimension n and the iteration step k. The five state variables are

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with CMA-ES

Start with the simplest possible case. Write down what CMA-ES claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In biology, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to CMA-ES before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about CMA-ES ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of CMA-ES

In research
CMA-ES appears in biology research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses CMA-ES in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
CMA-ES is common in secondary-school and first-year university syllabi. It links to neighbouring topics Evolution strategy, Stochastic optimization, so understanding it makes those chapters shorter.
In everyday life
Look for CMA-ES outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “CMA-ES” →

How to study CMA-ES in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what CMA-ES means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain CMA-ES out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is CMA-ES in simple terms?

Covariance matrix adaptation evolution strategy (CMA-ES) is a particular kind of strategy for numerical optimization. Evolution strategies (ES) are stochastic, derivative-free methods for numerical optimization of non-linear or non-convex continuous optimization problems.

Why does CMA-ES matter?

Because it connects several biology ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study CMA-ES?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on CMA-ES.

Tags

  • Evolution strategy
  • Stochastic optimization

Keep exploring