Differential Evolution — Global Stochastic Optimiser

Decision Sciences
Introduced by
Rainer Storn & Kenneth Price
Year
1997
Type
Population-based stochastic metaheuristic

What does it do?

Differential Evolution (DE), introduced by Rainer Storn and Kenneth Price in 1997, is a population-based stochastic optimisation algorithm for continuous parameter spaces.

It builds candidate solutions from differences between existing population members and requires no gradient information, which makes it applicable to black-box objectives that are non-differentiable or multimodal.

The intuition behind the method

Think of a group of explorers spread across an unknown landscape, looking for the lowest valley. In each round, every explorer considers three colleagues chosen at random, forms a new position by adding a scaled difference between two of them to the third, and keeps whichever of the new or old position lies lower. Over many rounds the group tends to concentrate around the low ground it has found. In DE, the difference between two population vectors supplies the search direction, and the scale factor F sets how large each step is.

History

Differential Evolution was introduced by Rainer Storn and Kenneth Price in their 1997 paper in the Journal of Global Optimization, which presented it as a simple and efficient heuristic for global optimisation over continuous spaces. Subsequent work has produced many variants and adaptive schemes, which Das, Mullick, and Suganthan (2016) review in an updated survey. Variants are commonly distinguished by strategy codes, which specify how the mutant vector is formed and how crossover is applied; the mutation rule described on this page is the one given in the mutation step.

When to use it

Choose DE when the objective is a function of continuous parameters with known lower and upper bounds, when gradients are unavailable or unreliable, and when the objective may be non-differentiable or have several local optima. It suits black-box tasks such as calibrating simulation models, tuning continuous hyperparameters, and engineering design with continuous variables. Avoid DE for purely discrete or combinatorial problems, where the update rule does not naturally produce valid solutions. If each objective evaluation is very expensive and the evaluation budget is tight, a more sample-efficient method such as Bayesian optimisation is usually the better choice, because DE evaluates the objective once per population member in every generation and typically needs many generations.

Limitations and considerations

  • Convergence speed depends on the generation budget and stopping rule, which the user must set; too few generations can end the run before the population has refined a solution.
  • Performance depends on F and CR: a small F can reduce diversity, while a large F can slow convergence. The ranges given on this page are starting points, not guarantees.
  • Each generation requires NP objective evaluations, which can be costly when a single evaluation is expensive.
  • The method is designed for continuous spaces; integer or categorical variables need workarounds that are only approximate.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Requires no gradient information: each trial vector is scored directly on the objective, so non-differentiable objectives can be handled.
  • The step size comes from the spread of the population rather than from a separate step-length schedule, so the scale of the search contracts naturally as the population concentrates.
  • Only three main control parameters (F, CR, and NP) need to be set, which limits the tuning effort.
  • The one-to-one greedy selection guarantees that the best objective value in the population never worsens from one generation to the next.
  • Within a generation, the trial evaluations are independent of one another, so they can be run in parallel.

Applications

  • Calibrating simulation or agent-based models whose parameters are continuous and whose objective has no closed form.
  • Tuning continuous hyperparameters of machine-learning models within bounded ranges.
  • Engineering design problems with continuous variables and a simulated performance measure.
  • Fitting non-linear models whose objective is not differentiable or is awkward to differentiate.

How it works

How it works

1

A population of NP candidate vectors is drawn uniformly at random within user-specified bounds for each parameter. The bounds must be supplied before the run, because DE does not infer them from the problem. A population that spans the feasible region gives the search a chance to reach several promising areas early on. NP must be at least four, so that three distinct members other than the target can be chosen for each mutation. A larger population helps maintain diversity but increases the number of objective evaluations per generation, and NP is usually increased as the number of parameters grows.

2

For each target vector, three distinct population members are chosen at random, and a mutant vector is formed as v = x_r1 + F*(x_r2 - x_r3), where F is the scale factor (a common practical starting range is 0.4–1.0). Because the step is a difference between population members, its size reflects how spread out the population currently is, so the search moves along directions suggested by the population itself and never needs a gradient. The base vector x_r1 is also drawn at random, so the formula above describes the mutation used throughout this page.

3

A trial vector is built by mixing the mutant and the target vector element by element. Each element is taken from the mutant with probability CR (the crossover rate, where a common practical starting range is 0.5–1.0, a heuristic rather than a result established in the literature) and from the target otherwise, and at least one element is always taken from the mutant. A high CR gives the mutant more influence on the trial, while a low CR keeps more of the current solution.

4

The trial vector is evaluated on the objective function and compared with its target vector. If the trial achieves an equal or better objective value, it replaces the target in the next generation; otherwise the target is kept. This one-to-one greedy selection means no individual in the population can worsen from one generation to the next, so the best objective value found never gets worse.

5

Mutation, crossover, and selection repeat over generations until a stopping criterion is met, such as a maximum generation count or a small change in the best objective value over time. The appropriate number of generations depends on the dimensionality of the problem, the ruggedness of the objective, and the cost of each evaluation, so it should be set by monitoring the best objective value rather than fixed in advance. The best vector in the final population is returned as the solution.

Common pitfalls

  • Stopping after too few generations: DE needs enough iterations for the population to contract around a good region. A run that stops early should be treated as preliminary, and a sample-efficient alternative such as Bayesian optimisation may suit a tight budget.
  • Choosing F poorly: a very small F shrinks the difference steps and can collapse diversity, while a very large F can prevent the population from settling. Start within about 0.4–1.0 and adjust according to the observed convergence.
  • Incorrect bounds: the bounds define the initial population and limit the search. Bounds that exclude the optimum, or that are unrealistically wide, lead to misleading results.
  • Relying on a single run: because DE is stochastic, results vary with the random seed. Several independent runs from different seeds, reporting the best solution and the spread across runs, give a more reliable picture.

Frequently asked questions

How do I choose the scale factor F and crossover rate CR?

There is no single correct setting. Common practical starting ranges are about 0.4–1.0 for F and 0.5–1.0 for CR, but these are heuristics rather than fixed values. Watch the population: if it converges too quickly, trying a larger F or a different CR and comparing runs is a reasonable step. Adaptive variants of DE, surveyed in Das et al. (2016), adjust these parameters during the run, which can reduce manual tuning when it is impractical.

How many generations are needed?

The right number depends on the dimensionality of the problem, the ruggedness of the landscape, and the cost of each evaluation, so no fixed figure applies to every problem. Track the best objective value across generations: if it has not improved for a long stretch, the run has either converged or stagnated, and restarting from a different random seed is a sensible check.

How does DE compare with Genetic Algorithms and Particle Swarm Optimisation?

All three are population-based methods for continuous optimisation. DE is stochastic because it selects random population members, but its update is a direct combination of difference vectors followed by one-to-one selection, and it has three main control parameters (F, CR, and NP). Relative performance depends on the problem, and this page does not claim that DE is generally superior, so the choice often rests on familiarity and available implementations.

Can DE handle integer or categorical parameters?

DE is designed for continuous spaces. Integer parameters can be accommodated by rounding the continuous solution to the nearest integer after each update, but this is an approximation. Purely categorical or combinatorial problems, such as scheduling or routing, are better served by methods designed for discrete spaces, such as Ant Colony Optimisation or Tabu Search.

Related methods

Sources

  1. 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.

    Open DOI reference
  2. Das, S., Mullick, S. S., & Suganthan, P. N. (2016). Recent advances in differential evolution – An updated survey. Swarm and Evolutionary Computation, 27, 1–30.

    Open DOI reference