betaFeedback

WorksMathematics

Consensus of Consensus: Decentralized Consensus-Based Optimization

Abstract

We propose and analyze a decentralized variant of Consensus-Based Optimization (CBO) for the global minimization of continuous, possibly non-convex functions accessible only through a stochastic, possibly biased, zeroth-order oracle with bounded mean-squared error. The agents are split among NN units of an undirected communication network. Each unit evolves its swarm of MM agents towards a local tracking variable, which follows the network average of the local consensus points through one round of neighbour-to-neighbour communication via a doubly stochastic mixing matrix, without any central coordinator. We show that, under an explicit condition linking the drift and diffusion parameters to MM, all agents reach consensus almost surely, at an exponential mean-square rate governed by the spectrum of the mixing matrix. Using a finite-agent quantitative Laplace principle, we prove that, for large αα and provided some agent visits a neighbourhood of the global minimizer with sufficient probability, the expected mean-squared distance of the swarm from the minimizer falls below any tolerance within an explicit number of iterations, at a rate that deteriorates for poorly connected networks. We verify this hitting assumption for a simplified dynamics. Experiments on benchmarks up to dimension d=1000d=1000, with stochastic objectives, and on a federated learning task demonstrate the method's effectiveness.

Introduction

Consensus-based optimization (CBO) is a versatile, zero-order metaheuristic for global optimization: an ensemble of interacting agents explores the search space and is driven, through a drift-diffusion dynamics, toward a weighted average of the agents’ positions, the consensus point, computed via a Gibbs-type weighting of the objective function. Since it never requires gradient information, CBO is directly applicable to nonsmooth, nonconvex, and even black-box objectives, while at the same time being amenable to rigorous mean-field and finite-agent analysis, unlike most other metaheuristics of swarm-intelligence type. The model was first introduced by Pinnau, Totzeck, Tse and Martin [34], who proposed the underlying stochastic differential equation and derived its mean-field limit as a nonlocal, degenerate parabolic PDE. The first rigorous proofs that the method actually converges to a global minimizer, under quantitative assumptions on the objective and the initialization, were given by Carrillo, Choi, Totzeck and Tse [8] and, in fully unconditional form with respect to initialization and with agent analysis as well, by Fornasier, Klock and Riedl [16] (see also the independent proof by Ha, Jin and Kim [21]). Since these foundational results, a large body of work has refined the model along several directions: anisotropic, component-wise noise to remove the dimension-dependence of the drift and to reduce computational cost via mini-batching [11], truncated noise [17], jump-diffusion noise [29], memory effects [35], heterogeneous noise combined with random-batch agent interactions [30], noisy/estimated objective evaluations [3], and mechanisms such as a personal-best memory term borrowed from particle swarm optimization [39]. In parallel, CBO has been extended to constrained problems on the sphere and other hypersurfaces [14] and shown to be competitive on high-dimensional machine learning tasks [11, 15], has been connected to consensus-based sampling [10], and has recently been introduced to robotics for global trajectory and policy optimization [37]; we refer to [38] for a broader survey of these developments.

Yet, in order to fully exploit the potential of CBO, in particular on the large-scale, high-dimensional problems arising in modern machine learning, a genuinely parallel and distributed formulation of the algorithm would be crucial. It is a recurring claim in the literature that CBO-type dynamics are “highly parallelizable” or “inherently scalable” [38, 13], and indeed the per-agent updates may typically be distributed across the cores of a GPU or a multi-core machine [37]. However, this common notion of parallelism is architecturally centralized: every agent, regardless of which processor evaluates its update, relies on the very same, globally shared consensus point, so that a central synchronization step is required at every iteration and no genuine network structure or local-only communication is exploited. We recently explored the parallelization of the centralized CBO in the companion paper [4]. A notable departure from a single, globally shared consensus point is given by the kinetic theory-based optimization (KBO) methods of [5], where the mean-field interaction of CBO is replaced by binary interactions between randomly sampled pairs of agents, described by a Boltzmann-type equation. There, however, any pair of agents may interact and the update still involves a collective estimate over the whole population, so that no network structure restricting communication is present. To the best of our knowledge, no distributed formulation of CBO with computational units communicating solely over a network of local connections has appeared in the literature, and, with the possible exception of the federated-learning variants of CBO proposed by García Trillos and collaborators [9, 19, 18], which nonetheless rely on a central server orchestrating the interaction between clients, no convergence proof has been provided for any parallel, decentralized implementation of the method.

