Abstract
Much of machine learning relies on comparing distributions with discrepancy measures. Stein's method creates discrepancy measures between two distributions that require only the unnormalized density of one and samples from the other. Stein discrepancies can be combined with kernels to define kernelized Stein discrepancies (KSDs). While kernels make Stein discrepancies tractable, they pose several challenges in high dimensions. We introduce kernelized complete conditional Stein discrepancies (KCC-SDs). Complete conditionals turn a multivariate distribution into multiple univariate distributions. We show that KCC-SDs distinguish distributions. To show the efficacy of KCC-SDs in distinguishing distributions, we introduce a goodness-of-fit test using KCC-SDs. We empirically show that KCC-SDs have higher power over baselines and use KCC-SDs to assess sample quality in Markov chain Monte Carlo.
Introduction
In machine learning, comparing a target distribution $p$ (often known only up to a normalization constant) with a sample distribution $q$ is a fundamental task. This comparison is essential for variational inference, goodness-of-fit testing, and monitoring MCMC convergence. Traditional Kernelized Stein Discrepancies (KSDs) leverage Stein’s identity to avoid normalization constants but struggle in high-dimensional spaces. As dimensionality increases, multivariate kernels like the Radial Basis Function (RBF) tend to vanish because the distance between points grows, rendering KSDs insensitive to distributional differences—a classic manifestation of the curse of dimensionality.
Methodology: Complete Conditionals
To overcome these limitations, we propose Kernelized Complete Conditional Stein Discrepancies (KCC-SDs). The core idea is to shift from comparing joint distributions to comparing complete conditionals: the distribution of a single variable given all others ($p(x_j | x_{-j})$).
- Decomposition: KCC-SD decomposes a $d$-dimensional comparison into $d$ univariate problems. By using univariate kernels, it avoids the vanishing issues inherent in multivariate kernels.
- Closed-Form Expression: The authors demonstrate that KCC-SD possesses a computable closed-form expression, making it a practical tool for empirical applications.
- Approximate KCC-SD: When exact conditionals of the sample distribution are unknown, the authors introduce an approximate version. This approach learns a conditional sampler (e.g., via neural networks) from the data, effectively transforming distribution comparison into a conditional density estimation problem.
- Goodness-of-Fit Testing: KCC-SD can be used as a test statistic within a wild-bootstrap framework to determine if a sample set originates from a specific target density $p$.
Empirical Evaluation
The method was evaluated against standard baselines like KSD and Finite Set Stein Discrepancy (FSSD) using both synthetic and real-world datasets, including Gaussian/Laplace benchmarks, Yacht Hydrodynamics, and the Netflix Prize dataset.
High-Dimensional Statistical Power
A critical finding is KCC-SD's robustness to dimensionality. In tests comparing Gaussian and Laplace distributions, KCC-SD maintained a statistical power of 1.0 as dimensions increased to 40. In contrast, standard KSD and other baselines saw their power drop significantly toward zero as dimensionality grew.
Furthermore, KCC-SD successfully distinguished distributions with identical marginals but different correlation structures, and proved effective in identifying optimal step sizes for Stochastic Gradient Langevin Dynamics (SGLD) where traditional metrics like Effective Sample Size (ESS) failed to account for asymptotic bias.
Discussion and Limitations
While KCC-SD offers superior power in high dimensions, it introduces certain trade-offs. The "Approximate KCC-SD" requires training a conditional model, which adds computational overhead compared to "plug-and-play" KSD variants.
The method's performance is also tied to the quality of the learned conditional sampler and currently requires the score function ($ abla \log p$) of the target distribution. Future work may focus on relaxing these requirements and optimizing the training process for the approximate models.
Summary updated