HOME

TheInfoList



OR:

A Stein discrepancy is a statistical divergence between two probability measures that is rooted in Stein's method. It was first formulated as a tool to assess the quality of
Markov chain Monte Carlo In statistics, Markov chain Monte Carlo (MCMC) methods comprise a class of algorithms for sampling from a probability distribution. By constructing a Markov chain that has the desired distribution as its equilibrium distribution, one can obtain ...
samplers,J. Gorham and L. Mackey. Measuring Sample Quality with Stein's Method. Advances in Neural Information Processing Systems, 2015. but has since been used in diverse settings in statistics, machine learning and computer science.


Definition

Let \mathcal be a
measurable space In mathematics, a measurable space or Borel space is a basic object in measure theory. It consists of a set and a σ-algebra, which defines the subsets that will be measured. Definition Consider a set X and a σ-algebra \mathcal A on X. Then the ...
and let \mathcal be a set of
measurable function In mathematics and in particular measure theory, a measurable function is a function between the underlying sets of two measurable spaces that preserves the structure of the spaces: the preimage of any measurable set is measurable. This is in di ...
s of the form m : \mathcal \rightarrow \mathbb. A natural notion of distance between two probability distributions P, Q, defined on \mathcal, is provided by an integral probability metric : (1.1) \quad d_(P , Q) := \sup_ , \mathbb_
(X) An emoticon (, , rarely , ), short for "emotion icon", also known simply as an emote, is a pictorial representation of a facial expression using characters—usually punctuation marks, numbers, and letters—to express a person's feelings, ...
- \mathbb_
(Y) A thumb signal, usually described as a thumbs-up or thumbs-down, is a common hand gesture achieved by a closed fist held with the thumb extended upward or downward in approval or disapproval, respectively. These gestures have become metaphors i ...
, where for the purposes of exposition we assume that the expectations exist, and that the set \mathcal is sufficiently rich that (1.1) is indeed a
metric Metric or metrical may refer to: * Metric system, an internationally adopted decimal system of measurement * An adjective indicating relation to measurement in general, or a noun describing a specific type of measurement Mathematics In mathem ...
on the set of probability distributions on \mathcal, i.e. d_(P,Q) = 0 if and only if P=Q. The choice of the set \mathcal determines the
topological In mathematics, topology (from the Greek words , and ) is concerned with the properties of a geometric object that are preserved under continuous deformations, such as stretching, twisting, crumpling, and bending; that is, without closing h ...
properties of (1.1). However, for practical purposes the evaluation of (1.1) requires access to both P and Q, often rendering direct computation of (1.1) impractical. Stein's method is a theoretical tool that can be used to bound (1.1). Specifically, we suppose that we can identify an operator \mathcal_ and a set \mathcal_ of real-valued functions in the domain of \mathcal_, both of which may be P-dependent, such that for each m \in \mathcal there exists a solution f_m \in \mathcal_ to the ''Stein equation'' : (1.2) \quad m(x) - \mathbb_
(X) An emoticon (, , rarely , ), short for "emotion icon", also known simply as an emote, is a pictorial representation of a facial expression using characters—usually punctuation marks, numbers, and letters—to express a person's feelings, ...
= \mathcal_ f_m(x) . The operator \mathcal_ is termed a ''Stein operator'' and the set \mathcal_ is called a ''Stein set''. Substituting (1.2) into (1.1), we obtain an upper bound : d_(P , Q) = \sup_ , \mathbb_[m(Y) - \mathbb_
(X) An emoticon (, , rarely , ), short for "emotion icon", also known simply as an emote, is a pictorial representation of a facial expression using characters—usually punctuation marks, numbers, and letters—to express a person's feelings, ...
], = \sup_ , \mathbb_[ \mathcal_ f_m(Y) ], \leq \sup_ , \mathbb_[\mathcal_ f(Y)], . This resulting bound : D_P(Q) := \sup_ , \mathbb_[\mathcal_P f(Y)], is called a ''Stein discrepancy''. In contrast to the original integral probability metric d_(P , Q), it may be possible to analyse or compute D_(Q) using expectations only with respect to the distribution Q.


Examples

Several different Stein discrepancies have been studied, with some of the most widely used presented next.


Classical Stein discrepancy

