[Paper Review] Fast Matrix Square Roots with Applications to Gaussian Processes and Bayesian Optimization
This paper introduces a fast, matrix-free algorithm for computing matrix square roots and their inverses via matrix-vector multiplications (MVMs), enabling efficient sampling and whitening in high-dimensional Gaussian processes and Bayesian optimization. By combining rational approximation with a preconditioned, multi-shift MINRES solver, the method achieves 4–5 decimal accuracy in under 100 MVMs—scaling to 50,000×50,000 matrices with GPU acceleration and enabling scalable variational inference and Gibbs sampling.
Matrix square roots and their inverses arise frequently in machine learning, e.g., when sampling from high-dimensional Gaussians $\mathcal{N}(\mathbf 0, \mathbf K)$ or whitening a vector $\mathbf b$ against covariance matrix $\mathbf K$. While existing methods typically require $O(N^3)$ computation, we introduce a highly-efficient quadratic-time algorithm for computing $\mathbf K^{1/2} \mathbf b$, $\mathbf K^{-1/2} \mathbf b$, and their derivatives through matrix-vector multiplication (MVMs). Our method combines Krylov subspace methods with a rational approximation and typically achieves $4$ decimal places of accuracy with fewer than $100$ MVMs. Moreover, the backward pass requires little additional computation. We demonstrate our method's applicability on matrices as large as $50,\!000 imes 50,\!000$ - well beyond traditional methods - with little approximation error. Applying this increased scalability to variational Gaussian processes, Bayesian optimization, and Gibbs sampling results in more powerful models with higher accuracy.
Motivation & Objective
- To address the computational bottleneck of computing K^{±1/2}b in high-dimensional Gaussian processes and Bayesian optimization.
- To enable scalable inference for large-scale Gaussian process models with up to 10,000 inducing points.
- To support efficient Gibbs sampling in high-dimensional problems (e.g., 25,600 dimensions) using matrix square roots.
- To develop a backward pass for automatic differentiation in learning and optimization pipelines.
- To reduce memory and computational costs by avoiding explicit Cholesky factorization and leveraging MVMs with GPU acceleration.
Proposed method
- Uses a rational approximation of the matrix square root as a sum of shifted matrix inverses, based on Hale et al. (2020).
- Employs a modified multi-shift MINRES (msMINRES) algorithm to solve multiple shifted systems (t_q I + K)^{-1}b in a single iteration with shared MVMs.
- Applies a single preconditioner to accelerate convergence of msMINRES across multiple shifts, despite differing shift parameters.
- Uses partitioned MVMs to maintain O(N) memory usage, avoiding full matrix storage.
- Derives a scalable backward pass for ∂(K^{±1/2}b)/∂K and ∂(K^{±1/2}b)/∂b using adjoint sensitivity methods.
- Combines quadrature-based rational approximation with iterative Krylov subspace methods to balance accuracy and efficiency.
Experimental results
Research questions
- RQ1Can matrix square roots be computed efficiently in high-dimensional settings without explicit Cholesky factorization?
- RQ2Can multi-shift Krylov solvers be accelerated with a single preconditioner across multiple shifts?
- RQ3Can the method achieve high accuracy (e.g., 4+ decimal places) with fewer than 100 matrix-vector multiplications?
- RQ4Can the algorithm scale to matrices of size 50,000×50,000 while maintaining low approximation error?
- RQ5Can the method be integrated into end-to-end learning pipelines, including backpropagation, for variational Gaussian processes and Bayesian optimization?
Key findings
- The method achieves 4–5 decimal places of accuracy in matrix square root computations using fewer than 100 matrix-vector multiplications.
- The algorithm scales to matrices of size 50,000×50,000 with negligible approximation error, far exceeding traditional Cholesky-based methods.
- The backward pass for K^{±1/2}b requires minimal additional computation, enabling efficient use in differentiable machine learning pipelines.
- Variational Gaussian process inference with up to 10,000 inducing points is enabled via an O(M²) MVM-based natural gradient update.
- Gibbs sampling is successfully performed on a 25,600-dimensional image reconstruction problem using the proposed K^{-1/2}b routine.
- Theoretical analysis shows convergence rates dependent on the condition number of K, with error bounds decaying exponentially in the number of iterations.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.