G ENERALIZATION BOUNDS FOR DEEP CONVOLUTIONAL NEURAL NETWORKS
A BSTRACT
We prove bounds on the generalization error of convolutional networks.
The bounds are in terms of the training loss, the number of parameters, the Lipschitz constant of the loss and the distance from the weights to the initial weights.
They are independent of the number of pixels in the input and the height and width of hidden feature maps.
We present experiments using CIFAR-10 with varying hyperparameters of a deep convolutional network, comparing our bounds with practical generalization gaps
I NTRODUCTION
Recently, substantial progress has been made regarding theoretical analysis of the generalization of deep learning models (see Neyshabur et al., 2015; Zhang et al., 2016; Dziugaite and Roy, 2017; Bartlett et al., 2017; Neyshabur et al., 2017; 2018; Arora et al., 2018; Golowich et al., 2018; Neyshabur et al., 2019; Wei and Ma, 2019a; Cao and Gu, 2019; Daniely and Granot, 2019).
One interesting point that has been explored, with roots in (Bartlett, 1998), is that even if there are many parameters, the set of models that can be represented using weights with small magnitude is limited enough to provide leverage for induction (Neyshabur et al., 2015; Bartlett et al., 2017; Neyshabur et al., 2018).
Intuitively, if the weights start small, since the most popular training algorithms make small, incremental updates that get smaller as the training accuracy improves, there is a tendency for these algorithms to produce small weights.
(For some deeper theoretical exploration of implicit bias in deep learning and related settings, see (Gunasekar et al., 2017; 2018a;b; Ma et al., 2018).)
Even more recently, authors have proved generalization bounds in terms of the distance from the initial setting of the weights instead of the size of the weights (Dziugaite and Roy, 2017; Bartlett et al., 2017; Neyshabur et al., 2019; Nagarajan and Kolter, 2019).
This is important because small initial weights may promote vanishing gradients; it is advisable instead to choose initial weights that maintain a strong but non-exploding signal as computation ﬂows through the network (see LeCun et al., 2012; Glorot and Bengio, 2010; Saxe et al., 2013;
He et al., 2015).
A number of recent theoretical analyses have shown that, for a large network initialized in this way, accurate models can be found by traveling a short distance in parameter space (see Du et al., 2019b;a; Allen-Zhu et al., 2019; Zou et al., 2018; Lee et al., 2019).
Thus, the distance from initialization may be expected to be signiﬁcantly smaller than the magnitude of the weights.
Furthermore, there is theoretical reason to expect that, as the number of parameters increases, the distance from initialization decreases.
This motivates generalization bounds in terms of distance from initialization (Dziugaite and Roy, 2017; Bartlett et al., 2017).
Convolutional layers are used in all competitive deep neural network architectures applied to image processing tasks.
The most inﬂuential generalization analyses in terms of distance from initialization have thus far concentrated on networks with fully connected layers.
Since a convolutional layer has an alternative representation as a fully connected layer, these analyses apply in the case of convolutional networks, but, intuitively, the weight-tying employed in the convolutional layer constrains the set of functions computed by the layer.
This additional restriction should be expected to aid generalization.
In this paper, we prove new generalization bounds for convolutional networks that take account of this effect.
As in earlier analyses for the fully connected case, our bounds are in terms of the distance from the initial weights, and the number of parameters.
Additionally, our bounds independent of the number of pixels in the input, or the height and width of the hidden feature maps.
Our most general bounds apply to networks including both convolutional and fully connected layers, and, as such, they also apply for purely fully connected networks.
In contrast with earlier bounds for settings like the one considered here, our bounds are in terms of a sum over layers of the distance from initialization of the layer.
Earlier bounds were in terms of product of these distances which led to an exponential dependency on depth.
Our bounds have linear dependency on depth which is more aligned with practical observations.
As is often the case for generalization analyses, the central technical lemmas are bounds on covering numbers.
Borrowing a technique due to Barron et al.
(1999), these are proved by bounding the
Lipschitz constant of the mapping from the parameters to the loss of the functions computed by the networks.
(Our proof also borrows ideas from the analysis of the fully connected case, especially (Bartlett et al., 2017; Neyshabur et al., 2018).)
Covering bounds may be applied to obtain a huge variety of generalization bounds.
We present two examples for each covering bound.
One is a standard bound on the difference between training and test error.
Perhaps the more relevant bound has the ﬂavor of “relative error”; it is especially strong when the training loss is small, as is often the case in modern practice.
Our covering bounds are polynomial in the inverse of the granularity of the cover.
Such bounds seem to be especially useful for bounding the relative error.
In particular, our covering bounds are of the form ( B/(cid:15) )
W , where (cid:15) is the granularity of the cover,
B is proportional to the Lipschitz constant of a mapping from parameters to functions, and W is the number of parameters in the model.
We apply a bound from the empirical process literature in terms of covering bounds of this form due to Giné and Guillou (2001), who paid particular attention to the dependence of estimation error on B .
This bound may be helpful for other analyses of the generalization of deep learning in terms of different notions of distance from initialization.
(Applying bounds in terms of Dudley’s entropy integral in the standard way leads to an exponentially worse dependence on B .)
Related previous work.
Du et al.
(2018) proved bounds for CNNs in terms of the number of parameters, for two-layer networks.
Arora et al.
(2018) analyzed the generalization of networks output by a compression scheme applied to CNNs.
Zhou and Feng (2018) provided a generalization guarantee for CNNs satisfying a constraint on the rank of matrices formed from their kernels.
Li et al.
(2018) analyzed the generalization of CNNs under other constraints on the parameters.
Lee and
Raginsky (2018) provided a size-free bound for CNNs in a general unsupervised learning framework that includes PCA and codebook learning. Related independent work.
Ledent et al. (2019) proved bounds for CNNs that also took account of the effect of weight-tying. (Their bounds retain the exponential dependence on the depth of the network from earlier work, and are otherwise qualitatively dissimilar to ours.) Daniely and Granot (2019) and Wei and Ma (2019b) obtained bounds for fully connected networks with an improved dependence on the depth of the network.
Jiang et al.
(2019) conducted a wide-ranging empirical study of the dependence of the generalization gap on a variety of quantities, including distance from initialization.
Notation. If K ( i ) is the kernel of convolutional layer number i , then op( K ( i ) ) refers to its operator matrix 1 and vec( K ( i ) ) denotes the vectorization of the kernel tensor K ( i ) .
For matrix M , (cid:107) M (cid:107)denotes the operator norm of M .
For vectors, || · || represents the Euclidian norm, and || · ||is the L 1 norm.
For a multiset S of elements of some set Z , and a function g from Z to R , let E
S [ g ] = 1 m (cid:80) mt =1 g ( z t ) .
We will denote the function parameterized by Θ by f Θ .
B OUNDS FOR A BASIC SETTING
In this section, we provide a bound for a clean and simple setting.
2. T HE SETTING AND THE BOUNDS
In the basic setting, the input and all hidden layers have the same number c of channels.
Each input x ∈ R d × d × c satisﬁes (cid:107) vec( x ) (cid:107) ≤ 1 .
We consider a deep convolutional network, whose convolutional layers use zero-padding (see Goodfellow et al., 2016).
Each layer but the last consists of a convolution followed by an activation function that is applied componentwise.
The activations are 1 -Lipschitz and nonexpansive (examples include
ReLU and tanh).
The kernels of the convolutional layers are K ( i
) ∈
R k × k × c × c for i ∈ { 1 , . . .
, L } .
Let K =
( K (1) , ..., K ( L ) ) be the L × k × k × c × c -tensor obtained by concatening the kernels for the various layers.
Vector w represents the last layer; the weights in the last layer are ﬁxed with || w ||
= 1 .
Let W =
Lk
c 2 be the total number of trainable parameters in the network.
We let K (1)0 , . . .
, K ( L )take arbitrary ﬁxed values (interpreted as the initial values of the kernels) subject to the constraint that, for all layers i ,
||
op( K ( i ) 0 ) ||
2 = 1 .
(This is often the goal of initialization schemes.)
Let K 0 be the corresponding L × k × k × c × c tensor.
We provide a generalization bound in terms of distance from initialization, along with other natural parameters of the problem.
The distance is measured with || K − K 0 || σ def = (cid:80) L i =1 || op( K ( i ) )
− op( K ( i ) 0 )
|| 2 .
For β > 0 , deﬁne K β to be the set of kernel tensors within || · || σ distance β of K 0 , and deﬁne F β to be set of functions computed by CNNs with kernels in K β .
That is, F β = { f K :
|| K − K 0 || σ ≤ β } .
Let (cid:96) : R × R → [0 , 1] be a loss function such that (cid:96) ( · , y ) is λ -Lipschitz for all y .
An example is the 1 /λ -margin loss.
For a function f from R d × d × c to R , let (cid:96) f
( x, y ) =
(cid:96) ( f ( x ) , y ) .
We will use S to denote a set { ( x 1 , y 1 ) , . . .
, ( x m , y m ) } = { z 1 , . . .
z m } of random training examples where each z t = ( x t , y t ) .
Theorem 2.1 (Basic bounds) .
For any η > 0 , there is a C > 0 such that for any β, δ > 0 , λ ≥ 1 , for any joint probability distribution P over R d × d × c × R , if a training set S of n examples is drawn independently at random from P , then, with probability at least 1 − δ , for all f ∈ F β ,
[Equation]
and, if β ≥ 5 , then
[Equation]
and otherwise
[Equation]
If Theorem 2.1 is applied with the margin loss, then E z ∼ P [ (cid:96) f
( z )] is in turn an upper bound on the probability of misclassiﬁcation on test data.
Using the algorithm from (Sedghi et al., 2018), || · || σ may be efﬁciently computed.
Since || K − K 0 || σ ≤ || vec( K ) − vec( K 0 ) || 1 (Sedghi et al., 2018), Theorem 2.1 yields the same bounds as a corollary if the deﬁnition of F β is replaced with the analogous deﬁnition using || vec( K ) − vec( K 0 )
|| 1 .
2. T OOLS
Deﬁnition 2.2.
For d ∈ N , a set G of real-valued functions with a common domain Z , we say that G is ( B, d ) -Lipschitz parameterized if there is a norm || · || on R d and a mapping φ from the unit ball w.r.t.
|| · || in R d to G such that, for all θ and θ (cid:48)
such that || θ || ≤ 1 and || θ (cid:48) || ≤ 1 , and all z ∈ Z , | ( φ ( θ ))
( z ) − ( φ ( θ (cid:48) ))
( z ) | ≤ B || θ − θ (cid:48)
|| .
The following lemma is essentially known.
Its proof, which uses standard techniques (see Pollard, 1984; Talagrand, 1994; 1996; Barron et al., 1999; Van de Geer, 2000; Giné and Guillou, 2001; Mohri et al., 2018), is in Appendix A.
Lemma 2.3.
Suppose a set G of functions from a common domain Z to [0 , M ] is ( B, d ) -Lipschitz parameterized for B > 0 and d ∈ N .
Then, for any η > 0 , there is a C such that, for all large enough n ∈ N , for any δ > 0 , for any probability distribution P over Z , if S is obtained by sampling n times independently from P , then, with probability at least 1 − δ , for all g ∈ G , [Equation] and if B ≥ 5 ,
[Equation]
and, for all B ,
[Equation]
2. P ROOF OF T HEOREM 2.
Deﬁnition 2.4.
Let (cid:96) F = { (cid:96) f : f ∈ F } .
We will prove Theorem 2.1 by showing that (cid:96) F β is (cid:0) βλe β , W (cid:1) -Lipschitz parameterized.
This will be achieved through a series of lemmas.
Lemma 2.5.
Choose K ∈ K β and a layer j .
Suppose ˜ K ∈ K β satisﬁes K
( i ) =
˜ K
( i ) for all i (cid:54) =
j .
Then, for all examples ( x, y ) , | (cid:96) ( f K ( x ) , y ) − (cid:96) ( f ˜ K ( x ) , y ) | ≤ λe β (cid:13)(cid:13)(cid:13) op( K ( j ) )
− op( ˜ K ( j ) )
(cid:13)(cid:13)(cid:13) 2 .
Proof.
For each layer i , let β i
=
||
op( K ( i ) )
− op( K ( i ) 0 )
|| 2 .
Since (cid:96) is λ -Lipschitz w.r.t.
its ﬁrst argument, we have that | (cid:96) ( f K ( x ) , y ) − (cid:96) ( f ˜ K ( x ) , y ) | ≤ λ | f K ( x ) − f ˜ K
( x ) | , so it sufﬁces to bound | f K ( x ) − f ˜ K
( x ) | .
Let g up be the function from the inputs to the whole network with parameters K to the inputs to the convolution in layer j , and let g down be the function from the output of this convolution to the output of the whole network, so that f K = g down ◦
f op( K ( j ) ) ◦ g up .
Choose an input x to the network, and let u
= g up ( x ) .
Recalling that || x || ≤ 1 , and the non-linearities are nonexpansive, we have (cid:107) u (cid:107) ≤ (cid:89) i<j (cid:13)(cid:13)(cid:13) op( K ( i ) )
(cid:13)(cid:13)(cid:13) 2 .
Since the non-linearities are 1-Lipschitz, and, recalling that K ( i ) =
˜ K
( i ) for i (cid:54) =
j , we have
[Equation]
i>j (cid:13)(cid:13)(cid:13) op( K ( i ) )
(cid:13)(cid:13)(cid:13)  (cid:13)(cid:13)(cid:13) op
( K ( j ) )
− op( ˜ K ( j ) )
(cid:13)(cid:13)(cid:13) 2 (cid:107) u (cid:107) ≤  (cid:89) i (cid:54) =
j (cid:13)(cid:13) (cid:13) op ( K ( i ) )
(cid:13)(cid:13) (cid:13)  (cid:13)(cid:13) (cid:13) op
( K ( j ) )
− op( ˜ K ( j ) )
(cid:13)(cid:13) (cid:13)≤  (cid:89) i (cid:54) =
j (1 + β i ) 
 (cid:13)(cid:13)(cid:13) op( K ( j ) )
