Abstract
Bi-level optimization problems, where one wishes to find the global minimizer of an upper-level objective function over the globally optimal solution set of a lower-level objective, arise in a variety of scenarios throughout science and engineering, machine learning, and artificial intelligence. In this paper, we propose and investigate, analytically and experimentally, consensus-based bi-level optimization (CB$^2$O), a multi-particle metaheuristic derivative-free optimization method designed to solve bi-level optimization problems when both objectives may be nonconvex. Our method leverages within the computation of the consensus point a carefully designed particle selection principle implemented through a suitable choice of a quantile on the level of the lower-level objective, together with a Laplace principle-type approximation w.r.t. the upper-level objective function, to ensure that the bi-level optimization problem is solved in an intrinsic manner. We give an existence proof of solutions to a corresponding mean-field dynamics, for which we first establish the stability of our consensus point w.r.t. a combination of Wasserstein and $L^2$ perturbations, and consecutively resort to PDE considerations extending the classical Picard iteration to construct a solution. For such solution, we provide a global convergence analysis in mean-field law showing that the solution of the associated nonlinear nonlocal Fokker-Planck equation converges exponentially fast to the unique solution of the bi-level optimization problem provided suitable choices of the hyperparameters. The practicability and efficiency of our CB$^2$O algorithm is demonstrated through extensive numerical experiments in the settings of constrained global optimization, sparse representation learning, and robust (clustered) federated learning.
Introduction
Bi-level optimization represents a hierarchical framework where an "upper-level" optimization problem is constrained by the solution set of a "lower-level" problem. Formally, one seeks to minimize an upper-level objective $G(\theta)$ subject to $\theta \in \text{argmin } L(\theta)$, where $L$ is the lower-level objective. This structure is prevalent in hyperparameter tuning, meta-learning, and constrained optimization.
However, these problems are notoriously difficult due to several factors:
- Non-convexity: Both objectives may possess multiple local minima.
- Implicit Constraints: The set of lower-level minimizers is often not known explicitly.
- Non-smoothness: Traditional gradient-based methods struggle when objectives lack smoothness or when gradients are unavailable.
While most existing solvers assume lower-level convexity, this work introduces CB²O (Consensus-Based Bi-Level Optimization), a robust, derivative-free method capable of handling non-convexity at both levels.
Methodology: The CB²O Algorithm
CB²O is a multi-particle metaheuristic inspired by Consensus-Based Optimization (CBO). In CBO, a swarm of particles explores the landscape and moves toward a weighted average or "consensus point." CB²O innovates by structuring this consensus point to respect the bi-level hierarchy through two key mechanisms:
- Quantile Selection: At each iteration, the algorithm evaluates the lower-level objective $L$ for all particles. It selects only the "best" particles—those within a specific quantile (e.g., the top 25%) of the lowest $L$ values. This approximates the set of global minimizers of the lower-level problem.
- Laplace Principle Weighting: Among the selected particles, a weighted average (the consensus point) is calculated using a Gibbs-type distribution based on the upper-level objective $G$. This pulls the swarm toward the point that minimizes $G$ within the feasible set defined by $L$.
The particles move toward this consensus point while being subject to Brownian motion, which facilitates exploration and helps the swarm escape local optima.
Theoretical Foundations
The authors provide a rigorous theoretical analysis of the algorithm's mean-field limit (where the number of particles $N \to \infty$). They establish:
- Existence of Solutions: Using PDE considerations and an extension of the Picard iteration, they prove that solutions to the mean-field dynamics exist.
- Stability: A novel stability estimate for the consensus point is derived by combining Wasserstein distance (tracking mass movement) with $L^2$ perturbations (tracking density changes).
- Global Convergence: The solution to the associated nonlinear nonlocal Fokker-Planck equation is shown to converge exponentially fast to the unique bi-level solution, given appropriate hyperparameter settings.
Experimental Results
The efficacy of CB²O was demonstrated across several benchmarks:
Synthetic Constrained Optimization
In tests using 2D Ackley functions constrained to non-convex sets (like star shapes), CB²O outperformed traditional "Projected" or "Penalized" CBO variants. On circular constraints, CB²O achieved the same precision as baselines while being approximately 5x faster. Notably, on highly non-convex star constraints, CB²O remained stable and accurate where gradient-forcing methods failed.
Sparse Representation Learning
Using the MNIST dataset, the algorithm was tasked with training a neural network for high accuracy (lower level) while enforcing feature sparsity (upper level). CB²O successfully identified models that were significantly sparser than those found by standard CBO, without compromising classification performance. It also proved easier to tune than traditional penalty-based methods.
Conclusion and Future Directions
CB²O offers a powerful, derivative-free approach to complex bi-level optimization. Its intrinsic invariance to transformations of the lower-level objective and its ability to handle non-convex constraints make it a versatile tool. Future work may address the uniqueness of mean-field solutions and explore ways to utilize "unselected" particles to further accelerate the search process. Additionally, integrating local gradient information where available could enhance the detection of lower-level minimizers.
Summary updated