In this paper we explore a parallel and distributed formulation of CBO with fully decentralized computation. We assume the NN computational units to be the nodes of a connected, undirected communication network G=(V,E)\mathcal{G} = (\mathcal{V},\mathcal{E}), each holding a local swarm of agents and able to communicate only with its network neighbors. Rather than relying on a single, globally shared consensus point, each node computes its own local consensus point from its own agents and then updates a local estimate of the global consensus by averaging it, through a doubly stochastic mixing matrix, with the estimates held by its neighbors, a mechanism we call consensus of consensus, in the spirit of classical linear gossip and distributed-averaging schemes over networks [40, 33]. Since the network is connected, information about the location of the global minimizer, although initially known only locally and imprecisely at each node, is able to reach every other node; along the dynamics this information is slowly diffused across the network, and, as we prove, global consensus among all agents and all local estimates is asymptotically formed, exactly as in the centralized method, without any node ever having direct access to the whole swarm.

A further consequence of this construction is that each node’s local consensus point is computed using only the agents, and hence only the (possibly stochastic) evaluations of the objective function, held locally at that node. This is particularly relevant for objectives of the type arising in machine learning, where the objective function is itself an empirical risk defined over possibly locally held data. The proposed scheme thus allows for a fully decentralized optimization of such objectives, in which nodes only ever exchange the low-dimensional consensus vectors ZiZ^i, and never share gradients, model updates, or any other disaggregated information about their local data from which the data itself could conceivably be reverse-engineered, as is instead possible for gradient-sharing schemes [20, 22]. In this sense, the method is privacy-respecting essentially by design. This sets it apart from existing CBO-inspired approaches to distributed learning, such as FedCBO [9] and its bilevel extensions CB2^2O [19] and its attack-robust variant [18], which use CBO dynamics to reach (possibly clustered) consensus among the models of different clients but still operate within the classical federated-learning architecture, with a central server aggregating information from all clients at every round4. Our fully decentralized, server-free formulation removes this single point of coordination, failure, and potential attack, while retaining, as we show, provable convergence guarantees; this suggests it as a promising gradient-free building block for privacy-aware decentralized training of machine learning and deep learning models over peer-to-peer networks.

Organisation of the paper The rest of the paper is organised as follows. In § 2 we state our assumptions on the objective function and on the stochastic oracle, and we introduce the decentralized parallel CBO scheme together with the tracking mechanism that replaces the global consensus point. § 2.1.1 is devoted to consensus formation. We show that, under an explicit condition on λ\lambda, σ\sigma and MM, all agents and tracking variables converge almost surely to a common point, at a rate determined by the spectrum of the mixing matrix and by the parameters of the local dynamics. In § 2.2 we derive a finite-agent quantitative Laplace principle and use it to prove convergence in expectation of the swarm towards the global minimizer. § 2.2.1 discusses the hitting-probability assumption required by this result and verifies it for a simplified decoupled dynamics. Finally, § 3 reports numerical experiments illustrating the behaviour of the method.

Notation

Throughout the paper, N={0,1,2,…}\mathbb{N} = \{0,1,2,\ldots\} and, for n∈Nn \in\mathbb{N}, the index range i=1:ni = 1:n stands for i=1,…,ni = 1,\ldots,n. Capital letters XX, ZZ, CC denote the random vectors in Rd\mathbb{R}^{d} generated by the method (agents, tracking variables and consensus points, respectively), and the corresponding lowercase letters denote their components. As a general rule, superscripts are labels identifying an object (e.g. agent ℓ\ell), while subscripts refer to iteration indices and components. For instance, xk,sℓx_{k,s}^{\ell} is the ss-th component of the position XkℓX_{k}^{\ell} of agent ℓ\ell at iteration kk. Calligraphic letters, such as Xks\mathcal{X}_{k}^{s} and Zks\mathcal{Z}_{k}^{s}, denote the vectors collecting the ss-th components across all agents or all computational units, so that, e.g., (Zks)i=zk,si(\mathcal{Z}_{k}^{s})_{i}=z_{k,s}^{i}. Capital letters are also used for matrices. We write II for the identity matrix, 1N\mathbf{1}_{N} for the vector of all ones in RN\mathbb{R}^{N}, ese_{s} for the ss-th vector of the canonical basis of Rd\mathbb{R}^{d}, and diag⁡(⋅)\operatorname{diag}(\cdot) for a (block-)diagonal matrix with the given diagonal entries or blocks. The symbol Λ\Lambda, with subscripts specifying the quantity being bounded, denotes a deterministic constant multiplying a geometric decay rate in an upper bound.

