NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Marginalised Gaussian Processes with Nested Sampling

Fergus Simpson, Vidhi Lalchand, Carl Edward Rasmussen

Gaussian Process (GP) models are a gold standard for probabilistic regression because they provide not just a prediction, but a principled estimate of uncertainty. However, the shape and reliability of that uncertainty depend entirely on the model's hyperparameters, such as the lengthscale or periodicity of the data.

This paper argues that the standard industry practice for training GPs—picking a single "best" set of hyperparameters—is fundamentally flawed. By ignoring hyperparameter uncertainty and frequently getting stuck in local minima, standard methods produce overconfident and brittle models. To solve this, the authors propose using Nested Sampling to marginalize over these hyperparameters, demonstrating that this approach yields much more reliable uncertainty estimates and better predictive performance, especially when using complex, multi-modal kernels.

The Problem with Standard Optimization

The industry standard for finding GP hyperparameters is to maximize the marginal likelihood, a method known as ML-II. This point-estimate approach is problematic for two main reasons:

  1. Overconfidence: By selecting just one "best" set of values, the model ignores the fact that other hyperparameter configurations might be nearly as likely. This leads to prediction intervals that are artificially narrow.
  2. The Local Minima Trap: For complex kernels, such as the Spectral Mixture kernel, the likelihood surface is often a jagged landscape with many peaks. Optimization algorithms frequently get stuck on a small hill (a local minimum) and miss the global optimum entirely, leading to poor model fit.

Methods: Marginalization via Nested Sampling

To overcome the limitations of ML-II, the authors propose moving away from optimization and toward marginalization—averaging the predictions over all possible hyperparameter values, weighted by their respective likelihoods.

To perform this marginalization efficiently, they employ Nested Sampling (NS), specifically utilizing the PolyChord algorithm. Unlike standard Markov Chain Monte Carlo (MCMC) methods like Hamiltonian Monte Carlo (HMC), which "walk" through the distribution and can easily get trapped in a single mode, Nested Sampling maintains a "cloud" of live points that iteratively contract toward higher likelihood regions.

Comparison of hyperparameter sampling methods showing Nested Sampling capturing multiple modes.

As illustrated above, Nested Sampling excels at multi-modal navigation. In many GP kernels, there are multiple sets of hyperparameters that explain the data equally well. While optimization (ML-II) forces a single choice and HMC often isolates a single mode, Nested Sampling embraces them all. This diversity directly translates into wider, more honest prediction intervals that are less likely to be surprised by new data.

Additionally, the authors introduce physically motivated priors for the Spectral Mixture kernel, designed specifically to handle aliasing (where high-frequency signals masquerade as low-frequency ones) and very low-frequency trends.

Key Results and Insights

The researchers evaluated their approach on synthetic 1D/2D datasets and a suite of 13 real-world time-series benchmarks (including datasets like AIRLINE, BIRTHS, and WAGES).

  • Improved Accuracy: On the 13 time-series benchmarks, Nested Sampling achieved the best (lowest) Negative Log Predictive Density (NLPD) in 11 out of 13 tasks compared to HMC and standard optimization.
  • Robustness: In challenging datasets like WAGES, standard optimization failed catastrophically due to a poor local minimum. Nested Sampling remained robust, providing a much more sensible fit.
  • Efficiency Gains: Surprisingly, Nested Sampling was found to be roughly twice as fast as HMC in these experiments, with the added benefit of automatically calculating the "model evidence" (useful for comparing different types of models).
NLPD comparison across different training sizes and noise levels.

The quantitative results confirm that marginalized GPs (both HMC and NS) significantly outperform point-estimate methods (ML-II). Across varying training sizes and noise levels, Nested Sampling consistently delivers competitive or superior predictive performance with significantly lower variance than optimization-based approaches.

Limitations and Future Work

While Nested Sampling provides a robust solution for hyperparameter inference, it does not eliminate the underlying GP's $O(N^3)$ computational bottleneck as the number of data points ($N$) grows. The authors suggest that combining Nested Sampling with Sparse GPs (which use inducing points) is a necessary next step for scaling to "Big Data" applications.

Furthermore, while the PolyChord algorithm handles up to roughly 50 dimensions well, extremely complex kernel compositions with higher-dimensional hyperparameter spaces might still challenge the sampler. Finally, while better uncertainty quantification leads to safer decision-making in critical fields like healthcare or engineering, the increased compute required for sampling inherently carries a larger carbon footprint than simple optimization.

Summary updated

BibTeX
@inproceedings{simpson2021marginalised,
  author = {Fergus Simpson and Vidhi Lalchand and Carl Edward Rasmussen},
  title = {{Marginalised Gaussian Processes with Nested Sampling}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=zHj5fx11jQC},
}
Figure