PAC-Bayesian Inequalities for Martingales

Yevgeny Seldin, François Laviolette, Nicolò Cesa-Bianchi, John Shawe-Taylor, Peter Auer

I Introduction

Martingales are one of the fundamental tools in probability theory and statistics for modeling and studying sequences of random variables. Some of the most well-known and widely used concentration inequalities for individual martingales are Hoeffding-Azuma’s and Bernstein’s inequalities . We present a comparison inequality that bounds the expectation of a convex function of a martingale difference sequence shifted to the $$ interval by the expectation of the same function of independent Bernoulli variables. We apply this inequality in order to derive a tighter analog of Hoeffding-Azuma’s inequality for martingales.

More importantly, we present a set of inequalities that make it possible to control weighted averages of multiple simultaneously evolving and interdependent martingales (see Fig. 1 for an illustration). The inequalities are especially interesting when the number of martingales is uncountably infinite and the standard union bound over the individual martingales cannot be applied. The inequalities hold with high probability simultaneously for a large class of averaging laws ρ\rho. In particular, ρ\rho can depend on the sample.

One possible application of our inequalities is an analysis of importance-weighted sampling. Importance-weighted sampling is a general and widely used technique for estimating properties of a distribution by drawing samples from a different distribution. Via proper reweighting of the samples, the expectation of the desired statistics based on the reweighted samples from the controlled distribution can be made identical to the expectation of the same statistics based on unweighted samples from the desired distribution. Thus, the difference between the observed statistics and its expected value forms a martingale difference sequence. Our inequalities can be applied in order to control the deviation of the observed statistics from its expected value. Furthermore, since the averaging law ρ\rho can depend on the sample, the controlled distribution can be adapted based on its outcomes from the preceding rounds, for example, for denser sampling in the data-dependent regions of interest. See for an example of an application of this technique in reinforcement learning.

Our concentration inequalities for weighted averages of martingales are based on a combination of Donsker-Varadhan’s variational formula for relative entropy with bounds on certain moment generating functions of martingales, including Hoeffding-Azuma’s and Bernstein’s inequalities, as well as the new inequality derived in this paper.

The weighted averages ⟨ϕ,ρ⟩\langle\phi,\rho\rangle on the left hand side of (2) are the quantities of interest and the inequality allows us to relate all possible averaging laws ρ\rho to a single “reference” distribution π\pi. (Sometimes, π\pi is also called a “prior” distribution, since it has to be selected before observing the sample.) We emphasize that inequality (2) is a deterministic relation. Thus, by a single application of Markov’s inequality to ⟨eϕ,π⟩\langle e^{\phi},\pi\rangle we obtain a statement that holds with high probability for all ρ\rho simultaneously. The quantity ln⁡⟨eϕ,π⟩\ln\langle e^{\phi},\pi\rangle, known as the cumulant-generating function of ϕ\phi, is closely related to the moment-generating function of ϕ\phi. The bound on ln⁡⟨eϕ,π⟩\ln\langle e^{\phi},\pi\rangle, after some manipulations, is achieved via the bounds on moment-generating functions, which are identical to those used in the proofs of Hoeffding-Azuma’s, Bernstein’s, or our new inequality, depending on the choice of ϕ\phi.

Donsker-Varadhan’s variational formula for relative entropy laid the basis for PAC-Bayesian analysis in statistical learning theory , where PAC is an abbreviation for the Probably Approximately Correct learning model introduced by Valiant . PAC-Bayesian analysis provides high probability bounds on the deviation of weighted averages of empirical means of sets of independent random variables from their expectations. In the learning theory setting, the space H{\cal H} usually corresponds to a hypothesis space; the function ϕ(h)\phi(h) is related to the difference between the expected and empirical error of a hypothesis hh; the distribution π\pi is a prior distribution over the hypothesis space; and the distribution ρ\rho defines a randomized classifier. The randomized classifier draws a hypothesis hh from H{\cal H} according to ρ\rho at each round of the game and applies it to make the prediction on the next sample. PAC-Bayesian analysis supplied generalization guarantees for many influential machine learning algorithms, including support vector machines , linear classifiers , and clustering-based models , to name just a few of them.

We show that PAC-Bayesian analysis can be extended to martingales. A combination of PAC-Bayesian analysis with Hoeffding-Azuma’s inequality was applied by Lever et. al in the analysis of U-statistics. The results presented here are both tighter and more general, and make it possible to apply PAC-Bayesian analysis in new domains, such as, for example, reinforcement learning .