− op( ˜ K ( j ) )
(cid:13)(cid:13)(cid:13) where the last inequality uses the fact that || op( K ( i ) ) − op( K ( i ) 0 )
||
2 ≤ β i for all i and || op( K ( i ) 0 )
|| 2 = 1 for all i .
Now (cid:81) i (cid:54) =
j (1 + β i ) ≤ (cid:81) Li
=1 (1 + β i ) , and the latter is maximized over the nonnegative β
i ’s subject to (cid:80) i (cid:54) =
j β i ≤ β when each of them is β/L .
Since (1 + β/L ) L ≤ e β , this completes the proof.
Now we prove a bound when all the layers can change between K and ˜ K .
Lemma 2.6.
For any K, ˜ K ∈ K β , for any input x to the network, | (cid:96) ( f K ( x ) , y ) − [Equation] [Equation]
| ≤
[Equation]
Proof.
Consider transforming K to ˜ K by replacing one layer of K at a time with the corresponding layer in ˜ K .
Applying Lemma 2.5 to bound the distance traversed with each replacement and combining this with the triangle inequality gives
[Equation]
Now we are ready to prove our basic bound.
Proof (of Theorem 2.1).
Consider the mapping φ from the ball w.r.t.
(cid:107)·(cid:107) σ of radius 1 in R Lk 2 ccentered at vec( K 0 ) to (cid:96) F β deﬁned by φ ( θ ) =
(cid:96) f K 0+ β vec − 1( θ ) , where vec − 1 ( θ ) is the reshaping of θ into a L × k × k × c × c -tensor.
Lemma 2.6 implies that this mapping is βλe β -Lipschitz.
Applying
Lemma 2.3 completes the proof.
C OMPARISONS
Since a convolutional network has an alternative parameterization as a fully connected network, the bounds of (Bartlett et al., 2017) have consequences for convolutional networks.
To compare our bound with this, ﬁrst, note that Theorem 2.1, together with standard model selection techniques, yields a
O
[Equation]
bound on E z ∼ P [ (cid:96) f ( z )] − E S [ (cid:96) f
( z )] (For more details, please see Appendix B.)
Translating the bound of (Bartlett et al., 2017) to our setting and notation directly yields a bound on E z ∼ P [ (cid:96) f
( z )] − E S [ (cid:96) f
( z )] whose main terms are proportional to [Equation] n
[Equation]
where, for a p × q matrix A , ||
A
|| 2 , 1 =
||
( || A : [Equation] 1 || 2 , ..., ||
A : ,q || 2 )
|| 1 .
One can get an idea of how this bound relates to (1) by comparing the bounds in a simple concrete case.
Suppose that each of the convolutional layers of the network parameterized by K 0 computes the identity function, and that K is obtained from K 0 by adding (cid:15) to each entry.
In this case, disregarding edge effects, for all i , ||
op( K ( i ) )
||
2 = 1 + (cid:15)k 2 c
and || K − K 0 || σ =
(cid:15)k 2 cL (as proved in Appendix C).
Also, || op( K ( i ) ) (cid:62) − op
( K ( i ) 0 ) (cid:62) || 2 , 1 = ( cd 2 )( (cid:15) √ ck 2 ) =
(cid:15)c 3 / 2 d 2 k. We get additional simpliﬁcation if we set (cid:15)
=
k 2 .
In this case, (2) gives a constant times
[Equation]
n where (1) gives a constant times
[Equation]
n
[Equation]
In this scenario, the new bound is independent of d , and grows more slowly with λ , c and L .
Note that k ≤ d (and, typically, it is much less).
This speciﬁc case illustrates a more general phenomenon that holds when the initialization is close to the identity, and changes to the parameters are on a similar scale.
Golowich et al.
(2017) established bounds that improve on the bounds of (Bartlett et al., 2017) in some cases. Their bound requires a restriction on the activation function (albeit one that is satisﬁed by the ReLU). For large n , the main term of the natural consequence of Corollary 1 of their paper in the setting of this section, with the required additional assumption on the activation function, grows like [Equation]
when (cid:15) = 1 /k 2 .
(We note, however, that, in addition to not trying to take account of the convolutional structure, Golowich et al.
(2017) also did not make an effort to obtain stronger bounds in the case that the distance from initialization is small.
On the other hand, we suspect that modifying their proof analogously to (Bartlett et al., 2017) to do so would not remove the exponential dependence on L .)
A MORE GENERAL BOUND
In this section, we generalize Theorem 2.1.
3. T HE SETTING
The more general setting concerns a neural network where the input is a d × d × c tensor whose ﬂattening has Euclidian norm at most χ , and network’s output is a m -dimensional vector, which may be logits for predicting a one-hot encoding of an m -class classiﬁcation problem.
The network is comprised of L c convolutional layers followed by L f fully connected layers.
The i th convolutional layer includes a convolution, with kernel K ( i
) ∈
R k
i × k
i × c
i − 1 × c i , followed by a componentwise non-linearity and an optional pooling operation.
We assume that the non-linearity and any pooling operations are 1 -Lipschitz and nonexpansive.
Let V ( i ) be the matrix of weights for the i th fully connected layer.
Let Θ =
( K (1) , ..., K ( L c ) , V (1) , ..., V ( L f ) ) be all of the parameters of the network.
Let L =
L c + L f .
We assume that, for all y , (cid:96) ( · , y ) is λ -Lipschitz for all y and that (cid:96) (ˆ y, y ) ∈
[0 , M ] for all ˆ y and y .
An example ( x, y ) includes a d × d × c -tensor x and y ∈ R m .
We let K (1)0 , . . .
, K ( L c ), V (1)0 , ..., V ( L f )take arbitrary ﬁxed values subject to the constraint that, for all convolutional layers i ,
||
op
( K ( i ) 0 )
|| 2 ≤ 1+ ν , and for all fully connected layers i , || V ( i )
|| 2 ≤ 1+ ν .
Let Θ
= ( K (1)0 , ..., K
( L c ), V (1)0 , ..., V ( L f )) .
For Θ = ( K (1) , ..., K ( L c ) , V (1) , ..., V ( L f ) ) and ˜Θ =
( ˜ K (1) , ...,
˜ K
( L c ) , ˜ V (1) , ...,
˜ V
( L f ) ) .
deﬁne ||
Θ − ˜Θ || N = (cid:32)
L c (cid:88) i
= || op( K ( i ) ) − op( ˜ K ( i ) ) ||(cid:33) +
L f (cid:88) i = || V
[Equation]
For β, ν ≥ 0 , deﬁne F β,ν to be set of functions computed by CNNs as described in this subsection with parameters within || · ||
N -distance β of Θ 0 .
Let O β,ν be the set of their parameterizations.
Theorem 3.1 (General Bound) .
For any η > 0 , there is a constant C such that the following holds.
For any β, ν, χ > 0 , for any δ > 0 , for any joint probability distribution P over R d × d × c × R m such that, with probability 1, ( x, y ) ∼ P satisﬁes || vec( x ) || 2 ≤ χ , under the assumptions of this section, if a training set S of n examples is drawn independently at random from P , then, with probability at least 1 − δ , for all f ∈ F β,ν ,
[Equation]
and, if χλβ (1 + ν + β/L ) L ≥ 5 ,
[Equation]
P [
[Equation]
and a bound of
[Equation]
holds for all χ, λ, β > 0 .
3. P ROOF OF T HEOREM 3.
We will prove Theorem 3.1 by using ||·|| N to witness the fact that (cid:96) F β,ν is (cid:0) χλβ (1 + ν + β/L ) L , W [Equation] Lipschitz parameterized.
The ﬁrst two lemmas concern the effect of changing a single layer.
Their proofs are very similar to the proof of Lemma 2.5, and are in the Appendices D and E.
Lemma 3.2.
Choose Θ
[Equation] [Equation]
( ˜ K (1) , ..., ˜ K
( L c ) , ˜ V (1) , ...,
˜ V
( L f ) )
∈
O β,ν and a convolutional layer j .
Suppose that K ( i ) =
˜ K
( i ) for all convolutional layers
i (cid:54) =
j and V ( i ) =
˜ V ( i ) for all fully connected layers i .
Then, for all examples ( x, y ) ,
[Equation]
Lemma 3.3.
Choose Θ =
[Equation]
, ˜ K
[Equation]
L c ) , ˜ V (1) , ...,
˜ V
( L f ) )
∈
O β,ν and a fully connected layer j .
Suppose that K ( i ) =
˜ K
( i ) for all convolutional layers i and V ( i ) =
˜ V ( i ) for all fully connected layers i (cid:54) =
j .
Then, for all examples ( x, y ) ,
[Equation]
Now we prove a bound when all the layers can change between Θ and ˜Θ .
Lemma 3.4.
For any Θ =
[Equation]
.., K
[Equation]
L
[Equation]
= (
[Equation]
..., ˜ K
[Equation]
L c
[Equation]
, ˜ V
[Equation]
, ..., ˜ V [Equation] L f ) )
∈
O β,ν , for any input x ,
[Equation]
[Table]
[Equation]
[Table]
Proof.
Consider transforming Θ to ˜Θ by replacing one layer at a time of Θ with the corresponding layer in ˜Θ .
Applying Lemma 3.2 to bound the distance traversed with each replacement of a convolutional layer, and Lemma 3.3 to bound the distance traversed with each replacement of a fully connected layer, and combining this with the triangle inequality gives the lemma.
Now we are ready to prove our more general bound.
Proof (of Theorem 3.1).
Consider the mapping φ from the ball of || · || N -radius 1 centered at Θ 0 to (cid:96) F β,ν deﬁned by φ (Θ)
= (cid:96) f Θ0+ β Θ .
Lemma 2.6 implies that this mapping is (cid:16) χλβ (1 + ν + β/L ) L , W (cid:17) -Lipschitz.
Applying Lemma 2.3 completes the proof.
3. M ORE COMPARISONS
Theorem 3.1 applies in the case that there are no convolutional layers, i.e. for a fully connected network.
In this subsection, we compare its bound in this case with the bound of (Bartlett et al., 2017).
Because the bounds are in terms of different quantities, we compare them in a simple concrete case.
In this case, for D = cd 2 , each hidden layer has D components, and there are
D classes.
For all i , V ( i )=
I and V ( i )
=
I + H/ √ D , where H is a Hadamard matrix (using the Sylvester construction), and χ = M = 1 .
Then, dropping the superscripts, each layer V has || V
||
= 2 , || V − V
||
= 1 , || V − V
|| 2 , 1 = D.
Further, in the notation of Theorem 3.1, W = D 2 L , and β = L , and ν = 0 .
Plugging into to
Theorem 3.1 yields a bound on the generalization gap proportional to
[Equation]
n where, in this case, the bound of (Bartlett et al., 2017) is proportional to
[Equation]
n and, when D is large relative to L , Corollary 1 of (Golowich et al., 2017) (approximately) gives
[Equation]
n
[Equation]
[Figure]
E XPERIMENTS
We trained a 10-layer all-convolutional model on the CIFAR-10 dataset.
The architecture was similar to VGG (Simonyan and Zisserman, 2014).
The network was trained with dropout regularization and an exponential learning rate schedule.
We deﬁne the generalization gap as the difference between train error and test error.
In order to analyze the effect of the number of network parameters on the generalization gap, we scaled up the number of channels in each layer, while keeping other elements of the architecture, including the depth, ﬁxed.
Each network was trained repeatedly, sweeping over different values of the initial learning rate and batch sizes 32 , 64 , 128 .
For each setting the results were averaged over ﬁve different random initializations.
Figure 1 shows the generalization gap for different values of W || K − K 0 || σ .
As in the bound of Theorem 3.1, the generalization gap increases with W || K − K 0 || σ .
Figure 2 shows that as the network becomes more over-parametrized, the generalization gap remains almost ﬂat with increasing W .
This is expected due to role of overparametrization on generalization (Neyshabur et al., 2019).
An explanation of this phenomenon that is consistent with the bound presented here is that, ultimately, increasing W leads to a decrease in value of || K − K 0 || σ ; see Figure 3a.
The ﬂuctuations in Figure 3a are partly due to the fact that training neural networks is not an stable process.
We provide the medians || K − K
||
σ for different values of W in Figure 3b.
A CKNOWLEDGMENTS
We thank Peter Bartlett and Jaeho Lee for valuable conversations, and anonymous reviewers for helpful comments
A P ROOF OF L EMMA 2.
Deﬁnition A.1.
If ( X, ρ ) is a metric space and H ⊆
X , we say that G is an (cid:15) -cover of H with respect to ρ if every h ∈ H has a g ∈ G such that ρ ( g, h ) ≤ (cid:15) .
Then N ρ ( H, (cid:15) ) denotes the size of the smallest (cid:15) -cover of H w.r.t.
ρ .
Deﬁnition A.2.
For a domain Z , deﬁne a metric ρ max on pairs of functions from Z to R by ρ max ( f, g ) =
sup z ∈ Z | f
( z ) − g ( z ) | .
We need two lemmas in terms of these covering numbers.
The ﬁrst is by now a standard bound from Vapnik-Chervonenkis theory (Vapnik and Chervonenkis, 1971; Vapnik, 1982; Pollard, 1984).
For example, it is a direct consequence of (Haussler, 1992, Theorem 3).
Lemma A.3.
For any η > 0 , there is a constant C depending only on η such that the following holds.
Let G be an arbitrary set of functions from a common domain Z to [0 , M ] .
If there are constants B and d such that, N ρ max ( G, (cid:15) ) ≤ [Equation] (cid:1) d for all (cid:15) > 0 , then, for all large enough n ∈ N , for any δ > 0 , for any probability distribution P over Z , if S is obtained by sampling n times independently from P , then, with probability at least 1 − δ , for all g ∈ G ,
[Equation]
We will also use the following, which is the combination of (2.5) and (2.7) of (Giné and Guillou, 2001).
Lemma A.4.
Let G be an arbitrary set of functions from a common domain Z to [0 , M ] .
If there are constants B ≥ 5 and d such that N ρ max ( G, (cid:15) ) ≤ (cid:0) B(cid:15) (cid:1) d for all (cid:15) > 0 , for all large enough n ∈ N , for any δ > 0 , for any probability distribution P over Z , if S is obtained by sampling n times independently from P , then, with probability at least 1 − δ , for all g ∈ G ,
[Equation]
where C is an absolute constant.
The above bound only holds for B ≥ 5 . The following, which can be obtained by combining
Talagrand’s Lemma with the standard bound on Rademacher complexity in terms of the Dudley entropy integral (see (Van de Geer, 2000; Bartlett, 2013)), yields a bound for all B .
Lemma A.5.
Let G be an arbitrary set of functions from a common domain Z to [0 , M ] .
If there are constants B > 0 and d such that N ρ max ( G, (cid:15) ) ≤ (cid:0) B(cid:15) (cid:1) d for all (cid:15) > 0 , then, for all large enough n ∈ N , for any δ > 0 , for any probability distribution P over Z , if S is obtained by sampling n times independently from P , then, with probability at least 1 − δ , for all g ∈ G ,
[Equation]
where C is an absolute constant.
So now we want a bound on N ρ max ( G, (cid:15) ) for Lipschitz-parameterized classes.
For this, we need the notion of a packing which we now deﬁne.
Deﬁnition A.6.
For any metric space ( X, ρ ) and any H ⊆ S , let M ρ ( H, (cid:15) ) be the size of the largest subset of H whose members are pairwise at a distance greater than (cid:15) w.r.t.
ρ .
Lemma A.7 ((Kolmogorov and Tikhomirov, 1959)) .
For any metric space ( X, ρ ) , any H ⊆ X , and any (cid:15) > 0 , we have
N ρ ( H, (cid:15) ) ≤ M ρ ( H, (cid:15) ) .
We will also need a lemma about covering a ball by smaller balls.
This is probably also already known, and uses a standard proof (see Pollard, 1990, Lemma 4.1), but we haven’t found a reference for it.
Lemma A.8.
Let
• d be a positive integer, • || · || be a norm • ρ be the metric induced by || · || , and • κ, (cid:15) > 0 .
A ball in R d of radius κ w.r.t.
ρ can be covered by (cid:0) 3 κ(cid:15) (cid:1) d balls of radius (cid:15) .
Proof.
We may assume without loss of generality that κ > (cid:15) .
Let q > 0 be the volume of the unit ball w.r.t.
ρ in R d .
Then the volume of any α -ball with respect to ρ is α d q .
Let B be the ball of radius r in R d .
The (cid:15)/ 2 -balls centered at the members of any (cid:15) -packing of B are disjoint.
Since these centers are contained in B , the balls are contained in a ball of radius κ + (cid:15)/ 2 .
Thus
[Equation]
Solving for M ρ ( B, (cid:15) ) and applying Lemma A.7 completes the proof.
We now prove Lemma 2.3.
Let || · || be the norm witnessing the fact that G is ( B, d ) -Lipschitz parameterized, and let B be the unit ball in R d w.r.t.
|| · || and let ρ be the metric induced by || · || .
Then, for any (cid:15) , an (cid:15)/B -cover of B w.r.t. ρ induces an (cid:15) -cover of G w.r.t. ρ max , so
[Equation]
Applying Lemma A.8, this implies
[Equation]
Then applying Lemma A.3, Lemma A.4 and Lemma A.5 completes the proof.
B P ROOF OF (1)
For δ > 0 , and for each j ∈ N , let β j = 5 × 2 j let δ j =
j 2 .
Taking a union bound over an application of Theorem 2.1 for each value of j , with probability at least 1 − (cid:80) j δ j ≥ 1 − δ , for all j , and all f ∈ F β j E z ∼ P
[ (cid:96) f
( z )] ≤ (1 + η ) E S [ (cid:96) f ( z )] + C ( W ( β j + log( λn ))
+ log( j/δ )) n and E z ∼ P [ (cid:96) f ( z )] ≤ E S [ (cid:96) f
( z )] + C (cid:114) W ( β j + log( λ )) + log( j/δ ) n .
For any K , if we apply these bounds in the case of the least j such that || K − K 0 || σ ≤ β j , we get
E z ∼ P
[ (cid:96) f
( z )] ≤ (1 + η ) E S
[ (cid:96) f
( z )]
+ C ( W (2 || K − K 0 ||
σ + log( λn ))
+ log(log( || K − K 0 || σ ) /δ ))
n and
[Equation]
and simplifying completes the proof.
C T HE OPERATOR NORM OF op( K ( i ) )
Let J = K ( i ) − K
( i ) 0 .
Since || op( K ( i ) )
||
2 = 1 + || op
( J )
|| 2 , it sufﬁces to ﬁnd || op
( J )
|| 2 .
For the rest of this section, we number indices from 0 , let [ d ] = { 0 , ..., d − 1 } , and deﬁne ω
= exp(2 πi/d ) .
To facilitate the application of matrix notation, pad the k × k × c × c tensor J out with zeros to make a d × d × c × c tensor ˜ J .
The following lemma is an immediate consequence of Theorem 6 of Sedghi et al.
Lemma C.1 (Sedghi et al.
Let F be the complex d × d matrix deﬁned by F ij = ω ij .
For each u, v ∈
[ d ] × [ d ] , let P ( u,v ) be the c × c matrix given by P ( u,v ) k(cid:96) =
( F T ˜ J : , : ,k,(cid:96) F ) uv .
Then
[Equation]
First, note that, by symmetry, for each u and v , all components of P ( u,v ) are the same.
Thus,
[Equation]
For any u, v , [Equation] u,
[Equation]
and P (0 , 0)= (cid:15)k 2 .
Combining this with (3) and Lemma C.1, || op( J ) ||
2 = (cid:15)ck 2 , which implies || op( K ) ||
2 = 1 + (cid:15)ck 2 .
D P ROOF OF L EMMA 3.
For each convolutional layer i , let β i
=
||
op( K ( i ) )
− op( K ( i ) 0 )
|| 2 , and, for each fully connected layer i , let γ i
=
||
V ( i ) − V
( i )
|| 2 .
Since (cid:96) is λ -Lipschitz w.r.t.
its ﬁrst argument, we have that | (cid:96) ( f Θ ( x ) , y ) − (cid:96) ( f ˜ Θ ( x ) , y ) | ≤ λ | f Θ ( x ) − f ˜Θ ( x ) | .
Let g up be the function from the inputs to the whole network with parameters Θ to the inputs to the convolution in layer j , and let g down be the function from the output of this convolution to the output of the whole network, so that f Θ = g down ◦
f op( K ( j ) ) ◦ g up .
Choose an input x to the network, and let u
= g up ( x ) .
Recalling that || x || ≤ χ , and that the non-linearities and pooling operations are non-expansive, we have (cid:107) u (cid:107) ≤ χ (cid:89)
i<j (cid:13)(cid:13)(cid:13) op
( K ( i ) )
(cid:13)(cid:13)(cid:13) 2 .
Using the fact that the non-linearities are
[Table]
[Equation]
where the last inequality uses the fact that || op( K ( i ) ) − op( K ( i ) 0 )
||
2 ≤ β i for all i ,
|| V ( i ) − V
( i )
|| 2 ≤ γ i for all i , ||
op( K ( i ) 0 )
|| 2 ≤ 1 + ν for all i and || V ( i )
|| 2 ≤ 1 + ν for all i .
Since (cid:16)(cid:81) i (cid:54) =
j (1 + ν + β i ) (cid:17) ( (cid:81) i (1 + ν + γ i )) ≤ ( (cid:81)
i (1 + ν + β i ))
( (cid:81) i (1 + ν + γ i )) , and the latter is maximized subject to ( (cid:80) i β i )
+ (cid:80) i γ i ≤ β when each summand is β/L , this completes the proof.
E P ROOF OF L EMMA 3.
For each convolutional layer i , let β i
=
||
op( K ( i ) )
− op( K ( i ) 0 )
|| 2 , and, for each fully connected layer i , let γ i
=
||
V ( i ) − V
( i )
|| 2 .
Since (cid:96) is λ -Lipschitz w.r.t.
its ﬁrst argument, we have that | (cid:96) ( f Θ ( x ) , y ) − (cid:96) ( f ˜Θ ( x ) , y ) | ≤ λ | f Θ ( x ) − f ˜Θ ( x ) | .
Let g up be the function from the inputs to the whole network with parameters Θ to the inputs to fully connected layer layer j , and let g down be the function from the output of this layer to the output of the whole network, so that f Θ = g down ◦
f V ( j ) ◦ g up .
Choose an input x to the network, and let u
= g up ( x ) .
Recalling that || x || ≤ χ , and that the non-linearities and pooling operations are non-expansive, we have (cid:107) u (cid:107) ≤ χ (cid:32)(cid:89) i (cid:13)(cid:13)(cid:13) op( K ( i ) )
(cid:13)(cid:13)(cid:13)(cid:33)  (cid:89)
i<j (cid:13)(cid:13)(cid:13) V ( i ) (cid:13)(cid:13)(cid:13)  .
Thus | f Θ ( x ) − f ˜Θ ( x ) | = | g down ( V ( j ) u ) − g down ( ˜ V ( j ) u ) | ≤  (cid:89) i>j (cid:13)(cid:13)(cid:13) V ( i ) (cid:13)(cid:13)(cid:13)  (cid:13)(cid:13)(cid:13) V ( j ) u − ˜ V ( j ) u (cid:13)(cid:13)(cid:13) ≤  (cid:89) i>j (cid:13)(cid:13)(cid:13) V ( i ) (cid:13)(cid:13)(cid:13)  (cid:13)(cid:13)(cid:13) V ( j ) − ˜ V
( j ) (cid:13)(cid:13)(cid:13) 2 (cid:107) u (cid:107) ≤ χ (cid:32)(cid:89) i (cid:13)(cid:13)(cid:13) op ( K ( i ) ) (cid:13)(cid:13)(cid:13)(cid:33)  (cid:89) i (cid:54) =
j (cid:13)(cid:13)(cid:13) V ( i ) (cid:13)(cid:13)(cid:13)  (cid:13)(cid:13)(cid:13) V ( j )
− ˜ V
( j ) (
cid:13)(cid:13)(cid:13)≤ χ (cid:32)(cid:89) i (1 + ν + β i ) (cid:33)   (cid:89) i (cid:54) =
j (1 + ν + γ i ) 
 (cid:13)(cid:13)(cid:13) V ( j ) − ˜ V
( j ) (cid:13)(cid:13)(cid:13) 2 .
Since ( (cid:81) i (1 + ν + β i ))
(cid:16)(cid:81) i (cid:54) =
j (1 + ν + γ i ) (cid:17) ≤ ( (cid:81)
i (1 + ν + β i ))
( (cid:81) i (1 + ν + γ i )) , and the latter is maximized subject to ( (cid:80) i β i )
+ (cid:80) i γ i ≤ β when each summand is β/L , this completes the proof.