For a probability distribution P with positive and differentiable density function p on a
convex set In geometry, a subset of a Euclidean space, or more generally an affine space over the reals, is convex if, given any two points in the subset, the subset contains the whole line segment that joins them. Equivalently, a convex set or a convex r ...
\mathcal \subseteq \mathbb^d, whose boundary is denoted \partial \mathcal, the combination of the ''Langevin–Stein operator'' \mathcal_ f = \nabla \cdot f + f \cdot \nabla \log p and the ''classical Stein set'' : \mathcal_P = \left\ yields the ''classical Stein discrepancy''. Here \, \cdot\, denotes the
Euclidean norm Euclidean space is the fundamental space of geometry, intended to represent physical space. Originally, that is, in Euclid's ''Elements'', it was the three-dimensional space of Euclidean geometry, but in modern mathematics there are Euclidean s ...
and \langle \cdot , \cdot \rangle the Euclidean inner product. Here \, M \, = \textstyle \sup_ \, Mv\, is the associated
operator norm In mathematics, the operator norm measures the "size" of certain linear operators by assigning each a real number called its . Formally, it is a norm defined on the space of bounded linear operators between two given normed vector spaces. Introdu ...
for matrices M \in \R^, and n(x) denotes the outward unit normal to \partial \mathcal at location x \in \partial \mathcal. If \mathcal = \R^d then we interpret \partial \mathcal = \emptyset. In the univariate case d=1, the classical Stein discrepancy can be computed exactly by solving a quadratically constrained quadratic program.


Graph Stein discrepancy