II Main Results

We first present our new inequalities for individual martingales, and then present the inequalities for weighted averages of martingales. All the proofs are provided in the appendix.

Our first lemma is a comparison inequality that bounds expectations of convex functions of martingale difference sequences shifted to the $intervalbyexpectationsofthesamefunctionsofindependentBernoullirandomvariables.ThelemmageneralizesapreviousresultbyMaurerforindependentrandomvariables.Thelemmausesthefollowingnotation:forasequenceofrandomvariablesinterval by expectations of the same functions of independent Bernoulli random variables. The lemma generalizes a previous result by Maurer for independent random variables . The lemma uses the following notation: for a sequence of random variablesX_{1},\dots,X_{n}weusewe useX_{1}^{i}:=X_{1},\dots,X_{i}todenotethefirstto denote the firsti$ elements of the sequence.

We apply Lemma 1 in order to derive the following inequality, which is an interesting generalization of an analogous result for i.i.d. variables. The result is based on the method of types in information theory .

Let X1,…,XnX_{1},\dots,X_{n} be as in Lemma 2. Then, for any δ∈(0,1)\delta\in(0,1), with probability greater than 1−δ1-\delta:

II-B PAC-Bayesian Inequalities for Weighted Averages of Martingales

Next, we present several inequalities that control the concentration of weighted averages of multiple simultaneously evolving and interdependent martingales. The first result shows that the classical PAC-Bayesian theorem for independent random variables holds in the same form for martingales. The result is based on combination of Donsker-Varadhan’s variational formula for relative entropy with Lemma 2. In order to state the theorem we need a few definitions.

Let Sˉn:=∑i=1nXˉi\bar{S}_{n}:=\sum_{i=1}^{n}\bar{X}_{i}. In the following theorem we are bounding the mean of Sˉn\bar{S}_{n} with respect to any probability measure ρ\rho over H{\cal H}.

Fix a reference distribution π\pi over H{\cal H}. Then, for any δ∈(0,1)\delta\in(0,1), with probability greater than 1−δ1-\delta over Xˉ1,…,Xˉn\bar{X}_{1},\dots,\bar{X}_{n}, for all distributions ρ\rho over H{\cal H} simultaneously:

By Pinsker’s inequality, Theorem 4 implies that

however, if ⟨1nSˉn,ρ⟩\left\langle\frac{1}{n}\bar{S}_{n},\rho\right\rangle is close to zero or one, inequality (5) is significantly tighter than (6).

Let Mˉi:=∑j=1iZˉj\bar{M}_{i}:=\sum_{j=1}^{i}\bar{Z}_{j}. Then, for each h∈Hh\in{\cal H} the sequence Mˉ1(h),…,Mˉn(h)\bar{M}_{1}(h),\dots,\bar{M}_{n}(h) is a martingale. In the following theorems we bound the mean of Mˉn\bar{M}_{n} with respect to any probability measure ρ\rho on H{\cal H}.

Assume that Zˉi:H→[αi,βi]\bar{Z}_{i}:{\cal H}\rightarrow[\alpha_{i},\beta_{i}]. Fix a reference distribution π\pi over H{\cal H} and λ>0\lambda>0. Then, for any δ∈(0,1)\delta\in(0,1), with probability greater than 1−δ1-\delta over Zˉ1n\bar{Z}_{1}^{n}, for all distributions ρ\rho over H{\cal H} simultaneously:

Assume that Zˉ1n\bar{Z}_{1}^{n} is as in Theorem 5. Fix a reference distribution π\pi over H{\cal H}. Take an arbitrary number c>1c>1. Then, for any δ∈(0,1)\delta\in(0,1), with probability greater than 1−δ1-\delta over Zˉ1n\bar{Z}_{1}^{n}, for all distributions ρ\rho over H{\cal H} simultaneously:

Assume that ∥Zˉi∥∞≤K\|\bar{Z}_{i}\|_{\infty}\leq K for all ii with probability 1 and pick λ\lambda, such that λ≤1/K\lambda\leq 1/K. Fix a reference distribution π\pi over H{\cal H}. Then, for any δ∈(0,1)\delta\in(0,1), with probability greater than 1−δ1-\delta over Zˉ1n\bar{Z}_{1}^{n}, for all distributions ρ\rho over H{\cal H} simultaneously:

