Abstract
Variational approximations to Gaussian processes (GPs) typically use a small set of inducing points to form a low-rank approximation to the covariance matrix. In this work, we instead exploit a sparse approximation of the precision matrix. We propose variational nearest neighbor Gaussian process (VNNGP), which introduces a prior that only retains correlations within K nearest-neighboring observations, thereby inducing sparse precision structure. Using the variational framework, VNNGP's objective can be factorized over both observations and inducing points, enabling stochastic optimization with a time complexity of O($K^3$). Hence, we can arbitrarily scale the inducing point size, even to the point of putting inducing points at every observed location. We compare VNNGP to other scalable GPs through various experiments, and demonstrate that VNNGP (1) can dramatically outperform low-rank methods, and (2) is less prone to overfitting than other nearest neighbor methods.
Introduction
Gaussian Processes (GPs) are a cornerstone of uncertainty-aware modeling, yet their $O(N^3)$ computational complexity limits their application to large datasets. The standard remedy, Stochastic Variational Gaussian Processes (SVGP), employs a small set of $M$ inducing points to create a low-rank approximation of the covariance matrix. While this reduces cost to $O(M^3)$, it introduces a "low-pass filter" effect, smoothing over high-frequency variations. This smoothing is particularly detrimental for spatiotemporal data, such as weather or traffic patterns, where local variations are critical. Furthermore, as model complexity increases, $M$ must grow, making the $O(M^3)$ cost prohibitive once again.
Methods
To address these limitations, we introduce the Variational Nearest Neighbor Gaussian Process (VNNGP). Unlike low-rank methods that approximate the covariance matrix, VNNGP approximates the precision matrix (the inverse of the covariance).
Our approach relies on three key technical innovations:
- Sparse Precision Prior: By utilizing a Vecchia approximation, we assume each point depends only on its $K$ nearest neighbors, resulting in a highly sparse precision matrix.
- Factorized ELBO: Unlike SVGP, where the Evidence Lower Bound (ELBO) requires simultaneous consideration of all inducing points, VNNGP’s objective factorizes over both data points and inducing points.
- Stochastic Optimization: This factorization allows for minibatching of inducing points, reducing complexity from $O(M^3)$ to $O(K^3)$, where $K$ is a small constant. This enables us to set $M = N$, placing an inducing point at every observed location without computational explosion.
Results and Discussion
VNNGP was evaluated against Exact GPs and SVGP across 11 datasets, including high-dimensional regression and spatial tasks. A key finding is that sparse precision is superior to low-rank approximations for "wiggly" data. While SVGP assumes global patterns explain the data, VNNGP focuses on local dependencies, which is a more accurate assumption for spatial datasets.
As shown in the performance metrics, VNNGP significantly outperforms SVGP on spatial datasets like UKHousing, achieving a Negative Log Likelihood (NLL) of 0.367 compared to SVGP’s 0.879. Additionally, VNNGP demonstrates robust regularization. While some nearest-neighbor variants (like SWSGP) use a "local" KL divergence that leads to overfitting, VNNGP employs a factorized but "global" KL term that considers the joint distribution of all points, providing superior protection against noise.
Conclusion
VNNGP offers a scalable alternative to low-rank GPs by leveraging sparse precision structures. By allowing the number of inducing points to match the number of observations, it avoids the smoothing artifacts common in SVGP while maintaining high computational efficiency. Future work will explore using the kernel function itself as a distance metric to better capture non-linear and periodic correlations.
Summary updated