Preconditioning for Scalable Gaussian Process Hyperparameter Optimization

Jonathan Wenger, Geoff Pleiss, Philipp Hennig, John P. Cunningham, Jacob R. Gardner

Preconditioning for Scalable Gaussian Process Hyperparameter Optimization

TL;DR

This paper introduces a preconditioning framework that dramatically accelerates Gaussian Process (GP) hyperparameter optimization by reducing both the bias and variance of stochastic estimates. By leveraging preconditioners not just for linear solves but also for log-determinant and gradient computations, the authors achieve up to an 11x speedup on large-scale datasets.

What Problem Does This Paper Address?

Gaussian Processes are powerful tools for probabilistic modeling, but they suffer from a well-known "cubic curse": training scales as $O(n^3)$ with the number of data points $n$. To handle large datasets, researchers often turn to iterative Krylov subspace methods like Conjugate Gradient (CG) for linear solves and Stochastic Trace Estimation (STE) for computing the log-marginal likelihood ($\mathcal{L}$) and its gradients.

However, these iterative methods face two major hurdles:

  1. Slow Convergence: Kernel matrices are often ill-conditioned, requiring many CG iterations to reach a solution.
  2. High Variance: Stochastic estimates of the log-determinant and its derivatives are noisy. This noise often forces practitioners to use slower, noise-robust optimizers like Adam rather than more efficient second-order methods like L-BFGS.

While preconditioning is a standard fix for the first problem (speeding up CG), its potential to solve the second problem (reducing stochastic variance) has lacked a rigorous theoretical and algorithmic foundation—until now.

Methods

The authors propose a unified preconditioning strategy for the entire GP optimization loop. The core idea is a variance-reduction technique for the log-determinant based on the following decomposition:

$$\log \det(\hat{K}) = \log \det(\hat{P}) + \text{tr}(\log(\hat{K}) - \log(\hat{P}))$$

Here, $\hat{P}$ is a cheap-to-invert preconditioner that approximates the kernel matrix $\hat{K}$. The first term is computed deterministically and efficiently. The second "residual" term is estimated stochastically. Because $\hat{P} \approx \hat{K}$, the residual has a much lower magnitude and variance than the original log-determinant.

The paper provides:

  • New Algorithms: Practical implementations for computing $\mathcal{L}$ and $\nabla \mathcal{L}$ using preconditioned Lanczos and CG.
  • Theoretical Guarantees: Probabilistic error bounds showing that as the preconditioner quality improves, the number of random vectors needed for a target accuracy drops significantly.
  • Kernel-Specific Rates: Derived convergence rates for common kernels (like RBF and Matérn) paired with various preconditioners (like partial Cholesky or Quadrature Fourier Features).

Key Insights and Ideas

Preconditioning is a Variance Reducer Traditionally viewed as a way to speed up matrix-vector products, the authors show preconditioning is equally valuable for "denoising" stochastic estimates. As seen in the figure below, better preconditioning tightens the distribution of likelihood and gradient estimates around their true values.

Preconditioning reduces bias and variance in stochastic approximations.

Enabling Better Optimizers By slashing the variance in the gradient signal, the authors make it possible to use L-BFGS, a quasi-Newton optimizer. L-BFGS typically fails when gradients are noisy, but with preconditioning, it significantly outperforms Adam in both speed and final model quality.

Exponential Convergence is Possible For certain kernel-preconditioner pairs (e.g., RBF with partial Cholesky), the error in the log-determinant estimate can decrease exponentially with the preconditioner's rank, allowing the relative error of matrix functions to drop sharply as preconditioner quality increases.

Key Results

The authors evaluated their approach on synthetic data and six real-world UCI benchmark datasets ranging from 12k to 326k data points.

  • Order-of-Magnitude Speedups: On the largest dataset (3DRoad, $n \approx 326k$), the preconditioned approach was 11.3x faster than the standard iterative approach.
  • Reduced Computational Effort: Preconditioning drastically reduced the number of model evaluations required for line searches during optimization. The figure below highlights how preconditioning leads to faster convergence with far fewer likelihood and gradient calls across various datasets.
Speedup and reduced evaluations across UCI datasets.
  • Precision Gains: For a fixed number of random samples, preconditioning reduces relative error and variance by several orders of magnitude compared to standard Hutchinson's estimation.

Limitations and Future Work

  • Preconditioner Selection: The performance gains are highly dependent on choosing a preconditioner that matches the kernel's structure. While the paper provides a table of recommended pairs, the authors suggest that future software should automatically select the best preconditioner based on the specified model.
  • Amortization: The cost of building the preconditioner must be outweighed by the savings in iterations. This is generally true for large $n$, but the "break-even" point varies.
  • High-Dimensional Data: In very high dimensions, the approximation quality of some preconditioners (like partial Cholesky) can degrade, though the authors note that real-world data often lies on lower-dimensional manifolds where these methods still excel.

Summary updated

BibTeX
@inproceedings{wenger2022preconditioning,
  author = {Jonathan Wenger and Geoff Pleiss and Philipp Hennig and John P. Cunningham and Jacob R. Gardner},
  title = {{Preconditioning for Scalable Gaussian Process Hyperparameter Optimization}},
  booktitle = {International Conference on Machine Learning},
  year = {2022},
  url = {https://openreview.net/forum?id=Laen6SQDBs},
}
Figure