Abstract
Inference in popular nonparametric Bayesian models typically relies on sampling or other approximations. This paper presents a general methodology for constructing novel tractable nonparametric Bayesian methods by applying the kernel trick to inference in a parametric Bayesian model. For example, Gaussian process regression can be derived this way from Bayesian linear regression. Despite the success of the Gaussian process framework, the kernel trick is rarely explicitly considered in the Bayesian literature. In this paper, we aim to fill this gap and demonstrate the potential of applying the kernel trick to tractable Bayesian parametric models in a wider context than just regression. As an example, we present an intuitive Bayesian kernel machine for density estimation that is obtained by applying the kernel trick to a Gaussian generative model in feature space.
Introduction
Bayesian nonparametric models are highly valued for their flexibility, allowing model complexity to grow naturally as more data arrives. However, this flexibility often comes at a high computational cost, requiring complex approximations or Markov Chain Monte Carlo (MCMC) sampling. Gaussian Process (GP) regression stands as a notable exception, offering elegant, closed-form solutions. This research explores why GPs are uniquely tractable and demonstrates how to replicate this success for other tasks, specifically density estimation, by systematically applying the "kernel trick" to simple parametric Bayesian models.
The Recipe for Bayesian Kernel Machines
The authors propose a three-step methodology to derive new, tractable nonparametric models:
- Start Simple: Begin with a basic parametric Bayesian model, such as a Gaussian generative model.
- Derive Exact Inference: Ensure the model possesses a closed-form posterior predictive distribution.
- Kernelize: Express the resulting inference equations entirely in terms of dot products, then replace those dot products with a kernel function $k(x, y)$.
To illustrate this, the paper derives the Kernel Student-T (KST) density estimator. By using a specific Normal-inverse-Wishart prior that is invariant to orthonormal transformations in a high-dimensional feature space, the resulting posterior predictive distribution takes the form of a Student-T distribution.
A key finding is that even a simple Gaussian in feature space can represent highly complex, multi-modal densities when mapped back to the input space. For shift-invariant kernels like the RBF, the necessary Jacobian correction for this mapping is constant and can be omitted, simplifying the model significantly.
Experimental Evaluation and Results
The KST model was evaluated against standard methods like Kernel Density Estimation (KDE) and Dirichlet Process Mixtures (DPM) across several challenging tasks:
- Novelty Detection: On the USPS handwritten digits dataset, KST achieved an Area under the Curve (AuC) of 96.82%, outperforming KDE (94.56%) and DPM (73.56%).
- Label Reconstruction: In predicting missing labels for digits, KST showed a confusion error of only 2.15%, compared to 9.24% for KDE and 23.85% for DPM.
- Relative Novelty Detection: Using satellite imagery, the model successfully identified unique objects (e.g., specific buildings or vehicles) using only a small fraction (3%) of the available data.
Insights and Future Directions
This work bridges the gap between frequentist kernel methods and Bayesian nonparametrics. It demonstrates that kernelization is a fundamental property of any Bayesian model invariant to orthonormal transformations. While the model provides exact shapes for density estimation, calculating absolute normalizing constants remains intractable.
Future work includes extending this framework to non-vector data (e.g., graphs or sequences) via specialized kernels and developing "sparse" approximations to handle the $O(N^3)$ computational complexity inherent in kernel-based methods. Additionally, the approach holds promise for Bayesian two-sample hypothesis testing.
Summary updated