On Rd\mathbb{R}^{d} we denote by ∥⋅∥\|\cdot\| the Euclidean norm. For vectors of any length, ∥⋅∥2\|\cdot\|_{2} and ∥⋅∥∞\|\cdot\|_{\infty} denote the Euclidean and the maximum norm; for matrices, ∥⋅∥2\|\cdot\|_{2} is the induced spectral norm and ρ(⋅)\rho(\cdot) the spectral radius. For a finite set SS, ∣S∣|S| denotes its cardinality. All random variables are defined on a probability space (Ω,A,P)(\Omega,\mathcal{A},\mathbb{P}). We denote by E\mathbb{E} the expectation and by E[⋅∣S]\mathbb{E}[\cdot\mid S] the expectation conditioned on an event SS, and “i.i.d.” stands for independent and identically distributed.

Decentralized parallel CBO

We consider a global optimization problem of the form

x∗=argmin⁡x∈Rd f(x)x^{*}=\underset{x\in\mathbb{R}^{d}}{\operatorname{argmin}}\ f(x)

where f:Rd→Rf:\mathbb{R}^{d}\to\mathbb{R} is a continuous, generally nonconvex function. Moreover, we assume that the function ff cannot be evaluated exactly. That is, given a point x∈Rdx\in\mathbb{R}^{d}, we assume that only a stochastic estimator f^(x,ω)≃f(x)\hat{f}(x,\omega)\simeq f(x) can be computed, where ω∈Ω\omega\in\Omega for a suitable probability space (Ω,A,P)(\Omega,\mathcal{A},\mathbb{P}). Here we assume that the global minimizer x∗x^{*} is unique. Given a scalar r>0r>0 we denote

Br:={x∈Rd∣∥x−x∗∥≤r},fr=max⁡x∈Brf(x).(1)B_{r}:=\{x\in\mathbb{R}^{d}\mid\|x-x^{*}\|\le r\},\qquad f_{r}=\max_{x\in B_{r}}f(x). \tag*{(1)}

We make the following assumptions on the objective function ff and the stochastic estimator f^\hat{f}.

downloads a sample of other units’ models, and tests them on its own data. It then moves its model toward a weighted average of those models, where models with lower loss get exponentially more weight. Models from other groups perform poorly on the unit’s data, so they receive almost no weight, while models from the same group dominate the average. As a result, units in the same group automatically converge to a shared model for that group, without any data being shared and without the cluster memberships ever being revealed.

Assumption 2.1. (i) f:Rd→Rf:\mathbb{R}^{d}\to\mathbb{R} is continuous and has a unique global minimizer x∗=arg min⁡x∈Rdf(x)x^{*}=\operatorname*{arg\,min}_{x\in\mathbb{R}^{d}}f(x).

(ii) There exist constants f∞,R0,β,ν>0f_{\infty},R_{0},\beta,\nu>0 such that

(f(x)−f(x∗))ν≥β∥x−x∗∥for every x∈BR0,\left(f(x)-f(x^{*})\right)^{\nu}\geq\beta\lVert x-x^{*}\rVert\quad\text{for every }x\in B_{R_{0}},
f(x)≥f(x∗)+f∞for every x∈Rd∖BR0.f(x)\geq f(x^{*})+f_{\infty}\quad\text{for every }x\in\mathbb{R}^{d}\setminus B_{R_{0}}.

Assumption 2.2. There exists a constant σf≥0\sigma_{f}\geq0 such that

