Abstract
We present the Gaussian process density sampler (GPDS), an exchangeable generative model for use in nonparametric Bayesian density estimation. Samples drawn from the GPDS are consistent with exact, independent samples from a distribution defined by a density that is a transformation of a function drawn from a Gaussian process prior. Our formulation allows us to infer an unknown density from data using Markov chain Monte Carlo, which gives samples from the posterior distribution over density functions and from the predictive distribution on data space. We describe two such MCMC methods. Both methods also allow inference of the hyperparameters of the Gaussian process.
Introduction
In Bayesian statistics, estimating an unknown probability density function from observed data is a fundamental task. Gaussian Processes (GPs) are highly attractive for this purpose due to their flexibility and ability to incorporate prior beliefs about smoothness. However, applying GPs to density estimation introduces a significant hurdle: a valid density function must be non-negative and integrate to one.
While non-negativity can be achieved by transforming the GP through a squashing function (e.g., the logistic sigmoid), the normalization constraint creates a "doubly-intractable" posterior. The normalization constant—the integral of the squashed GP—depends on the GP itself and lacks an analytical solution. This paper introduces the Gaussian Process Density Sampler (GPDS), a framework for exact inference that bypasses these computational bottlenecks.
The Gaussian Process Density Sampler (GPDS)
The GPDS defines a density $f(x)$ as: $$f(x) = \frac{\Phi(g(x)) \pi(x)}{Z}$$ where $g(x)$ is a function drawn from a GP prior, $\Phi$ is a squashing function mapping to $[0, 1]$, $\pi(x)$ is a tractable "base density," and $Z$ is the normalization constant.
To perform inference without explicitly calculating $Z$, the authors propose two Markov Chain Monte Carlo (MCMC) strategies. The first, Exchange Sampling, uses "fantasy data" to cancel out $Z$ in the Metropolis-Hastings ratio. The second, and more efficient, is Latent History Sampling.
Inference via Latent History Sampling
The Latent History approach treats the rejection sampling process as a generative model. By including the locations of rejected proposals as latent variables, the normalization constant $Z$ disappears from the likelihood. This "retrospective sampling" allows the model to only evaluate the GP at points relevant to the sampling process.
This method effectively performs "inference on a simulation." By tracking where the sampler "failed" (the rejected points), the model implicitly accounts for the area under the curve without numerical integration.
Key Results and Flexibility
The GPDS was evaluated on synthetic benchmarks, including 1D bounded densities and 2D mixtures. A key strength of the model is its ability to learn hyperparameters, such as length-scales ($\ell$) and amplitude ($\alpha$), which dictate the smoothness and scale of the estimated density.
As shown in the 2D synthetic ring mixture experiments, varying the length-scales ($\ell_x, \ell_y$) allows the model to capture different degrees of anisotropy and local structure. The amplitude parameter $\alpha$ controls how much the density deviates from the base distribution $\pi(x)$.
Discussion and Limitations
The GPDS provides a path to exact Bayesian density estimation, avoiding the approximations required by previous grid-based or numerical methods. However, several challenges remain:
- Computational Complexity: Like standard GP methods, GPDS scales as $O(N^3)$, where $N$ is the total number of data points and latent rejections.
- Base Density Selection: The efficiency of the rejection sampler is highly sensitive to the choice of $\pi(x)$. A poor envelope leads to an explosion in the number of rejected points.
- High-Dimensional Scaling: While effective in 2D, finding efficient base densities in high-dimensional spaces remains a significant open problem.
Despite these limitations, the "Latent History" framework represents an elegant solution to the doubly-intractable posterior problem, offering a robust tool for nonparametric Bayesian modeling.
Summary updated