Automated Variational Inference for Gaussian Process Models

Trung V. Nguyen, Edwin V. BonillaNeurIPS 2014

TL;DR: This paper introduces an automated variational inference (AGP) framework for Gaussian Process (GP) models that eliminates the need for model-specific mathematical derivations. By using a mixture of Gaussians and clever univariate sampling, the authors achieve the accuracy of "hard-coded" inference methods while running orders of magnitude faster than traditional MCMC sampling.

The Usability Gap in Gaussian Processes

Gaussian Processes are a powerhouse in Bayesian modeling, but they suffer from a major usability gap. If your data follows a simple Gaussian distribution (standard regression), the math is closed-form and straightforward. However, for real-world problems like classification (binary/multi-class) or count data (Poisson processes), the exact posterior becomes intractable.

Researchers typically solve this in two ways:

  1. MCMC Sampling: Highly flexible but painfully slow and difficult to diagnose for convergence.
  2. Variational Inference (VI): Fast and deterministic, but requires tedious mathematical derivations of the Evidence Lower Bound (ELBO) for every single new type of model or likelihood.

The authors tackle this by creating a "black-box" variational approach that works for a wide class of GP models without requiring the user to derive new gradients for every specific likelihood function.

The Automated GP (AGP) Framework

The core of the AGP approach relies on several technical innovations designed to make inference both flexible and computationally efficient:

  • Mixture of Gaussians (MoG) Posterior: Instead of a single Gaussian, the framework uses a mixture. This allows the model to capture more complex, multi-modal posterior distributions.
  • Univariate Sampling Trick: The authors prove that the Expected Log Likelihood (ELL) and its gradients can be approximated by sampling from univariate Gaussian distributions. This is the "secret sauce" that makes the method black-box—you only need access to the likelihood function itself, not its complex derivatives.
  • Analytical Hyperparameters: Unlike other black-box methods (like BBVI), AGP can optimize GP hyperparameters (e.g., length-scales) using exact analytical gradients, leading to much more stable and efficient learning.
  • Efficient Parametrization: They propose two specific versions of the variational distribution (Full Gaussian and Mixture of Diagonals) that reduce the number of parameters from $O(N^2)$ to $O(N)$, making the optimization computationally feasible for typical datasets.

Key Technical Insights

  • The "Aha" Moment on Sampling: Because GP likelihoods usually factorize over observations, there is no need to sample from a high-dimensional multivariate Gaussian. Sampling from a simple 1D Gaussian is sufficient to get an accurate estimate of the gradients.
  • Rao-Blackwellization: Using a mixture of diagonal Gaussians actually results in lower variance for gradient estimates than using a single full-covariance Gaussian. This means the "simpler" mixture often converges faster and more reliably.
  • Hyperparameter Learning: A major critique of previous black-box variational methods was their inability to learn GP hyperparameters effectively. This paper solves that by deriving exact gradients for the covariance parameters, independent of the likelihood.

Experimental Validation and Results

The authors validated AGP across six benchmark datasets covering five different types of GP models, including Log Gaussian Cox Processes (Mining Disasters), standard regression (Boston Housing), Warped GPs (Creep & Abalone), and classification (Breast Cancer & USPS).

Performance on Creep and Abalone datasets
  • Accuracy: AGP-FULL (the full Gaussian version) performed nearly identically to exact Gaussian Process Regression and specialized "hard-coded" methods like Expectation Propagation (EP).
  • Generality: The same code and framework successfully handled radically different statistical models, proving the "automated" claim.
Classification performance on Breast Cancer and USPS datasets
  • Speed: On the Log Gaussian Cox Process task, AGP was more than 100x faster than state-of-the-art MCMC methods like Elliptical Slice Sampling (ESS) and Hybrid Monte Carlo (HMC).

Limitations and Future Directions

  • Scalability to "Big Data": While the parametrization is linear ($O(N)$), the method still involves inverting covariance matrices, which is typically $O(N^3)$. For very large datasets, further work on sparse GP approximations (inducing points) is necessary.
  • Optimization Sensitivity: While standard gradient-based optimizers (like Conjugate Gradient) were used, stochastic optimization could be applied but might require significant effort to tune learning rates.
  • Factorization Assumption: The method assumes the likelihood factorizes over observations. While common, this excludes certain types of structured or time-series likelihoods where observations are directly dependent.

Summary updated

BibTeX
@inproceedings{nguyen2014automated,
  author = {Trung V. Nguyen and Edwin V. Bonilla},
  title = {{Automated Variational Inference for Gaussian Process Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2014},
  url = {https://openreview.net/forum?id=B1-xbPWuWB},
}
Figure