Eω∼P[∣f(x)−f^(x,ω)∣2]≤σf2for every x∈Rd.(2)\mathbb{E}_{\omega\sim\mathbb{P}}\left[\left|f(x)-\widehat{f}(x,\omega)\right|^{2}\right]\leq\sigma_{f}^{2}\quad\text{for every }x\in\mathbb{R}^{d}. \tag*{(2)}

Notice that we do not assume that Eω[f^(x,ω)]=f(x)\mathbb{E}_{\omega}[\widehat{f}(x,\omega)]=f(x), hence the oracle may not be unbiased. To ease the notation we will also assume, without loss of generality, that f(x∗)=0f(x^{*})=0.

Discrete-time finite-particle regime

Assume we have NN computational units on a communication network G=(V,E)\mathcal{G}=(\mathcal{V},\mathcal{E}), where V={1,…,N}\mathcal{V}=\{1,\ldots,N\} denotes the set of vertices and E\mathcal{E} the set of edges. Given G\mathcal{G} we define a mixing matrix W∈RN×NW\in\mathbb{R}^{N\times N} associated with the network. We make the following assumption on G\mathcal{G} and WW.

Assumption 2.3. (i) The network G=(V,E)\mathcal{G}=(\mathcal{V},\mathcal{E}) is undirected, connected, and without multiple edges.

(ii) The mixing matrix W∈RN×NW\in\mathbb{R}^{N\times N} is symmetric, doubly stochastic, and such that if (i,j)∉E(i,j)\notin\mathcal{E} then wij=0w_{ij}=0, while wij>0w_{ij}>0 whenever (i,j)∈E(i,j)\in\mathcal{E}.

For every node ii we denote by Ni\mathcal{N}_{i} the neighborhood of ii in G\mathcal{G}, namely

Ni={j∈V∣(i,j)∈E}.\mathcal{N}_{i}=\{j\in\mathcal{V}\mid(i,j)\in\mathcal{E}\}.

We assume that node ii can communicate directly only with nodes j∈Nij\in\mathcal{N}_{i}. In practice, it is natural to assume that each node also uses its own tracking variable, that is, (i,i)∈E(i,i)\in\mathcal{E} and wii>0w_{ii}>0. However, the analysis below does not require it, so in Assumption 2.3 we do not require the network to have self-loops at every node.

We assume each node ii holds a set of MM agents.5 Without loss of generality we can assume node ii holds agents (Xℓ)ℓ∈Mi⊂Rd(X^{\ell})_{\ell\in\mathcal{M}_{i}}\subset\mathbb{R}^{d} with Mi={(i−1)M+1,(i−1)M+2,…,iM}\mathcal{M}_{i}=\{(i-1)M+1,(i-1)M+2,\ldots,iM\}. Implicitly, we are ordering the agents within the units’ indexes M1,…,MN\mathcal{M}_{1},\ldots,\mathcal{M}_{N}. Moreover, we assume that every node ii holds an additional tracking variable Zi∈RdZ^{i}\in\mathbb{R}^{d}.

Given an initial distribution ρ0\rho_{0} with finite fourth moment, the agents evolve according to the following equations:

