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 samplers, but has since been used in diverse settings in statistics, machine learning and computer science.
Definition Let 𝒳 be a measurable space and let ℳ be a set of measurable functions of the form m:𝒳→ℝ. A natural notion of distance between two probability distributions P, Q, defined on 𝒳, is provided by an integral probability metric
(1.1)dℳ(P,Q):=supm∈ℳ|𝔼X∼P[m(X)]−𝔼Y∼Q[m(Y)]|, where for the purposes of exposition we assume that the expectations exist, and that the set ℳ is sufficiently rich that (1.1) is indeed a metric on the set of probability distributions on 𝒳, i.e. dℳ(P,Q)=0 if and only if P=Q. The choice of the set ℳ determines the topological 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 𝒜P and a set ℱP of real-valued functions in the domain of 𝒜P, both of which may be P-dependent, such that for each m∈ℳ there exists a solution fm∈ℱP to the Stein equation
(1.2)m(x)−𝔼X∼P[m(X)]=𝒜Pfm(x). The operator 𝒜P is termed a Stein operator and the set ℱP is called a Stein set. Substituting (1.2) into (1.1), we obtain an upper bound
dℳ(P,Q)=supm∈ℳ|𝔼Y∼Q[m(Y)]−𝔼X∼P[m(X)]|=supm∈ℳ|𝔼Y∼Q[𝒜Pfm(Y)]|≤supf∈ℱP|𝔼Y∼Q[𝒜Pf(Y)]| . This resulting bound
DP(Q):=supf∈ℱP|𝔼Y∼Q[𝒜Pf(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 DP(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 𝒳⊆ℝd, whose boundary is denoted ∂𝒳, the combination of the Langevin–Stein operator 𝒜Pf=∇⋅f+f⋅∇logp and the classical Stein set
ℱP={f:𝒳→ℝd|supx≠ymax(‖f(x)‖,‖∇f(x)‖,‖∇f(x)−∇f(y)‖‖x−y‖)≤1,⟨f(x),n(x)⟩=0∀x∈∂𝒳} yields the classical Stein discrepancy. Here ‖⋅‖ denotes the Euclidean norm and ⟨⋅,⋅⟩ the Euclidean inner product. Here ‖M‖=supv∈ℝd,‖v‖=1‖Mv‖ is the associated operator norm for matrices M∈ℝd×d, and n(x) denotes the outward unit normal to ∂𝒳 at location x∈∂𝒳. If 𝒳=ℝd then we interpret ∂𝒳=∅︀. 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=∑i=1nwiδ(xi), one can define the graph G with vertex set V={x1,…,xn} and edge set E⊆V×V. From this graph, one can define the graph Stein set as
ℱP={f:𝒳→ℝd|max(‖f(v)‖∞,‖∇f(v)‖∞,‖f(x)−f(y)‖∞‖x−y‖1,‖∇f(x)−∇f(y)‖∞‖x−y‖1)≤1,‖f(x)−f(y)−∇(x)(x−y)‖∞12‖x−y‖12≤1,‖f(x)−f(y)−∇f(y)(x−y)‖∞12‖x−y‖12≤1,∀v∈supp(Qn),(x,y)∈E}. 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, 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 ℱP={f∈H(K):‖f‖H(K)≤1} be the unit ball in a (possibly vector-valued) reproducing kernel Hilbert space H(K) with reproducing kernel K, whose elements are in the domain of the Stein operator 𝒜P. Suppose that
For each fixed x∈𝒳, the map f↦𝒜P[f](x) is a continuous linear functional on ℱP. 𝔼X∼Q[𝒜P𝒜P′K(X,X)]<∞. where the Stein operator 𝒜P acts on the first argument of K(⋅,⋅) and 𝒜P′ acts on the second argument. Then it can be shown that
DP(Q)=𝔼X,X′∼Q[𝒜P𝒜P′K(X,X′)], where the random variables X and X′ in the expectation are independent. In particular, if Q=∑i=1nwiδ(xi) is a discrete distribution on 𝒳, then the Stein discrepancy takes the closed form
DP(Q)=∑i=1n∑j=1nwiwj𝒜P𝒜P′K(xi,xj). A Stein discrepancy constructed in this manner is called a kernel Stein discrepancy and the construction is closely connected to the theory of kernel embedding of probability distributions. Let k:𝒳×𝒳→ℝ be a reproducing kernel. For a probability distribution P with positive and differentiable density function p on 𝒳=ℝd, the combination of the Langevin—Stein operator 𝒜Pf=∇⋅f+f⋅∇logp and the Stein set
ℱP={f∈H(k)×⋯×H(k):∑i=1d‖fi‖H(k)2≤1}, associated to the matrix-valued reproducing kernel K(x,x′)=k(x,x′)Id×d, yields a kernel Stein discrepancy with
𝒜P𝒜P′K(x,x′)=∇x⋅∇x′k(x,x′)+∇xk(x,x′)⋅∇x′logp(x′)+∇x′k(x,x′)⋅∇xlogp(x)+k(x,x′)∇xlogp(x)⋅∇x′logp(x′) where ∇x (resp. ∇x′) 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′)⊤Σ−1(x−x′))−β with parameters β>0 and Σ∈ℝd×d a symmetric positive definite matrix, and if we denote u(x)=∇logp(x), then we have (2.1)𝒜P𝒜P′K(x,x′)=−4β(β+1)(x−x′)⊤Σ−2(x−x′)(1+(x−x′)⊤Σ−1(x−x′))β+2+2β[tr(Σ−1)+[u(x)−u(x′)]⊤Σ−1(x−x′)(1+(x−x′)⊤Σ−1(x−x′))1+β]+u(x)⊤u(x′)(1+(x−x′)⊤Σ−1(x−x′))β.
Diffusion Stein discrepancy Diffusion Stein discrepancies generalize the Langevin Stein operator 𝒜Pf=∇⋅f+f⋅∇logp=1p∇⋅(fp) to a class of diffusion Stein operators 𝒜Pf=1p∇⋅(mfp), each representing an Itô diffusion 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, non-Euclidean domains, discrete domains, improved scalability., and gradient-free Stein discrepancies where derivatives of the density p are circumvented. Furthermore, this approach is expanded into the Gradient-Free Kernel Conditional Stein Discrepancy, which targets conditional distributions.
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.
… excerpt ends here. Continue reading the full article.