Representing Additive Gaussian Processes by Sparse Matrices

Lu Zou, Haoyuan Chen, Liang DingarXiv 2023 · DOI

Abstract

Among generalized additive models, additive Matérn Gaussian Processes (GPs) are one of the most popular for scalable high-dimensional problems. Thanks to their additive structure and stochastic differential equation representation, back-fitting-based algorithms can reduce the time complexity of computing the posterior mean from $O(n^3)$ to $O(n\log n)$ time where $n$ is the data size. However, generalizing these algorithms to efficiently compute the posterior variance and maximum log-likelihood remains an open problem. In this study, we demonstrate that for Additive Matérn GPs, not only the posterior mean, but also the posterior variance, log-likelihood, and gradient of these three functions can be represented by formulas involving only sparse matrices and sparse vectors. We show how to use these sparse formulas to generalize back-fitting-based algorithms to efficiently compute the posterior mean, posterior variance, log-likelihood, and gradient of these three functions for additive GPs, all in $O(n \log n)$ time. We apply our algorithms to Bayesian optimization and propose efficient algorithms for posterior updates, hyperparameters learning, and computations of the acquisition function and its gradient in Bayesian optimization. Given the posterior, our algorithms significantly reduce the time complexity of computing the acquisition function and its gradient from $O(n^2)$ to $O(\log n)$ for general learning rate, and even to $O(1)$ for small learning rate.

The Scalability Challenge

Gaussian Processes (GPs) are widely regarded as the "gold standard" for Bayesian regression due to their ability to provide both accurate predictions and well-calibrated uncertainty estimates. However, their practical application is often limited by the "cubic wall": standard GP training requires $O(n^3)$ time, where $n$ is the number of data points.

To address high-dimensional problems, researchers frequently turn to Additive GPs, which decompose a complex function into a sum of independent one-dimensional functions. While existing "back-fitting" techniques have successfully reduced the complexity of calculating the posterior mean to $O(n \log n)$, computing the posterior variance and log-likelihood—both critical for hyperparameter tuning and Bayesian Optimization—has remained a significant computational bottleneck.

Sparse Factorization via Kernel Packets

The core innovation of this work lies in the use of Kernel Packets (KPs) to achieve sparse matrix representations. For Matérn kernels, which are linked to stochastic differential equations, the covariance matrix can be factorized into a product of sparse, banded matrices. This sparsity arises because, in one dimension, the influence of a data point is localized to its immediate neighbors.

Kernel Packets (KPs) for Matérn-3/2 kernels, showing the localized basis functions that enable sparse matrix operations.

By extending Kernel Packet theory to include kernel derivatives, the authors developed Generalized Kernel Packets (GKPs). This allows for the representation of not just the GP itself, but also the gradients of the log-likelihood and acquisition functions using sparse linear algebra. Instead of inverting dense $n \times n$ matrices, the method employs iterative solvers like Gauss-Seidel, which are highly efficient on the banded matrices produced by the GKP framework.

Decomposition of a single Kernel Packet into its constituent components, illustrating the underlying structure of the sparse representation.

Breakthrough in Bayesian Optimization

One of the most impactful results of this research is the acceleration of Bayesian Optimization (BO). In BO, an acquisition function is maximized to find the next point to sample. Traditionally, calculating the gradient of this function at a new point takes $O(n^2)$ time.

Because KPs have "compact support"—meaning they are zero outside a very small range—the GKP method reduces this complexity to $O(\log n)$. Remarkably, for small optimization step sizes, the complexity becomes $O(1)$, making the cost of finding the next sample point independent of the total dataset size. This allows for large-scale optimization on standard hardware that was previously computationally prohibitive.

Performance and Results

The GKP method was evaluated against standard benchmarks like the Schwefel and Rastrigin functions in up to 20 dimensions, with datasets as large as $n = 30,000$.

  • Accuracy: Unlike "Inducing Points" methods that approximate the model to save time, GKP maintains high predictive accuracy by utilizing the full dataset through its exact sparse structure. It consistently outperformed Variational Bayesian (VBEM) and Inducing Points (IP) methods in terms of Root Mean Squared Error (RMSE).
  • Efficiency: GKP demonstrated linear to log-linear scaling ($O(n \log n)$), allowing it to handle datasets that would be impossible for "Full GP" implementations. In practical BO tasks, this translated to finding global minima significantly faster than traditional methods.

Conclusion and Future Directions

This work provides a robust framework for scaling Additive Matérn GPs without sacrificing accuracy. By leveraging the inherent sparsity of Matérn kernels through Generalized Kernel Packets, the authors have unlocked $O(n \log n)$ training and $O(1)$ acquisition gradients. While currently optimized for half-integer Matérn kernels, future work aims to extend these sparse representations to more complex kernels and deep Gaussian Process architectures.

Summary updated

BibTeX
@misc{zou2023representing,
  author = {Lu Zou and Haoyuan Chen and Liang Ding},
  title = {{Representing Additive Gaussian Processes by Sparse Matrices}},
  year = {2023},
  eprint = {2305.00324},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2305.00324},
}
Figure