Approximate Bayesian Optimisation for Neural Networks

Nadhir Hassen, Irina RisharXiv 2021

Abstract

Bayesian Optimization (BO) is a powerful tool for hyperparameter tuning, but its reliance on Gaussian Processes (GPs) often leads to scalability issues and rigid modeling assumptions. This paper introduces BOGGN (Bayesian Optimization by Gauss-Newton density estimation), which leverages Bayesian Neural Networks (BNNs) to perform BO. By reframing the search for optimal parameters as a binary classification task and utilizing efficient Gauss-Newton approximations, BOGGN provides a scalable, flexible alternative that achieves state-of-the-art results on complex optimization landscapes.

Introduction

In machine learning, selecting the right hyperparameters is crucial for model performance. Bayesian Optimization is the standard approach for this task when function evaluations are expensive. Traditionally, BO uses Gaussian Processes as surrogate models to predict performance. However, GPs suffer from $O(N^3)$ computational complexity and often assume stationarity, which is frequently violated in neural network hyperparameter spaces. BOGGN addresses these limitations by using BNNs, which scale linearly ($O(N)$) and can model non-stationary data more effectively.

Methodology

The core of BOGGN lies in treating optimization as a classification problem rather than a regression one.

Optimization as Classification

Instead of predicting exact performance values, BOGGN defines a threshold based on a quantile of observed results. A classifier is then trained to predict the probability that a new configuration will exceed this threshold. This approach is mathematically linked to density ratio estimation, where the goal is to find regions where the density of "good" points ($f_1(x)$) is high relative to "bad" points ($f_2(x)$).

Comparison of density ratio estimation via Class Probability Estimation (CPE) for different models. The top plot shows the underlying densities, while the subplots show how various classifiers (MLP, RF, SVM, XGB) approximate the exact ratio.

The BNN Surrogate and GGN Approximation

BOGGN employs a Neural Network as the classifier. To incorporate uncertainty—essential for the "Bayesian" part of BO—the authors use the Generalized Gauss-Newton (GGN) approximation within Laplace’s method. This allows for efficient estimation of the posterior distribution over weights. By linearizing the network's link function, the authors can compute the Expected Improvement (EI) acquisition function with minimal overhead, making the BNN surrogate as practical as a standard GP but far more scalable.

Experimental Evaluation

The authors evaluated BOGGN across several benchmarks:

  • HPOBench: A standard suite for hyperparameter optimization tasks.
  • Protein Dataset: A regression task testing the handling of non-stationary data.
  • Synthetic Functions: Standard optimization tests including Branin, Six-Hump Camel, and Hart-Mann.

Key Results and Insights

BOGGN demonstrates superior performance and faster convergence compared to GP-based BO, Tree-structured Parzen Estimators (TPE), and Hyperband.

  • Mathematical Equivalence: The paper formalizes the link between Class Probability Estimation (CPE) and Expected Improvement. Maximizing the probability of being in the top tier of results is shown to be equivalent to maximizing EI.
  • Calibration: The BNN-based classifier is well-calibrated, meaning its uncertainty estimates accurately reflect the likelihood of improvement.
  • Scalability: By avoiding the cubic cost of GPs, BOGGN remains efficient even as the number of observations grows, a critical requirement for modern large-scale hyperparameter tuning.

Limitations and Future Work

Despite its strengths, BOGGN's performance can be sensitive to the choice of weight priors. While the classification approach is robust, density-ratio methods can still face challenges in extremely high-dimensional spaces. Future research may focus on more sophisticated prior selection and further refining approximate inference techniques for the optimization loop.

Conclusion

BOGGN represents a significant step forward in making Bayesian Optimization scalable for deep learning. By combining the flexibility of neural networks with the rigor of Bayesian inference via Gauss-Newton approximations, it offers a robust framework for efficient hyperparameter search in complex, non-stationary environments.

Summary updated

BibTeX
@misc{hassen2021approximate,
  author = {Nadhir Hassen and Irina Rish},
  title = {{Approximate Bayesian Optimisation for Neural Networks}},
  year = {2021},
  eprint = {2108.12461},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2108.12461},
}
Figure