In many applications one often wishes to quantify the discrepancy between a finite-size sample and a probability distribution. We introduce a quality measure based on Stein’s method which quantifies the maximum discrepancy between sample and target expectations over a large class of test functions. This discrepancy is able to provide relatively tight, deterministic upper and lower bounds to the Wasserstein metric for a large class of target distributions including multimodal and heavy-tailed densities.
The key ingredient is a careful construction of the Stein operator from the infinitesimal generator of a diffusion process which converges sufficiently quickly to a unique invariant distribution defined by the target density. Through a similar construction, we introduce an analogous discrepancy measure for distributions on a Hilbert space which are absolutely continuous with respect to a Gaussian reference measure, demonstrating similar control over the Wasserstein metric. Applications to path sampling and Bayesian inverse problems are discussed.