References

  1. [1]Rafael Bailo, Alethea Barbaro, Susana N. Gomes, Konstantin Riedl, Tim Roith, Claudia Totzeck, and Urbain Vaes. CBX: Python and Julia Packages for Consensus-Based Interacting Particle Methods. Journal of Open Source Software, 9(98):6611, June 2024.
  2. [2]Jonas Beddrich, Enis Chenchene, Massimo Fornasier, Hui Huang, and Barbara Wohlmuth. Constrained consensus-based optimization and numerical heuristics for the few particle regime. Journal of Global Optimization, pages 1–54, 2026.DOI
  3. [3]S. Bellavia and G. Malaspina. A discrete consensus-based global optimization method with noisy objective function. Journal of Optimization Theory and Applications, 206(20), 2025.arxiv.org/abs/2408.10078
  4. [4]Stefania Bellavia, Massimo Fornasier, Greta Malaspina, and Tim Roith. A parallelization strategy for consensus based optimization with global convergence guarantees. In preparation, 2026.
  5. [5]Alessandro Benfenati, Giacomo Borghi, and Lorenzo Pareschi. Binary interaction methods for high dimensional global optimization and machine learning. Applied Mathematics and Optimization, 86(1):Paper No 9, 2022.
  6. [6]Sabrina Bonandin, Konstantin Riedl, and Sara Veneruso. Exploiting structure with anisotropic consensus-based optimization, 2026.arxiv.org/abs/2607.10205
  7. [7]Leon Bungert, Franca Hoffmann, Doh Yeon Kim, and Tim Roith. MirrorCBO: A consensus-based optimization method in the spirit of mirror descent. Mathematical Models and Methods in Applied Sciences, 35(14):3083–3170, 2025.
  8. [8]J. A. Carrillo, Y.-P. Choi, C. Totzeck, and O. Tse. An analytical framework for a consensus-based global optimization method. Mathematical Models and Methods in Applied Sciences, 28(6):1037–1066, 2018.arxiv.org/abs/1602.00220
  9. [9]J. A. Carrillo, N. García Trillos, S. Li, and Y. Zhu. FedCBO: Reaching group consensus in clustered federated learning through consensus-based optimization. Journal of Machine Learning Research, 25(214):1–51, 2024.arxiv.org/abs/2305.02894
  10. [10]J. A. Carrillo, F. Hoffmann, A. M. Stuart, and U. Vaes. Consensus-based sampling. Studies in Applied Mathematics, 148(3):1069–1140, 2022.arxiv.org/abs/2106.02519
  11. [11]J. A. Carrillo, S. Jin, L. Li, and Y. Zhu. A consensus-based global optimization method for high dimensional machine learning problems. ESAIM: Control, Optimisation and Calculus of Variations, 27:S5, 2021.arxiv.org/abs/1909.09249
  12. [12]Christian Fiedler and Tim Roith. Consensus-based optimization for linearly separable functions. arXiv preprint arXiv:2609.01317, 2026.arxiv.org/abs/2609.01317
  13. [13]M. Fornasier, H. Huang, J. Klemenc, and G. Malaspina. From consensus-based optimization to evolution strategies: Proof of global convergence, 2026. arXiv preprint.arxiv.org/abs/2602.11677
  14. [14]M. Fornasier, H. Huang, L. Pareschi, and P. Sünnen. Consensus-based optimization on hypersurfaces: well-posedness and mean-field limit. Mathematical Models and Methods in Applied Sciences, 30:2725–2751, 2020.DOI
  15. [15]M. Fornasier, H. Huang, L. Pareschi, and P. Sünnen. Consensus-based optimization on the sphere: Convergence to global minimizers and machine learning. Journal of Machine Learning Research, 22(237):1–55, 2021.
  16. [16]M. Fornasier, T. Klock, and K. Riedl. Consensus-based optimization methods converge globally. SIAM Journal on Optimization, 34(3):2973–3004, 2024.DOI
  17. [17]M. Fornasier, P. Richtárik, K. Riedl, and L. Sun. Consensus-based optimization with truncated noise. European Journal of Applied Mathematics, 36(2):292–315, 2025.DOI
  18. [18]N. García Trillos, A. Kumar Akash, S. Li, K. Riedl, and Y. Zhu. Defending against diverse attacks in federated learning through consensus-based bi-level optimization. Philosophical Transactions of the Royal Society A, 383(2298):20240235, 2025.DOI
  19. [19]N. García Trillos, S. Li, K. Riedl, and Y. Zhu. CB²O: Consensus-based bi-level optimization, 2024. arXiv preprint.
  20. [20]J. Geiping, H. Bauermeister, H. Dröge, and M. Moeller. Inverting gradients – how easy is it to break privacy in federated learning? In Advances in Neural Information Processing Systems, volume 33, pages 16937–16947, 2020.arxiv.org/abs/2003.14053
  21. [21]S.-Y. Ha, S. Jin, and D. Kim. Convergence of a first-order consensus-based global optimization algorithm. Mathematical Models and Methods in Applied Sciences, 30:2417–2444, 2020.arxiv.org/abs/1910.08239
  22. [22]N. Haim, G. Vardi, G. Yehudai, O. Shamir, and M. Irani. Reconstructing training data from trained neural networks. In Advances in Neural Information Processing Systems, volume 35, pages 22911–22924, 2022.arxiv.org/abs/2206.07758
  23. [23]Nikolaus Hansen. The cma evolution strategy: a comparing review. Towards a new evolutionary computation: Advances in the estimation of distribution algorithms, pages 75–102, 2006.
  24. [24]Nikolaus Hansen, Steffen Finck, Raymond Ros, and Anne Auger. Real-parameter black-box optimization benchmarking 2009: Noiseless functions definitions. PhD thesis, INRIA, 2009.
  25. [25]Nikolaus Hansen, André SP Niederberger, Lino Guzzella, and Petros Koumoutsakos. A method for handling uncertainty in evolutionary optimization with an application to feedback control of combustion. IEEE Transactions on Evolutionary Computation, 13(1):180–197, 2008.DOI
  26. [26]Nikolaus Hansen, yoshihikoueno, ARF1, Sait Cakmak, Gabi Kadlecová, Guillermo Abad López, Kento Nozawa, Luca Rolshoven, martinsvardsjo, Paul Stahr, Youhei Akimoto, brieglhostis, and Dimo Brockhoff. Cma-es/pycma: r4.5.0, 2026.
  27. [27]Roger A. Horn and Charles R. Johnson. Matrix Analysis. Cambridge University Press, 1985.
  28. [28]Momin Jamil and Xin-She Yang. A literature survey of benchmark functions for global optimisation problems. International Journal of Mathematical Modelling and Numerical Optimisation, 4(2):150–194, 2013.DOI
  29. [29]D. Kalise, A. Sharma, and M. V. Tretyakov. Consensus-based optimization via jump-diffusion stochastic differential equations. Mathematical Models and Methods in Applied Sciences, 33(2):289–339, 2023.DOI
  30. [30]D. Ko, S.-Y. Ha, S. Jin, and D. Kim. Convergence analysis of the discrete consensus-based optimization algorithm with random batch interactions and heterogeneous noises. Mathematical Models and Methods in Applied Sciences, 32(06):1071–1107, 2022.arxiv.org/abs/2107.14383
  31. [31]Yann LeCun, Corinna Cortes, and CJ Burges. MNIST handwritten digit database. ATT Labs [Online]. Available: http://yann.lecun.com/exdb/mnist, 2, 2010.
  32. [32]P. Massart. Concentration inequalities and model selection. Lecture Notes in Mathematics, Springer, 1896, 2003.
  33. [33]A. Nedić and A. Ozdaglar. Distributed subgradient methods for multi-agent optimization. IEEE Transactions on Automatic Control, 54(1):48–61, 2009.DOI
  34. [34]R. Pinnau, C. Totzeck, O. Tse, and S. Martin. A consensus-based model for global optimization and its mean-field limit. Mathematical Models and Methods in Applied Sciences, 27(1):183–204, 2017.DOI
  35. [35]K. Riedl. Leveraging memory effects and gradient information in consensus-based optimisation: On global convergence in mean-field law. European Journal of Applied Mathematics, pages 1–32, 2023. First View.DOI
  36. [36]Raymond Ros and Nikolaus Hansen. A simple modification in cma-es achieving linear time and space complexity. In International conference on parallel problem solving from nature, pages 296–305. Springer, 2008.DOI
  37. [37]Xudong Sun, Armand Jordana, Massimo Fornasier, Jalal Etesami, and Majid Khadiv. Consensus-based optimization (CBO): Towards Global Optimality in Robotics. In Proceedings of Robotics: Science and Systems, Sydney, Australia, July 2026.arxiv.org/abs/2602.06868
  38. [38]C. Totzeck. Trends in consensus-based optimization. In Active Particles, Volume 3: Advances in Theory, Models, and Applications, pages 201–226. Springer, 2021.arxiv.org/abs/2104.01383
  39. [39]C. Totzeck and M.-T. Wolfram. Consensus-based global optimization with personal best. Mathematical Biosciences and Engineering, 17(5):6026–6044, 2020.arxiv.org/abs/2005.07084
  40. [40]L. Xiao and S. Boyd. Fast linear iterations for distributed averaging. Systems & Control Letters, 53(1):65–78, 2004.

Paper details

vlnc:W_4rnch93x
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 4

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Mathematics

Not recorded for this paper

View statement
Looking for related papers…
Contents