Consensus-based optimization (CBO) is a multi-agent derivative-free optimization method, designed to obtain solutions for global optimization problems of the form
where denotes the objective function acting on the state space , which is assumed to be a normed vector space. The function can potentially be nonconvex and nonsmooth. The algorithm employs particles or agents to explore the state space, which communicate with each other to update their positions. Their dynamics follows the paradigm of metaheuristics, which blend exploration with exploitation. In this sense, CBO is comparable to ant colony optimization, wind driven optimization, particle swarm optimization or Simulated annealing.
Consider an ensemble of points , dependent of the time . Then the update for the th particle is formulated as a stochastic differential equation,
with the following components:
An attractive property of CBO is that it allows for mathematical guarantees, especially through its mean-field interpretation. Global convergence of the numerical method can be established.
In practice, the SDE is discretized via the EulerâÂÂMaruyama method such that the following explicit update formula for the ensemble is obtained,If one can employ an efficient implementation of the LogSumExp functions, this can be beneficial for numerical stability of the consensus point computation. We refer to existing implementation in Python https://pdips.github.io/CBXpy/ and Julia https://github.com/PdIPS/CBX.jl.
Consensus-based optimization can be transformed into a sampling method by modifying the noise term and choosing appropriate hyperparameters. Namely, one considers the following SDE
where the weighted covariance matrix is defined as
.
If the parameters are chosen such that the above scheme creates approximate samples of a probability distribution with a density, that is proportional to .
If the function is multi-modal, i.e., has more than one global minimum, the standard CBO algorithm can only find one of these points. However, one can âÂÂpolarizeâ the consensus computation by introducing a kernel that includes local information into the weighting. In this case, every particle has its own version of the consensus point, which is computed asIn this case, the drift is a vector field over the state space . Intuitively, particles are now not only attracted to other particles based on their objective value, but also based on their spatial locality. For a constant kernel function, the polarized version corresponds to standard CBO and is therefore a generalization. We briefly give some examples of common configurations:
A further modification is to also scale the kernel with the objective function, which leads to a provably globally convergent scheme.