Differential evolution

From HandWiki
Differential Evolution optimizing the 2D Ackley function.

In evolutionary computation, differential evolution (DE) is a method that optimizes a problem by iteratively trying to improve a candidate solution with regard to a given measure of quality. Such methods are commonly known as metaheuristics as they make few or no assumptions about the problem being optimized and can search very large spaces of candidate solutions. However, metaheuristics such as DE do not guarantee an optimal solution is ever found.

DE is used for multidimensional real-valued functions but does not use the gradient of the problem being optimized, which means DE does not require the optimization problem to be differentiable, as is required by classic optimization methods such as gradient descent and quasi-newton methods. DE can therefore also be used on optimization problems that are not even continuous, are noisy, change over time, etc.[1]

DE optimizes a problem by maintaining a population of candidate solutions and creating new candidate solutions by combining existing ones according to its simple formulae, and then keeping whichever candidate solution has the best score or fitness on the optimization problem at hand. In this way, the optimization problem is treated as a black box that merely provides a measure of quality given a candidate solution and the gradient is therefore not needed.

DE was introduced by Storn and Price in the 1990s.[2][3] Books have been published on theoretical and practical aspects of using DE in parallel computing, multiobjective optimization, constrained optimization, and the books also contain surveys of application areas.[4][5][6][7] Surveys on the multi-faceted research aspects of DE can be found in journal articles .[8][9]


A basic variant of the DE algorithm works by having a population of candidate solutions (called agents). These agents are moved around in the search-space by using simple mathematical formulae to combine the positions of existing agents from the population. If the new position of an agent is an improvement then it is accepted and forms part of the population, otherwise the new position is simply discarded. The process is repeated and by doing so it is hoped, but not guaranteed, that a satisfactory solution will eventually be discovered.

Formally, let [math]\displaystyle{ f: \mathbb{R}^n \to \mathbb{R} }[/math] be the fitness function which must be minimized (note that maximization can be performed by considering the function [math]\displaystyle{ h := -f }[/math] instead). The function takes a candidate solution as argument in the form of a vector of real numbers and produces a real number as output which indicates the fitness of the given candidate solution. The gradient of [math]\displaystyle{ f }[/math] is not known. The goal is to find a solution [math]\displaystyle{ \mathbf{m} }[/math] for which [math]\displaystyle{ f(\mathbf{m}) \leq f(\mathbf{p}) }[/math] for all [math]\displaystyle{ \mathbf{p} }[/math] in the search-space, which means that [math]\displaystyle{ \mathbf{m} }[/math] is the global minimum.

Let [math]\displaystyle{ \mathbf{x} \in \mathbb{R}^n }[/math] designate a candidate solution (agent) in the population. The basic DE algorithm can then be described as follows:

  • Choose the parameters [math]\displaystyle{ \text{NP} \geq 4 }[/math], [math]\displaystyle{ \text{CR} \in [0,1] }[/math], and [math]\displaystyle{ F \in [0,2] }[/math].
    • [math]\displaystyle{ \text{NP} }[/math] is the population size, i.e. the number of candidate agents or "parents"; a typical setting is 10[math]\displaystyle{ n }[/math].
    • The parameter [math]\displaystyle{ \text{CR} \in [0,1] }[/math] is called the crossover probability and the parameter [math]\displaystyle{ F \in [0,2] }[/math] is called the differential weight. Typical settings are [math]\displaystyle{ CR = 0.9 }[/math] and [math]\displaystyle{ F = 0.8 }[/math].
    • Optimization performance may be greatly impacted by these choices; see below.
  • Initialize all agents [math]\displaystyle{ \mathbf{x} }[/math] with random positions in the search-space.
  • Until a termination criterion is met (e.g. number of iterations performed, or adequate fitness reached), repeat the following:
    • For each agent [math]\displaystyle{ \mathbf{x} }[/math] in the population do:
      • Pick three agents [math]\displaystyle{ \mathbf{a},\mathbf{b} }[/math], and [math]\displaystyle{ \mathbf{c} }[/math] from the population at random, they must be distinct from each other as well as from agent [math]\displaystyle{ \mathbf{x} }[/math]. ([math]\displaystyle{ \mathbf{a} }[/math] is called the "base" vector.)
      • Pick a random index [math]\displaystyle{ R \in \{1, \ldots, n\} }[/math] where [math]\displaystyle{ n }[/math] is the dimensionality of the problem being optimized.
      • Compute the agent's potentially new position [math]\displaystyle{ \mathbf{y} = [y_1, \ldots, y_n] }[/math] as follows:
        • For each [math]\displaystyle{ i \in \{1,\ldots,n\} }[/math], pick a uniformly distributed random number [math]\displaystyle{ r_i \sim U(0,1) }[/math]
        • If [math]\displaystyle{ r_i \lt CR }[/math] or [math]\displaystyle{ i = R }[/math] then set [math]\displaystyle{ y_i = a_i + F \times (b_i-c_i) }[/math] otherwise set [math]\displaystyle{ y_i = x_i }[/math]. (Index position [math]\displaystyle{ R }[/math] is replaced for certain.)
      • If [math]\displaystyle{ f(\mathbf{y}) \leq f(\mathbf{x}) }[/math] then replace the agent [math]\displaystyle{ \mathbf{x} }[/math] in the population with the improved or equal candidate solution [math]\displaystyle{ \mathbf{y} }[/math].
  • Pick the agent from the population that has the best fitness and return it as the best found candidate solution.

