Perturbation theory for Markov chains via Wasserstein distance
Daniel Rudolf, Nikolaus Schweizer
Introduction
Markov chain Monte Carlo (MCMC) algorithms are one of the key tools in computational statistics. They are used for the approximation of expectations with respect to probability measures given by unnormalized densities. For almost all classical MCMC methods it is essential to evaluate the target density. In many cases, this requirement is not an issue, but there are also important applications where it is a problem. This includes applications where the density is not available in closed form, see , or where an exact evaluation is computationally too demanding, see . Problems of this kind lead to the approximation of Markov chains and to the question of how small differences in the transitions of two Markov chains affect the differences between their distributions.
In Bayesian inference when big data sets are involved an exact evaluation of the target density is typically very expensive. For instance, in each step of a Metropolis-Hastings algorithm the likelihood of a proposed state must be computed. Every observation in the underlying data set contributes to the likelihood and must be taken into account in the calculation. This may result in evaluating several terabytes of data in each step of the algorithm. These are the reasons for the recent interest in numerically cheaper approximations of classical MCMC methods, see . A reduction of the computational costs can, e.g., be achieved by relying on a moderately sized random subsample of the data in each step of the algorithm. The function value of the target density is thus replaced by an approximation. Naturally, subsampling and alternative attempts at “cutting the Metropolis-Hastings budget” induce additional biases. These biases can lead to dramatic changes in the properties of the algorithms as discussed in .
We provide perturbation bounds based on Wasserstein distances, which lead to flexible quantitative estimates of the biases of approximate MCMC methods. Our first main result is the Wasserstein perturbation bound of Theorem 3.1. Under a Wasserstein ergodicity assumption, explained in Section 2, it provides an upper bound on the distance of the th step distribution between an ideal and an approximating Markov chain in terms of the difference between their one-step transition probabilities. The result is well-suited for applications on a non-compact state space, since the difference of the one-step transition probabilities is measured by a weighted supremum with respect to a suitable Lyapunov function. For an autoregressive model, we show in Section 4.1 that the resulting perturbation bound cannot be improved in general. As a consequence of the Wasserstein approach we also obtain perturbation estimates for geometrically ergodic Markov chains. We first adapt our Wasserstein perturbation bound to this setting. Then, as a second main result, Theorem 3.2, we prove a refined estimate for geometrically ergodic chains where the perturbation is measured by a weighted total variation distance. Our perturbation bounds, and earlier ones in , establish a direct connection between an exponential convergence property for Markov chains and their robustness to perturbations. In particular, fast convergence to stationarity implies insensitivity to perturbations in the transition probabilities. Geometric ergodicity has been studied extensively in the MCMC literature. Thus, our estimates can be used in combination with many existing convergence results for MCMC algorithms. In Section 4, we illustrate the applicability of both theorems by generalizing recent findings on approximate Metropolis-Hastings algorithms from and on noisy Langevin algorithms for Gibbs random fields from .
We refer to for an overview of the classical literature on perturbation theory for Markov chains. However, as Stuart and Shardlow observed in , the classical assumptions on the perturbation might be too restrictive for many interesting applications. As a consequence, they develop a perturbation theory for geometrically ergodic Markov chains which requires to control perturbations of iterated transition kernels in a weaker sense. In our bounds for geometrically ergodic Markov chains, we have similar flexibility in the perturbation due to the Lyapunov-type stability condition, and require only a control on the errors of one-step transition kernels.
Mitrophanov, in , considers uniformly ergodic Markov chains and provides the best estimates in those settings. In the geometrically ergodic case, there are further related results, see and the references therein. Compared to , our focus is on non-asymptotic estimates with explicit constants, while their main focus is on qualitative results such as inheritance of geometric ergodicity by the perturbation. Earlier related results on perturbations induced by floating-point roundoff errors are shown in .
Finally, let us point out that our paper is complementary to the work of Pillai and Smith who also present Wasserstein perturbation bounds for Markov chains. When moving beyond the uniformly ergodic Markov chain case, an important challenge is to handle the issue that in many applications suprema of relevant quantities over the whole state space are infinite. The authors of guarantee finiteness of supremum norms by restricting attention to subsets of the state space. Their bounds thus involve exit probabilities from these subsets. Our approach circumvents these issues by relying on Lyapunov-type stability conditions for the approximate algorithm.
Wasserstein ergodicity
Let be a Polish space and be the corresponding Borel -algebra. Let be a metric, possibly different from the one which makes the space Polish, which is assumed to be lower semi-continuous with respect to the product topology of . Let be the set of all Borel probability measures on . Then, we define the Wasserstein distance of by
which leads to the well-known duality formula
For details we refer to [45, Chapter 1.2]. By we denote the probability measure concentrated at . Hence is finite for .
Let be a transition kernel on which defines a linear operator given by
with whenever one of the integrals exist, see for example [40, Lemma 3.6]. Now, by
we define the generalized ergodicity coefficient of transition kernel . This coefficient can be understood as a generalized Dobrushin ergodicity coefficient, see . Dobrushin himself called the Kantorovich norm of , see [10, formula (14.34)]. Finally, also provides a lower bound of the coarse Ricci curvature of introduced in .
Two essential properties of the ergodicity coefficient are submultiplicativity and contractivity, see [10, Proposition 14.3 and Proposition 14.4].
For two transition kernels and on and , we have
As an immediate consequence of this contractivity, we obtain the following corollary.
Let be a transition kernel with stationary distribution , i.e. , and assume for some (and hence any) it holds that . Then
Because of the assumption we have that is finite for any . Thus, the assertion follows by Proposition 2.1 and stationarity of . ∎
For some special cases one also has an estimate of the form (2.2) in the other direction. To this end, consider the trivial metric with indicator function
be the total variation norm of a signed measure on . In this setting . For with we have so that
For the moment, let us assume that is uniformly ergodic, that is, there exist numbers and such that
An immediate consequence of the uniform ergodicity is that .
For the transition kernel there exist numbers and such that
For any probability measure , a transition kernel with stationary distribution and we have under the Wasserstein ergodicity condition that
Perturbation bounds
Similar as in [33, Theorem 3.1], we show quantitative bounds on the difference of and , but use the Wasserstein distance instead of total variation. Besides Assumption 2.1, the bounds depend on the difference of the initial distributions and on a suitably weighted one-step difference between and .
Let Assumption 2.1 be satisfied with the numbers and , i.e., . Assume that there are numbers and and a measurable Lyapunov function of such that
with . Then
so that we obtain . By this fact we have
Then, by (3.3), (3.4) and the triangle inequality of the Wasserstein distance we have
Finally, by (2.4) we obtain which allows us to complete the proof. ∎
The parameter is an upper bound on . It can be interpreted as a measure for the stability of the perturbed Markov chain. The parameter quantifies with a weighted supremum norm the one-step difference between and . The use of the Lyapunov function increases the flexibility of the resulting estimate, since larger values of compensate larger values of the Wasserstein distance between the kernels. Notice that the existence of a Lyapunov function satisfying (3.1) is weaker than assuming -uniform ergodicity of since it is not associated with a small set condition. In particular, the condition is satisfied for any with the trivial choice for all , see Corollary 3.2. As we will see in Section 4, allowing for non-trivial choices of considerably increases the applicability of our results.
If has a stationary distribution, say , as a consequence of the previous theorem, we obtain bounds on the difference between and .
Let the assumptions of Theorem 3.2 be satisfied. Assume that has a stationary distribution and let be finite. Then
By Theorem 3.2 we obtain with , , the stationarity of the distributions , and by letting that
By the Lyapunov condition and [16, Proposition 4.24], it holds that
which leads to and finishes the proof. ∎
It may seem artificial to assume but this is needed for the limit argument in the proof. This condition is often satisfied a priori. For example, it holds if the metric is bounded, i.e., is finite, or, more generally, if the distributions and possess a first moment in the sense that there exist such that
As pointed out in Remark 3.1, we do not need to impose condition (3.1) to obtain a non-trivial perturbation bound:
Assume that Assumption 2.1 holds with the numbers and , i.e., , and let
The statement follows by Theorem 3.1 with and . ∎
For the trivial metric the last corollary states essentially the result of [33, Theorem 3.1], where instead of the general Wasserstein distance the total variation distance is used. There, the bound’s dependence on and can be further improved by using the a priori bound in addition to uniform ergodicity. For another metric such an a priori bound is in general not available.
Table 1 provides a detailed comparison between our Theorem 3.1 and the related Wasserstein perturbation result of Pillai and Smith, [35, Lemma 3.3]. An important ingredient in their estimate is a set which can be interpreted as the part of where both Markov chains remain with high probability. When a good uniform upper bound on for all is available, we can choose in [35, Lemma 3.3] and in Theorem 3.1. In that case, both results essentially simplify to Corollary 3.2. The results become entirely different when such a bound is not available or too rough. In our estimate, one then needs a non-trivial Lyapunov function for and a uniform upper bound on . To apply their estimate, one needs a uniform bound on for all . In addition, a bound on , Lyapunov functions and estimates of the exit probabilities from of both Markov chains need to be available. Finally, while [35, Lemma 3.3] requires slightly more regularity on the Lyapunov function, contractivity of the unperturbed transition kernel (with ) is not needed on the whole state space but only on .
2 Perturbation bounds for geometrically ergodic Markov chains
In this section, we derive general perturbation bounds for geometrically ergodic Markov chains. First, we recall some results from , and which are helpful to apply our Wasserstein perturbation bounds in the geometrically ergodic case. Then we present the new estimates:
Corollary 3.3 is an application of Theorem 3.1 with Wasserstein distances replaced by -norms of differences between measures.
In Corollary 3.4, we show that having a Lyapunov function for is sufficient for our bounds if the transition kernels and are sufficiently close (in a suitable sense).
In Theorem 3.2, we provide a quantitative perturbation bound which still applies if we can only control the total variation distance between and . To measure the perturbation in such a weak sense is new for geometrically ergodic Markov chains.
A transition kernel with stationary distribution is called geometrically ergodic if there is a constant and a measurable function such that for -a.e. we have
For -irreducible and aperiodic Markov chains, it is well known that geometric ergodicity is equivalent to -uniform ergodicity, see [36, Proposition 2.1]. Namely, if is geometrically ergodic, then there exists a -a.e. finite measurable function with finite moments with respect to and there are constants and such that
The following result establishes the connection between -norms and certain Wasserstein distances. It is basically due to Hairer and Mattingly , see also .
Assume that is lower semi-continuous on . For , let us define the metric
Then, for any we have
where denotes the Wasserstein distance based on the metric .
Lower semi-continuity of implies lower semi-continuity of , which leads to the duality formula (2.1) by [45, Theorem 1.14]. We thus impose the standing assumption of lower semi-continuity of whenever we speak of -uniform ergodicity in the following. In principle, this requirement can be removed and (3.8) remains true, but we do not go into further detail in that direction. In applications, this is typically not restrictive since is continuous anyway.
By similar arguments as in the proof of [26, Theorem 1.1] we observe that (3.7) implies a suitable upper bound on
If (3.7) is satisfied for the transition kernel , then
For any positive real numbers we have the following elementary inequality
Now, by using (3.7) we obtain the assertion. ∎The lemmas above and Theorem 3.1 lead to the following new perturbation bound for geometrically ergodic Markov chains.
Let be -uniformly ergodic, i.e., there are constants and such that
We also assume that there are numbers and and a measurable Lyapunov function of such that
with . Then
In [41, Theorem 3.1], a related perturbation bound is proven. The convergence property of the unperturbed transition kernel is slightly weaker than our -uniform ergodicity, but also based on a kind of Lyapunov function. More restrictively, there it is assumed that the difference of and for all can be controlled. In addition, the perturbation error is measured with a weight given by the same Lyapunov function as in the convergence property of , but by taking a supremum over a subset of test functions. With our approach we can take the supremum over all test functions and obtain similar estimates by setting .
The next corollary demonstrates how the Lyapunov function of can be replaced by a Lyapunov function of , provided that the distance between the transition kernels is sufficiently small. Notice that assuming the existence of a Lyapunov function of in addition to the -uniform ergodicity is a definition of constants rather than an additional requirement, see, e.g., .
Let be -uniformly ergodic, i.e., there are constants and such that
Moreover, is a measurable Lyapunov function of , such that
with constants and . Let
with . If , then
which implies (3.14). The assertion follows by the assumption that and an application of Corollary 3.3. ∎
For discrete state spaces and under the requirement , a result similar to the previous corollary is obtained in [21, Theorem 3, Corollary 3]. The authors of replace our constant by . This we could do as well, see the proof of Theorem 3.1.
It is easily seen that is a normed linear space. In the setting of Corollary 3.3, we have
In Corollary 3.4, the more restrictive case is considered. The corresponding operator norm appears in classical perturbation theory for Markov chains, see . But as discussed in [41, p. 1126] and it might be too restrictive to measure the perturbation with this operator norm for .
By relying, e.g., on [28, Proposition 2] we have some flexibility in the choice of . There it is shown that, for , -uniform ergodicity implies -uniform ergodicity. This leads to less favorable constants in the -uniform ergodicity of , but can relax the requirements on the similarity of and . Namely, with a Lyapunov function of we can apply Corollary 3.3 with a -uniformly ergodic and .
Unfortunately, this approach breaks down for . To see this, notice that -uniform ergodicity with is just uniform ergodicity which is not implied by geometric ergodicity. The next theorem overcomes this limitation by separating the two roles of the function in the previous perturbation bounds. Roughly, we set in the sense that we measure the distances between and as well as between and in the total variation distance. At the same time, we set in the sense that we assume is -uniformly ergodic with Lyapunov function .
Let be -uniformly ergodic, i.e., there are constants and such that
Moreover, is a measurable Lyapunov function of and , such that
with constants and . Let
with . Then, for we have
From the proof of Theorem 3.2 we know that
Fix a real number and let . By considering (2.3) one can see that . This leads to
For , we can choose the numbers and . This yields and the proof is complete. ∎
Let be a stationary distribution of . Notice that by the assumption that is Lyapunov function of and [16, Proposition 4.24] it follows that . Further, by the -uniform ergodicity of we also know that is finite. Thus,
Now, by Theorem 3.2 we can bound with , and by letting . We obtain
In the setting of Theorem 3.2, we can also interpret as an operator norm. Namely,
Applications
We illustrate our perturbation bounds in three different settings. We begin with studying an autoregressive process also considered in . After this, we show quantitative perturbation bounds for approximate versions of two prominent MCMC algorithms, namely the Metropolis-Hastings and stochastic Langevin algorithms.
and it is well known that there exists a stationary distribution, say , of .
leads to . Similarly, one obtains
and , . Then, inequality (3.2) of Theorem 3.1 gives
and for we have
From the previous two inequalities one can see that if is sufficiently close to , then the distance of the distribution and is small. Let us emphasize here that we provide an explicit estimate rather than an asymptotic statement.
The dependence on in the previous inequality cannot be improved in general. To see this, let us assume that and are real-valued random variables with distribution and , respectively. Then, because of the stationarity we have that and are also distributed according to and , respectively. Thus
Let us now discuss the application of Corollary 3.4 and Theorem 3.2. Under the additional assumption that , the distribution of , has a Lebesgue density , it is shown in [15, Section 4] that the autoregressive model (4.1) is also -uniformly ergodic. Precisely, there is a constant such that
Moreover, from [13, Example 1] we know that
does not go to when . Hence, Corollary 3.4 cannot quantify for small whether the th step distributions are close to each other. However, also in [13, Example 1] it is proven that
The first summand on the right hand side we can bound by
and similarly for the second summand. Using that , we obtain . Finally, by substitution we can write
For simplicity set and assume that as well as . Then, Theorem 3.2 implies
2 Approximate Metropolis-Hastings algorithms
We apply our perturbation results to the approximate (or noisy) Metropolis-Hastings algorithms analyzed in . We assume either that the unperturbed transition kernel of the Metropolis-Hastings algorithm satisfies the Wasserstein ergodicity condition stated in Assumption 2.1 or is geometrically ergodic. In particular, we do not assume that the transition kernel is uniformly ergodic. Let be a probability distribution on and assume that we are interested in sampling realizations from this distribution. Let be a transition kernel which serves as the proposal for the Metropolis-Hastings algorithm. From [44, Proposition 1] we know that there exists a set such that we can define the “acceptance ratio” for as
Then, let the acceptance probability be . With this notation the Metropolis-Hastings algorithm defines a transition kernel
A single transition from to of the Metropolis-Hastings algorithm works as follows:
Draw a sample and independently, call the result and ;
Set , with the ratio defined in (4.5);
If , then accept the proposal, and set , else reject the proposal and set .
A single transition from to works as follows:
Draw a sample and independently, call the result and ;
Draw a sample , call the result ;
If , then accept the proposal, and set , else reject the proposal and set .
and the transition kernel of such a Markov chain is still of the form (4.6) with substituted by , i.e., it is given by . The following results hold in the slightly more general case where is any approximation of the acceptance probability .
The next lemma provides an estimate for the Wasserstein distance between transition kernels of the form (4.6) in terms of the acceptance probabilities.
Let be a transition kernel on and let and be measurable functions. By and we denote the transition kernels of the form (4.6) with acceptance probabilities and . Then, for all , we have
with .
By the use of the dual representation of the Wasserstein distance it follows that
∎By the previous lemma and Theorem 3.1, we obtain the following Wasserstein perturbation bound for the approximate Metropolis-Hastings algorithm.
Let be a transition kernel on and let and be measurable functions. By and we denote the transition kernels of the form (4.6) with acceptance probabilities and . Let the following conditions be satisfied:
Assumption 2.1 holds for the transition kernel , i.e., for and .
There are numbers , and a measurable Lyapunov function of , i.e.,
Let and assume that
Then, for any and finite we have
where .
Let us point out several aspects of condition (4.7). Recall that (4.7) is always satisfied with for all . However, in this case it seems more difficult to control . If some additional knowledge in form of a Lyapunov function of , i.e., for some and , is available, then a non-trivial candidate for is . For sufficiently small
Then, and whenever it is clear that condition (4.7) is verified.
To highlight the usefulness of a non-trivial Lyapunov function, we consider the following scenario which is related to a local perturbation of an independent Metropolis-Hastings algorithm.
Let us assume that for Assumption 2.1, as formulated in Corollary 4.1, is satisfied. For some probability measure on define and . For let
Hence, for the transition kernel accepts any proposed state and for we have . It is easily seen that . For arbitrary and set and note that
The last inequality of the previous formula follows by distinguishing the cases and . Define and observe
for arbitrary and . Under the assumption that is finite and letting as well as we obtain
which tells us that basically measures the difference of the distributions. A small perturbation set with respect to , thus implies a small bias. In contrast, with the trivial Lyapunov function , and if there is such that , we only obtain
The resulting upper bound on will typically be bounded away from zero regardless of the set .
The constant essentially depends on the distance and the difference of the acceptance probabilities . By applying the Cauchy-Schwarz inequality to the numerator of , we can separate the two parts, i.e.,
If both integrals remain finite we see that an appropriate control of suffices for making the constant small.
By using a Hoeffding-type bound, in Bardenet et al. [3, Lemma 3.1.] it is shown that for their version of the approximate Metropolis-Hastings algorithm with adaptive subsampling the approximation error is bounded uniformly in and by a constant . Moreover, can be chosen arbitrarily small for the implementation of the algorithm.
Now we consider the case where the unperturbed transition kernel is geometrically ergodic. Motivated by Remark 4.2, we also assume that for a sufficiently small number . The following corollary generalizes a main result of Bardenet et al. [3, Proposition 3.2] to the geometrically ergodic case.
Let be a transition kernel on and let and be measurable functions. By and we denote the transition kernels of the form (4.6) with acceptance probabilities and . Let the following conditions be satisfied:
The unperturbed transition kernel is -uniformly ergodic, that is,
for numbers , and a measurable function . Moreover, is a Lyapunov function of , i.e.,
for numbers and .
A uniform bound on the difference of the acceptance probabilities is given, that is, for all , we have
If , then, for any with finite we have
We consider the metric , defined in Lemma 3.1, set and use so that it is easily seen that the constant from Corollary 4.1 satisfies . From the proof of Corollary 3.4, we know that is a Lyapunov function of provided that . Thus, we have
Now if , then and the assertion follows from Corollary 4.1 by writing the Wasserstein distances in terms of -norms as in Section 3.2. ∎
Without in the denominator, i.e., if we had relied on Corollary 3.2 instead of Theorem 3.1, the constant would often be infinite. Consider the following toy example: Let be the exponential distribution with density on and assume that is a uniform proposal with support . With it is well known that the Metropolis-Hastings algorithm is -uniformly ergodic, see or [37, Example 4]. In this example
whereas is unbounded in . Notice that only depends on the unperturbed Markov chain so that a bound on can be combined with any approximation.
Let and be -irreducible and aperiodic. Then, one can prove under the assumptions of Corollary 4.2 that is -uniformly ergodic if is sufficiently small. To see this, note that by [31, Theorem 16.0.1] the -uniform ergodicity of implies that satisfies their drift condition (V4). By the arguments stated in the proof of Corollary 3.4, one obtains that also satisfies (V4) for sufficiently small and this implies -uniform ergodicity. In this case, clearly possesses a stationary distribution, say , and
The previous inequality follows by (3.5) and the fact that
Here the finiteness of follows by the -uniform ergodicity of and follows by (4.10) and [16, Proposition 4.24].
3 Noisy Langevin algorithm for Gibbs random fields
An alternative to the Metropolis-Hastings algorithm is the Langevin algorithm, see . Unfortunately, in its implementation one needs the gradient of the density of the target distribution. To overcome this problem, different approximate Langevin algorithms have been proposed and studied, see .
where the prior density is the Lebesgue density of the normal distribution with .
In general is not a stationary distribution of , but there exists a stationary distribution (see Proposition 4.1 below), say , which is close to depending on . Let then, by the definition of we have
A single transition from to works as follows:
Draw , independent from step 1., call the result . Set
From [2, Lemma 3] and by applying arguments of , we obtain the following facts about the noisy Langevin algorithm.
the function is a Lyapunov function for and . We have
with , and the interval
the transition kernels and are -uniformly ergodic.
for we have
Thus, the assertions from 1. to 3. are proven. The statement of 4. is a consequence of [2, Lemma 3]. There it is shown that for it holds that
By using and we further estimate the right-hand side by
Since , we have the bound provided that which follows from . The assertion of (4.13) follows now by a simple calculation. ∎
By using the facts collected in the previous proposition, we can apply the perturbation bound of Theorem 3.2 and obtain a quantitative perturbation bound for the noisy Langevin algorithm.
We have by Proposition 4.1 that is -uniformly ergodic with , i.e., there are numbers and such that
Now, by combining Theorem 3.2 and Remark 3.8 with the results from Proposition 4.1 we obtain the result. ∎
We want to point out that the assumptions imposed are the same as in [2, Theorem 3.2], but instead of the asymptotic result we provide an explicit estimate. The numbers and are not stated in terms of the model parameters. In principle, these values can be derived from the drift condition (4.12) through [5, Theorem 1.1].
Acknowledgements
We thank Alexander Mitrophanov and the referees for their valuable comments which helped to improve the paper. D.R. was supported by the DFG Research Training Group 2088.