The first known computable Stein discrepancies were the graph Stein discrepancies (GSDs). Given a discrete distribution Q = \textstyle \sum_^n w_i \delta(x_i), one can define the
graph Graph may refer to: Mathematics *Graph (discrete mathematics), a structure made of vertices and edges **Graph theory, the study of such graphs and their properties *Graph (topology), a topological space resembling a graph in the sense of discre ...
G with vertex set V = \ and edge set E \subseteq V \times V. From this graph, one can define the ''graph Stein set'' as : \begin \mathcal_P = \Big\. \end The combination of the Langevin–Stein operator and the graph Stein set is called the ''graph Stein discrepancy'' (GSD). The GSD is actually the solution of a finite-dimensional
linear program Linear programming (LP), also called linear optimization, is a method to achieve the best outcome (such as maximum profit or lowest cost) in a mathematical model whose requirements are represented by linear relationships. Linear programming is ...
, with the size of E as low as linear in n, meaning that the GSD can be efficiently computed.''''


Kernel Stein discrepancy

The supremum arising in the definition of Stein discrepancy can be evaluated in closed form using a particular choice of Stein set. Indeed, let \mathcal_P = \ be the unit ball in a (possibly vector-valued)
reproducing kernel Hilbert space In functional analysis (a branch of mathematics), a reproducing kernel Hilbert space (RKHS) is a Hilbert space of functions in which point evaluation is a continuous linear functional. Roughly speaking, this means that if two functions f and g in ...
H(K) with reproducing kernel K, whose elements are in the domain of the Stein operator \mathcal_P. Suppose that *For each fixed x \in \mathcal, the map f \mapsto \mathcal_P x) is a continuous linear functional on \mathcal_P. * \mathbb_ \mathcal_P \mathcal_P' K(X,X) < \infty. where the Stein operator \mathcal_P acts on the first argument of K(\cdot,\cdot) and \mathcal_P' acts on the second argument. Then it can be shownMastubara, T., Knoblauch, J., Briol, F-X., Oates, C. J. Robust Generalised Bayesian Inference for Intractable Likelihoods. arXiv:2104.07359. that : D_P(Q) = \sqrt , where the random variables X and X' in the expectation are independent. In particular, if Q = \sum_^n w_i \delta(x_i) is a discrete distribution on \mathcal, then the Stein discrepancy takes the closed form : D_P(Q) = \sqrt. A Stein discrepancy constructed in this manner is called a ''kernel Stein discrepancyOates, C. J., Girolami, M., & Chopin, N. (2017). Control functionals for Monte Carlo integration. Journal of the Royal Statistical Society B: Statistical Methodology, 79(3), 695–718.Liu, Q., Lee, J. D., & Jordan, M. I. (2016). A kernelized Stein discrepancy for goodness-of-fit tests and model evaluation. International Conference on Machine Learning, 276–284.Chwialkowski, K., Strathmann, H., & Gretton, A. (2016). A kernel test of goodness of fit. International Conference on Machine Learning, 2606–2615.''Gorham J, Mackey L. Measuring sample quality with kernels. InInternational Conference on Machine Learning 2017 Jul 17 (pp. 1292-1301). PMLR. and the construction is closely connected to the theory of kernel embedding of probability distributions. Let k : \mathcal \times \mathcal \rightarrow \mathbb be a reproducing kernel. For a probability distribution P with positive and differentiable density function p on \mathcal = \R^d, the combination of the Langevin--Stein operator \mathcal_ f = \nabla \cdot f + f \cdot \nabla \log p and the Stein set : \mathcal_P = \left\, associated to the matrix-valued reproducing kernel K(x,x') = k(x,x') I_, yields a kernel Stein discrepancy with : \mathcal_P \mathcal_P' K(x,x') = \nabla_x \cdot \nabla_ k(x,x') + \nabla_x k(x,x') \cdot \nabla_ \log p(x') +\nabla_ k(x,x') \cdot \nabla_x \log p(x) + k(x,x') \nabla_x \log p(x) \cdot \nabla_ \log p(x') where \nabla_x (resp. \nabla_) indicated the gradient with respect to the argument indexed by x (resp. x'). Concretely, if we take the ''inverse multi-quadric'' kernel k(x,x') = (1 + (x-x')^\top \Sigma^ (x-x') )^ with parameters \beta > 0 and \Sigma \in \mathbb^ a symmetric positive definite matrix, and if we denote u(x) = \nabla \log p(x), then we have (2.1) \quad \mathcal_P \mathcal_P' K(x,x') = - \frac + 2 \beta \left \frac \right+ \frac .


Diffusion Stein discrepancy

''Diffusion Stein discrepancies''Gorham, J., Duncan, A. B., Vollmer, S. J., & Mackey, L. (2019). Measuring sample quality with diffusions. The Annals of Applied Probability, 29(5), 2884-2928. generalize the Langevin Stein operator \mathcal_ f = \nabla \cdot f + f \cdot \nabla \log p = \textstyle\frac\nabla \cdot (f p) to a class of ''diffusion Stein operators'' \mathcal_ f = \textstyle\frac\nabla \cdot (m f p), each representing an
Itô diffusion In mathematics – specifically, in stochastic analysis – an Itô diffusion is a solution to a specific type of stochastic differential equation. That equation is similar to the Langevin equation used in physics to describe the Brownian motion of ...
that has P as its stationary distribution. Here, m is a matrix-valued function determined by the infinitesimal generator of the diffusion.


Other Stein discrepancies

Additional Stein discrepancies have been developed for constrained domains,Shi, J., Liu, C., & Mackey, L. (2021). Sampling with Mirrored Stein Operators. arXiv preprint arXiv:2106.12506 non-Euclidean domains'''', discrete domains,Shi J, Zhou Y, Hwang J, Titsias M, Mackey L. Gradient Estimation with Discrete Stein Operators. arXiv preprint arXiv:2202.09497. 2022. improved scalability.Huggins JH, Mackey L. Random Feature Stein Discrepancies. In NeurIPS 2018.Gorham J, Raj A, Mackey L. Stochastic Stein Discrepancies. In NeurIPS 2020., and gradient-free Stein discrepancies where derivatives of the density p are circumvented.


Properties

The flexibility in the choice of Stein operator and Stein set in the construction of Stein discrepancy precludes general statements of a theoretical nature. However, much is known about the particular Stein discrepancies.


Computable without the normalisation constant

