Provably Reliable Large-Scale Sampling from Gaussian Processes

Anthony Stephenson, Robert Allison, Edward Pyzer-KnapparXiv 2022

Abstract

When comparing approximate Gaussian process (GP) models, it can be helpful to be able to generate data from any GP. If we are interested in how approximate methods perform at scale, we may wish to generate very large synthetic datasets to evaluate them. Naïvely doing so would cost $\mathcal{O}(n^3)$ flops and $\mathcal{O}(n^2)$ memory to generate a size $n$ sample. We demonstrate how to scale such data generation to large $n$ whilst still providing guarantees that, with high probability, the sample is indistinguishable from a sample from the desired GP.

Introduction

Gaussian Processes (GPs) are fundamental to probabilistic machine learning, yet they are notoriously difficult to scale. A significant hurdle in benchmarking new GP models is the "scaling tax" associated with generating high-fidelity synthetic data. To produce a true sample of size $n$, one typically requires a Cholesky decomposition of the covariance matrix, incurring an $\mathcal{O}(n^3)$ computational cost and $\mathcal{O}(n^2)$ memory footprint.

Due to these constraints, researchers often resort to using noisy deterministic functions, which fail to capture the true GP prior. This paper addresses this "benchmarking gap" by introducing a theoretical framework and practical algorithms—specifically leveraging Contour Integral Quadrature (CIQ)—to generate massive GP samples that are provably indistinguishable from exact samples.

Methodology

The Indistinguishability Standard

The core theoretical contribution is the concept of $\epsilon$-indistinguishability. The authors define two distributions as indistinguishable if an optimal Bayesian decision-maker cannot differentiate between them with a success rate significantly higher than random chance. This is formally linked to Total Variation (TV) distance. By bounding the TV distance, the authors provide rigorous guarantees on the fidelity of the generated samples.

Approximation Techniques

The paper evaluates three primary methods for scaling sampling:

  1. Random Fourier Features (RFF): Approximates the kernel by mapping data into a randomized feature space. While memory-efficient, the authors prove that for guaranteed fidelity, its time complexity is surprisingly worse than Cholesky ($\mathcal{O}(n^3 \log n)$).
  2. Contour Integral Quadrature (CIQ): Uses the Cauchy integral formula to estimate the matrix square root via matrix-vector products. This method is kernel-agnostic.
  3. Preconditioned CIQ (PCIQ): The authors' primary advancement. By employing a Nyström preconditioner, the number of iterations required for convergence can become constant ($\mathcal{O}(1)$) as $n$ increases for smooth kernels, drastically reducing the computational burden.

Empirical Results and Performance

Experimental results demonstrate that the proposed algorithms achieve high fidelity much faster than the conservative theoretical bounds suggest. Using the Cramér-von Mises test, the authors tracked rejection rates as a function of approximation parameters.

Comparison of statistical rejection rates for RFF (a), CIQ (b), and PCIQ (c). The dashed lines represent the expected Type I error rate. PCIQ demonstrates significantly faster convergence to the baseline rejection rate compared to standard CIQ, especially for larger dataset sizes (n).

Key findings include:

  • Complexity Gains: PCIQ achieves a time complexity of approximately $\mathcal{O}(n^{2.375} \log n)$, a substantial improvement over the $\mathcal{O}(n^3)$ standard.
  • Statistical Fidelity: Approximate samples from PCIQ and RFF reached the expected Type I error rate (the rate at which even perfect samples are rejected by chance) well before reaching theoretical parameter bounds.
  • Scalability: PCIQ showed superior convergence in rejection rates compared to standard CIQ, particularly as $n$ increased from 256 to 4096.

Conclusion

This work provides a robust path forward for large-scale GP benchmarking. While RFF remains useful for memory-constrained scenarios, PCIQ emerges as the superior choice for general kernel support and raw computational speed. Future work may involve refining the implementation—potentially moving beyond general-purpose inference libraries like GPyTorch—and extending these reliability bounds to a broader range of non-stationary kernels.

Summary updated

BibTeX
@misc{stephenson2022provably,
  author = {Anthony Stephenson and Robert Allison and Edward Pyzer-Knapp},
  title = {{Provably Reliable Large-Scale Sampling from Gaussian Processes}},
  year = {2022},
  eprint = {2211.08036},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2211.08036},
}
Figure