As in the previous case, the right hand side of (9) cannot be minimized for all ρ\rho simultaneously by a single value of λ\lambda. Furthermore, Vˉn\bar{V}_{n} is a random function. In the following theorem we take a similar grid of λ\lambda-s, as we did in Theorem 6, and a union bound over the grid. Picking a value of λ\lambda from the grid closest to the value of λ\lambda that minimizes the right hand side of (9) yields almost as good result as we would get if we would minimize (9) for a single choice of ρ\rho. In this approach the variance Vˉn\bar{V}_{n} can be replaced by a sample-dependent upper bound. For example, in importance-weighted sampling such an upper bound is derived from the reciprocal of the sampling distribution at each round .

Assume that ∥Zˉi∥∞≤K\|\bar{Z}_{i}\|_{\infty}\leq K for all ii with probability 1. Fix a reference distribution π\pi over H{\cal H}. Pick an arbitrary number c>1c>1. Then, for any δ∈(0,1)\delta\in(0,1), with probability greater than 1−δ1-\delta over Zˉ1n\bar{Z}_{1}^{n}, simultaneously for all distributions ρ\rho over H{\cal H} that satisfy

(⌈x⌉\lceil x\rceil is the smallest integer value that is larger than xx.)

III Comparison of the Inequalities

We first recall Hoeffding-Azuma’s inequality . For a sequence of random variables Z1,…,ZnZ_{1},\dots,Z_{n} we use Z1i:=Z1,…,ZiZ_{1}^{i}:=Z_{1},\dots,Z_{i} to denote the first ii elements of the sequence.

By combining Hoeffding-Azuma’s inequality with Markov’s inequality and taking λ=8ln⁡2δ∑i=1n(βi−αi)2\lambda=\sqrt{\frac{8\ln\frac{2}{\delta}}{\sum_{i=1}^{n}(\beta_{i}-\alpha_{i})^{2}}} it is easy to obtain the following corollary.

For MnM_{n} defined in Lemma 9 and δ∈(0,1)\delta\in(0,1), with probability greater than 1−δ1-\delta:

The next lemma is a Bernstein-type inequality . We provide the proof of this inequality in Appendix C, the proof is a part of the proof of [21, Theorem 1].

By combining Lemma 11 with Markov’s inequality we obtain that for any λ∈[0,1K]\lambda\in[0,\frac{1}{K}] and δ∈(0,1)\delta\in(0,1), with probability greater than 1−δ1-\delta:

VnV_{n} is a random variable and can be replaced by an upper bound. Inequality (14) is minimized by λ∗=ln⁡2δ(e−2)Vn\lambda^{*}=\sqrt{\frac{\ln\frac{2}{\delta}}{(e-2)V_{n}}}. Note that λ∗\lambda^{*} depends on VnV_{n} and is not accessible until we observe the entire sample. We can bypass this problem by constructing the same grid of λ\lambda-s, as the one used in the proof of Theorem 8, and taking a union bound over it. Picking a value of λ\lambda closest to λ∗\lambda^{*} from the grid leads to the following corollary. In this bounding technique the upper bound on VnV_{n} can be sample-dependent, since the bound holds simultaneously for all λ\lambda-s in the grid. Despite being a relatively simple consequence of Lemma 11, we have not seen this result in the literature. The corollary is tighter than an analogous result by Beygelzimer et. al. [21, Theorem 1].

For MnM_{n} and VnV_{n} as defined in Lemma 11, c>1c>1 and δ∈(0,1)\delta\in(0,1), with probability greater than 1−δ1-\delta, if

where ν\nu is defined in (12), and otherwise

The technical condition (15) follows from the requirement of Lemma 11 that λ∈[0,1K]\lambda\in[0,\frac{1}{K}].

III-B Comparison

We first compare inequalities for individual martingales in Corollaries 3, 10, and 12.

IV Discussion

We presented a comparison inequality that bounds expectation of a convex function of martingale difference type variables by expectation of the same function of independent Bernoulli variables. This inequality enables to reduce a problem of studying continuous dependent random variables on a bounded interval to a much simpler problem of studying independent Bernoulli random variables.

As an example of an application of our lemma we derived an analog of Hoeffding-Azuma’s inequality for martingales. Our result is always comparable to Hoeffding-Azuma’s inequality up to a logarithmic factor and in cases, where the empirical drift of a corresponding random walk is close to the region boundaries it is tighter than Hoeffding-Azuma’s inequality by an order of magnitude. It can also be tighter than Bernstein’s inequality for martingales, unless there is a tight bound on the martingale variance.

