{
 "id": "epqc2m1msw",
 "slug": "covariance-matrix-adaptation-evolution-strategy-cma-es",
 "title": "Covariance matrix adaptation evolution strategy (CMA-ES)",
 "updated": "2026-10-15",
 "topic_path": [
  {
   "id": "technology",
   "label": "Technology and the built world",
   "api_url": "https://www.edgepedia.org/api/v1/topics/technology"
  },
  {
   "id": "technology.computing",
   "label": "Computing and digital systems",
   "api_url": "https://www.edgepedia.org/api/v1/topics/technology.computing"
  },
  {
   "id": "technology.computing.ai",
   "label": "Artificial intelligence and data",
   "api_url": "https://www.edgepedia.org/api/v1/topics/technology.computing.ai"
  },
  {
   "id": "technology.computing.ai.algorithms",
   "label": "Algorithms and computational methods",
   "api_url": "https://www.edgepedia.org/api/v1/topics/technology.computing.ai.algorithms"
  },
  {
   "id": "technology.computing.ai.optimization_dp",
   "label": "Optimization and dynamic programming",
   "api_url": "https://www.edgepedia.org/api/v1/topics/technology.computing.ai.optimization_dp"
  },
  {
   "id": "technology.computing.ai.optimization_dp.evolutionary-computation",
   "label": "Evolutionary computation",
   "api_url": "https://www.edgepedia.org/api/v1/topics/technology.computing.ai.optimization_dp.evolutionary-computation"
  }
 ],
 "geo": [
  {
   "id": "geo.nongeo.t2001.technology.computing.ai.optimization_dp",
   "label": "Non-geographic · 2001 to 2020: Optimization and dynamic programming",
   "api_url": "https://www.edgepedia.org/api/v1/geo/geo.nongeo.t2001.technology.computing.ai.optimization_dp",
   "path": [
    {
     "id": "geo.nongeo",
     "label": "Non-geographic",
     "api_url": "https://www.edgepedia.org/api/v1/geo/geo.nongeo"
    },
    {
     "id": "geo.nongeo.t2001",
     "label": "Non-geographic · 2001 to 2020",
     "api_url": "https://www.edgepedia.org/api/v1/geo/geo.nongeo.t2001"
    },
    {
     "id": "geo.nongeo.t2001.technology",
     "label": "Technology and the built world",
     "api_url": "https://www.edgepedia.org/api/v1/geo/geo.nongeo.t2001.technology"
    },
    {
     "id": "geo.nongeo.t2001.technology.computing",
     "label": "Computing and digital systems",
     "api_url": "https://www.edgepedia.org/api/v1/geo/geo.nongeo.t2001.technology.computing"
    },
    {
     "id": "geo.nongeo.t2001.technology.computing.ai",
     "label": "Artificial intelligence and data",
     "api_url": "https://www.edgepedia.org/api/v1/geo/geo.nongeo.t2001.technology.computing.ai"
    },
    {
     "id": "geo.nongeo.t2001.technology.computing.ai.algorithms",
     "label": "Algorithms and computational methods",
     "api_url": "https://www.edgepedia.org/api/v1/geo/geo.nongeo.t2001.technology.computing.ai.algorithms"
    },
    {
     "id": "geo.nongeo.t2001.technology.computing.ai.optimization_dp",
     "label": "Optimization and dynamic programming",
     "api_url": "https://www.edgepedia.org/api/v1/geo/geo.nongeo.t2001.technology.computing.ai.optimization_dp"
    }
   ]
  }
 ],
 "excerpt": "Covariance matrix adaptation evolution strategy (CMA-ES) is a stochastic evolutionary algorithm for black-box minimization of continuous, non-convex functions, introduced by Nikolaus Hansen and Andreas Ostermeier in 2001.",
 "snippet": "Covariance matrix adaptation evolution strategy (CMA-ES) is a stochastic evolutionary algorithm for black-box minimization of continuous, non-convex functions, introduced by Nikolaus Hansen and Andreas Ostermeier in 2001.",
 "node": "technology.computing.ai.optimization_dp.evolutionary-computation",
 "markdown": "# Covariance matrix adaptation evolution strategy (CMA-ES)\n\nCMA-ES (covariance matrix adaptation evolution strategy) is a stochastic evolutionary algorithm that minimizes continuous, non-linear, non-convex functions under black-box conditions, meaning the function values of evaluated search points are the only accessible information about the objective. It repeatedly samples candidate solutions from a multivariate Gaussian distribution and adapts the full covariance matrix of that distribution from the selected points, so the search distribution gradually matches the shape of the objective's contour lines.\n\n| Key fact | Detail |\n|---|---|\n| Problem class | Real-parameter (continuous) minimization of non-linear, non-convex functions; only function values of evaluated points are accessible<sup>[1](https://arxiv.org/abs/1604.00772)</sup> |\n| Search distribution | Multivariate normal, chosen because it has maximum entropy given variances and covariances and does not distinguish coordinate directions<sup>[1](https://arxiv.org/abs/1604.00772)</sup> |\n| Core mechanism | Covariance adaptation approximates the objective's contour lines; on convex-quadratic functions this amounts to approximating the inverse Hessian, similar to a quasi-Newton method<sup>[1](https://arxiv.org/abs/1604.00772)</sup> |\n| Default population size | \\( \\lambda = 4 + \\lfloor 3 \\ln d \\rfloor \\), computed automatically from the dimension \\( d \\)<sup>[2](https://arxiv.org/html/2401.15876v1)</sup> |\n| Typical dimensions | Unconstrained or bounded problems in search space dimensions between three and a hundred<sup>[3](https://cma-es.github.io/index.html)</sup> |\n| Effect of covariance adaptation | Speed-up of several orders of magnitude on badly scaled, non-separable functions; a factor of three to ten on moderately mis-scaled functions<sup>[4](https://doi.org/10.1162/106365601750190398)</sup> |\n| Benchmark coverage | BIPOP-CMA-ES solved 24, 24, 24, 23, 22, and 20 out of 24 BBOB-2009 noiseless functions in dimensions 2, 3, 5, 10, 20, and 40 within \\( 10^{6} \\cdot D \\) evaluations per trial<sup>[5](https://www.msr-inria.fr/files/inria-00382093/file/hansen2009bbi.pdf)</sup> |\n\n## How it works\n\nCMA-ES treats optimization as repeatedly drawing candidates from a Gaussian search distribution \\( \\mathcal{N}(\\mathbf{m}, \\sigma^{2} \\mathbf{C}) \\), where \\( \\mathbf{m} \\) is the mean, \\( \\mathbf{C} \\) the covariance matrix, and \\( \\sigma \\) a global step size. The multivariate normal is used because, given all variances and covariances, it has the largest entropy of all distributions in \\( \\mathbb{R}^{n} \\) and treats all coordinate directions alike.<sup>[1](https://arxiv.org/abs/1604.00772)</sup>\n\nThe final objective of covariance matrix adaptation is to approximate the contour lines of the objective function. On convex-quadratic functions this amounts to approximating the inverse [Hessian matrix](https://www.edgepedia.org/hessian-matrix), which makes the method similar to a quasi-Newton method.<sup>[1](https://arxiv.org/abs/1604.00772)</sup>\n\nCumulation is the second key idea. Rather than reacting to single successful steps, the algorithm accumulates successive selected steps into an evolution path. If successively selected mutation steps are parallel-correlated (scalar product greater than zero), the path becomes comparatively long; if they are anti-parallel correlated, it becomes comparatively short, and step lengths are realized accordingly.<sup>[4](https://doi.org/10.1162/106365601750190398)</sup> Path-length control of the step size (cumulative step-size adaptation, CSA) is needed because covariance matrix adaptation alone is too slow to achieve competitive change rates of the overall step length, for example on the sphere function.<sup>[1](https://arxiv.org/abs/1604.00772)</sup>\n\nCMA-ES differs from estimation-of-distribution algorithms in three ways: it estimates the distribution of selected steps rather than selected points, it updates incrementally rather than re-estimating from scratch, and it adds path-length control of the global step size, which prevents premature convergence.<sup>[3](https://cma-es.github.io/index.html)</sup>\n\n## How it is done\n\nEach iteration runs the following sequence.\n\n1. **Sample** \\( \\lambda \\) offspring from \\( \\mathcal{N}(\\mathbf{m}, \\sigma^{2} \\mathbf{C}) \\) and evaluate the objective.\n2. **Select** the \\( \\mu \\) best points (truncation selection) and set the new mean to their weighted average.<sup>[1](https://arxiv.org/abs/1604.00772)</sup>\n3. **Update the covariance matrix** with a rank-one term from the evolution path and a rank-\\( \\mu \\) term from the selected steps; the rank-\\( \\mu \\) update is so named because the sum of outer products has rank \\( \\min(\\mu, n) \\) with probability one.<sup>[1](https://arxiv.org/abs/1604.00772)</sup>\n4. **Update the step size** \\( \\sigma \\) by cumulative path-length control.\n\nThe recombination weights are summarized by the variance-effective selection mass \\( \\mu_{\\mathrm{eff}} = \\left(\\sum_{i} |w_{i}|\\right)^{2} / \\sum_{i} w_{i}^{2} \\), which quantifies how much information the recombination uses and lies between 1 and \\( \\mu \\).<sup>[1](https://arxiv.org/abs/1604.00772)</sup> Four strategy parameters govern the updates: \\( c_{1} \\) (rank-one learning rate), \\( c_{\\mu} \\) (rank-\\( \\mu \\) learning rate) with \\( c_{1} + c_{\\mu} \\le 1 \\), \\( c_{\\sigma} \\) (decay rate of the cumulation path for step-size control), and \\( c_{c} \\) (covariance path decay).<sup>[1](https://arxiv.org/abs/1604.00772)</sup> Empirically validated defaults are \\( c_{1} \\approx 2/n^{2} \\), \\( c_{\\mu} \\approx \\mu_{\\mathrm{eff}}/n^{2} \\), and \\( c_{c} \\approx 4/n \\), \\( c_{\\sigma} \\approx 4/n \\).<sup>[1](https://arxiv.org/abs/1604.00772)</sup> The default population size is \\( \\lambda = 4 + \\lfloor 3 \\ln d \\rfloor \\).<sup>[2](https://arxiv.org/html/2401.15876v1)</sup>\n\n## Origin\n\nCMA-ES grew out of evolution strategies with mutative self-adaptation of strategy parameters. The 1996 article *Adapting Arbitrary Normal Mutation Distributions in Evolution Strategies: The Covariance Matrix Adaptation* by Nikolaus Hansen and Andreas Ostermeier, presented at the 1996 IEEE International Conference on Evolutionary Computation, introduced covariance matrix adaptation into the (1,\\(\\lambda\\))-ES with cumulation and the (\\(\\mu/\\mu,\\lambda\\))-CMA-ES, adapting arbitrary normal mutation distributions.<sup>[4](https://doi.org/10.1162/106365601750190398)</sup><sup> • </sup><sup>[13](https://researchportal.ip-paris.fr/en/publications/adapting-arbitrary-normal-mutation-distributions-in-evolution-str/)</sup> That paper applies weighted recombination of the best \\( \\mu \\) out of \\( \\lambda \\) individuals.<sup>[4](https://doi.org/10.1162/106365601750190398)</sup>\n\nThe precursors are mutative strategy parameter control introduced by Rechenberg (1973) for global and individual step sizes, expansion to arbitrary normal mutation distributions, and a first level of derandomization introduced into strategy parameter control by Ostermeier and colleagues (1994b).<sup>[4](https://doi.org/10.1162/106365601750190398)</sup> The generating set adaptation (GSA) of Hansen, Ostermeier, and Gawelczyk (1995) adapted arbitrary normal mutation distributions and is discussed as a close forerunner in the CMA papers.<sup>[3](https://cma-es.github.io/index.html)</sup> In 2003, Hansen, Sibylle D. Müller, and [Petros Koumoutsakos](https://www.edgepedia.org/petros-koumoutsakos) added the rank-\\( \\mu \\) update in *Reducing the Time Complexity of the Derandomized Evolution Strategy with Covariance Matrix Adaptation (CMA-ES)*, published in Evolutionary Computation.<sup>[6](https://doi.org/10.1162/106365603321828970)</sup>\n\n## Variants\n\n**Active CMA-ES** uses negative recombination weights in the covariance update so that \"bad\" steps are also taken into account; it has consistently outperformed standard CMA-ES on the BBOB testbed, and combined with weighted recombination it has become the default implementation.<sup>[3](https://cma-es.github.io/index.html)</sup><sup> • </sup><sup>[7](https://inria.hal.science/hal-00746120/document)</sup>\n\n**Restart schemes.** In IPOP-CMA-ES the population size is increased by a factor of two before each restart.<sup>[3](https://cma-es.github.io/index.html)</sup> BIPOP-CMA-ES combines this IPOP mode with a small-population mode, forming a portfolio between IPOP-CMA-ES and independent restarts.<sup>[3](https://cma-es.github.io/index.html)</sup>\n\n**Reduced-complexity variants.** sep-CMA-ES restricts covariance changes to diagonal elements, raising the covariance learning rate from roughly \\( \\mathcal{O}(1/n^{2}) \\) to \\( \\mathcal{O}(1/n) \\) and making internal time and memory complexity linear in the dimension, but abandoning the learning of variable dependencies.<sup>[3](https://cma-es.github.io/index.html)</sup> The matrix adaptation evolution strategy (MA-ES), reported by Hans-Georg Beyer and Bernhard Sendhoff in 2017 in IEEE Transactions on Evolutionary Computation, removes one evolution path and the covariance matrix itself, so covariance update and matrix square-root operations disappear; it learns a matrix \\( \\mathbf{M} \\) using only matrix-matrix and matrix-vector multiplications, and performs nearly as well as the original CMA-ES.<sup>[8](https://doi.org/10.1109/tevc.2017.2680320)</sup>\n\n**Step-size refinements.** Two-point adaptation (TPA), a fully parallelizable step-size scheme that samples two candidates symmetrically about the mean on the line of the last mean shift, has become a secondary standard default for step-size control.<sup>[3](https://cma-es.github.io/index.html)</sup>\n\n**Learning rate adaptation (LRA)** adapts the learning rate \\( \\eta \\) to maintain a constant signal-to-noise ratio, enabling good performance on multimodal and noisy problems without expensive learning-rate tuning.<sup>[2](https://arxiv.org/html/2401.15876v1)</sup>\n\n**CMA-MAE** (covariance matrix adaptation MAP-annealing), published by Shihan Zhao and colleagues in 2024 in ACM Transactions on Evolutionary Learning and Optimization, introduces an archive learning rate \\( \\alpha \\) that smoothly blends quality-diversity CMA-ME behavior with single-objective CMA-ES behavior (\\( \\alpha = 0 \\)), addressing premature exploration abandonment, flat objectives, and low-resolution archives.<sup>[9](https://doi.org/10.1145/3665336)</sup>\n\n## Applications\n\nThe most common applications are model calibration (for example curve fitting) and [shape optimization](https://www.edgepedia.org/shape-optimization).<sup>[3](https://cma-es.github.io/index.html)</sup>\n\nOn the BBOB-2009 noiseless testbed, BIPOP-CMA-ES running times in 20-D to reach the final target value range between \\( D \\) and somewhat above \\( 3 \\times 10^{5} \\cdot D \\) evaluations, typically above \\( 300 \\cdot D \\) and below \\( 30\\,000 \\cdot D \\).<sup>[5](https://www.msr-inria.fr/files/inria-00382093/file/hansen2009bbi.pdf)</sup> Internal compute cost is modest: an eigendecomposition of \\( \\mathbf{C} \\) with time complexity proportional to \\( D^{3} \\) is conducted only every roughly \\( D/10 \\) iterations (a lazy update), giving quadratic internal time scaling and about \\( 10^{-8} \\cdot D^{2} \\) seconds of internal CPU time per function evaluation.<sup>[5](https://www.msr-inria.fr/files/inria-00382093/file/hansen2009bbi.pdf)</sup> For multimodal functions the running-time scaling with dimension is typically quadratic, in some cases worse, but never better; for the unimodal functions f1, f5, and f12 the scaling is linear.<sup>[5](https://www.msr-inria.fr/files/inria-00382093/file/hansen2009bbi.pdf)</sup>\n\n## Limitations and alternatives\n\n**Separable functions.** On additively decomposable (and therefore separable) functions CMA-ES can be vastly outperformed, for example by differential evolution, while it shows superior performance on non-separable functions.<sup>[3](https://cma-es.github.io/index.html)</sup> In a benchmark of BFGS, NEWUOA, CMA-ES, DE, and PSO on ill-conditioned ellipsoid functions with condition number up to \\( 10^{6} \\), NEWUOA clearly outperformed all other algorithms on the separable ellipsoid.<sup>[10](http://www.cmap.polytechnique.fr/~nikolaus.hansen/acte_giens09.pdf)</sup>\n\n**Convex-quadratic functions.** When gradients are unavailable, BFGS is typically faster than CMA-ES by a factor of about ten in function evaluations on purely convex-quadratic functions \\( f(\\mathbf{x}) = \\mathbf{x}^{\\mathsf{T}} \\mathbf{H} \\mathbf{x} \\), and by about 30 on \\( f(\\mathbf{x}) = \\|\\mathbf{x}\\|^{2} \\).<sup>[3](https://cma-es.github.io/index.html)</sup> On the Rosenbrock function NEWUOA outperforms CMA-ES roughly by a factor of five, vanishing for very large conditioning; for \\( \\alpha > 10^{4} \\) BFGS fails and CMA-ES becomes superior to BFGS and NEWUOA for large condition numbers, while DE is roughly ten times slower than CMA-ES.<sup>[10](http://www.cmap.polytechnique.fr/~nikolaus.hansen/acte_giens09.pdf)</sup>\n\n**Noisy objectives.** On the noisy BBOB testbed, solution times range between \\( 100 \\cdot D \\) and \\( 10^{5} \\cdot D^{2} \\) evaluations<sup>[11](https://www.msr-inria.fr/files/inria-00382101/file/hansen2009bbn.pdf)</sup>, and restart-termination via a stagnation criterion turns out to be crucial, since most other standard termination criteria regularly fail.<sup>[11](https://www.msr-inria.fr/files/inria-00382101/file/hansen2009bbn.pdf)</sup>\n\n**Very high dimensions.** Typical practice stays between three and a hundred dimensions<sup>[3](https://cma-es.github.io/index.html)</sup>, and the large-scale variants exist precisely to push beyond the full-matrix cost.<sup>[12](https://dl.acm.org/doi/10.1145/3319619.3326893)</sup>\n\n## References\n\n1. [The CMA Evolution Strategy: A Tutorial (Hansen, 2016, arXiv:1604.00772)](https://arxiv.org/abs/1604.00772)\n2. [CMA-ES with Learning Rate Adaptation (Nomura et al., 2023/2024)](https://arxiv.org/html/2401.15876v1)\n3. [The CMA Evolution Strategy (Hansen's official CMA-ES page)](https://cma-es.github.io/index.html)\n4. [Nikolaus Hansen, Andreas Ostermeier (2001). Completely Derandomized Self-Adaptation in Evolution Strategies. Evolutionary Computation.](https://doi.org/10.1162/106365601750190398)\n5. [Benchmarking a BI-Population CMA-ES on the BBOB-2009 Function Testbed](https://www.msr-inria.fr/files/inria-00382093/file/hansen2009bbi.pdf)\n6. [Nikolaus Hansen, Sibylle D. Müller, Petros Koumoutsakos (2003). Reducing the Time Complexity of the Derandomized Evolution Strategy with Covariance Matrix Adaptation (CMA-ES). Evolutionary Computation.](https://doi.org/10.1162/106365603321828970)\n7. [Comparing Mirrored Mutations and Active Covariance Matrix Adaptation in the IPOP-CMA-ES on the Noiseless BBOB Testbed](https://inria.hal.science/hal-00746120/document)\n8. [Hans-Georg Beyer, Bernhard Sendhoff (2017). Simplify Your Covariance Matrix Adaptation Evolution Strategy. IEEE Transactions on Evolutionary Computation.](https://doi.org/10.1109/tevc.2017.2680320)\n9. [Shihan Zhao and colleagues (2024). Covariance Matrix Adaptation MAP-Annealing: Theory and Experiments. ACM Transactions on Evolutionary Learning and Optimization.](https://doi.org/10.1145/3665336)\n10. [Empirical comparisons of several derivative free optimization algorithms](http://www.cmap.polytechnique.fr/~nikolaus.hansen/acte_giens09.pdf)\n11. [Benchmarking a BI-Population CMA-ES on the BBOB-2009 Noisy Testbed](https://www.msr-inria.fr/files/inria-00382101/file/hansen2009bbn.pdf)\n12. [Benchmarking large scale variants of CMA-ES and L-BFGS-B on the bbob-largescale testbed](https://dl.acm.org/doi/10.1145/3319619.3326893)\n13. [Adapting Arbitrary Normal Mutation Distributions in Evolution Str, researchportal.ip-paris.fr](https://researchportal.ip-paris.fr/en/publications/adapting-arbitrary-normal-mutation-distributions-in-evolution-str/)\n\n---\n*Topic: Encyclopedia › Technology and the built world › Computing and digital systems › Artificial intelligence and data › Algorithms and computational methods › Optimization and dynamic programming › Evolutionary computation*\n\n*Initially written Sep 29, 2026 · Edited: Oct 15, 2026*\n\n*Copyright 2026 EdgeChat AI, a subsidiary of Biostate AI.*\n\nLicense: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license\n",
 "same_as": [],
 "url": "https://www.edgepedia.org/covariance-matrix-adaptation-evolution-strategy-cma-es",
 "markdown_url": "https://www.edgepedia.org/covariance-matrix-adaptation-evolution-strategy-cma-es.md",
 "license": {
  "name": "Edgepedia Community License 1.0",
  "url": "https://www.edgepedia.org/edgepedia/license",
  "summary": "Free with credit, commercial use included. AI training is open to everyone. For other uses, organizations over USD 100M in revenue or 100M monthly users license separately.",
  "spdx": "LicenseRef-Edgepedia-Community-1.0"
 },
 "credit": "\"Covariance matrix adaptation evolution strategy (CMA-ES)\", Edgepedia (EdgeChat), https://www.edgepedia.org/covariance-matrix-adaptation-evolution-strategy-cma-es. Edgepedia Community License 1.0.",
 "credit_md": "\"[Covariance matrix adaptation evolution strategy (CMA-ES)](https://www.edgepedia.org/covariance-matrix-adaptation-evolution-strategy-cma-es)\", Edgepedia (EdgeChat), [https://www.edgepedia.org/covariance-matrix-adaptation-evolution-strategy-cma-es](https://www.edgepedia.org/covariance-matrix-adaptation-evolution-strategy-cma-es). [Edgepedia Community License 1.0](https://www.edgepedia.org/edgepedia/license).",
 "credit_html": "\"<a href=\"https://www.edgepedia.org/covariance-matrix-adaptation-evolution-strategy-cma-es\">Covariance matrix adaptation evolution strategy (CMA-ES)</a>\", Edgepedia (EdgeChat), <a href=\"https://www.edgepedia.org/covariance-matrix-adaptation-evolution-strategy-cma-es\">https://www.edgepedia.org/covariance-matrix-adaptation-evolution-strategy-cma-es</a>. <a href=\"https://www.edgepedia.org/edgepedia/license\">Edgepedia Community License 1.0</a>.",
 "speakable": "Covariance matrix adaptation evolution strategy is a stochastic evolutionary algorithm for black-box minimization of continuous, non-convex functions, introduced by Nikolaus Hansen and Andreas Ostermeier in 2001."
}
