Variance Reduction for Matrix Computations with Applications to Gaussian Processes
Authors: Anant Mathur, Sarat Moka, Zdravko Botev
Organizations: University of New South Wales High Street, Kensington Sydney, NSW 2052, Australia · Macquarie University, 192 Balaclava Rd, Macquarie Park, NSW 2113, Australia
In addition to recent developments in computing speed and memory, methodological advances have contributed to significant gains in the performance of stochastic simulation. In this paper we focus on variance reduction for matrix computations via matrix factorization. We provide insights into existing variance reduction methods for estimating the entries of large matrices. Popular methods do not exploit the reduction in variance that is possible when the matrix is factorized. We show how computing the square root factorization of the matrix can achieve in some important cases arbitrarily better stochastic performance. In addition, we detail a factorized estimator for the trace of a product of matrices and numerically demonstrate that the estimator can be up to 1,000 times more efficient on certain problems of estimating the log-likelihood of a Gaussian process. Additionally, we provide a new estimator of the log-determinant of a symmetric positive-definite matrix where the log-determinant is treated as a normalizing constant of a probability density.
Figures & tables
Figure 1: True relative error as a function of θ2 for M=1 (a single replication), when n=102 and n=103 . Relative Error =Var(ψ^)/∣ψ∣ , where ψ=tr(Ky−1∂θ2∂Ky) .
Figure 2: Mean Monte Carlo size M required in simulation to obtain a mean squared error of 0.25 as n increases, when θ2=1 and θ2=5 .
Figure 3: Mean relative error of ln∣K∣ , as n increases, where K is the squared exponential Gram matrix with θ1=1 , θ2=1 . Monte Carlo size: M=10 .
Variance reduction develops methods that make Monte Carlo estimates, gradients, and experimental comparisons more precise with limited data or computation.
Stochastic trace estimation is a standard tool for approximating the trace of a large-scale matrix available only through matrix-vector products. However, in tensor-structured settings, unstructured Gaussian or Rademacher test vectors may be prohibitively expensive to store and compute with, while cheaper rank-one tensor-product vectors can require sample complexities that grow exponentially with the tensor order. This work studies Gaussian random tensor train vectors as a structured alternative for stochastic trace estimation. We show that, with a suitable choice of the tensor train rank, random tensor train vectors recover dimension-independent guarantees for the Girard--Hutchinson estimator. In particular, a median-of-means variant with tensor train rank r≥d−1 achieves the same dependence on the accuracy ε and failure probability δ as the classical estimator based on unstructured Gaussian vectors. We further prove an oblivious subspace injection result for sketches formed from independent Gaussian random tensor train vectors: tensor train rank r≥d−1 and O(ε−2(k+log(1/δ))) samples suffice for a k-dimensional target subspace. Finally, we investigate the use of such sketches within the Nyström++ framework. We show that the resulting estimator can achieve the desired O(ε−1) sample complexity under an additional spectral-tail condition. These results provide clarififcation on both the potential and the limitations of random tensor train vectors in stochastic trace estimation.
Zvonimir Bujanović, Daniel Kressner, Hrvoje Olić
University of Zagreb, Faculty of Science, Department of Mathematics, Croatia. · Institute of Mathematics, EPFL, Switzerland.
Gaussian processes (GPs) offer appealing properties but are costly to train at scale. Sparse variational GP (SVGP) approximations reduce cost yet still rely on Cholesky decompositions of kernel matrices, ill-suited to low-precision, massively parallel hardware. While one can construct valid variational bounds that rely only on matrix multiplications (matmuls) via an auxiliary matrix parameter, optimising them with off-the-shelf first-order methods is challenging. We make the inverse-free approach practical by proposing a better-conditioned bound and deriving a matmul-only natural-gradient update for the auxiliary parameter, markedly improving stability and convergence. We further provide simple heuristics, such as step-size schedules and stopping criteria, that make the overall optimisation routine fit seamlessly into existing workflows. Across regression and classification benchmarks, we demonstrate that our method 1) serves as a drop-in replacement in SVGP-based models (e.g., deep GPs), 2) recovers similar performance to traditional methods, and 3) can be faster than baselines when well tuned.
The exact computation of the Normalized Maximum Likelihood (NML) codelength for regular non-smooth estimators (e.g., Lasso) has been historically limited by the cubic scaling walls of manifold-constrained projection and volume integration. At each step of the geometric Propose-and-Project Metropolis--Hastings (PPMH) sampler, evaluating the projection operator requires inverting an (N+k)×(N+k) generalized KKT matrix, while calculating the volume factor requires the determinant of an (N−k)×(N−k) Gram matrix. This paper presents an exact, mathematically equivalent formulation that bypasses both bottlenecks by utilizing the block Schur complement and Sylvester's determinant identity. We prove that the computational complexity of both operations collapses from O(N3) to O(k3+N2k) per step. We generalize this reduction to Sparse Support Vector Machines (SVMs), Elastic Net, and Group Lasso. Finally, we provide a rigorous numerical stability analysis and evaluate the sampler's efficiency using the Effective Sample Size (ESS) per second. Our empirical benchmarks on high-dimensional datasets confirm a constant speedup exceeding 14,100× while maintaining double-precision numerical equivalence, rendering exact non-smooth NML estimation highly tractable for large-scale statistical inference.
Trenton Lau, Gary P. T. Choi
Department of Mathematics, The Chinese University of Hong Kong