Parameter selection

Performance landscape showing how the basic DE performs in aggregate on the Sphere and Rosenbrock benchmark problems when varying the two DE parameters [math]\displaystyle{ \text{NP} }[/math] and [math]\displaystyle{ \text{F} }[/math], and keeping fixed [math]\displaystyle{ \text{CR} }[/math]=0.9.

The choice of DE parameters [math]\displaystyle{ \text{NP} }[/math], [math]\displaystyle{ \text{CR} }[/math] and [math]\displaystyle{ F }[/math] can have a large impact on optimization performance. Selecting the DE parameters that yield good performance has therefore been the subject of much research. Rules of thumb for parameter selection were devised by Storn et al.[3][4] and Liu and Lampinen.[10] Mathematical convergence analysis regarding parameter selection was done by Zaharie.[11]


Variants of the DE algorithm are continually being developed in an effort to improve optimization performance. Many different schemes for performing crossover and mutation of agents are possible in the basic algorithm given above, see e.g.[3]

See also


  1. Rocca, P.; Oliveri, G.; Massa, A. (2011). "Differential Evolution as Applied to Electromagnetics". IEEE Antennas and Propagation Magazine 53 (1): 38–49. doi:10.1109/MAP.2011.5773566. 
  2. Storn, R.; Price, K. (1997). "Differential evolution - a simple and efficient heuristic for global optimization over continuous spaces". Journal of Global Optimization 11 (4): 341–359. doi:10.1023/A:1008202821328. 
  3. 3.0 3.1 3.2 Storn, R. (1996). "On the usage of differential evolution for function optimization". pp. 519–523. doi:10.1109/NAFIPS.1996.534789. 
  4. 4.0 4.1 Price, K.; Storn, R.M.; Lampinen, J.A. (2005). Differential Evolution: A Practical Approach to Global Optimization. Springer. ISBN 978-3-540-20950-8. https://www.springer.com/computer/theoretical+computer+science/foundations+of+computations/book/978-3-540-20950-8. 
  5. Feoktistov, V. (2006). Differential Evolution: In Search of Solutions. Springer. ISBN 978-0-387-36895-5. https://www.springer.com/mathematics/book/978-0-387-36895-5. 
  6. G. C. Onwubolu and B V Babu, "New Optimization Techniques in Engineering". https://www.springer.com/in/book/9783540201670. 
  7. Chakraborty, U.K., ed. (2008), Advances in Differential Evolution, Springer, ISBN 978-3-540-68827-3, https://www.springer.com/engineering/book/978-3-540-68827-3 
  8. S. Das and P. N. Suganthan, "Differential Evolution: A Survey of the State-of-the-art", IEEE Trans. on Evolutionary Computation, Vol. 15, No. 1, pp. 4-31, Feb. 2011, DOI: 10.1109/TEVC.2010.2059031.
  9. S. Das, S. S. Mullick, P. N. Suganthan, "Recent Advances in Differential Evolution - An Updated Survey," Swarm and Evolutionary Computation, doi:10.1016/j.swevo.2016.01.004, 2016.
  10. Liu, J.; Lampinen, J. (2002). "On setting the control parameter of the differential evolution method". Brno, Czech Republic. pp. 11–18. 
  11. Zaharie, D. (2002). "Critical values for the control parameters of differential evolution algorithms". Brno, Czech Republic. pp. 62–67.