Numerically Stable Sparse Gaussian Processes via Minimum Separation using Cover Trees

Alexander Terenin, David R. Burt, Artem Artemev, Seth R. Flaxman, Mark van der Wilk, Carl Edward Rasmussen, Hong Ge

TL;DR

Sparse Gaussian processes (GPs) often suffer from numerical instability and Cholesky decomposition failures when inducing points cluster too close together. By adapting mathematical tools from the scattered data interpolation literature, this paper proves that enforcing a minimum separation distance between inducing points guarantees bounded condition numbers. The authors then introduce an efficient $\mathcal{O}(N \log N)$ cover tree algorithm to automatically select well-separated inducing points for low-dimensional problems, alongside a "clustered-data" sparse GP variant that further improves numerical stability.

What Problem Does This Paper Address?

Gaussian processes scale cubically ($\mathcal{O}(N^3)$) with dataset size $N$. Sparse approximations reduce this cost to $\mathcal{O}(M^3)$ by conditioning on $M \ll N$ "inducing points." However, practitioners routinely encounter numerical crashes (e.g., failed Cholesky factorizations) or stalling conjugate gradient (CG) solvers during training.

While practitioners typically resort to ad-hoc fixes like adding "jitter" (a small constant added to the matrix diagonal), this does not address the fundamental issue: as points are sampled densely relative to the kernel's length scale, the condition number of the kernel matrix diverges to infinity ($\text{cond}(\mathbf{K}) \to \infty$). This paper tackles how to theoretically guarantee numerical stability in sparse GPs independently of dataset size, with a particular focus on low-dimensional applications like geospatial modeling.

Methods

  • Stability via Minimum Separation: Building on scattered data interpolation theory, the authors prove that if the kernel satisfies a mild spatial decay condition and the inducing points $\mathbf{z}$ maintain a minimum separation distance $\text{sep}(\mathbf{z}) = \min_{i \ne j} \|\mathbf{z}_i - \mathbf{z}_j\| \ge \delta > 0$, the maximum and minimum eigenvalues of $\mathbf{K}_{\mathbf{zz}}$ are bounded above and below independently of $M$, ensuring $\text{cond}(\mathbf{K}_{\mathbf{zz}})$ remains bounded.
  • $R$-Neighbor Cover Trees: The authors design a breadth-first modification of the cover tree data structure. Given a target spatial resolution $\varepsilon$, the algorithm constructs inducing points in near-linear time ($\mathcal{O}(N \log N)$ in low dimensions) such that points simultaneously satisfy covering resolution ($\le \varepsilon$) and separation ($\ge \varepsilon$).
  • Clustered-Data GP (CDGP): An alternative non-variational inducing approximation based on the Opper–Archambeau framework. Training points are projected onto their nearest inducing cluster, yielding an equivalent posterior that inverts $(\mathbf{K}_{\mathbf{zz}} + \mathbf{\Lambda})^{-1}$, where $\mathbf{\Lambda}$ is a diagonal heteroskedastic noise matrix ($\Lambda_{ii} = \sigma^2 / N_{\text{cluster}}$). This provides built-in regularization against near-zero eigenvalues without heuristic jitter. Hyperparameters are trained using stochastic maximum marginal likelihood combined with Hutchinson's trace estimator.

Datasets

  • Synthetic Multidimensional Data: Uniformly sampled hypercubes in dimensions $d \in \{1, 2, 4, 8\}$ ($N = 1000$) to analyze condition numbers, CG iteration counts, and Wasserstein distance error.
  • East Africa Land Surface Temperature: A 2D geospatial regression dataset (55,884 training points, 27,525 test points) characterized by fine-scale spatial variations.
  • Combined Cycle Power Plant: A 4D benchmark dataset from the UCI Machine Learning Repository containing 9,568 instances.

Key Insights and Ideas

  • Separation is both sufficient and necessary: For stationary kernels with spatial decay, minimum separation prevents limiting integral operator behavior from collapsing eigenvalues to zero. For Lipschitz kernels without noise, minimum separation is also necessary for bounded condition numbers.
  • Standard K-means fails at stability: Counterintuitively, standard K-means placement yields the worst numerical stability and performance among non-random baselines. While K-means++ improves upon this due to its distance-weighted initialization, only methods that explicitly enforce geometric separation (like cover trees and partial pivoted Cholesky) yield guaranteed stability.
  • Dimensionality affects conditioning naturally: In higher dimensions ($d = 8$), inputs generated uniformly tend to naturally separate due to measure concentration, leading to lower condition numbers. In low dimensions ($d \in \{1, 2\}$), clustering occurs easily, making explicit separation essential.
  • Resolution controls the accuracy-stability tradeoff: Spatial resolution $\varepsilon$ acts as an intuitive dial: smaller $\varepsilon$ improves posterior approximation (reducing Wasserstein error) but increases condition numbers and conjugate gradient iterations.

Key Results

  • Near-Linear Construction: On the 2D East Africa dataset, the cover tree matched the predictive RMSE, NLPD, and condition numbers of partial pivoted Cholesky while scaling at $\mathcal{O}(N \log N)$ rather than $\mathcal{O}(NM^2)$.
  • Single-Precision Reliability: Running at fine resolution ($\varepsilon = 0.03$, yielding $M = 6851$ inducing points) in 32-bit floating-point precision caused standard sparse variational GP (SGPR) Cholesky factorization to fail, necessitating manual increases to jitter. In contrast, CDGP using conjugate gradients executed reliably across all resolution levels without jitter, achieving comparable test RMSE (around 0.23 vs. 0.21).

Limitations and Future Work

  • Curse of Dimensionality: Cover tree complexity scales exponentially with intrinsic dimensionality (via external packing numbers $(2a+1)^d$). While well-suited for low-dimensional spatial tasks ($d \le 4$), it becomes less advantageous in high dimensions, where partial pivoted Cholesky is often preferable.
  • Slight Performance Penalty for CDGP: The clustered-data approximation trades off a small amount of predictive accuracy relative to standard variational GP formulations in exchange for unconditional numerical stability.
  • Preconditioning: The authors defer combining these geometric insights into formal preconditioners for iterative linear solvers to future research.

Summary updated

BibTeX
@article{terenin2024numerically,
  author = {Alexander Terenin and David R. Burt and Artem Artemev and Seth R. Flaxman and Mark van der Wilk and Carl Edward Rasmussen and Hong Ge},
  title = {{Numerically Stable Sparse Gaussian Processes via Minimum Separation using Cover Trees}},
  journal = {J. Mach. Learn. Res.},
  year = {2024},
  url = {https://openreview.net/forum?id=RiuZK62Nr0},
}
Figure