Finally, but most importantly, we presented a set of inequalities on concentration of weighted averages of multiple simultaneously evolving and interdependent martingales. These inequalities are especially useful for controlling uncountably many martingales, where standard union bounds cannot be applied. Martingales are one of the most basic and important tools for studying time-evolving processes and we believe that our results will be useful for multiple domains. One such application in analysis of importance weighted sampling in reinforcement learning was already presented in .

Appendix A Proofs of the Results for Individual Martingales

The proof follows the lines of the proof of Maurer [19, Lemma 3]. Any point xˉ=(x1,…,xn)∈n\bar{x}=(x_{1},\dots,x_{n})\in^{n} can be written as a convex combination of the extreme points ηˉ=(η1,…,ηn)∈{0,1}n\bar{\eta}=(\eta_{1},\dots,\eta_{n})\in\{0,1\}^{n} in the following way:

with equality if xˉ∈{0,1}n\bar{x}\in\{0,1\}^{n}. Let X1i:=X1,…,XiX_{1}^{i}:=X_{1},\dots,X_{i} be the first ii elements of the sequence X1,…,XnX_{1},\dots,X_{n}. Let Wi(ηi)=(1−Xi)(1−ηi)+XiηiW_{i}(\eta_{i})=(1-X_{i})(1-\eta_{i})+X_{i}\eta_{i} and let wi(ηi)=(1−bi)(1−ηi)+biηiw_{i}(\eta_{i})=(1-b_{i})(1-\eta_{i})+b_{i}\eta_{i}. Note that by the assumption of the lemma:

By taking expectation of both sides of (16) we obtain:

In (17) we apply induction in order to replace XiX_{i} by bib_{i}, one-by-one from the last to the first, same way we did it for XnX_{n}. ∎

Lemma 2 follows from the following concentration result for independent Bernoulli variables that is based on the method of types in information theory . Its proof can be found in .

Corollary 3 follows from Lemma 2 by Markov’s inequality.

For δ∈(0,1)\delta\in(0,1) and a random variable X≥0X\geq 0, with probability greater than 1−δ1-\delta::

By Markov’s inequality and Lemma 2, with probability greater than 1−δ1-\delta:

Taking logarithm of both sides of the inequality and normalizing by nn completes the proof. ∎

Appendix B Proofs of PAC-Bayesian Theorems for Martingales

In this appendix we provide the proofs of Theorems 4, 7, and 8. The proof of Theorem 5 is very similar to the proof of Theorem 7 and, therefore, omitted. The proof of Theorem 6 is very similar to the proof of Theorem 8, so we only provide the way of how to choose the grid of λ\lambda-s in this theorem.

The proofs of all PAC-Bayesian theorems are based on the following lemma, which is obtained by changing sides in Donsker-Varadhan’s variational definition of relative entropy. The lemma takes roots back in information theory and statistical physics . The lemma provides a deterministic relation between averages of ϕ\phi with respect to all possible distributions ρ\rho and the cumulant generating function ln⁡⟨eϕ,π⟩\ln\langle e^{\phi},\pi\rangle with respect to a single reference distribution π\pi. A single application of Markov’s inequality combined with the bounds on moment generating functions in Lemmas 2, 9, and 11 is then used in order to bound the last term in (20) in the proofs of Theorems 4, 5, and 7, respectively.

Since the KL-divergence is infinite when the support of ρ\rho exceeds the support of π\pi, inequality (20) is interesting when π≫ρ\pi\gg\rho. For a similar reason, it is interesting only when ⟨eϕ,π⟩\langle e^{\phi},\pi\rangle is finite. We note that the inequality is tight in the same sense as Jensen’s inequality is tight: for ϕ(h)=ln⁡ρ(h)π(h)\phi(h)=\ln\frac{\rho(h)}{\pi(h)} it becomes an equality.

For the proof of Theorem 7 we take ϕ(h):=λMˉn(h)−(e−2)λ2Vˉn(h)\phi(h):=\lambda\bar{M}_{n}(h)-(e-2)\lambda^{2}\bar{V}_{n}(h). Or, more compactly, ϕ=λMˉn−(e−2)λ2Vˉn\phi=\lambda\bar{M}_{n}-(e-2)\lambda^{2}\bar{V}_{n}. Then with probability greater than 1−δ21-\frac{\delta}{2} for all ρ\rho:

where (27) is by Lemma 11 and other steps are justified in the same way as in the previous proof.

