This package implements consensus based optimization and polarization methods. The experiments in this repo reproduce the examples from the paper "Polarized consensus-based dynamics for optimization and sampling": https://arxiv.org/abs/2211.05238
You can install polarcbo via pip:
pip install polarcbo
Polarized consensus-based dynamics allow to apply consensus-based optimization (CBO) and sampling (CBS) for objective functions with several global minima or distributions with many modes, respectively. Here we have
- particles
${x^{(i)}}\in\mathbb{R}^d$ which explore the space, - the objective
$V:\mathbb{R}^d\to\mathbb{R}$ which we want to optimize.
For optimizing
where
-
$m(x^{(i)})$ is a weighted empirical mean associated with the point$x^{(i)}$ , -
$W^{(i)}$ are independent Brownian motions, -
$\sigma$ scales the influence of the noise term.
For sampling from
where
The choice of the functions
Note that these weighted mean and covariance give more influence to particles which are close to
You can find a documentation for the polarcbo
here.
If you want to cite this package or parts of the code you can use this bibtex entry
@online{bungert2022polarized,
author = {Bungert, Leon and Roith, Tim and Wacker, Philipp},
title = {Polarized consensus-based dynamics for optimization and sampling},
year = {2022},
eprint={2211.05238},
archivePrefix={arXiv},
primaryClass={math.OC}
}