Consistency and fluctuations for stochastic gradient Langevin dynamics
Yee Whye Teh, Alexandre Thiéry, Sebastian Vollmer
Introduction
We are entering the age of Big Data, where significant advances across a range of scientific, engineering and societal pursuits hinge upon the gain in understanding derived from the analyses of large scale data sets. Examples include recent advances in genome-wide association studies (Hirschhorn and Daly, 2005; McCarthy et al., 2008; Wang et al., 2005), speech recognition (Hinton et al., 2012), object recognition (Krizhevsky et al., 2012), and self-driving cars (Thrun, 2010). As the quantity of data available has been outpacing the computational resources available in recent years, there is an increasing demand for new scalable learning methods, for example methods based on stochastic optimization (Robbins and Monro, 1951b; Srebro and Tewari, 2010; Sato, 2001; Hoffman et al., 2010), distributed computational architectures (Ahmed et al., 2012; Neiswanger et al., 2013; Minsker et al., 2014), greedy optimization (Harchaoui and Jaggi, 2014), as well as the development of specialized computing systems supporting large scale machine learning applications (Gonzalez, 2014).
Recently, there has also been increasing interest in methods for Bayesian inference scalable to Big Data settings. Rather than attempting a single point estimate of parameters typical in optimization-based or maximum likelihood settings, Bayesian methods attempt to obtain characterizations of the full posterior distribution over the unknown parameters and latent variables in the model, hence providing better characterizations of the uncertainties inherent in the learning process, as well as providing protection against overfitting. Scalable Bayesian methods proposed in the recent literature include stochastic variational inference (Sato, 2001; Hoffman et al., 2010), which applies stochastic approximation techniques to optimizing a variational approximation to the posterior, parallelized Monte Carlo (Neiswanger et al., 2013; Minsker et al., 2014), which distributes the computations needed for Monte Carlo sampling across a large compute cluster, as well as subsampling-based Monte Carlo (Welling and Teh, 2011; Ahn et al., 2012; Korattikara et al., 2014), which attempt to reduce the computational complexity of Markov chain Monte Carlo (MCMC) methods by applying updates to small subsets of data.
In this paper we study the asymptotic properties of the stochastic gradient Langevin dynamics (SGLD) algorithm first proposed by Welling and Teh (2011). SGLD is a subsampling-based MCMC algorithm based on combining ideas from stochastic optimization, specifically using small subsets of data to estimate gradients, with Langevin dynamics, a MCMC method making use of gradient information to produce better parameter updates. Welling and Teh (2011) demonstrated that SGLD works well on a variety of models and this has since been extended by Ahn et al. (2012, 2014) and Patterson and Teh (2013b).
The stochastic gradients in SGLD introduce approximations into the Markov chain, whose effect has to be controlled by using a slowly decreasing sequence of step sizes. Welling and Teh (2011) provided an intuitive argument that as the step-size decreases the variations introduced by the stochastic gradients gets dominated by the natural stochasticity of Langevin dynamics, the result being that the stochastic gradient approximation should wash out asymptotically and that the Markov chain should converge to the true posterior distribution.
In this paper, we make this intuitive argument more precise by providing conditions under which SGLD converges to the targeted posterior distribution; we describe a number of characterizations of this convergence. Specifically, we show that estimators derived from SGLD are consistent (Theorem 7) and satisfy a central limit theorem (CLT) (Theorem 8); the bias-variance trade-off of the algorithm is discussed in details in Section 5. In Section 6 we prove that, when observed on the right (inhomogeneous) time scale, the sample path of the algorithm converges to a Langevin diffusion (Theorem 9).
Our analysis reveals that for a sequence of step-sizes with algebraic decay the optimal choice, when measured in terms of rate of decay of the mean squared error (MSE), is given for ; the choice leads to an algorithm that converges at rate . This rate of convergence is worse than the standard Monte-Carlo -rate of convergence. This is not due to the stochastic gradients used in SGLD, but rather to the decreasing step-sizes.
These results are asymptotic in the sense that they characterise the behaviour of the algorithm as the number of steps approaches infinity. Therefore they do not necessarily translate into any insight into the behaviour for finite computational budgets which is the regime in which the SGLD might provide computational gains over alternatives. The mathematical framework described in this article show that the SGLD is a sound algorithm, an important result that has been missing in the literature.
SJV and YWT acknowledge EPSRC for research funding through grant EP/K009850/1 and EP/K009362/1. AHT is grateful for financial support in carrying out this research from a Singaporean MoE grant.
Stochastic Gradient Langevin Dynamics
where denotes the standard Laplacian operator. The motivation behind the choice of Langevin diffusions is that, under certain conditions, they are ergodic with respect to the distribution ; for example, (Roberts and Tweedie, 1996; Stramer and Tweedie, 1999a, b; Mattingly et al., 2002) describe drift conditions of the type described in Section 3.2 that ensure that the total variation distance from stationarity of the law at time of the Langevin diffusion (1) decreases to zero exponentially quickly as .
Given a time-step and a current position , it is often straightforward to simulate a random variable that is approximately distributed as the law of given . For stochastic differential equations, the Euler-Maruyama scheme (Maruyama, 1955) might be the simplest approach for approximating the law of . For a Langevin diffusion this reads
for a standard -dimensional centred Gaussian random variable . To fully correct the discretization error, one can adopt a Metropolis-Hastings accept-reject mechanism. The resulting algorithm is usually referred to as the Metropolis-Adjusted-Langevin algorithm (MALA) (Roberts and Tweedie, 1996). Other discretizations can be used as proposals. For example, the random walk Metropolis-Hastings algorithm uses the discretization of a standard Brownian motion as the proposal, while the Hamiltonian Monte Carlo (HMC) algorithm (Duane et al., 1987) is based on discretizations of an Hamiltonian system of differential equations. See the excellent review of Neal (2010) for further information.
In this paper, we shall consider the situation where the target is the density of the posterior distribution under a Bayesian model where there are i.i.d. observations, the so called Big Data regime,
Here, both computing the gradient term and evaluating the Metropolis-Hastings acceptance ratio require a computational budget that scales unfeasibly as . One approach is to use a standard random walk proposal instead of Langevin dynamics, and to efficiently approximating the Metropolis-Hastings accept-reject mechanism using only a subset of the data (Korattikara et al., 2014; Bardenet et al., 2014).
This paper is concerned with stochastic gradient Langevin dynamics (SGLD), an alternative approach proposed by Welling and Teh (2011). This follows the opposite route and chooses to completely avoid the computation of the Metropolis-Hastings ratio. By choosing a discretization of the Langevin diffusion (1) with a sufficiently small step-size , because the Langevin diffusion is ergodic with respect to , the hope is that even if the Metropolis-Hastings accept-reject mechanism is completely avoided, the resulting Markov chain still has an invariant distribution that is close to . Choosing a decreasing sequence of step-sizes should even allow us to converge to the exact posterior distribution. To further make this approach viable in large settings, the gradient term can be further approximated using a subsampling strategy. For an integer and a random subset of generated by sampling with or without replacement from , the quantity
is an unbiased estimator of . Most importantly, this stochastic estimate can be computed with a computational budget that scales as with potentially much smaller than . Indeed, the larger the quotient , the smaller the variance of this estimate.
Stochastic gradient methods have a long history in optimisation and machine learning and are especially relevant in the large dataset regime considered in this article (Robbins and Monro, 1951a; Bottou, 2010; Hoffman et al., 2013). In this paper we will adopt a slightly more general framework and assume that one can compute an unbiased estimate to the gradient , where is an auxiliary random variable which contains all the randomness involved in constructing the estimate. Without loss of generality we may assume (although this is unnecessary) that is uniform on . The unbiasedness of the estimator means that
for an i.i.d. sequence , and an independent and i.i.d. sequence of auxiliary random variables. This is the equivalent of the Euler-Maruyama discretization (3) of the Langevin diffusion (1) with a decreasing sequence of step-sizes and a stochastic estimate to the gradient term. The analysis presented in this article assumes for simplicity that the initial position of the algorithm is deterministic; in the simulation study of Section 7, the algorithms are started at the MAP estimator. Indeed, more general situations could be analysed with similar arguments at the cost of slightly less transparent proofs. Note that the process is a non-homogeneous Markov chain, and many standard analysis techniques for homogeneous Markov chains do not apply.
with . The quantity thus approximates the ergodic average between time zero and . During the course of the proof of our fluctuation Theorem 8, we will need to consider more general averaging schemes than the one above. Instead, for a general positive sequence of weights , we define the -weighted sum
with . Indeed, in the particular case ; we will consider the weight sequence in the proof of Theorem 8.
In the rest of this paper, we will build a rigorous framework for understanding the properties of this SGLD algorithm, demonstrating that the heuristics and numerical evidences presented in Welling and Teh (2011) were indeed correct.
Assumptions and Stability Analysis
This section starts with the basics assumptions we will need for the asymptotic results to follow, and illustrates some of the potential stability issues that may occur, would the SGLD algorithm be applied without care.
Throughout this text, we assume that the sequence of step-sizes satisfies the following usual assumption.
The step-sizes form a decreasing sequence with
Indeed, this assumption is easily seen to also be necessary for the Law of Large Numbers of Section 4 to hold. Furthermore, we will need at several occasions to assume the following assumption on the oscillations of a sequence of step-sizes .
The step-sizes sequence is such that and and
where .
Assumption 2 holds if satisfies Assumption (1) and the weights are defined as , for some some exponent small enough for . This is because the first sum is less than \sum_{m\geq 1}\big{|}\Delta(\omega_{m}/\delta_{m})\big{|}/\Omega_{1}=\delta_{1}^{p-1}/\Omega_{1}, while the finiteness of the second sum can be seen as follows:
For any exponents and the sequences and satisfy both Assumption 1 and Assumption 2.
2 Stability
Unfortunately, stability of the continuous time Langevin diffusion does not always translate into good behaviour for its Euler-Maruyama discretization. For example, even if the drift term points towards the right direction in the sense that for every parameter , it might happen that the magnitude of the drift term is too large so that the Euler-Maruyama discretization overshoots and becomes unstable. In a one dimensional setting, this would lead to a Markov chain that diverges in the sense that the sequence alternates between taking arbitrarily large positive and negative values. Lemma of (Mattingly et al., 2002) gives such an example with a target density . See also Theorem of (Roberts and Tweedie, 1996) for examples of the same flavours.
Guaranteeing stability of the Euler-Maruyama discretization requires stronger Lypanunov type conditions. At a heuristic level, one must ensure that the drift term points towards the centre of the state space. In addition, the previous discussion indicates that one must also ensure that the magnitude of this drift term is not too large. The following assumptions satisfy both heuristics, and we will show are enough to guarantee that the SGLD algorithm is consistent, with asymptotically Gaussian fluctuations.
There exists an exponent such that
This implies that for any exponent .
Equation (12) ensures that on average the drift term points towards the centre of the state space, while equations (10) and (11) provide control on the magnitude of the (stochastic) drift term. The drift condition (12) implies in particular that the Langevin diffusion (1) converges exponentially quickly towards the equilibrium distribution (Mattingly et al., 2002; Roberts and Tweedie, 1996). The proof of the Law of Large Numbers (LLN) and the Central Limit Theorem (CLT) both exploit the following Lemma.
Let the step-sizes satisfy Assumption 1 and suppose that the stability Assumptions 4 hold. For any exponent the following bounds hold almost surely,
Moreover, for any exponent we have . If the sequence of weights satisfies Assumption 2 the following holds almost surely,
The technical proof can be found in Section B. The idea is to leverage condition (12) in order to establish that the function satisfies both discrete and continuous drift conditions.
3 Scope of the analysis
For a posterior density of the form (4) and the usual unbiased estimate to described in Equation (5), to establish that Equations (10) and (11) hold it suffices to verify that the prior density is such that and that for any index the likelihood term is such that
Indeed, in these circumstances, we have . Several such examples are described in Section 7.
It is important to note that the drift Condition (12) typically does not hold for distributions with heavy tails such that as (Roberts and Tweedie, 1996). For example, the standard MALA algorithm is not geometrically ergodic when converges to zero as (Theorem of (Roberts and Tweedie, 1996)); indeed, the analysis of standard local-move MCMC algorithms when applied to target densities with heavy tails is delicate and typically necessitate other tools Stramer and Tweedie (1999b); Jarner and Roberts (2007); Kamatani (2014) than the approach based on drift conditions of the type (12). The analysis of the properties of the SGLD algorithm when applied to such heavy tail densities is out of the scope of this article. It is important to note that many more complex scenarios involving high-dimensionality, multi-modality, non-parametric settings where the complexity of the target distribution increases with the size of the data, or combination thereof, are examples of interesting and relevant situations where our analysis typically does not apply; analysing the SGLD algorithm when applied to these challenging target distributions is well out of the scope of this article.
Consistency
with a similar result for -weighted empirical averages, under assumptions on the weight sequence . The proofs of several results of this paper make use of the following elementary lemma.
Let and be two sequences of random variables adapted to a filtration and let be an increasing sequence of positive real numbers. The limit
holds almost surely if the following two conditions are satisfied.
The process is a martingale, i.e. and
The sequence is such that
The above lemma, whose proof can be found in the appendix A, is standard; Lamberton and Pages (2002) also follows this route to prove several of their results.
If in addition the sequence of weights satisfies Assumption (2), a similar result holds almost surely for the -weighted ergodic average:
Proof In the following, we write and to denote the conditional expectation and conditional probability respectively. We use the notation . Finally, for notational convenience, we only present the proof in the scalar case , the multidimensional case being entirely similar. We will give a detailed proof of Equation (18) and then briefly describe how the more general Equation (19) can be proven using similar arguments. To prove Equation (18), we first show that the sequence almost surely converges weakly to . Equation (18) is then proved in a second stage.
Weak convergence of . To prove that almost surely the sequence converges weakly towards it suffices to prove that the sequence is almost surely weakly pre-compact and that any weakly convergent subsequence of necessarily (weakly) converges towards . By Prokhorov’s Theorem (Billingsley, 1995) and Equation (13), because the Lyapunov function goes to infinity as , the sequence is almost surely weakly pre-compact. It thus remains to show that if a subsequence converges weakly to a probability measure then .
To prove Equation (20) we use the following decomposition of ,
Let us prove that the first term of (21) converges almost surely to zero. The numerator is equal to the sum of and . By boundedness of , the term converges almost surely to zero. By Lemma 6, to conclude is suffices to show that the martingale difference terms are such that
Because is Lipschitz, it suffices to prove that is finite. The stability Assumption 4 and Lemma 5 imply that the supremum is finite. Since , it follows that is less than a constant multiple of . Under Assumption 1, because the telescoping sum is finite, the sum is finite. This concludes the proof that the first term in (21) converges almost surely to zero.
The second term of (21) equals \big{(}R_{0}+\ldots+R_{m-1}\big{)}/T_{m} with
We now show that there exists a constant such that the bound holds for any . To do so, let be such that the support of the test function is included in the compact set . We examine two cases separately.
If then so that . Since we have
If , we decompose into two terms. A second order Taylor formula yields
Under Assumption 4, the quantities and are upper bounded by a constant multiple of . Since the function is globally bounded (because continuous with compact support) this shows that is less than a constant multiple of . Since , the bounds and (see Lemma 5) yield that with
Note that is finite by Assumption 4 and Lemma 5.
We have thus proved that there is a constant such for ; it follows that the sum is less than a constant multiple of . Under Assumption 1, this upper bound converges to zero as , hence the conclusion.
This ends the proof of the almost sure weak convergence of towards .
Proof of Equation (18). By assumption we have for some constant and exponent . To show that almost surely, we will use Lemma 5 and the almost sure weak convergence, which guarantees that for a continuous and bounded test function .
For any , the set is compact and Tietze’s extension theorem (Rudin, 1986, Theorem ) yields that there exists a continuous function with compact support that agrees with on and such that . We can indeed also assume that . Since Lemma 5 states that is almost surely finite, it follows that
By the triangle inequality, we thus have,
On the right-hand-side, the term in the middle can be made arbitrarily small as since converges weakly towards , while the other two terms converges to zero as . This concludes the proof of Equation (18).
Proof of Equation (19). The approach is very similar to the proof of Equation (18) and for this reason we only highlight the main differences. The same argument shows that the sequence is tight and it suffices to show that for any weak limit of the sequence for obtaining the almost sure weak convergences of towards . One can then upgrade this almost sure weak convergence to a Law of Large Numbers. To prove (19), we thus concentrate on proving that . For a smooth and compactly supported test function we use the decomposition with
and prove that each term converges to zero almost surely. For , by Lemma 6 it suffices to show that is finite. This follows from the bound \operatorname{\mathbf{E}}{\left[\big{(}\operatorname{\mathbf{E}}_{k-1}[\varphi(\theta_{k})]-\varphi(\theta_{k})\big{)}^{2}\right]}\lesssim\delta_{k} and the fact that is finite. For , we can write it as
Because , and is bounded, one can concentrate on proving that converges almost surely to zero. By Lemma 6, it suffices to verify that is finite; this directly follows from the boundedness of and Assumption 2. Finally, algebra shows that with the quantity defined in Equation (22). It has been proved that there is a constant such that, almost surely, for all . Since , the rescaled sum converges to zero as . It follows that converges almost surely to zero.
Fluctuations, Bias-Variance Analysis, and Central Limit Theorem
is introduced so that the additive functional of the trajectory of the Markov process can be expressed as the sum of a martingale and a remainder term. A central limit for martingales can then be invoked to describe the asymptotic behaviour of the fluctuations
where the random variables and are independent.
Proof The proof follows the strategy described in Lamberton and Pages (2002), with the additional difficulty that only unbiased estimates of the drift term of the Langevin diffusion are available. We use the decomposition
A fifth order Taylor expansion and Equation (7) yields that
In the above, we have defined ; the quantity lies between and . It follows from the expression (2) of the generator of the of the Langevin diffusion (1) and decomposition (28) that where the fluctuation and bias terms are given by
Remainder term: we start by proving that the term is negligible. The term converges to zero in probability because and Lemma 5 shows that is almost surely finite. Similarly, Assumptions 1 and 4 and Lemma 5 yield that
from which it follows that converges to zero in probability; we have exploited the fact that is assumed to be globally bounded. Essentially the same argument yield that the high-order terms are asymptotically negligible: for and the limit
holds in probability because the coefficients are uniformly bounded in expectation and the quantity converges to zero since and . To conclude, one needs to verify that the low order terms are also negligible in the sense that the limit
holds in probability with and and and . Since where is the natural filtration associated to the process it follows that
We made use of the fact that the expectations are uniformly bounded for all by the same arguments as above, and that the final expression converges to 0 since , and . This concludes the proof that the remainder term is asymptotically negligible.
Fluctuation term: we now prove that the fluctuations term converges in distribution at Monte-Carlo rate towards a Gaussian distribution,
Using the standard martingale central limit theorem (e.g. Theorem , Chapter of (Hall and Heyde, 1980)), it suffices to verify that for any the following limits hold in probability,
Since , the conclusion follows.
Bias term: we conclude by proving that the bias term is such that the limit
holds in probability. The quantity can also be expressed as
for a martingale difference term where and equals
Under the assumptions of Theorem 8, the function satisfies the hypothesis of Theorem 7 applied to the weight sequence ; it follows that the first term in Equation (31) converge almost surely to . It remains to prove that the second term in Equation (31) also converges almost surely to zero. By Lemma 6, it suffices to prove that the martingale
is bounded in . Under the Assumption of Theorem 8, Lemma 5 yields that the martingale difference term is uniformly bounded in from which the conclusion readily follows.
For the standard choice of step-sizes the statistical fluctuations dominate in the range , there is an exact balance between bias and fluctuations for , and the bias dominates for . The optimal rate of convergence is obtained for and leads to an algorithm that converges at rate .
Diffusion limit
In this section we show that, when observed on the right (inhomogeneous) time scale, the sample path of the SGLD algorithm converges to the continuous time Langevin diffusion of Equation (1), confirming the heuristic discussion in Welling and Teh (2011).
If the drift function is globally Lipschitz, then the Itô’s map is well defined and continuous. Further, the image under the Itô map of a standard Brownian motion on can be seen to be described by Langevin diffusion (1).
Define and for each . The Markov chains are coupled to as follows:
for an i.i.d. collection of auxiliary random variables . Note that form an i.i.d. sequence of variables for each . We can construct piecewise affine continuous time sample paths by linearly interpolating the Markov chains,
for . The approach then amounts to showing that each can be expressed as , where is a sequence of stochastic processes converging to and is asymptotically negligible, and making use of the continuity properties of the Itô map .
For convenience, we define as the continuous piecewise affine processes that satisfies for all and that is affine in between. It follows that for any time we have
are finite, it readily follows that converges to zero in expectation.
Numerical Illustrations
In this section we illustrate the use of the SGLD method to a simple Gaussian toy model and to a Bayesian logistic regression problem. We verify that both models satisfy Assumption 4, the main assumption needed for our asymptotic results to hold. Simulations are then performed to empirically confirm our theory; for step-sizes sequences of the type , both the rate of decay of the MSE and the impact of the sub-sampling scheme are investigated. The main purpose of this article is to establish the missing theoretical foundation of stochastic gradient methods for the approximation of expectations. For more exhaustive simulation studies we refer to Welling and Teh (2011); S. Ahn and Welling (2012); Patterson and Teh (2013a); Chen et al. (2014). By considering a logistic regression model, we demonstrate that the SGLD can be advantageous over the Metropolis-Adjusted-Langevin (MALA) algorithm if the available computational budget only allows a few iterations through the whole data set, see Section 7.2.2.
Consider independent and identically distributed observations from the two parameters location model given by
We use a Gaussian prior and assume that the variance hyper-parameters and are both known. The posterior density is normally distributed with mean and variance given by
where is the sample average of the observations. In this case, we have
for a random subset of cardinal .
We verify in this section that Assumption (4) is satisfied for the following choice of Lyapunov function,
Since the error term is globally bounded, the drift and the Lyapunov function are linear, Assumptions (4).1 and (4).2 are satisfied. Finally, to verify Assumption (4).3, it suffices to note that since we have
In other words, Assumption (4).3 holds with .
1.2 Simulations
We chose , and created a data set consisting of data points simulated from the model. We used as the size of subsets used to estimate the gradients. We evaluated the convergence behaviour of SGLD using the test function where .
We are interested in confirming the asymptotic convergence regimes of Theorem 8 by running SGLD with a range of step sizes, and plotting the mean squared error (MSE) achieved by the estimate against the number of steps of the algorithm to determine the rates of convergence. We used step sizes , for where is chosen such that is less than the posterior standard deviation. According to the Theorem, the MSE should scale as for , and for .
The observed MSE is plotted against on a log-log plot in Figure 1. As predicted by the theory, the optimal rate of decay is around . To be more precise, we estimate the rates of decay by estimating the slopes on the log-log plots. This is plotted in Figure 2, which also shows a good match to the theoretical rates given in Theorem 8, where the best rate of decay is achieved at . Finally, to demonstrate that there are indeed two distinct regimes of convergence, in Figure 3 we have plotted the MSE multiplied by . For , the plots remain flat, showing that the MSE does indeed decay as . For , the plots diverge, showing that the MSE decays at a slower rate than .
For , Figure 4 depicts how the MSE decreases as a function of the number of likelihood evaluations for subsample sizes .
2 Logistic Regression
We verify in this section that Assumption (4) is satisfied for the following logistic regression model. Consider independent and identically observations distributed as
for a random subset of cardinal .
We verify in this section that Assumption (4) is satisfied for the Lyapunov function . Since is globally bounded and and
it is straightforward to see that Assumption (4).1 and (4).2 are satisfied. Finally,
2.2 Comparison of the SGLD and the MALA for logistic regression
We consider a simulated dataset where and . We set the input covariates with for , and use a Gaussian prior . We draw a and based on it we generate according to the model probabilities (36). In the following we compare MALA in SGLD by comparing their estimate for the variance of the first component.
The findings of this article show that SGLD-based expectation estimates converge at a slower rate of at most compared to the standard rate of for standard MCMC algorithms such as the MALA algorithm. In the following we demonstrate that in the non-asymptotic regime (allowing only a few passes through the data set) the SGLD can be advantageous. We start both algorithms at the MAP estimator and we ensure that this study is not biased due to different speeds in finding the mode of the posterior. For a fair comparison we tune the MALA to an acceptance rate of approximately following the findings of Roberts and Rosenthal (1998). For the SGLD-based variance estimate of the first component for we choose as step sizes and optimise over the choices of and . This is achieved by estimating the MSE for choices of and on a log-scale grid based on independent runs. The estimates based on and effective iterations through the data set the averages are visualised in the heat maps in Figure 5. That means we limit the algorithm to and likelihood evaluations, respectively. The figures indicate that the range of the good parameter choices seems to be the same in both cases. Using the heat map for the estimated MSE after 20 iterations through the data set, we pick and and compare the time behaviour of the SGLD and the MALA algorithm in Figure 6. The figure is a simulation evidence that the SGLD algorithm can be advantageous in the initial phase for the first few iterations through the data set. This recommends further investigation as the initial phase can be quite different from the asymptotic phase.
Conclusion
The CLT and bias-variance decomposition can be leveraged to show that it is optimal to choose a step-sizes sequences that scales as ; the resulting algorithm converges at rate . Note that this recommendation is different from the previously suggested Welling and Teh (2011) choice of .
Our theory suggests that an optimally tuned SGLD method converges at rate , and is thus asymptotically less efficient than a standard MCMC procedure. We believe that this result does not necessarily preclude SGLD to be more efficient in the initial transient phase, a result hinted at in Figure 4; the detailed study of this (non-asymptotic) phenomenon is an interesting venue of research. The asymptotic convergence rate of SGLD depends crucially on the decreasing step sizes, which is required to reduce the effect of the discretization bias due to the lack of a Metropolis-Hastings correction. Another avenue of exploration is to determine more precisely the bias resulting from the discretization of the Langevin diffusion, and to study the effect of the choice of step sizes in terms of the trade-off between bias, variance, and computation.
A Proof of Lemma 6
Recall Kronecker’s Lemma (Shiryaev, 1996, Lemma IV.3.2) that states that for a non-decreasing and positive sequence and another real valued sequence such that the series converges the following limit holds,
For proving Equation (15) it thus suffices to show that the sums and are almost surely finite. This follows from Condition (16) ( martingale convergence theorem) and Condition (17).
B Proof of Lemma 5
For clarity, the proof is only presented in the scalar case ; the multidimensional setting is entirely similar. Before embarking on the proof, let us first mention some consequences of Assumptions 4 that will be repeatedly used in the sequel. Since the second derivative is globally bounded and is upper bounded by a multiple of , we have that
and that the function is globally Lipschitz. By expressing the quantity as \big{(}V^{1/2}(\theta)+[V^{1/2}(\theta+\varepsilon)-V^{1/2}(\theta)]\big{)}^{2p}, it then follows that
Similarly, Definition (7), the bound and Equation (10) yield that for any exponent the following holds,
For clarity, the proof of Lemma (5) is separated into several steps. First, we establish that the process satisfies a Lyapunov type condition; see Equation (40) below. We then describe how Equation (13) follows from this Lyapunov condition. The fact that is finite can be seen as a consequence of Theorem of (Roberts and Tweedie, 1996).
Discrete Lyapunov condition. Let us prove that there exists an index and constants such that for any we have
Since for any there exists such that , for proving (40) it actually suffices to verify that we have
for some constants and index large enough. A second order Taylor expansion yields that the left hand side of (41) is less than
for a random quantity lying between and . Since , the drift condition (12) yields that the first term of (42) is less than
for given by Equation (12). Consequently, for proving Equation (40), it remains to bound the second term of (42). Equation (37) shows that is upper bounded by a multiple of ; the bound (38) then yields that is less than a constant multiple of . It follows from the bound (39) on the difference and the assumption that for any one can find an index large enough such that for any index the second term of (41) is less than a constant multiple of
for a constant . Equations (43) and (44) directly yield to Equation (41), which in turn implies to Equation (40).
Proof that for any . Equations (38) and (39) show that if is finite then so is . Under the conditions of Lemma 5, this shows that is finite for any . An inductive argument based on the discrete Lyapunov Equation (40) then yields that for any index the expectation is less than
It follows that is finite.
Proof that for any . One needs to prove that the sequence is almost surely bounded. The discrete Lyapunov Equation (40) yields that is less than ; this yields that is less than a constant multiple of
To conclude the proof, we prove that the last term in the above displayed Equation almost surely converges to zero; by Lemma 6, it suffices to prove that the quantity
is almost surely finite. We have and the mean value theorem yields that for some lying between and . The bound and Equation (38) then yield that |V^{p}(\theta_{k+1})-V^{p}(\theta_{k})|\lesssim V^{p-1/2}(\theta_{k})\,\big{|}\theta_{k+1}-\theta_{k}\big{|}+\big{|}\theta_{k+1}-\theta_{k}\big{|}^{2p}. From the bound (39) and the assumption that it follows that the quantity in Equation (46) is less than a constant multiple of
Since is uniformly bounded for any and (because the sum is finite), the conclusion follows.
Proof of for any . Since , the drift condition (12) yields that Theorem of (Roberts and Tweedie, 1996) holds. Moreover, the bound implies that there are constants such that
where is the generator of the Langevin diffusion (1). Theorem of (Roberts and Tweedie, 1996) gives the conclusion.
Proof that for any . One needs to prove that the sequence is almost surely bounded. The bound yields that is less than a constant multiple of
To conclude the proof, we establish that the following limits hold almost surely,
To prove Equation (48) it suffices to use the assumption that and then follow the same approach used to establish that the quantity (46) is finite. Lemma 6 shows that to prove Equation (49) it suffices to verify that
This directly follows from the assumption that \sum_{m\geq 0}\,\big{|}\Delta(\omega_{m}/\delta_{m})\big{|}/\Omega_{m}<\infty and the fact that is finite.