Integral Probability Metrics PAC-Bayes Bounds
Abstract
We present a PAC-Bayes-style generalization bound which enables the replacement of the KL-divergence with a variety of Integral Probability Metrics (IPM).
We provide instances of this bound with the IPM being the total variation metric and the Wasserstein distance .
A notable feature of the obtained bounds is that they naturally interpolate between classical uniform convergence bounds in the worst case (when the prior and posterior are far away from each other), and improved bounds in favorable cases (when the posterior and prior are close).
This illustrates the possibility of reinforcing classical generalization bounds with algorithm- and data-dependent components, thus making them more suitable to analyze algorithms that use a large hypothesis space.
Introduction and Related Work
Classical statistical learning theory is based on a worst-case perspective which can be too pessimistic to model practical machine learning.
In reality, data is rarely worst-case and experiments demonstrate learning tasks that are solved with much less data than predicted by traditional theory.
A primary manifestation of the traditional worst-case perspective is demonstrated by uniform convergence (UC); a genre of generalization bounds which form the backbone of the classical theory (Vapnik, 1999).
These bounds guarantee that the generalization gap of all hypotheses in the output-space of the algorithm simultaneously vanish as the training-set size grows.
The key algorithmic insight these bounds provide is summarized by the Empirical Risk Minimization principle (ERM) which asserts that it suffices to output any hypothesis in the class which minimizes the empirical risk.
Consequently, UC arguments provide non-trivial guarantees only if the hypothesis class used by the algorithm is restricted (e.g. has low Rademacher complexity or bounded VC dimension).
In contrast, practical learning approaches such as deep learning algorithms use huge hypothesis classes whose VC dimensions rapidly increase with the size and depth of the underlying network.
Hence, the rate guaranteed by UC arguments is often much slower than the rate observed in practice (Bachmann, Moosavi-Dezfooli, & Hofmann, 2021; Nagarajan & Kolter, 2019b; Neyshabur, Bhojanapalli,
McAllester, & Srebro, 2017; Zhang, Bengio, Hardt, Recht, & Vinyals, 2017).
A further shortcoming of UC bounds, and the associated ERM principle, is that they are algorithm- and data-independent; 1 that is, they do not utilize beneficial properties of the data and/or the algorithm.
For example, in practice, regularized algorithms often perform better than Empirical Risk Minimization, but this cannot be expressed by UC bounds and the ERM principle.
The PAC-Bayes (PB) framework is a prominent example of a theoretical framework that does not require the UC property.
This framework was pioneered by Shawe-Taylor and Williamson (1997) and McAllester (1998) and developed in later papers, e.g. (Catoni, 2007; Lever, Laviolette, & ShaweTaylor, 2013; Maurer, 2004; McAllester, 2003; Seeger, 2002); see Guedj (2019) and Alquier (2021) for extensive surveys.
Begin, Germain, Laviolette, and Roy (2016) introduced a general strategy that produces PB bounds from change-of-measure inequalities leading to bounds based on the Rényi’s α -divergence, and Alquier and Guedj (2018); Ohnishi and Honorio (2021); Picard-Weibel and Guedj (2022) further extended PB bounds to other Csiszár’s f -divergences.
PB theorems consider the generalization performance of stochastic predictors.
These bounds are nonuniform 2 by nature, and are algorithm and data-dependent.
They are usually based on a complexity term that depends on the Kullback-Leibler (KL) divergence between a data-dependent posterior distribution and a data-independent prior distribution.
There are additional notable works on data and algorithm-dependent guarantees.
The classical work of Bousquet and Elisseeff (2002) and Xu and Mannor (2012) studied generalization guarantees that depend on data and algorithm-dependent stability measures.
A further line of recent papers tries to incorporate noise robustness/resilience.
In Miyaguchi (2019), a PAC-Bayes transportation bound is used to measure the contribution of randomization to PB.
This is done via optimal transport and
Lipschitzness, based on the usual KL-PB bound.
The work of Wei and Ma (2019) uses data-dependent
Lipschitz smoothness to improve margin bounds, and Nagarajan and Kolter (2019a) passes from standard PB to a deterministic bound by assuming noise-resilience on the training data.
This property translates to the test data, implying that good training smoothness leads to good test smoothness.
Finally, Yang, Sun, and Roy (2019) measure data-dependent smoothness around each hypothesis (for each sample) and merge Catoni’s bound (Catoni, 2007) with Rademacher theory, to obtain fast rates.
Recent work by Aminian, Bu, Wornell, and Rodrigues (2022); Lopez and Jog (2018); Rodríguez Gálvez, Bassi, Thobaben, and Skoglund (2021); Wang, Diaz, Santos Filho, and Calmon (2019) and Neu and Lugosi (2022) proved information-theoretic bounds on the expected generalization gap using the Wasserstein and the total-variation (TV) distances.
Our work is within the PB framework, and therefore enjoys the following advantages: (i)
The bounds are “in high probability” over the sample rather than in expectation.
(ii) PB bounds are sample dependent, i.e., bound the generalization gap for a specific sample-dependent posterior, while information-theoretic bounds are formulated as expectation over all sample sets, thereby providing a basis for empirical algorithms, e.g., Alquier (2021); Dziugaite and Roy (2017).
(iii)
The reference measure in PB can be any sample-independent distribution, while information-theoretic bounds consider a specific reference.
Our work introduces uniform convergence assumptions, while the above-mentioned papers each used different assumptions.
Recently, Chee and Loustau (2021) proposed PB bounds with the entropy regularized optimal transport distance for an online-learning setting with a finite class.
In the modern deep learning regime, measures of the hypothesis class complexity used in UC bounds, such as the VC dimension or Rademacher complexity, are enormous, making the bounds extremely loose for any reasonable number of samples, as opposed to PB bounds (Dziugaite & Roy, 2017;
Jiang, Neyshabur, Mobahi, Krishnan, & Bengio, 2019).
However, these complexity measures often have closed-form formulas for models such as neural networks, which show explicitly the effect of the model architecture (number of layer, activation functions etc.).
This in contrast to PB bounds, in which the dependence on the hypothesis class is less explicit (but see Anthony and Bartlett (1999); Neyshabur, Tomioka, and Srebro (2015) for exceptions for neural networks).
Therefore, we believe that extension of UC bounds to incorporate data- and algorithm-dependence can facilitate the design of better performing architectures.
A further advantage of PB bounds is their non-uniformity (the generalization gap bound depends on the learning output), hence we can use the bound as a minimization objective for a structural minimization algorithm, where the complexity term acts as a regularizer.
In cases where the hypothesis class is very large, but we have some prior knowledge on which hypotheses are more likely to have low population loss (e.g. prefer simpler hypothesis as suggested by Occam’s Razor), then in PB one can inject this knowledge as the prior distribution, effectively lowering the generalization bound.
Can the rich theory of UC bounds be extended to help explain generalization with modern large scale models?
Can this theory be used to prove data and algorithm dependent guarantees?
In this paper, we take a step in the direction of answering these questions positively.
To achieve this goal, we show a new technique to incorporate UC bounds within the PAC-Bayes framework.
We prove new PB bounds with Integral Probability Metric (IPM) (Müller, 1997) to measure distances between distributions, rather than the standard KL or f -divergences used so far.
Specifically, we focus on utilizing two specific IPMs: the total variation and Wasserstein metrics This IPM framework allows greater flexibility, as it does not require the support of the posterior to be a subset of the prior’s support (absolute continuity) as in standard KL-PB bounds, and it applies to deterministic as well as stochastic prior and posterior distributions.
In fact, the IPM-based PB bounds we introduce match, at worst, the rate of the UC bound used.
Recently, Livni and Moran (2020) showed that the classical
KL-PB theorem cannot imply meaningful distribution-free generalization bounds for 1-dimensional linear classification.
In contrast, our derived IPM-PB bounds do imply such bounds, because linear classifiers satisfy uniform convergence.
We note that the work of Audibert and Bousquet (2003, 2007) showed a different approach to utilizing the UC assumption to derive PAC-Bayes bounds.
Their work assumed a UC property to utilize the generic chaining technique, resulting in more refined, variance-sensitive, bounds.
In contrast to our work, their bound is not fully empirical, and the assumed UC bound is not used by the resulting bound.
The Total Variation PAC-Bayes (TVPB) bound (Thm. 6) applies in any setting where uniform convergence (UC)
(Def. 1) holds, an assumption that is satisfied by many natural learning problems.
For example, in binary problems, UC holds with a rate of O ( (cid:112) VC ( H ) / m ) , where VC ( H ) is the VC dimension (Vapnik, 1999).
As observed in practice, for large models of deep neural networks with very large VC dimensions the learning rate on natural datasets is often much faster than predicted
UC bounds.
To explain this gap, we must turn to data and algorithm-dependent bounds.
The TVPB improves the gap bound to be O (cid:16)(cid:112) VC ( H ) D TV ( Q,P ) / m (cid:17) , effectively multiplying the VC dimension by the total variation distance of the posterior from the prior.
Intuitively, simpler posteriors (closer to the prior assumed before observing the data) lead to a better generalization gap.
Compared to the vanilla KL-PB, the TV distance can be small even in cases where the KL distance can be very large, and in any case, the bound only improves over the original UC bound.
In addition, the TV-PB bounds incorporate properties of H via the VC dim.
We also explore settings where the generalization gap function exhibits a certain smoothness property, and show a PB bound with the Wasserstein metric (Thm. 11), We analyze this smoothness property and show an explicit Wasserstein-based bound in the finite hypothesis class setting and in a linear regression setting.
In the latter setting, we show that a standard UC bound can be improved by a factor of O ( (cid:112) W 1 ( Q, P )) , where W 1 ( Q, P ) is the 1 st order Wasserstein distance between posterior and prior over the unit-sphere.
We conduct a numerical simulation to demonstrate the improvement of the Wasserstein PB bound over the UC bound, and, in cases of narrow prior distributions, over the KL-PB bound.
The experiment also investigates the case of non-randomized predictors by setting the prior and posterior as Dirac delta measures, which f -divergence based PB bounds are unable to use.
Figure 1 illustrates graphically the organization of the claims in the paper.
Preliminaries 2.1 The Learning Problem
We begin with a short description a standard supervised learning task.
Consider a domain Z , 4 a distribution D over Z , a hypothesis set H , and finally, a loss function ℓ : H × Z → [0 , 1] .
The tuple ( D , H , ℓ ) defines a learning problem: The learning algorithm receives as input a training set
S =
{ z i } m i =1 ∈
Z m sampled i.i.d from D and selects an hypothesis h ∈ H .
The performance of h is measured by the expected risk , L D ( h ) def = E z ∼D ℓ ( h, z ) .
While the expected risk is unavailable to
[Figure]
algorithm, the empirical risk , ˆ L S ( h ) def = 1 m (cid:80) mi
=1 ℓ ( h, z i ) , can be evaluated using the training data.
The generalization gap is defined by ∆ S ( h ) def =
L D ( h ) − ˆ L S ( h ) .
Several of our results will assume that the learning problem ( D , H , ℓ ) satisfies the uniform convergence property ; i.e. the existence of a uniform upper bound on the generalization gap which applies simultaneously to all hypotheses in H .
Definition 1 (Uniform convergence, (Vapnik & Chervonenkis, 2015)) .
The learning problem ( D , H , ℓ ) satisfies the uniform convergence property, if there exists a bound function u ( m, δ ′ ) >
0 s.t.
for any m ∈ N + , δ ∈ (0 , 1) we have
[Equation]
and
[Equation]
UC type bounds are a major part of the foundations of theoretical machine learning.
Unfortunately, they suffers from a few drawbacks.
First, currently known bounds tend to be extremely loose in many cases, most notably for deep networks.
Second, the setup does not provide a natural way to encode prior knowledge into the bounds, particularly when dealing with deep networks - the hypothesis set is usually rich enough to express all relevant functions, and the training algorithms that might utilize some prior knowledge are not themselves a part of UC based bounds.
Finally, UC bounds are usually not data-dependent, a property which is critical to explain the generalization of DNNs on real-world data (Nagarajan & Kolter, 2019b; Zhang et al., 2017).
2.2 PAC-Bayes Bounds
Let M ( H ) denote the set of all probability measures over H .
For any probability measure Q ∈
M ( H ) , we define the expected loss, empirical loss and generalization gap by
[Equation]
PAC-Bayes theory bounds the expected loss, simultaneously for all “posterior" (sample-dependent) probability measures Q ∈ M ( H ) , with high probability over the samples S ∼ D m , given any “prior" (sample-independent) probability measure P ∈ M ( H ) .
A key feature of most PAC-Bayes bounds is their dependence on the KL divergence between the two distributions P, Q , KL ( Q ∥ P ) def = (cid:82)
H ln
( d Q d P )d Q , where d Q d P is the Radon–Nikodym derivative of Q w.r.t.
P .
While KL is a natural measure of divergence between probability distributions, it restricts the applicability of the resulting bounds to cases where the support of Q is contained in the support of P .
The following bound was introduced by McAllester (1998).
Proposition 2 (Classical KL-PB Bound) .
For any prior P ∈ M ( H ) and δ ∈ (0 , 1) , with probability at least 1 − δ over the samples S ∼ D m , for all Q ∈ M ( H ) , we have
[Equation]
A Template for IPM PAC-Bayes Bounds 3.1 General IPM-PB Bound
Definition 3 (Integral Probability Metric) .
(Müller, 1997; Sriperumbudur, Fukumizu, Gretton,
Schölkopf, & Lanckriet, 2009, 2012)
The Integral Probability Metric (IPM) between two probability measures P and Q over H is defined as
[Equation]
where F is a set of real-valued bounded functions H → R .
By definition, IPM distance measures are symmetric and non-negative.
Note that the KL-divergence is not a special case of IPM, rather it belongs to the family of f -divergences, that intersect with IPM only at the Total-Variation (Sriperumbudur et al., 2009, 2012).
The following proposition assumes that for any fixed sample S ′ ∈ Z m , the function f S ′ ( h ) def = 2( m − 1)∆ 2 S
( h ) is a member of a family of functions that depend on the sample, denoted F S ′ .
Thus, the IPM-PB bound allows us to ‘convert’ some knowledge we have about the properties of the generalization gap function ∆ S ( h ) to a generalization bound.
Since we do not specify yet the collection of function families {F S } S ∈Z m , the bound does not convey an explicit rate, and it should rather be seen as a template .
In the next sections, we will derive explicit bounds with specific IPMs divergences.
Namely, we will derive a total-variation distance based bound by selecting a collection of bounded function sets, and a Wasserstein distance based bound, by selecting a collection of Lipschitz function sets.
Proposition 4 (Template for IPM PB Bound) .
For any fixed dataset S ′ ∈
Z m , m ∈ N + , let F S ′ be a family of bounded and measurable functions H
→ R .
Assume that for any number of samples, m , and
sample S
∈
Z m , the function 2( m − 1)∆ 2 S ′ ( · ) is in F S ′ .
Then for any prior P ∈ M ( H ) and δ ∈ (0 , 1) , with probability at least 1 − δ over the samples S ∼ D m , for all Q ∈ M ( H ) , we have
[Equation]
The proof is in Appendix A.1.
The main idea is to use the IPM definition and the assumption as a change-of-measure inequality, instead of the variational formula by Donsker and Varadhan (1975), which is used in the classical KL-PB bound proof.
The rest of the proof is similar to the classical derivation (McAllester, 2003; Shalev-Shwartz & Ben-David, 2014).
Note that, similarly to the classical KL-PB bound, Proposition 4 does not require the UC property to hold.
However, in the next sections we will see that assuming an existence of a UC bound u ( m, δ ) , and selecting a particular collection of function families {F S } S ∈Z m , will result in explicit bounds that can improve upon the worst-case nature of the original u ( m, δ ) bound.
3.2 Template for Seeger Type IPM PAC-Bayes Bound
The work of Seeger (2002) and Maurer (2004) presented a different form of the PAC-Bayes theorem with fast O ( 1 / m ) rate as the dominant term, if the empirical risk is low.
We denote by kl ( p ∥ q ) the KL divergence between two Bernoulli distributions B ( p ) and B ( q ) , p, q ∈ [0 , 1] , that is,
[Equation]
else if
[Equation]
= q undefined , else
[Equation]
For any h ∈ H , define the relative entropy of the empirical risk with respect to the expected one as ∆ kl S ( h ) def =
kl (ˆ L S ( h ) ∥
L D ( h )) .
Similarly, and overloading notations, we define for any distribution
Q ∈ M ( H ) , ∆ kl S ( Q ) def =
kl
(ˆ L S ( Q ) ∥
L D ( Q )) .
By replacing the KL-based change-of-measure inequality step in the proof of (Maurer, 2004, Thm.
5) with the IPM property (Def. 3) we get a similar bound for IPM measures (see a detailed proof in
Appendix A.2).
Proposition 5 (Template for Seeger Type IPM PAC-Bayes Bound) .
Assume f S ( h ) def = m · ∆ kl S ( h ) ∈
F S .
Then for any prior P ∈ M ( H ) and δ ∈ (0 , 1) , with probability at least 1 − δ over the samples
S ∼ D m , for all Q ∈ M ( H ) , we have
[Equation]
By applying the Refined Pinsker’s relaxation (McAllester (2003), Eq. 6) we can immediately derive the following, looser, but easier to interpret bound
[Equation]
When ˆ L S ( Q ) is small (as is typical with modern deep networks), the final term determines the convergence rate.
We defer the investigation of PB bounds derived from Prop. 5 to Appendix B.
In the following sections we focus on investigating the implication of the Template IPM PB Bound of
Prop. 4.
Total-Variation PAC-Bayes Bounds
In this section, we investigate a PB bound with the total-variation (TV) distance, D TV ( Q, P ) def = sup A ∈ Σ H | P ( A ) − Q ( A ) | , where Σ H is the standard Borel sigma-algebra associated with H .
The
TV distance can be described as an IPM with the family of functions
[Equation]
for any M ≥ 0 .
To see this, note that
[Equation]
where equality ( i) holds since in the supremum it suffices to take the class of indicator functions { M · 1 A ( h ) , A ∈ Σ H } , since the functions in F ∞ M are bounded in [0 , M ] .
Theorem 6 (Template for Total-Variation PB Bound) .
Assume that there exists some uniform convergence bound u ( m, δ ′ )
(Definition 1), then, for any prior P ∈ M ( H ) and δ ∈ (0 , 1) , with probability of at least 1 − δ over samples S ∼ D m , for all Q ∈ M ( H ) , we have
[Equation]
The proof (Appendix A.3) follows directly from the general IPM PB bound (Prop. 4) and the uniform convergence assumption, using a union bound argument.
This bound can be seen as a template to be used to derive explicit PB bounds, by plugging in existing UC bounds.
Note that while we require the existence of UC bound, the resulting bound is nonuniform (since it depends on the data-dependent posterior).
Compared to the original UC bound, u ( m, δ ) , the bound in (11) is roughly multiplied by a factor of (cid:112)
D TV ( Q, P ) ∈
[0 , 1] , ensuring tighter guarantees, especially if the posterior is close to the prior.
For example, consider a binary classification case, with the zero-one loss function and VC ( H ) class
H .
The well-known UC theorem states that the generalization gap converges uniformly at a rate
O (cid:16)(cid:112) VC ( H ) / m (cid:17) .
Proposition 7 (VC Bound, Boucheron, Bousquet, and Lugosi (2005)) .
There exists some universal constant 5 c > 0 s.t.
for any δ ∈ (0 , 1) we have
[Equation]
Using Thm.
6, we derive the following algorithm and data-dependent bound.
Corollary 8 (Total-Variation PB Bound for VC Classes) .
Consider a binary classification problem, with the zero-one loss, and hypothesis class H , with finite VC dimension, VC ( H ) .
There exists some universal constant c > 0 s.t. for any prior P ∈ M ( H ) and δ ∈ (0 , 1) , with probability of at least 1 − δ over samples S ∼ D m , for all Q ∈ M ( H ) , we have
[Equation]
Compared to the UC bound of Prop. 7, Cor. 8 multiplies the dominant term of the bound by a nonuniform (data and algorithm-dependent) factor of (cid:112) D TV ( Q, P ) , which is guaranteed to tighten the bound.
Note that the total-variation based bound of Aminian et al.
and Rodríguez Gálvez et al.
(2021) assume Lipschitz loss function, while our TV bound allows non continuous loss functions such as the zero-one loss.
The TV based bound of Wang et al.
(Thm. 1) is not directly comparable, since the empirical risk term is multiplied by a factor that goes to infinity for TV distance that goes to 1.
Wasserstein PAC-Bayes Bounds 5.1 Template for Wasserstein-PB Bound
In this section, we provide a PAC-Bayes generalization bound with the Wasserstein metric between posterior and prior and a certain smoothness parameter of the generalization gap function.
We explore learning settings for which H can be paired with a distance metric ρ : H × H
→ R ≥ 0 s.t.
( H , ρ ) is a
Polish metric space (complete, separable metric space).
Given the distance metric ρ , we can define the Wasserstein distance between any two probability measures on H .
Definition 9 (Wasserstein Distance) .
For any two probability measures P, Q on H with finite first moment, the 1 st order Wasserstein distance is
[Equation]
where Γ( Q, P ) denotes the set of all couplings of Q and P , that is, the set of all joint measure on
H × H whose marginals are Q and P .
The following proposition gives a dual representation for the first-order Wasserstein distance.
Proposition 10 (Kantorovich-Rubinstein Duality (Villani, 2006)) .
For any 0 ≤ K , and any two probability measures P, Q ∈ M ( H ) ,
[Equation]
where F Lip K is the set of K -Lipschitz functions w.r.t.
ρ ( h, h ′ ) , i.e. functions that satisfy
[Equation] [Equation]
We can write the Kantorovich-Rubinstein duality (15) using IPM formulation (Def. 3),
[Equation]
Using this duality we will prove the following bound.
Theorem 11 (Template for Wasserstein-PB Bound) .
Assume that for any δ ′ ∈ (0 , 1] , w.p. at least 1 − δ ′ over the sampling S ∼ D m , the squared generalization gap function, ∆ 2 S ( · ) , is K -Lipschitz w.r.t.
the metric ρ with some K = K ( m, δ ′ ) .
Then, for any prior P ∈ M ( H ) and δ ∈ (0 , 1) , with probability of at least 1 − δ over samples S ∼ D m , for all Q ∈ M ( H ) , we have
[Equation]
The proof (Appendix A.4) follows directly from Proposition 4 and the assumption, via the union bound.
Theorem 11 can be seen as a template to be used for deriving Wasserstein-PB bounds in various learning settings where the ∆ 2 S ( · ) is K -Lipschitz with high probability (over samples), where the rate of K = K ( m, δ / 2 ) should be O
( 1 / m ) to ensure a factor O ( 1 / √ m ) multiplying the divergence between posterior and prior, as in the KL-PB bound.
Such a result can be challenging to prove since it requires uniform convergence of the slope between any two hypotheses in H .
Next, we will show specific learning settings where this property holds and the resulting generalization bounds.
We note that recent work Neu and Lugosi (2022) also establishes a Wasserstein-based informationtheoretic generalization bound.
This work assumed infinitely smooth loss functions and established bounds on the expected generalization gap, rather than high-probability bounds.
In fact, Neu and
Lugosi (2022) noted that obtaining such bounds is an open problem.
Observe, though, that our bound depends on the Lipschitz constant K = K ( m, δ ) which needs to assessed; see sections 5.2 and 5. for specific examples.
The general problem remains open.
At a more pragmatic level, we note that learning algorithms derived from minimizing Wasserstein based PB bounds have an added benefit of more stable optimization compared to KL based approaches, due to lower gradient variance, as noted in Arjovsky, Chintala, and Bottou (2017), and this distance measure can be approximated efficiently from finite samples (Cuturi, 2013; Weed & Bach, 2017)
5.2 Wasserstein-PB Bound for Finite Classes
We first investigate the simple case of a finite hypothesis class with a loss function ℓ which is GLipschitz w.r.t.
the metric ρ .
Note that for finite classes, UC always holds.
We derive the following bound from Thm.
Theorem 12 (Wasserstein-PB Bound for Finite Classes) .
Let H be a finite hypothesis class.
Assume that for any fixed z ∈ Z , ℓ ( h, z ) is a G -Lipschitz function in h w.r.t the metric ρ .
Then for any prior P ∈ M ( H ) and δ ∈ (0 , 1) , with probability of at least 1 − δ over samples S ∼ D m , for all
Q ∈ M ( H ) , we have
[Equation]
The proof (Appendix A.5) makes use of standard union bound arguments, Hoeffding’s concentration inequality and the template Wasserstein-PB bound (Thm. 11).
Notice that compared to the standard
UC bound for finite classes, Thm.
12 multiplies the bound by a nonuniform factor of (cid:112) GW 1 ( Q, P ) .
5.3 Wasserstein-PB Bound for Loss-Gradient UC Classes
In this section we show a Wasserstein-PB bound for learning problems ( D , H , ℓ ) , with H ⊂ R d , for some dimension d ∈ N + , that satisfy the standard UC property, and, additionally, satisfy UC property for the loss gradient, as defined below.
Definition 13 (Loss-Gradient UC Property) .
A learning problem ( D , H , ℓ ) , with H ⊂ R d , is said to satisfy the loss-gradient UC property , if: (i) the loss function ℓ ( h, z ) is differentiable w.r.t.
h on
Int ( H ) ×
Z and continuous w.r.t.
h on H × Z .
(ii)
The problem satisfies the uniform convergence property (Def. 1).
(iii)
The empirical average of the loss gradient converges uniformly in L 2 norm sense to its mean.
I.e., there exists a bound function u grad ( m, δ ) > 0 , s.t. for any δ ∈ (0 , 1) we have u grad ( m, δ )
→ m →∞ 0 and for any m ∈ N + ,
[Equation]
where ∇ h ℓ ( h, z ) denotes the gradient of ∇ h ℓ ( h, z ) w.r.t.
h , for a fixed z ∈ Z , and Int ( H ) is the interior of H .
We call u grad , the UC bound of the loss gradient.
Theorem 14 (Wasserstein-PB Bound for Loss-Gradient UC Classes) .
Let ( H , ρ ) be a metric space such that H ⊂ R
d is a closed and convex set, and ρ is the L 2 distance.
Assume the learning problem satisfies the loss-gradient UC property (Def. 13), with UC bound u , and a UC bound of the loss gradient, u grad .
Then for any prior P ∈ M ( H ) and δ ∈ (0 , 1) , with probability of at least 1 − δ over samples S ∼ D m , for all Q ∈ M ( H ) , we have
[Equation]
The proof (Appendix A.6) is derived from the assumptions and the template Wasserstein-PB bound (Thm. 11).
In learning problems that satisfy the loss-gradient UC property, we often have u ( m, δ / 4 ) , u grad ( m, δ / 4 ) ∈
O ( 1 / √ m ) , and then the resulting bound is O ( 1 / √ m ) .
We provide full analysis that shows such a rate for the following linear regression example.
5.4 Linear Regression Example
Based on the Wasserstein-PB Bound for Loss-Gradient UC Classes (Thm. 14), we derive the following corollary.
Corollary 15 (Wasserstein-PB Bound for Linear Regression) .
Consider a data distribution of pairs
z
=
( x, y ) , where x is sampled from an unknown distribution supported on a d -dimensional ball of radius r > 0 , B dr def = { x ∈ R d : ∥ x ∥ 2 ≤ r } , and the target, y = f ( x ) , is set by an unknown, possibly random, target function f : B dr → [ − 1 , 1] .
The hypothesis space H is B d 1 / r , and the loss function is ℓ ( x, y, h ) =
14 ( h ⊤ x − y ) 2 .
Then, for any prior P ∈ M ( H ) and δ ∈ (0 , 1) , with probability at least 1 − δ over samples S ∼ D m , for all Q ∈ M ( H ) ,
[Equation]
(22) where W 1 ( Q, P ) denotes the 1 st order Wasserstein distance with the L 2 metric, u ( m,
δ ) ∈
O (cid:32)(cid:114) d (1 + ln( 1 / δ )) m (cid:33) , and u grad ( m, δ ) ∈
O (cid:32) r
(cid:114) d (1 + ln( 1 / δ )) m (cid:33) .
The full expression of the bound appears in the theorem’s proof (Appendix A.7).
Ignoring logarithmic factors we obtained a UC bound of ˜ O (cid:18)(cid:113) dm (cid:19) , and a Wasserstein-PB bound of ˜ O (cid:18)(cid:113) rW 1 ( Q, P ) dm (cid:19) .
Note that from Thm.
6 we can also deduce a TV-PB bound of order ˜
O
(cid:18)(cid:113) D TV ( Q, P ) dm (cid:19) .
In comparison, the standard KL-PB bound is of order ˜ O (cid:18)(cid:113) KL ( Q ∥ P ) m (cid:19) .
The TV-PB bound is, at worst, roughly the same as the UC bound, since D TV ( Q, P ) ≤ 1 .
Note that since Q and P are distributions over a sphere of radius 1 / r , then rW 1 ( Q, P ) ≤ 2 .
Hence, the Wasserstein-PB is also, at worst, roughly the same as the UC bound.
However, the KL-PB bound can be either tighter or looser, depending on P and Q .
In cases where the mass of the posterior Q is concentrated in a region of the hypothesis set where the prior P is arbitrarily small, then the KL divergence can be arbitrarily large, making the KL-PB bound extremely loose compared to the UC, TV-PB, and
Wasserstein-PB bounds.
The numerical experiment described in Appendix C demonstrates this by investigating different prior distributions with different widths.
In particular, for posteriors and priors that are Dirac delta distributions (i.e., deterministic predictors), we show that the Wasserstein-PB considerably improves over the UC bound, while the KL-PB bound is undefined.
We therefore demonstrated non-vacuous guarantees for deterministic models within the PB framework without requiring additional derandomization steps.
We can compare the bound of Thm.
14 to the bound of Corollary 8, in Neu and Lugosi (2022), which is also dependent on the Wasserstein distance between a data-dependent output (posterior) and a base measure (prior).
The bound of Thm.
14 is different in the sense that (i) It holds with high probability instead of in expectation.
(ii) Instead of assuming infinitely-smooth loss function with β -bounded directional derivatives, Thm.
14 assumes a loss-gradient UC class.
(iii)
The bound scales as ˜ O (cid:16)(cid:112) W 1 · u · u grad (cid:17) instead of ˜ O
(cid:18)(cid:113) W 2 · dβm (cid:19) .
In our linear regression example, Cor. 15 scales as ˜ O
(cid:16)(cid:112) W 1 · u · u grad (cid:17) =
˜ O (cid:32)(cid:114) r (cid:113) dm r (cid:113) dm (cid:33) =
˜ O (cid:18) r (cid:113) dm (cid:19) .
The loss is infinitely-smooth with β ∈ O (1 + r + r 2 ) , and therefore Cor.
8 of Neu and Lugosi (2022) scales as ˜ O (cid:18)(cid:113) W 2 · dβm (cid:19) =
˜ O (cid:18) r (cid:113) dm (1 + r + r 2 ) (cid:19) , i.e., looser by a factor of ˜ O (cid:0) √ 1 + r + r 2 (cid:1) compared to Cor. 15.
Discussion
We have presented high-probability PB bounds based on integral probability metrics, that extend standard PB bounds based on KL divergence and
more recent f -divergence and α -divergence based bounds, to a new class of distances.
Our bounds interpolate between classic UC bounds and PB bounds, by allowing data- and algorithm-dependent complexity terms.
As in all PB results, our bounds suggest improved rates when the PB posterior is close to the prior.
While we have extended high-probability PB bounds for IPMs to novel distance measures, it is still an open question to do so without the UC assumption.
Possible directions for future research include: (i) Deriving high probability IPM-PB bounds (e.g.
Wasserstein or TV based), without global UC assumptions (possibly using localization based approaches, e.g. , Local Rademacher complexities (Bartlett, Bousquet, & Mendelson, 2005; Koltchinskii & Panchenko, 2004) are computed only on a subset of hypotheses with small empirical risk).
This may allow non-vacuous bounds for large-scale models where global UC-based bounds are extremely vacuous.
(ii) Derivation of algorithms that utilize the bounds as minimization objectives.
Based on the optimization advantages of Wasserstein based costs mentioned in Sec. 5.1, these could lead to enhanced practical utility.
Such an advantage could play an important role in meta-learning schemes where PB methods have been widely used in recent years (Amit & Meir, 2018).
Acknowledgments
We thank Nadav Merlis and Daniel Soudry for helpful discussions of this work, and the anonymous reviewers for their helpful comments.
SM is a Robert J. Shillman Fellow; he acknowledges support by
ERC grant 802599, by ISF grant 1225/20, by BSF grant 2018385, by an Azrieli Faculty Fellowship, by Israel PBC-VATAT, and by the Technion Center for Machine Learning and Intelligent Systems (MLIS)
Checklist
For all authors... (a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope?
[Yes] (b) Did you describe the limitations of your work?
[Yes] (c) Did you discuss any potential negative societal impacts of your work?
[N/A] (d) Have you read the ethics review guidelines and ensured that your paper conforms to them?
[Yes] 2.
If you are including theoretical results... (a) Did you state the full set of assumptions of all theoretical results?
[Yes] (b) Did you include complete proofs of all theoretical results?
[Yes] 3.
If you ran experiments... (a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)?
[Yes] (b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)?
[Yes] (c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)?
[Yes] (d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)?
[N/A] 4.
If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... (a) If your work uses existing assets, did you cite the creators?
[N/A] (b) Did you mention the license of the assets?
[N/A] (c) Did you include any new assets either in the supplemental material or as a URL?
[N/A] (d) Did you discuss whether
and how consent was obtained from people whose data you’re using/curating?
[N/A] (e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content?
[N/A] 5.
If you used crowdsourcing or conducted research with human subjects... (a) Did you include the full text of instructions given to participants and screenshots, if applicable?
[N/A] (b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable?
[N/A] (c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation?
[N/A]
A Appendix: Proofs A.1 Proof of the IPM-PB Bound (Prop. 4)
Proof.
The proof follows a similar structure as the classical derivation (McAllester, 2003; ShalevShwartz & Ben-David, 2014), except for replacing the change-of-measure inequality.
For any sample S ∈ Z m , consider the function
[Equation]
Since we assume f S ∈ F S , Definition 3 implies that for any pair of probability measures P, Q ∈
M ( H )
[Equation]
Therefore, by the monotonicity of exp( · ) we have
[Equation]
[Equation]
where the last inequality is by the convexity of exp( · ) , and by Jensen’s inequality.
Taking the supremum over Q ∈ M ( H ) , and an expectation over samples S ∼ D m we have that for any P ∈ M ( H )
[Equation]
where the last equality is obtained by the prior’s independence from the sample, and from Fubini’s theorem.
We recall that by Hoeffding’s inequality, for any h ∈ H ,
[Equation] which, by Lemma 5 of McAllester (2003), this imply.
[Equation]
Inequalities (26) and (27) imply
[Equation]
Therefore, by Markov’s inequality, for any t > 0 we have
[Equation]
Or, equivalently,
[Equation]
∼D
[Equation]
By Lem.
18, the ln( · ) and sup( · ) operations are interchangeable, and therefore
P S ∼D
[Equation]
Let δ ∈ (0 , 1) , we set t = mδ , and plug in f S ( h ) def = 2( m − 1)∆ 2 S ( h ) to get
P S ∼D m
[Equation]
Therefore, the complementary event satisfies
[Equation]
I.e., for any P ∈ M ( H ) , with a probability of at least 1 − δ over the samples S ∼ D m , the following inequality holds for all Q ∈ M ( H )
[Equation]
Jensen’s inequality implies that
[Equation]
The proof is concluded by taking the square root of both sides.
A.2 Proof of the Seeger’s Type IPM-PB Bound (Prop. 5)
Proof.
As in the proof of Prop. 4, we follow a similar structure as the classical derivation (Maurer, 2004; McAllester, 2003), except replacing the change-of-measure inequality.
For any sample S ∈ Z m , consider the function on H
[Equation]
Note that f S ( · ) is almost surely well-defined, since if L D ( h ) = 0 , then ˆ L ( h ) a.s. = 0 .
Since we assume f S ∈ F S , Definition 3 implies that for any pair of probability measures P, Q ∈
M ( H )
[Equation]
Therefore, by the monotonicity of exp( · ) we have
[Equation]
where the last inequality is by the convexity of exp( · ) and by Jensen’s inequality.
Taking the supremum over Q ∈ M ( H ) , and an expectation over samples S ∼ D m we have for any
P ∈ M ( H )
[Equation]
where the last equality is obtained by the prior’s independence from the sample, and from Fubini’s theorem.
Using Maurer (2004), Thm.
1 we have
[Equation]
Inequalities (28) and (29) imply
[Equation]
Therefore, by Markov’s inequality, for any t > 0 we have
[Equation]
or, equivalently,
P S ∼D
[Equation]
By Lem.
18, the ln( · ) and sup( · ) operations are interchangeable, and therefore
Let δ ∈ (0 , 1) , we set t = 2 √ mδ , and plug in f S ( h ) def = m · kl (ˆ L S ( h ) ∥
L D ( h )) to get
P S ∼D m (cid:18) sup
[Equation]
Therefore, the complementary event satisfies
[Equation]
I.e., for any P ∈ M ( H ) , with a probability of at least 1 − δ over the samples S ∼ D m , the following inequality holds for all Q ∈ M ( H )
[Equation]
By the convexity of the function kl ( p ∥ q ) in the pair of parameters ( p, q ) and by Jensen’s inequality [Equation] we have
[Equation]
Therefore we finally get that for any P ∈ M ( H ) , w.p. of at least 1 − δ the following holds for all
Q ∈ M ( H
[Equation]
A.3 Proof of the Total-Variation PAC-Bayes Bound (Thm. 6)
Proof.
Let δ > 0 .
For any fixed sample S ∈ Z m , we define f S ( h ) def = 2( m − 1)∆ 2 S ( h ) .
Define
M S def = sup h ∈H ∆ 2 S ( h ) .
Therefore, 0 ≤ f S ( h ) ≤ 2( m − 1) M S , i.e., f S ( h ) ∈ F ∞ 2( m − 1) M S .
This fact, together with the general IPM PB bound (Prop. 4) and Eq.
(10) (equivalence of IPM to TV under the family of bounded functions) imply that for any δ ∈ (0 , 1) P
[Equation]
or equivalently,
[Equation]
According to the UC assumption we have
[Equation]
and therefore, using the fact that 0 ≤ ∆ S ( h ) ≤ 1 we also have
[Equation]
which implies that the bounds also holds for the supremum M S
[Equation]
To conclude the proof, we use a union bound argument and Equations (30) and (31).
A.4 Proof of the Template Wasserstein-PB Bound (Thm. 11)
Proof.
Let δ > 0 .
Let K S be some Lipschitz constant of ∆ 2 S ( · ) .
Define f S ( h ) def = 2( m − 1) K S .
Notice that ∆ 2 S ( h ) is 2( m − 1) K S -Lipschitz,
i.e., f S ( h ) ∈ F Lip 2( m − 1) K S .
Using Proposition 4 we have
[Equation]
By equation (17) (the Kantorovich-Rubinstein duality) the inequality can rewritten as
[Equation]
δ / 2 . By assumption, w.p. at least 1 − δ / 2 , ∆ 2 S ( h ) is K -Lipschitz with K = K ( m, δ / 2 ) .
Using a union bound argument with this event and the event of (32) concludes the proof.
A.5 Proof of the Wasserstein-PB Bound for Finite Classes (Thm. 12)
We first prove the following lemma.
Lemma 16.
Let H be a finite hypothesis class.
Assume that for any fixed z ∈ Z , ℓ ( h, z ) is a
G -Lipschitz function in h ∈ H w.r.t the metric ρ .
Then for any δ ∈ (0 , 1) , we have
[Equation]
where for any fixed S ∈ Z m , ˜ K S is the sharp Lipschitz constant of ∆ 2 S ( · ) , i.e.
[Equation]
Proof of lemma 16.
Let δ > 0 .
Note that for any h, h ′ ∈ H and S ∈ Z m , we have
[Equation]
[Equation]
(cid:12)(cid:12)(cid:12)(cid:12)
[Equation]
By assumption, for any fixed z ∈ Z , ℓ ( h, z ) is a G -Lipschitz function in h w.r.t.
the metric ρ .
I.e., we have that | ℓ ( h, z ) − ℓ ( h ′ , z ) | ≤ Gρ ( h, h ′ ) , ∀ h, h ′ ∈ H , z ∈ Z .
Hence, for any pair ( h, h ′ ) ∈ H 2 , the random sequence {| ℓ ( h, z i ) − ℓ ( h ′ , z i ) |} mi =1 is i.i.d.
and bounded by Gρ ( h, h ′ ) .
By Hoeffding’s theorem, it holds with probability of at least 1 −
[Equation]
2 |
[Equation]
| 2 that
[Equation]
m
[Equation]
By using a union bound over claim (34) for all pairs of hypotheses ( h, h ′ ) ∈ H 2 , we get that w.p. of at least 1 − δ / 2 , we have for all pairs ( h, h ′ )
∈ H 2 simultaneously that,
[Equation]
m
[Equation]
i =
[Equation]
It is well-known (e
[Equation]
g. Shalev-Shwartz and Ben-David (2014), Cor. 2.3) that for a finite hypothesis class and any δ / 2 > 0 ,
[Equation]
Notice that
[Equation]
The proof of the lemma is concluded by using a union bound argument with claims (35) and (36).
We get that w.p. of at least 1 − δ we have
[Equation]
Proof of Theorem 12.
The proof follows directly from Lemma 16 and Theorem 11.
A.6 Proof of the Wasserstein-PB Bound for Differentiable Loss UC Classes (Thm. 14)
We first prove the following lemma.
Lemma 17.
Let ( H , ρ ) be a metric space such that H ⊂ R
d is a closed convex set, and ρ is the Ldistance.
Assume that the loss function ℓ ( h, z ) is differentiable w.r.t.
h on Int ( H ) ×
Z and continuous w.r.t.
h on H × Z .
Assume the learning problem has a UC bound u (Def. 1), and a UC bound of the loss gradient, u grad (Def. 13), then
[Equation]
where for any fixed S ∈ Z m , ˜ K S is the sharp Lipschitz constant of ∆ 2 S ( · ) , i.e.
[Equation]
Proof of Lemma 17.
Using the fact that loss function ℓ ( h, z ) is differentiable w.r.t.
h on Int ( H ) ×
Z and continuous w.r.t.
h on H × Z , and by the mean value theorem and the convexity of H , we have ∀ z ∈ Z ,
[Equation] [Equation]
[Equation] [Equation]
[Equation]
where ∇ h ℓ ( w, z ) denotes the gradient of ℓ ( · , · ) w.r.t the h variable, at the point ( w, z ) .
Notice that
[Equation]
We have for any ( h, h ′ ) ∈ H , h ̸ = h that
[Equation]
where (i) is by the mean value theorem (Eq. 37), (ii) is by the linearity of the sum, expectation, and the inner product, and (iii) is by the Cauchy–Schwarz inequality.
By the UC assumptions, we have
[Equation]
and
P
[Equation]
To conclude the proof, we use a union bound argument with (40) and (41), and use inequalities (38) and (39) to finally get
[Equation]
Proof of Theorem 14.
The proof follows from Lemma 17 with δ / 2 , Theorem 11 with δ / 2 , and using the union bound.
A.7 Proof of the Wasserstein-PB Bound for Linear Regression (Cor. 15)
Proof of Corollary 15.
To meet the requirements of Theorem 14, we will prove a uniform convergence bound for the generalization gap (Def. 1), and for the loss gradient (Def. 13).
The generalization gap function for any h ∈ H can be written as
[Equation]
Let δ > 0 .
We will now bound in high probability each of the three term above.
First term.
The variables y 2 1 , . . .
, y 2 m are independent random variables in the range [0 , 1] , therefore by Hoeffding’s inequality
[Equation] [Equation]
I.e.,
[Equation]
Second term.
Note that yx is r -sub-Gaussian random vector in R d , since, for any s in the unitsphere S d − 1, s ⊤ yx is r -sub-Gaussian (since it is a.s. bounded in [ − r, r ] ).
Therefore { y i x i } mi =1 are independent r -sub-Gaussian random vectors.
Using Thm.
1 of Hsu, Kakade, and Zhang (2012), we have that for any t > 0 ,
[Equation]
Therefore, we have
[Equation] [Equation]
Then, by the Cauchy–Schwarz inequality we have that w.p. of at least 1 − δ / 3 , for all h ∈ B d 1 / r
[Equation]
Third term.
By Theorem 6.5 of Wainwright (2019) (constants from Thm.
of Bastani, Simchi-Levi, and Zhu (2021)
Lem. 22), we have that w.p. of at least 1 − δ /
[Equation]
where ∥·∥ op is the ℓ 2 operator-norm, that can be defined by ∥
A ∥ op def = sup u,v ∈ S d
[Equation] [Equation]
∀
A ∈
R d × d , where S d − 1is the the unit sphere in R d .
Therefore, we conclude that w.p. of at least 1 − δ /
[Equation]
Taking the absolute value of (42) and using the triangle inequality, the union bound, and inequalities (44), (46), and (48), we get that
[Equation]
where we defined
[Equation]
Therefore, u ( m, δ ) ∈
O (cid:18)(cid:113) d (1+ln( 1 / δ )) m (cid:19) .
Next, we wish to prove a uniform convergence bound for the loss gradient, in Euclidean norm.
Note that for any h ∈ H
[Equation]
To bound the L 2 norm of the first term of the equation above, we use similar argument as in (47), and the fact that the operator-norm can be defined equivalently by ∀ A ∈ R d × d , ∥ A ∥ op = sup v ∈ S d − 1∥
Av ∥ 2 , to get that w.p. of at least 1 −
δ /∀ h ∈
B
d 1 / r , (cid:13)(cid:13)(cid:13)(cid:13)(cid:13) 1 2 h ⊤
[Equation]
[Equation]
To bound the L 2 norm of the second term, we use the same argument as in (45)
[Equation]
and get
[Equation]
Now, taking the norm of equality (50) and using the triangle inequality, inequalities (51) and (52)
[Equation]
and the union bound we get that
[Equation]
where we defined
[Equation]
Therefore, u grad ( m, δ ) ∈
O
[Equation]
r (cid:113) d (1+ln
[Equation] [Equation]
m (cid:19) .
Notice that the loss is bounded in [0 , 1] , since
[Equation]
Therefore we can use Theorem 14 to conclude the proof.
B Appendix: An Example of a Seeger Type Bound
To derive an analogous Seeger’s type theorem to Thm.
6, we need to prove uniform convergence of the kl-gap, ∆ kl S ( h ) def =
kl (ˆ L S ( h ) ∥
L D ( h )) , rather than the usual gap ∆ S ( h ) =
L D ( h ) − ˆ L S ( h ) .
For example, consider the binary classification and finite H case.
For each h ∈ H , we bound ∆ kl S ( h )
=
kl (ˆ L S ( h ) ∥
L D ( h )) using the concentration inequality from
Dembo and Zeitouni (2009) Thm.
(see also Mardia, Jiao, Tánczos, Nowak, and Weissman (2019)
Lem.
8), which holds since ˆ L S ( h ) is an empirical average of m Bernoulli i.i.d variables with mean L D ( h ) .
For any ε > 0 , we have
[Equation]
Using a union bound argument we get
P (cid:0) ∀ h ∈ H , ∆ kl S
[Equation] [Equation]
(cid:1)
[Equation]
|
[Equation]
mε ) .
Therefore, for any δ ∈ (0 , 1) we can get
[Equation]
Let F ∞ ln( 4 |H| / δ ) be the family of functions as defined in Eq.
9, i.e., functions that are bounded in the ∞ -norm by ln( 4 |H| / δ ) , for which the IPM is ln
( 4 |H| / δ ) D TV ( Q, P ) .
By (55), w.p. at least 1 − δ / 2 we have that m ∆ kl S ( h ) ∈
F ∞ ln( 4 |H| / δ )
Now we can use the Seeger’s type IPM-PB bound (Prop. 5) and a union bound argument, to get that with probability at least 1 − δ over the samples S ∼ D m , the following inequality holds for all
Q ∈ M ( H )
[Equation]
C Appendix: Numerical Demonstration Details
This section describes the experiment that implements the setting of Corollary 15 (Wasserstein-PB
Bound for Linear Regression).
The code is available at: https://github.com/ron-amit/ pac_bayes_reg .
The sample distribution.
The unknown data distribution D is determined by a latent vector g ∈ R d , drawn once per experiment instance from a uniform distribution over B 0 .
The dimension is d = 10 .
For each sample ( x, y ) ∼ D , x is drawn uniformly from B 0 .
1 and y = f
( x ) is set by f ( x ) =
clip [ − 1 , 1] { g ⊤ x + ξ } where, clip [ a,b ] ( t ) def =   a, t < a t, a ≤ t ≤ b b t > b, for any a, b, t ∈ R , and ξ is drawn uniformly from [ − 0 .
The motivation for this choice of D is to have an underlying linear structure in the data, corrupted by noise.
The clipping ensures that the loss values are in the range [0 , 1] .
The prior and posterior distributions.
The hypothesis space is an r -radius ball H =
B r , with r = 1 .
The prior and posterior distributions over H are set as projected Gaussian distributions.
Let
P B : R d → B r be a projection operator onto B r Let ˜ P be a Gaussian measure over R d , N ( µ P , σ 2 P I ) , where µ P = ¯ 0 , and σ P is a fixed constant that will be specified later.
The prior is defined as P =
P B ♯ ˜ P , i.e. , as the push-forward measure of ˜ P under the projection P B .
The family of posteriors we are considering are projected Gaussian distributions, Q def = (cid:110) P
[Equation]
N (
[Equation] [Equation]
[Equation] [Equation]
r Q (cid:111) , where σ Q is a fixed constant that will be specified later and the maximal norm of µ Q is r Q = 0 .
The Wasserstein distance.
Since there is no closed-form formula for the 1 st order Wasserstein distance between Gaussian distributions projected onto a ball W 1 ( Q, P ) , we will instead use an upper bound.
We use Lemma 19 (Sect. D) to bound this distance with the distance of the corresponding pre-projection measures, W 1 ( ˜ Q, ˜ P ) , where ˜ Q and ˜ P are the corresponding pre-projection measures.
Note that our choice of parameters ensures that the lemma condition holds:
[Equation]
We also use the fact that W 1 ( ˜ Q, ˜ P ) ≤ W 2 ( ˜ Q, ˜ P ) ( Givens and Shortt (1984), Prop. 3) and the analytic formula for the 2 nd order Wasserstein distance between two Gaussian distributions (Givens and
Shortt (1984), Prop. 7) to finally get a closed-form upper bound,
[Equation]
Notice that in the limit of σ Q , σ P → 0 , the bound becomes ∥ µ Q − µ P ∥ 2 , which is equivalent to the
Wasserstein distance between two Dirac measures at µ Q and µ P .
The empirical risk term.
To compute the expectation of the empirical risk w.r.t.
the posterior,
E h ∼ Q ˆ L ( h ) , we derive a closed-form formula using the structure and of the loss and the posterior distribution 7 .
Given a dataset S
= { ( x i , y i ) } mi =1 , denote X ∈ R m × d as a matrix whose rows are the vectors x i , and denote Y ∈
R m × 1 as a vector whose entries are y i .
Denote ˆ J ( X,Y ) ( µ Q ) def =
E h ∼ Q ˆ L ( h ) .
Then we have
[Equation]
The explicit Wasserstein-PB bound.
According to Cor. 15, given a training set S =
( X, Y ) , the upper bound on the expected risk L ( Q ) def =
E h ∼ Q L ( h ) is
[Equation]
where u ( m, δ ) is defined in (49), u grad ( m, δ ) is defined in (54), and W bound ( µ Q ) is the upper bound over W 1 ( Q, P ) defined in (56).
The explicit KL-PB bound.
For the KL-PB bound, we use the classic PB bound (Prop. 2) with the
KL-divergence replaced by an upper bound that has a closed-form expression.
By the data-processing inequality we have that KL ( Q ∥ P ) =
KL ( P B ♯ ˜ Q
∥ P B ♯ ˜ P ) ≤ KL ( ˜ Q ∥ ˜ P ) , and KL ( ˜ Q ∥ ˜ P ) can be computed using the analytic formula for the KL-divergence between two Gaussian distributions.
Therefore, the upper bound we use is
[Equation]
Experiment Procedure: We repeat the experiment for 10 repetitions, to account for the randomness of the data and optimization in each run.
In each run, (i) the task data distribution D is generated as described above, (ii) A training set of m samples is generated.
(iii)
The posterior mean vector µ Q is learned using the Adam Optimizer (D. Kingma & Ba, 2015) that minimizes either J KL-PB ( X,Y ) ( µ Q ) or
J WPB ( X,Y ) ( µ Q ) (as will be specified later), where the learning rate is set as 10 − 3 , and the maximal batch size is 256 .
The gradients are computed using automatic differentiation by the PyTorch framework (Paszke et al., 2019).
After each gradient step, the parameter µ Q is projected to B r Q .
Results.
Table 1 show the results when we set the prior parameter σ P as 10 − 2 , and Table 2 shows the results for σ P = 10 − 4 , both use σ Q = 10 − 3 .
The optimization objective for those two setups is the KLPB bound, J KL-PB ( X,Y ) ( µ Q ) .
The third setup (Table 3) investigates Dirac posteriors (“a deterministic model”).
In this setup we set σ Q = σ P = 0 , and the optimization objective is set to be J WPB ( X,Y ) ( µ Q ) .
Note that since σ P = 0 then the KL-divergence is undefined, while the W 1 distance equals exactly ∥ µ Q − µ P ∥ 2 .
Figures 2a, 2b and 2c show the corresponding plots.
The ‘Training loss’ column shows the empirical risk (57), i.e., the averaged loss of the learned posterior on the training data.
The ‘Test loss’ column shows the average loss of the learned posterior on a separate ‘test’ set of 10000 samples drawn from
D .
In all the evaluated bounds, we use the confidence parameter δ = 0 . 05 .
The ‘UC bound’ shows
[Table] [Table]
3.8298 (0.0006) 0.4482 (0.0006) 0.9186 (0.0006) 0.0205 (0.0005) 0.0208 (0.0001) 3.3187 (0.0005) 0.3906 (0.0005) 0.7974 (0.0005) the sum of the empirical risk and the UC generalization gap bound (49).
The ‘WPB bound’ is the
Wasserstein-PB bound evaluated by equation (58), and the ‘KLPB bound’ is evaluated by equation (59).
The results clearly show the improved tightness of the WPB bound over the UC bound, for the two choices of a prior distribution.
The KLPB bound, also shows relatively tight values, as expected from an algorithm- and data-dependent bound.
However, for the narrower prior distribution ( σ P = 10 − 4 ), the KLPB bound is significantly looser than the WPB bound.
That is expected from the properties of the KL-divergence, which can tend to ∞ if σ P → 0 , as opposed to the Wasserstein distance.
In the extreme case of σ P =
the KLPB bound is undefined, while the WPB exhibits a considerable improvement over the UC bound.
The results confirm that the WPB generally improves over UC bounds, and may be tighter than the KLPB bound, depending on the prior and posterior distributions.
[Figure]
D Appendix: Technical Lemmas
Lemma 18.
Let A ⊂ R be bounded and non-empty, and let f : (0 , ∞ ) → R be continuous and monotone non-decreasing.
Then f (sup A ) =
sup f ( A ) , where we defined sup A def = sup
a ∈
A a , and sup f ( A ) def = sup a ∈
A f ( a ) ; that is, f ( A ) is the image of the set
A under f .
Proof.
First notice that f (sup A ) ≥ sup f ( A ) by monotonicity, because a ≤ sup A for all a ∈ A .
For the other inequality, f (sup A ) ≤ sup f ( A ) we need to also use continuity: let ε > 0 ; by continuity there exists δ > 0 such that for every a ∈ A such that a ≥ sup A − δ it holds that
[Table]
f ( a ) ≥ f (sup A ) − ε
(there exists such a by the definition of the supremum).
By monotonicity this implies that sup f ( A ) ≥ f (sup A ) − ε .
Since the latter inequality holds for every ε > 0 , we conclude that sup f ( A ) ≥ f (sup A ) as required
[Table]
Lemma 19 (Wasserstein distance between truncated Gaussian distributions) .
Let X (1) and X (2) be the Gaussian random vectors in R d , with distributions N ( µ 1 , Σ 1 ) , and N ( µ 1 , Σ 2 ) respectively.
Let
P B r : R d
→ B r be a projection operator onto the an r -radius ball around the origin, P B r ( x ) def =
argmin x ′ ∈ B r ∥ x − x ′ ∥ 2 , where B r = (cid:8) x ∈ R d :
∥ x ∥ 2 ≤ r (cid:9) .
Assume that r ≥ (cid:113) ∥ µ j ∥ 22 + ∥ Σ j ∥ 2 F for j = 1 , 2 .
Denote the distribution measures of X (1) and X (2) as ν 1 and ν 2 respectively.
Let
P B r ♯ν 1 and P B r ♯ν 2 be the push-forward measures of ν 1 and ν 2 , respectively, under the operator P B r .
Then
[Equation]
where W 1 ( Q, P ) denotes the 1 st order Wasserstein distance with the L 2 metric.
Proof.
Using the triangle inequality of Wasserstein distances (Clement & Desch, 2008; Thorpe, 2018)
twice we get
[Equation]
Notice that
[Equation]
where in (i) we used the notation [ t ] + def = (cid:26) t t >0 t ≤ 0 and the equality holds since P B r ( x ) =
x for ∥ x ∥ ≤ r , and ∥ P B r ( x ) − x ∥ =
∥ x ∥ 2 − r for ∥ x ∥ > r (by the properties of the projection onto the a
L 2 ball).
In (ii) we use the definition of the random variable V def =
(cid:13)(cid:13)
X (2) (cid:13)(cid:13) 2 .
In (iii) we used the tail sum formula for the expectation.
Equality (iv) holds since the corresponding events are equivalent.
Let Z be a standard Gaussian random vector in R d , i.e., Z ∼ N (¯ 0 , I ) .
By Wainwright (2019), Thm. 2.26 (one-sided variant) we have that
[Equation]
for any s ≥ 0 and for any function f : R d → R that is L -Lipschitz w.r.t.
the L 2 metric.
In particular, for the function f ( z ) def = (cid:13)(cid:13)(cid:13) µ 2 + Σ 1 / 2 2 z (cid:13)(cid:13)(cid:13)
we have for any s ≥
P
[Equation]
since f is Lipschitz with constant (cid:13)(cid:13)(cid:13) Σ 1 / 2 2 (cid:13)(cid:13)(cid:13) 2 , 2 where ∥·∥ 2 , 2 is the operator norm defined by ∥ A ∥ 2 , 2 = sup ∥ x ∥ 2 =1 ∥
Ax ∥ 2 for any A ∈ R d × d .
Equality (i) holds since (cid:13)(cid:13)(cid:13) Σ 1 / 2 2 (cid:13)(cid:13)(cid:13)2 , 2 = (cid:32) sup ∥ x
∥ 2 = (cid:13)(cid:13)(cid:13)
[Equation]
Notice that
[Equation]
where (i) is by Jensen’s inequality, and in (ii) we used the fact that Z ∼ N (¯ 0 , I ) and ∥·∥ F denotes the Frobenius Norm, defined by ∥
A ∥ F def =
(cid:113)(cid:80) i,j A 2 i,j .
Therefore, using (62)
[Equation]
we get
[Equation]
Note that the random variable V def =
(cid:13)(cid:13)
X (2) (cid:13)(cid:13) 2 is equal, in distribution, to the random variable (cid:13)(cid:13)(cid:13)
µ 2 + Σ 1 / 2 2 Z (cid:13)(cid:13)(cid:13) 2 ,
and therefore we also have for s ≥ 0 that
[Equation]
For any t ≥ 0 , set s :
= t + r − (cid:113) ∥ µ 2 ∥ 22 + ∥ Σ 2 ∥ 2 F .
Since we assume that r ≥ (cid:113) ∥ µ 2 ∥ 22 + ∥ Σ 2 ∥ 2 F , we have that s ≥ 0 .
Therefore we have
[Equation]
Hence, by (61) we have
[Equation]
By symmetry we have a similar bound for W 1 ( P B r ♯ν 1 , ν 1 ) .
To conclude, using (60) we get
[Equation]