By applying the same argument to −Mˉn-\bar{M}_{n}, taking a union bound over the two results, taking (e−2)λ2⟨Vˉn,ρ⟩(e-2)\lambda^{2}\langle\bar{V}_{n},\rho\rangle to the other side of the inequality, and normalizing by λ\lambda, we obtain the statement of the theorem. ∎

The value of λ\lambda that minimizes (9) depends on ρ\rho, whereas we would like to have a result that holds for all possible distributions ρ\rho simultaneously. This requires considering multiple values of λ\lambda simultaneously and we have to take a union bound over λ\lambda-s in step (26) of the proof of Theorem 7. We cannot take all possible values of λ\lambda, since there are uncountably many possibilities. Instead we determine the relevant range of λ\lambda and take a union bound over a grid of λ\lambda-s that forms a geometric sequence over this range. Since the range is finite, the grid is also finite.

We cover the above range with a grid of λi\lambda_{i}-s, such that λi:=ci1Kln⁡2δ(e−2)n\lambda_{i}:=c^{i}\frac{1}{K}\sqrt{\frac{\ln\frac{2}{\delta}}{(e-2)n}} for i=0,…,m−1i=0,\dots,m-1. It is easy to see that in order to cover the interval of relevant λ\lambda we need

(λm−1\lambda_{m-1} is the last value that is strictly less than 1/K1/K and we take λm:=1/K\lambda_{m}:=1/K for the case when the technical condition (10) is not satisfied). This defines the value of ν\nu in (12).

Finally, we note that (9) has the form g(λ)=Uλ+λVg(\lambda)=\frac{U}{\lambda}+\lambda V. For the relevant range of λ\lambda, there is λi∗\lambda_{i^{*}} that satisfies U/V≤λi∗<cU/V\sqrt{U/V}\leq\lambda_{i^{*}}<c\sqrt{U/V}. For this value of λ\lambda we have g(λi∗)≤(1+c)UVg(\lambda_{i^{*}})\leq(1+c)\sqrt{UV}.

Therefore, whenever (10) is satisfied we pick the highest value of λi\lambda_{i} that does not exceed the left hand side of (10), substitute it into (9), and obtain (11), where the ln⁡ν\ln\nu factor comes from the union bound over λi\lambda_{i}-s. If (10) is not satisfied, we know that ⟨Vˉn,ρ⟩<K2(KL(ρ∥π)+ln⁡2νδ)/(e−2)\langle\bar{V}_{n},\rho\rangle<K^{2}\left(KL(\rho\|\pi)+\ln\frac{2\nu}{\delta}\right)/(e-2) and by taking λ=1/K\lambda=1/K and substituting into (9) we obtain (13). ∎

hence, we are interested in λ\lambda that is larger or equal to this value. We take a grid of λi\lambda_{i}-s of the form

where ⌊x⌋\lfloor x\rfloor is the largest integer value that is smaller than xx. Taking a weighted union bound over λi\lambda_{i}-s with weights 2−(i+1)2^{-(i+1)} completes the proof. (In the weighted union bound we take δi=δ2−(i+1)\delta_{i}=\delta 2^{-(i+1)}. Then by substitution of δ\delta with δi\delta_{i}, (7) holds with probability greater than 1−δi1-\delta_{i} for each λi\lambda_{i} individually, and with probability greater than 1−∑i=0∞δi=1−δ1-\sum_{i=0}^{\infty}\delta_{i}=1-\delta for all λi\lambda_{i} simultaneously.) ∎

Appendix C Background

In this section we provide a proof of Lemma 11. The proof reproduces an intermediate step in the proof of [21, Theorem 1].

We apply inequality (30) in the following way:

Inequality (32) applies inequality (30) and inequality (34) recursively proceeds with Zn−1,…,Z1Z_{n-1},\dots,Z_{1} (in reverse order). ∎

Note that conditioning on additional variables in the proof of the lemma does not change the result. This fact is exploited in the proof of Theorem 7, when we allow interdependence between multiple martingales.

Acknowledgments

The authors would like to thank Andreas Maurer for his comments on Lemma 1. We are also very grateful to the anonymous reviewers for their valuable comments that helped to improve the presentation of our work. This work was supported in part by the IST Programme of the European Community, under the PASCAL2 Network of Excellence, IST-2007-216886, and by the European Community’s Seventh Framework Programme (FP7/2007-2013), under grant agreement NoN^{o}270327. This publication only reflects the authors’ views.

References