Exploiting gradients and Hessians in Bayesian optimization and Bayesian quadrature

Anqi Wu, Mikio Aoi, Jonathan W. PillowarXiv 2017 · DOI

Abstract: An exciting branch of machine learning research focuses on methods for learning, optimizing, and integrating unknown functions that are difficult or costly to evaluate. A popular Bayesian approach to this problem uses a Gaussian process (GP) to construct a posterior distribution over the function of interest given a set of observed measurements, and selects new points to evaluate using the statistics of this posterior. Here we extend these methods to exploit derivative information from the unknown function. We describe methods for Bayesian optimization (BO) and Bayesian quadrature (BQ) in settings where first and second derivatives may be evaluated along with the function itself. We perform sampling-based inference in order to incorporate uncertainty over hyperparameters, and show that both hyperparameter and function uncertainty decrease much more rapidly when using derivative information. Moreover, we introduce techniques for overcoming ill-conditioning issues that have plagued earlier methods for gradient-enhanced Gaussian processes and kriging. We illustrate the efficacy of these methods using applications to real and simulated Bayesian optimization and quadrature problems, and show that exploiting derivatives can provide substantial gains over standard methods.

Introduction

In the world of expensive black-box optimization, the goal is typically to find the peak of a function by sampling it as sparingly as possible. Traditionally, Bayesian Optimization (BO) and Bayesian Quadrature (BQ) methods rely solely on function values $f(x)$. However, in many modern machine learning contexts, gradients and Hessians can be calculated almost for free as a byproduct of function evaluation. While incorporating this extra data seems intuitive, it has historically been hindered by numerical instability.

The Challenge of Ill-Conditioning

When derivative information is added to a Gaussian Process, the resulting joint covariance matrices often become "singular" or explode numerically. This phenomenon, known as ill-conditioning, is particularly severe when the function is very smooth (large length scales) or highly oscillatory (small length scales).

Condition number of the joint covariance matrix as a function of length scale. (a) Standard joint covariance matrix shows extreme ill-conditioning at small and large length scales. (b) The proposed stabilization techniques significantly reduce the condition number, enabling robust inference.

As shown in the figure above, the condition number for the Hessian-enhanced matrix ($K_{[f, \nabla f, \nabla^2 f]}$) can reach values as high as $10^{20}$, making standard matrix inversion impossible. This paper introduces a robust framework to solve these numerical gremlins.

Methods for Robust Derivative Integration

The authors build a joint Gaussian Process that models the function, its gradient, and its Hessian simultaneously. To maintain numerical stability, they introduce two key strategies:

  1. Input Rescaling: For functions with small length scales, they rescale the input space to prevent derivative terms from exploding.
  2. Spectral Domain Representation: For functions with large length scales, they transform the GP into the frequency domain using a Fourier transform. This "spectral GP" converts a complex joint covariance matrix into a simpler diagonal form, ensuring stability and simplifying the underlying mathematics.

To handle uncertainty over the GP's hyperparameters (such as length scale), the framework utilizes Markov Chain Monte Carlo (MCMC) sampling, preventing the model from becoming overconfident.

Key Results and Insights

The efficacy of these methods was evaluated on synthetic benchmarks (like the Rosenbrock "Banana" function) and real-world applications such as Evidence Optimization for Automatic Spectral Distribution (ASD) priors.

  • Optimization Speedup: On the Rosenbrock function, Hessian-enhanced BO reached the global optimum in approximately half the iterations required by standard GPBO.
  • Hyperparameter Clarity: Derivative information significantly accelerates the learning of the GP's own hyperparameters. With fewer samples, the model gains a much clearer understanding of the function's length scale and variance.
  • Stability in High Dimensions: In tasks involving up to 75,000 dimensions, the proposed methods remained stable and outperformed standard L-BFGS optimizers, which frequently became trapped in local optima.

Conclusion and Future Work

By overcoming the historical hurdle of ill-conditioning, this research demonstrates that curvature is a powerful shortcut in Bayesian inference. The Hessian provides local curvature information that allows the GP to "see" further from sample points, ruling out large search areas rapidly.

Future work remains in scaling the spectral representation, which currently faces a curse of dimensionality ($O(p^{2d})$), and extending these techniques to non-stationary kernels where the spectral approach is not directly applicable.

Summary updated

BibTeX
@misc{wu2017exploiting,
  author = {Anqi Wu and Mikio Aoi and Jonathan W. Pillow},
  title = {{Exploiting gradients and Hessians in Bayesian optimization and Bayesian quadrature}},
  year = {2017},
  eprint = {1704.00060},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1704.00060},
}
Figure