Stein discrepancy can sometimes be computed in challenging settings where the probability distribution P admits a probability density function p (with respect to an appropriate reference measure on \mathcal ) of the form p(x) = \textstyle \frac \tilde(x) , where \tilde(x) and its derivative can be numerically evaluated but whose normalisation constant Z is not easily computed or approximated. Considering (2.1), we observe that the dependence of \mathcal_P \mathcal_P K(x,x') on P occurs only through the term : u(x) = \nabla \log p(x) = \nabla \log \left( \frac \right) = \nabla \log \tilde(x) - \nabla \log Z = \nabla \log \tilde(x) which does not depend on the normalisation constant Z .


Stein discrepancy as a statistical divergence

A basic requirement of Stein discrepancy is that it is a statistical divergence, meaning that D_P(Q) \geq 0 and D_P(Q) = 0 if and only if Q=P. This property can be shown to hold for classical Stein discrepancy and kernel Stein discrepancy'''' a provided that appropriate regularity conditions hold.


Convergence control

A stronger property, compared to being a statistical divergence, is ''convergence control'', meaning that D_P(Q_n) \rightarrow 0 implies Q_n converges to P in a sense to be specified. For example, under appropriate regularity conditions, both the classical Stein discrepancy and graph Stein discrepancy enjoy ''Wasserstein convergence control'', meaning that D_P(Q_n) \rightarrow 0 implies that the
Wasserstein metric In mathematics, the Wasserstein distance or Kantorovich– Rubinstein metric is a distance function defined between probability distributions on a given metric space M. It is named after Leonid Vaseršteĭn. Intuitively, if each distribution is ...
between Q_n and P converges to zero.Mackey, L., & Gorham, J. (2016). Multivariate Stein factors for a class of strongly log-concave distributions. Electronic Communications in Probability, 21, 1-14. For the kernel Stein discrepancy, ''weak convergence control'' has been establishedChen WY, Mackey L, Gorham J, Briol FX, Oates CJ. Stein points. In International Conference on Machine Learning 2018 (pp. 844-853). PMLR. under regularity conditions on the distribution P and the reproducing kernel K, which are applicable in particular to (2.1). Other well-known choices of K , such as based on the Gaussian kernel, provably do not enjoy weak convergence control.


Convergence detection

The converse property to convergence control is ''convergence detection'', meaning that D_P(Q_n) \rightarrow 0 whenever Q_n converges to P in a sense to be specified. For example, under appropriate regularity conditions, classical Stein discrepancy enjoys a particular form of ''mean square convergence detection'', meaning that D_P(Q_n) \rightarrow 0 whenever X_n \sim Q_n converges in mean-square to X \sim P and \nabla \log p(X_m) converges in mean-square to \nabla \log p(X). For kernel Stein discrepancy, W''asserstein convergence detection'' has been established, under appropriate regularity conditions on the distribution P and the reproducing kernel K.


Applications of Stein discrepancy

Several applications of Stein discrepancy have been proposed, some of which are now described.


Optimal quantisation

Given a probability distribution P defined on a measurable space \mathcal, the '' quantization'' task is to select a small number of states x_1,\dots,x_n \in \mathcal such that the associated discrete distribution Q^n = \frac \sum_^n \delta(x_i) is an accurate approximation of P in a sense to be specified. ''Stein points'' are the result of performing ''optimal'' quantisation via minimisation of Stein discrepancy: (3.1) \quad \underset \; D_\left( \frac \sum_^n \delta(x_i) \right) Under appropriate regularity conditions, it can be shown that D_P(Q^n) \rightarrow 0 as n \rightarrow \infty. Thus, if the Stein discrepancy enjoys convergence control, it follows that Q^n converges to P. Extensions of this result, to allow for imperfect numerical optimisation, have also been derived.Chen WY, Barp A, Briol FX, Gorham J, Girolami M, Mackey L, Oates CJ. Stein Point Markov Chain Monte Carlo. International Conference on Machine Learning (ICML 2019). Riabiz M, Chen W, Cockayne J, Swietach P, Niederer SA, Mackey L, Oates CJ. Optimal thinning of MCMC output. Journal of the Royal Statistical Society B: Statistical Methodology, to appear. 2021. Sophisticated optimisation algorithms have been designed to perform efficient quantisation based on Stein discrepancy, including gradient flow algorithms that aim to minimise kernel Stein discrepancy over an appropriate space of probability measures.


Optimal weighted approximation

If one is allowed to consider weighted combinations of point masses, then more accurate approximation is possible compared to (3.1). For simplicity of exposition, suppose we are given a set of states \_^n \subset \mathcal. Then the optimal weighted combination of the point masses \delta(x_i) , i.e. : Q_n := \sum_^n w_i^* \delta(x_i), \qquad w^* \in \underset \; D_P\left( \sum_^n w_i \delta(x_i) \right), which minimise Stein discrepancy can be obtained in closed form when a kernel Stein discrepancy is used. Some authors consider imposing, in addition, a non-negativity constraint on the weights, i.e. w_i \geq 0. However, in both cases the computation required to compute the optimal weights w^* can involve solving linear systems of equations that are numerically ill-conditioned. Interestingly, it has been shown that greedy approximation of Q_n using an un-weighted combination of m \ll n states can reduce this computational requirement. In particular, the greedy ''Stein thinning'' algorithm : Q_ := \frac \sum_^m \delta(x_), \qquad \pi(m) \in \underset \; D_P\left( \frac \sum_^ \delta(x_) + \frac \delta(x_j) \right) has been shown to satisfy an error bound : D_P(Q_) = D_P(Q_n) + O\left(\sqrt \right). Non-myopic and mini-batch generalisations of the greedy algorithm have been demonstrated to yield further improvement in approximation quality relative to computational cost.


Variational inference

Stein discrepancy has been exploited as a ''variational objective'' in
variational Bayesian methods Variational Bayesian methods are a family of techniques for approximating intractable integrals arising in Bayesian inference and machine learning. They are typically used in complex statistical models consisting of observed variables (usually ...
.Fisher M, Nolan T, Graham M, Prangle D, Oates CJ. Measure transport with kernel Stein discrepancy. International Conference on Artificial Intelligence and Statistics 2021 (pp. 1054-1062). PMLR. Given a collection \_ of probability distributions on \mathcal, parametrised by \theta \in \Theta, one can seek the distribution in this collection that best approximates a distribution P of interest: : \underset \; D_P(Q_\theta) A possible advantage of Stein discrepancy in this context, compared to the traditional Kullback–Leibler variational objective, is that Q_\theta need not be absolutely continuous with respect to P in order for D_P(Q_\theta) to be well-defined. This property can be used to circumvent the use of flow-based generative models, for example, which impose diffeomorphism constraints in order to enforce absolute continuity of Q_\theta and P.


Statistical estimation

Stein discrepancy has been proposed as a tool to fit parametric statistical models to data. Given a dataset \_^n \subset \mathcal, consider the associated discrete distribution Q^n = \textstyle \frac\sum_^n \delta(x_i). For a given parametric collection \_ of probability distributions on \mathcal, one can estimate a value of the parameter \theta which is compatible with the dataset using a ''minimum Stein discrepancy estimator''Barp, A., Briol, F.-X., Duncan, A. B., Girolami, M., & Mackey, L. (2019). Minimum Stein discrepancy estimators. Neural Information Processing Systems, 12964–12976. : \underset \; D_(Q^n). The approach is closely related to the framework of
minimum distance estimation Minimum-distance estimation (MDE) is a conceptual method for fitting a statistical model to data, usually the empirical distribution. Often-used estimators such as ordinary least squares can be thought of as special cases of minimum-distance esti ...
, with the role of the "distance" being played by the Stein discrepancy. Alternatively, a generalised Bayesian approach to estimation of the parameter \theta can be considered where, given a prior probability distribution with density function \pi(\theta), \theta \in \Theta, (with respect to an appropriate reference measure on \Theta), one constructs a ''generalised posterior'' with probability density function : \pi^n(\theta) \propto \pi(\theta) \exp\left( - \gamma D_(Q^n)^2 \right) , for some \gamma > 0 to be specified or determined.


Hypothesis testing

The Stein discrepancy has also been used as a test statistic for performing goodness-of-fit testing and comparing latent variable models.Kanagawa, H., Jitkrittum, W., Mackey, L., Fukumizu, K., & Gretton, A. (2019). A kernel Stein test for comparing latent variable models. arXiv preprint arXiv:1907.00586. Since the aforementioned tests have a computational cost quadratic in the sample size, alternatives have been developed with (near-)linear runtimes.Jitkrittum W, Xu W, Szabó Z, Fukumizu K, Gretton A. A Linear-Time Kernel Goodness-of-Fit Test.


See also

* Stein's method *
Divergence (statistics) In information geometry, a divergence is a kind of statistical distance: a binary function which establishes the separation from one probability distribution to another on a statistical manifold. The simplest divergence is squared Euclidean di ...


References

{{reflist Statistical distance Theory of probability distributions