Gradient-free optimization via integration

Christophe Andrieu, Nicolás Chopin, Ettore Fincato, Mathieu GerberarXiv 2024 · DOI · arXiv

Abstract

We develop and analyse an approach to optimize functions $l\colon \mathbb{R}^d \rightarrow \mathbb{R}$ not assumed to be convex, differentiable or even continuous. The algorithm belongs to the class of model-based search methods. The idea is to fit recursively $l$ to a parametric family of distributions, using a Bayesian update followed by a reprojection back onto the chosen family. Remarkably, reprojection in our scenario boils down to computing expectations, which can be simply approximated through Monte Carlo. We show that when the family of distributions is appropriately chosen this approach can be interpreted as an implicit time-inhomogeneous gradient descent algorithm on a sequence of smoothed approximations of $l$, providing a route to establishing convergence. We establish new results for generic inhomogeneous gradient descent algorithms, which we specialise to the model-based search algorithm in the Gaussian scenario. We illustrate the performance of the algorithm on a challenging classification task in machine learning.

Introduction

Optimization of functions $l\colon \mathbb{R}^d \rightarrow \mathbb{R}$ that are non-convex, non-differentiable, or discontinuous remains a significant challenge in machine learning. Traditional gradient-based methods like Stochastic Gradient Descent (SGD) rely on the existence of informative derivatives, which are often absent in "black-box" or piecewise-constant landscapes. While heuristic methods exist, they frequently lack the theoretical guarantees required for reliable performance. This work introduces a framework that replaces local derivative information with global integration, leveraging Bayesian updates and reprojection to navigate complex objective landscapes.

Methodology: The Ideal Algorithm

The proposed approach is a model-based search method that recursively fits a parametric family of distributions to the objective function. The core logic is defined by a three-step recursive process.

Algorithm 1: The Ideal Gradient-Free Optimization Algorithm.

As shown in the pseudocode, the algorithm proceeds as follows:

  1. Bayesian Update: A current distribution $\pi_n$ is "tilted" using the objective function $l(x)$ to create a posterior $\tilde{\pi}_{n+1} \propto \pi_n(x) \exp\{-l(x)\}$. This step shifts probability mass toward regions where $l(x)$ is minimized.
  2. Reprojection: The posterior is projected back onto the chosen parametric family (e.g., Gaussians) by minimizing the Kullback-Leibler (KL) divergence. In the Gaussian case, this is equivalent to moment matching.
  3. Shrinkage: The variance $\gamma_n$ is decreased over time, causing the sequence of distributions to concentrate on a single point.
Trajectory of Gaussian means and densities as they converge toward the minimum of the objective function.

Theoretical Framework

A key contribution of this work is the interpretation of the reprojection step as an implicit time-inhomogeneous gradient descent on a sequence of smoothed approximations of $l$. By utilizing the framework of epi-convergence, we demonstrate that as the smoothing parameter $\gamma$ approaches zero, the minima of these smoothed functions converge to the minima of the original objective. This provides a rigorous path to establishing convergence even for lower semi-continuous functions.

Empirical Evaluation

The algorithm was tested on Area Under Curve (AUC) risk minimization, a task characterized by a discontinuous, piecewise-constant objective function. Using the Pima Indians Diabetes and Sonar datasets from the UCI repository, the method demonstrated significant improvements over standard gradient-free solvers like Nelder-Mead. Specifically, the integration-based approach achieved lower empirical risk and exhibited greater stability across varying initializations. In the 60-dimensional Sonar dataset, the algorithm successfully reached AUC risk scores below $1.5 \times 10^{-3}$, demonstrating robustness in higher-dimensional spaces.

Conclusion

By reframing optimization as a sequence of integration and projection steps, this framework offers a robust alternative for non-smooth optimization. While the current implementation relies on Monte Carlo approximations, the underlying theory bridges Bayesian inference and classical optimization, opening new avenues for gradient-free search in complex landscapes.

Summary updated

Abstract

We develop and analyse an approach to optimize functions $l\colon \mathbb{R}^d \rightarrow \mathbb{R}$ not assumed to be convex, differentiable or even continuous. The algorithm belongs to the class of model-based search methods. The idea is to fit recursively $l$ to a parametric family of distributions, using a Bayesian update followed by a reprojection back onto the chosen family. Remarkably, reprojection in our scenario boils down to computing expectations, which can be simply approximated through Monte Carlo. We show that when the family of distributions is appropriately chosen this approach can be interpreted as an implicit time-inhomogeneous gradient descent algorithm on a sequence of smoothed approximations of $l$, providing a route to establishing convergence. We establish new results for generic inhomogeneous gradient descent algorithms, which we specialise to the model-based search algorithm in the Gaussian scenario. We illustrate the performance of the algorithm on a challenging classification task in machine learning.
BibTeX
@misc{andrieu2024gradient,
  author = {Christophe Andrieu and Nicolás Chopin and Ettore Fincato and Mathieu Gerber},
  title = {{Gradient-free optimization via integration}},
  year = {2024},
  eprint = {2408.00888},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2408.00888},
}
Figure