T HE ROLE OF OVER - PARAMETRIZATION IN GENERALIZATION OF NEURAL NETWORKS
A BSTRACT
Despite existing work on ensuring generalization of neural networks in terms of scale sensitive complexity measures such as norms, margin and sharpness these complexity measures do not offer an explanation of why neural networks generalize better with over-parametrization.
In this work we suggest a novel complexity measure based on unit-wise capacities resulting in a tighter generalization bound for two layer ReLU networks.
Our capacity bound correlates with the behavior of test error with increasing network sizes (within the range reported in the experiments) and could partly explain the improvement in generalization with over-parametrization.
We further present a matching lower bound for the
Rademacher complexity that improves over previous capacity lower bounds for neural networks
I NTRODUCTION
Deep neural networks have enjoyed great success in learning across a wide variety of tasks.
They played a crucial role in the seminal work of Krizhevsky et al.
(2012), starting an arms race of training larger networks with more hidden units, in pursuit of better test performance (He et al., 2016).
In fact the networks used in practice are over-parametrized to the extent that they can easily ﬁt random labels to the data (Zhang et al., 2017).
Even though they have such a high capacity, when trained with real labels they achieve smaller generalization error.
Traditional wisdom in learning suggests that using models with increasing capacity will result in overﬁtting to the training data.
Hence capacity of the models is generally controlled either by limiting the size of the model (number of parameters) or by adding an explicit regularization, to prevent from overﬁtting to the training data.
Surprisingly, in the case of neural networks we notice that increasing the model size only helps in improving the generalization error, even when the networks are trained without any explicit regularization - weight decay or early stopping (Lawrence et al., 1998;
Srivastava et al., 2014; Neyshabur et al., 2015c).
In particular, Neyshabur et al.
(2015c) observed that training on models with increasing number of hidden units lead to decrease in the test error for image classiﬁcation on MNIST and CIFAR-10.
Similar empirical observations have been made over a wide range of architectural and hyper-parameter choices (Liang et al., 2017;
Novak et al., 2018; Lee et al., 2018).
What explains this improvement in generalization with over-parametrization?
What is the right measure of complexity of neural networks that captures this generalization phenomenon?
Complexity measures that depend on the total number of parameters of the network, such as VC bounds, do not capture this behavior as they increase with the size of the network.
Existing works suggested different norm, margin and sharpness based measures, to measure the capacity of neural networks, in an attempt to explain the generalization behavior observed in practice (Neyshabur et al., 2015b; Keskar et al., 2017; Dziugaite & Roy, 2017; Neyshabur et al., 2017; Bartlett et al., 2017;
[Figure]
Neyshabur et al., 2018; Golowich et al., 2018; Arora et al., 2018).
In particular, Bartlett et al.
(2017) showed a margin based generalization bound that depends on the spectral norm and (cid:96) 1 , 2 norm of the layers of a network.
However, as shown in Neyshabur et al.
(2017) and
in Figure 5, these complexity measures fail to explain why over-parametrization helps, and in fact increase with the size of the network.
Dziugaite & Roy (2017) numerically evaluated a generalization bound based on PAC-Bayes.
Their reported numerical generalization bounds also increase with the increasing network size.
These existing complexity measures increase with the size of the network, even for two layer networks, as they depend on the number of hidden units either explicitly, or the norms in their measures implicitly depend on the number of hidden units for the networks used in practice (Neyshabur et al., 2017)
(see
Figures 3 and 5).
To study and analyze this phenomenon more carefully, we need to simplify the architecture making sure that the property of interest is preserved after the simpliﬁcation.
We therefore chose two layer
ReLU networks since as shown in the left and middle panel of Figure 1, it exhibits the same behavior with over-parametrization as the more complex pre-activation ResNet18 architecture.
In this paper we prove a tighter generalization bound (Theorem 2) for two layer ReLU networks.
Our capacity bound, unlike existing bounds, correlates with the test error and decreases with the increasing number of hidden units, in the experimental range considered.
Our key insight is to characterize complexity at a unit level, and as we see in the right panel in Figure 1 these unit level measures shrink at a rate faster than 1 / √ h for each hidden unit, decreasing the overall measure as the network size increases.
When measured in terms of layer norms, our generalization bound depends on the Frobenius norm of the top layer and the Frobenius norm of the difference of the hidden layer weights with the initialization, which decreases with increasing network size (see Figure 2).
The closeness of learned weights to initialization in the over-parametrized setting can be understood by considering the limiting case as the number of hidden units go to inﬁnity, as considered in Bengio et al.
(2006) and Bach (2017).
In this extreme setting, just training the top layer of the network, which is a convex optimization problem for convex losses, will result in minimizing the training error, as the randomly initialized hidden layer has all possible features.
Intuitively, the large number of hidden units here represent all possible features and hence the optimization problem involves just picking the right features that will minimize the training loss.
This suggests that as we over-parametrize the networks, the optimization algorithms need to do less work in tuning the weights of the hidden units to ﬁnd the right solution.
Dziugaite & Roy (2017) indeed have numerically evaluated a PAC-Bayes measure from the initialization used by the algorithms and state that the Euclidean distance to the initialization is smaller than the Frobenius norm of the parameters.
Nagarajan & Kolter (2017) also make a similar empirical observation on the signiﬁcant role of initialization, and in fact prove an initialization dependent generalization bound for linear networks.
However they do not prove a similar generalization bound for neural networks.
Alternatively, Liang et al.
(2017) suggested a
Fisher-Rao metric based complexity measure that correlates with generalization behavior in larger networks, but they also prove the capacity bound only for linear networks.
Contributions: Our contributions in this paper are as follows.
• We empirically investigate the role of over-parametrization in generalization of neural networks on 3 different datasets (MNIST, CIFAR10 and SVHN), and show that the existing complexity measures increase with the number of hidden units - hence do not explain the generalization behavior with over-parametrization.
• We prove tighter generalization bounds (Theorem 2) for two layer ReLU networks, improving over previous results.
Our proposed complexity measure for neural networks decreases with the increasing number of hidden units, in the experimental range considered (see Section 2), and can potentially explain the effect of over-parametrization on generalization of neural networks.
• We provide a matching lower bound for the Rademacher complexity of two layer ReLU networks with a scalar output.
Our lower bound considerably improves over the best known bound given in Bartlett et al.
(2017), and to our knowledge is the ﬁrst such lower bound that is bigger than the Lipschitz constant of the network class.
1. P RELIMINARIES
We consider two layer fully connected ReLU networks with input dimension d , output dimension c , and the number of hidden units h .
Output of a network is f V , U ( x ) =
V [ Ux ] + 1 where x ∈ R d ,
U ∈ R h × d and V ∈ R c × h .
We denote the incoming weights to the hidden unit i by u i and the outgoing weights from hidden unit i by v i .
Therefore u i corresponds to row i of matrix U and v i corresponds to the column i of matrix V .
We consider the c -class classiﬁcation task where the label with maximum output score will be selected as the prediction.
Following Bartlett et al.
(2017), we deﬁne the margin operator µ : R c × [ c ] → R as a function that given the scores f ( x ) ∈ R c for each label and the correct label y ∈ [ c ] , it returns the difference between the score of the correct label and the maximum score among other labels, i.e. µ ( f ( x ) , y ) =
f ( x )[ y ] − max i (cid:54) =
y f ( x )[ i ] .
We now deﬁne the ramp loss as follows:
[Equation]
For any distribution D and margin γ > 0 , we deﬁne the expected margin loss of a predictor f ( . ) as
L γ ( f ) =
P ( x ,y ) ∼D [ (cid:96) γ ( f ( x ) , y )] .
The loss L γ ( . ) deﬁned this way is bounded between 0 and 1.
We use ˆ L γ ( f ) to denote the empirical estimate of the above expected margin loss.
As setting γ =reduces the above to classiﬁcation loss, we will use L 0 ( f ) and ˆ L 0 ( f ) to refer to the expected risk and the training error respectively.
G ENERALIZATION OF T WO L AYER R E LU N ETWORKS
For any function class F , let (cid:96) γ ◦ F denote the function class corresponding to the composition of the loss function and functions from class F .
With probability 1 − δ over the choice of the training set of size m , the following generalization bound holds for any function f ∈ F (Mohri et al., 2012,
Theorem 3.1):
[Equation]
where R S ( H ) is the Rademacher complexity of a class H of functions with respect to the training set
S which is deﬁned as:
[Equation]
[Figure]
e n s i t y
[Figure]
r o
[Figure]
t
[Figure]
n s i t y 642561K4K16K32K
Rademacher complexity is a capacity measure that captures the ability of functions in a function class to ﬁt random labels which increases with the complexity of the class.
2. A N E MPIRICAL I NVESTIGATION
We will bound the Rademacher complexity of neural networks to get a bound on the generalization error.
Since the Rademacher complexity depends on the function class considered, we need to choose the right function class that only captures the real trained networks, which is potentially much smaller than networks with all possible weights, to get a complexity measure that explains the decrease in generalization error with increasing width.
Choosing a bigger function class can result in weaker capacity bounds that do not capture this phenomenon.
Towards that we ﬁrst investigate the behavior of different measures of network layers with increasing number of hidden units.
The experiments discussed below are done on the CIFAR-10 dataset.
Please see Section A for similar observations on
SVHN and MNIST datasets.
First layer: As we see in the second panel in Figure 2 even though the spectral and Frobenius norms of the learned layer decrease initially, they eventually increase with h , with Frobenius norm increasing at a faster rate.
However the distance Frobenius norm, measured w.r.t.
initialization ( (cid:107) U − U 0 (cid:107) F ), decreases.
This suggests that the increase in the Frobenius norm of the weights in larger networks is due to the increase in the Frobenius norm of the random initialization.
To understand this behavior in more detail we also plot the distance to initialization per unit and the distribution of angles between learned weights and initial weights in the last two panels of Figure 2.
We indeed observe that per unit distance to initialization decreases with increasing h , and a signiﬁcant shift in the distribution of angles to initial points, from being almost orthogonal in small networks to almost aligned in large networks.
This per unit distance to initialization is a key quantity that appears in our capacity bounds and we refer to it as unit capacity in the remainder of the paper.
Unit capacity.
We deﬁne β i = (cid:13) (cid:13) u
i − u
i (cid:13) (cid:13) 2 as the unit capacity of the hidden unit i .
Second layer: Similar to ﬁrst layer, we look at the behavior of different measures of the second layer of the trained networks with increasing h in the ﬁrst panel of Figure 2.
Here, unlike the ﬁrst layer, we notice that Frobenius norm and distance to initialization both decrease and are quite close suggesting a limited role of initialization for this layer.
Moreover, as the size grows, since the Frobenius norm (cid:107) V (cid:107) F of the second layer slightly decreases, we can argue that the norm of outgoing weights v i from a hidden unit i decreases with a rate faster than 1 / √ h .
If we think of each hidden unit as a linear separator and the top layer as an ensemble over classiﬁers, this means the impact of each classiﬁer on the ﬁnal decision is shrinking with a rate faster than 1 / √ h .
This per unit measure again plays an important role and we deﬁne it as unit impact for the remainder of this paper.
Unit impact.
We deﬁne α i = (cid:107)
v
i
(cid:107)
as the unit impact, which is the magnitude of the outgoing weights from the unit i .
Motivated by our empirical observations we consider the following class of two layer neural networks that depend on the capacity and impact of the hidden units of a network.
Let W be the following restricted set of parameters:
[Equation]
We now consider the hypothesis class of neural networks represented using parameters in the set W :
[Equation]
Our empirical observations indicate that networks we learn from real data have bounded unit capacity and unit impact and therefore studying the generalization behavior of the above function class can potentially provide us with a better understanding of these networks.
Given the above function class, we will now study its generalization properties.
2. G ENERALIZATION B OUND
In this section we prove a generalization bound for two layer ReLU networks.
We ﬁrst bound the
Rademacher complexity of the class F W in terms of the sum over hidden units of the product of unit capacity and unit impact.
Combining this with the equation (2) will give us the generalization bound.
Theorem 1.
Given a training set S = { x i } mi =1 and γ > 0 , Rademacher complexity of the composition of loss function (cid:96) γ over the class F W deﬁned in equations (4) and (5) is bounded as follows:
[Equation]
The proof is given in the supplementary Section C.
The main idea behind the proof is a new technique to decompose the complexity of the network into complexity of the hidden units.
To our knowledge, all previous works decompose the complexity to that of layers and use Lipschitz property of the network to bound the generalization error.
However, Lipschitzness of the layer is a rather weak property that ignores the linear structure of each individual layer.
Instead, by decomposing the complexity across the hidden units, we get the above tighter bound on the Rademacher complexity of the two layer neural networks.
The generalization bound in Theorem 1 is for any function in the function class deﬁned by a speciﬁc choice of α and β ﬁxed before the training procedure.
To get a generalization bound that holds for all networks, it sufﬁces to cover the space of possible values for α and β and take a union bound over it.
The following theorem states the generalization bound for any two layer ReLU network 2 .
Theorem 2.
For any h ≥ 2 , γ > 0 , δ ∈ (0 , 1) and U 0 ∈ R h × d , with probability 1 − δ over the choice of the training set S
= { x i } mi =1 ⊂ R d , for any function f ( x ) =
V [ Ux ] + such that V ∈ R c × h and U ∈ R h × d , the generalization error is bounded as follows:
[Equation]
U
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
+ (cid:114) h m 
 .
The above generalization bound empirically improves over the existing bounds, and decreases with increasing width for networks learned in practice (see Section 2.3).
We also show an explicit lower bound for the Rademacher complexity (Theorem 3), matching the ﬁrst term in the above generalization bound, thereby showing its tightness.
The additive factor ˜ O ( (cid:112) h/m ) in the above bound is the result of taking the union bound over the cover of α and β .
As we see in Figure 5, in the regimes of interest this additive term is small and does not dominate the ﬁrst term, resulting in an overall decrease in capacity with over-parametrization.
In Appendix Section B, we further extend the generalization bound in Theorem 2 to (cid:96) p norms, presenting a ﬁner tradeoff between the two terms.
2. C OMPARISON WITH E XISTING R ESULTS
In table 1 we compare our result with the existing generalization bounds, presented for the simpler setting of two layer networks.
In comparison with the bound
[Table]
[Figure]
[Table]
[Figure]
˜Θ (cid:16) (cid:107) U (cid:107) 2 (cid:107) V − V 0 (cid:107) 1 , 2 + (cid:107) U − U 0 (cid:107) 1 , 2 (cid:107) V (cid:107) 2 (cid:17) (Bartlett et al., 2017; Golowich et al., 2018):
The ﬁrst term in their bound (cid:107) U (cid:107) 2 (cid:107) V − V
(cid:107) 1 , 2 is of smaller magnitude and behaves roughly similar to the ﬁrst term in our bound (cid:107) U 0 (cid:107) 2 (cid:107) V (cid:107) F
(see Figure 3 last two panels).
The key complexity term in their bound is (cid:107) U − U 0 (cid:107) 1 , 2 (cid:107) V (cid:107) 2 , and in our bound is (cid:13)(cid:13)
U − U
(cid:13)(cid:13) F (cid:107) V (cid:107) F , for the range of h considered.
(cid:107) V (cid:107) 2 and (cid:107) V (cid:107) F differ by number of classes, a small constant, and hence behave similarly.
However, (cid:107) U − U 0 (cid:107) 1 , 2 can be as big as √ h · (cid:13)(cid:13)
U − U
(cid:13)(cid:13) F when most hidden units have similar capacity.
Infact their bound increases with h mainly because of this term (cid:107) U − U 0 (cid:107) 1 , 2 .
As we see in the ﬁrst and second panels of Figure 3, (cid:96) 1 norm terms appearing in Bartlett & Mendelson (2002); Bartlett et al.
(2017); Golowich et al.
(2018) over hidden units increase with the number of units as the hidden layers learned in practice are usually dense.
Neyshabur et al.
(2015b)
; Golowich et al.
(2018) showed a bound depending on the product of Frobenius norms of layers, which increases with h , showing the important role of initialization in our bounds.
In fact the proof technique of
Neyshabur et al.
(2015b) does not allow for getting a bound with norms measured from initialization, and our new decomposition approach is the key for the tighter bound.
Experimental comparison.
We train two layer ReLU networks of size h on CIFAR-10 and SVHN datasets with values of h ranging from 2 6 to 2 15 .
The training and test error for CIFAR-10 are shown in the ﬁrst panel of Figure 1, and for SVHN in the left panel of Figure 4.
We observe for both datasets that even though a network of size 128 is enough to get to zero training error, networks with sizes well beyond 128 can still get better generalization, even when trained without any regularization.
We further measure the unit-wise properties introduce in the paper, namely unit capacity and unit impact.
These quantities decrease with increasing h , and are reported in the right panel of Figureand second panel of Figure 4.
Also notice that the number of epochs required for each network size to get 0.01 cross-entropy loss decreases for larger networks as shown in the third panel of Figure 4.
For the same experimental setup, Figure 5 compares the behavior of different capacity bounds over networks of increasing sizes.
Generalization bounds typically scale as (cid:112) C/m where C is the effective capacity of the function class.
The left panel reports the effective capacity C based on different measures calculated with all the terms and constants.
We can see that our bound is the only that decreases with h and is consistently lower that other norm-based data-independent bounds.
Our bound even improves over VC-dimension for networks with size larger than 1024.
While the actual numerical values are very loose, we believe they are useful tools to understand the relative generalization behavior with respect to different complexity measures, and in many cases applying a set of data-dependent techniques, one can improve the numerical values of these bounds signiﬁcantly (Dziugaite & Roy, 2017; Arora et al., 2018).
In the middle and right panel we presented
[Figure] [Figure]
each capacity bound normalized by its maximum in the range of the study for networks trained on CIFAR-10 and SVHN respectively.
For both datasets, our capacity bound is the only one that decreases with the size even for networks with about 100 million parameters.
All other existing norm-based bounds initially decrease for smaller networks but then increase signiﬁcantly for larger networks.
Our capacity bound therefore could potentially point to the right properties that allow the over-parametrized networks to generalize.
Finally we check the behavior of our complexity measure under a different setting where we compare this measure between networks trained on real and random labels (Neyshabur et al., 2017; Bartlett et al., 2017).
We plot the distribution of margin normalized by our measure, computed on networks trained with true and random labels in the last panel of Figure 4 - and as expected they correlate well with the generalization behavior.
L OWER B OUND
In this section we will prove a lower bound for the Rademacher complexity of neural networks, that matches the dominant term in the upper bound of Theorem 1.
We will show our lower bound on a smaller function class than F W , with an additional constraint on spectral norm of the hidden layer.
This allows for comparison with the existing results, and also extends the lower bound to the bigger class F W .
Theorem 3.
Deﬁne the parameter set
[Equation]
and let F W (cid:48) be the function class deﬁned on W (cid:48) by equation (5) .
Then, for any d = h ≤ m , { α j , β j } hj =1 ⊂ R + and U 0 = 0 , there exists S
= { x i } mi =
⊂ R d , such that
[Equation]
m (cid:33) .
Clearly, W (cid:48) ⊆ W , since it has an extra constraint.
The complete proof is given in the supplementary
Section C.3.
The above complexity lower bound matches the ﬁrst term,
[Equation]
, in the upper bound of
Theorem 1, upto 1 γ , which comes from the 1 γ -Lipschitz constant of the ramp loss l γ .
To match the second term in the upper bound for Theorem 1, consider the setting with c = 1 and β = 0 , resulting in,
[Equation]
where F V = { f ( x ) = Vx | V ∈ R 1 × h , (cid:107) v j (cid:107) ≤ α j } .
In other words, when β = 0 , the function class F W (cid:48) on S = { x i } mi =1 is equivalent to the linear function class F V on [ U 0 ◦ S ]
+ =
[ U 0 x i ] + } mi =1 , and therefore we have the above lower bound, showing that the upper bound provided in Theorem 1 is tight.
It also indicates that even if we have more information, such as bounded spectral norm with respect to the reference matrix is small (which effectively bounds the Lipschitz of the network), we still cannot improve our upper bound.
To our knowledge, all the previous capacity lower bounds for spectral norm bounded classes of neural networks with a scalar output and element-wise activation functions correspond to the Lipschitz constant of the network.
Our lower bound strictly improves over this, and shows a gap between the
Lipschitz constant of the network (which can be achieved by even linear models), and the capacity of neural networks.
This lower bound is non-trivial, in the sense that the smaller function class excludes the neural networks with all rank-1 matrices as weights, and thus shows a Θ( √ h ) -capacity gap between the neural networks with ReLU activations and linear networks.
The lower bound therefore does not hold for linear networks.
Finally, one can extend the construction in this bound to more layers by setting all the weight matrices in the intermediate layers to be the Identity matrix.
Comparison with existing results.
Bartlett et al.
(2017) have proved a Rademacher complexity lower bound of Ω (cid:16) s 1 s 2 (cid:107) X (cid:107) F m (cid:17) for the function class deﬁned by the parameter set:
[Equation]
Note that s 1 s 2 is the Lipschitz bound of the function class F W spec .
Given W spec with bounds s 1 and s 2 , choosing α and β such that (cid:107) α (cid:107)
= s 1 and max i ∈
[ h ] β i =
s 2 results in W (cid:48)
⊂ W spec .
Hence we get the following result from Theorem 3, showing a stronger lower bound for this function class as well.
Corollary 4.
∀ h
=
[Equation]
m such that R
[Equation]
Hence our result improves the lower bound in Bartlett et al.
(2017) by a factor of √ h .
Theoremin Golowich
et al.
(2018) also gives a Ω( s 1 s 2 √ c ) lower bound, c is the number of outputs of the network, for the composition of 1-Lipschitz loss function and neural networks with bounded spectral norm, or ∞ -Schatten norm.
Our above result even improves on this lower bound.
D ISCUSSION
In this paper we present a new capacity bound for neural networks that empirically decreases with the increasing number of hidden units, and could potentially explain the better generalization performance of larger networks.
In particular, we focused on understanding the role of width in the generalization behavior of two layer networks.
More generally, understanding the role of depth and the interplay between depth and width in controlling capacity of networks, remain interesting directions for future study.
We also provided a matching lower bound for the capacity improving on the current lower bounds for neural networks.
While these bounds are useful for relative comparison between networks of different size, their absolute values still remain larger than the number of training samples, and it is of interest to get bounds with numerically smaller values.
In this paper we do not address the question of whether optimization algorithms converge to low complexity networks in the function class considered in this paper, or in general how does different hyper parameter choices affect the complexity of the recovered solutions.
It is interesting to understand the implicit regularization effects of the optimization algorithms (Neyshabur et al., 2015a; Gunasekar et al., 2017; Soudry et al., 2018) for neural networks, which we leave for future work.
A CKNOWLEDGEMENTS
The authors thank Sanjeev Arora for many fruitful discussions on generalization of neural networks and David McAllester for discussion on the distance to random initialization. The authors also thank
Wei Zhan for discussion on the lower bound.
This research was supported in part by NSF IIS-RI award 1302662 and Schmidt Foundation.
A E XPERIMENTS A. E XPERIMENTS S ETTINGS
Below we describe the setting for each reported experiment.
ResNet
In this experiment, we trained a pre-activation ResNet18 architecture on CIFARdataset.
The architecture consists of a convolution layer followed by 8 residual blocks (each of which consist of two convolution) and a linear layer on the top.
Let k be the number of channels in the ﬁrst convolution layer.
The number of output channels and strides in residual blocks is then [ k, k, 2 k, 2 k, 4 k, 4 k, 8 k, 8 k ] and [1 , 1 , 1 , 2 , 1 , 2 , 1 , 2] respectively.
Finally, we use the kernel sizesin all convolutional layers.
We train 11 architectures where for architecture i we set k
=
(cid:100) 2 2+ i/ 2 (cid:101) .
In each experiment we train using SGD with mini-batch size 64, momentum 0.9 and initial learning rate 0.1 where we reduce the learning rate to 0.01 when the cross-entropy loss reaches 0.01 and stop when the loss reaches 0.001 or if the number of epochs reaches 1000.
We use the reference line in the plots to differentiate the architectures that achieved 0.001 loss.
We do not use weight decay or dropout but perform data augmentation by random horizontal ﬂip of the image and random crop of size 28 × 28 followed by zero padding.
Two Layer ReLU Networks We trained fully connected feedforward networks on CIFAR-10,
SVHN and MNIST datasets.
For each data set, we trained 13 architectures with sizes from 2 3 to 2each time increasing the number of hidden units by factor 2.
For each experiment, we trained the network using SGD with mini-batch size 64, momentum 0.9 and ﬁxed step size 0.01 for MNIST and 0.001 for CIFAR-10 and SVHN.
We did not use weight decay, dropout or batch normalization.
For experiment, we stopped the training when the cross-entropy reached 0.01 or when the number of epochs reached 1000.
We use the reference line in the plots to differentiate the architectures that achieved 0.01 loss.
Evaluations For each generalization bound, we have calculated the exact bound including the logterms and constants.
We set the margin to 5 th percentile of the margin of data points.
Since bounds in Bartlett & Mendelson (2002) and Neyshabur et al.
(2015c) are given for binary classiﬁcation, we multiplied Bartlett & Mendelson (2002) by factor c and Neyshabur et al.
(2015c) by factor √ c to make sure that the bound increases linearly with the number of classes (assuming that all output units have the same norm).
Furthermore, since the reference matrices can be used in the bounds given in Bartlett et al.
(2017) and Neyshabur et al.
(2018), we used random initialization as the reference matrix.
When plotting distributions, we estimate the distribution using standard Gaussian kernel density estimation.
A. S UPPLEMENTARY F IGURES
Figures 6 and 7 show the behavior of several measures on networks with different sizes trained on
SVHN and MNIST datasets respectively.
The left panel of Figure 8 shows the over-parametrization phenomenon in MNSIT dataset and the middle and right panels compare our generalization bound to others.
[Figure] [Figure]
[Figure]
B E XTENDING THE G ENERALIZATION B OUND TO (cid:96) p N ORM
In this section we generalize the Theorem 2 to (cid:96) p norm.
The main new ingredient in the proof is the
Lemma
[Figure]
in which we construct a cover for the (cid:96) p ball with entry-wise dominance.
Theorem 5.
For any h, p ≥ 2 , γ > 0 , δ ∈ (0 , 1) and U 0 ∈ R h × d , with probability 1 − δ over the choice of the training set S
= { x i } mi =1 ⊂ R d , for any function f ( x ) =
V [ Ux ] + such that V ∈ R c × h and U ∈ R h × d , the generalization error is bounded as follows:
[Equation]
where (cid:107) .
(cid:107) p, 2 is the (cid:96) p norm of the row (cid:96) 2 norms.
For p of order ln h , (cid:113) he − p
≈ constant improves on the √ h additive term in Theorem 2 and
[Equation]
V T (cid:13)(cid:13)
ln h, 2 which is a tight upper bound for (cid:107) V (cid:107) F and is of the same order if all rows of V have the same norm - hence giving a tighter bound that decreases with h for larger values.
In particular for p
=
ln h
we get the following bound.
Corollary 6.
Under the settings of Theorem 5, with probability 1 − δ over the choice of the training set S = { x i } mi =1 , for any function f ( x ) =
V [ Ux ] + , the generalization error is bounded as follows:
[Equation]

[Table]
γm 

[Table]
 
[Table]
γ √ m   .
C P ROOFS C. P ROOF OF T HEOREM
We start by stating a simple lemma which is a vector-contraction inequality for Rademacher complexities and relates the norm of a vector to the expected magnitude of its inner product with a vector of Rademacher random variables.
We use the following technical result from Maurer (2016) in our proof.
Lemma 7 (Propostion 6 of Maurer (2016)) .
Let ξ i be the Rademacher random variables.
For any vector v ∈ R d , the following holds:
[Equation]
The above lemma can be useful to get Rademacher complexities in multi-class settings.
The below lemma bounds the Rademacher-like complexity term for linear operators with multiple output centered around a reference matrix.
The proof is very simple and similar to that of linear separators.
See
Bartlett & Mendelson (2002) for similar arguments.
Lemma 8.
For any positive integer c , positive scaler r > 0 , reference matrix V 0 ∈ R c × d and set { x i } mi =1 ⊂ R d , the following inequality holds:
[Equation]
Proof.
[Equation]
sup (cid:107) V − V 0 (cid:107) F ≤ r (cid:42)
V , m (cid:88) i =
ξ i x (cid:62) i (cid:43)(cid:35) =
E ξ i
[Equation] [Equation]
1 } c
[Equation]
i ∈ [ m ] (cid:34) sup (cid:107) V − V 0 (cid:107) F ≤ r (cid:42)
V − V
[Equation]
V 0 , m (cid:88) i =
[Equation]
i x (cid:62) i (cid:43)(cid:35) =
[Equation]
] (cid:34) sup (cid:107)
[Equation]
− V 0 (cid:107) F
[Equation]
r (cid:42)
V
[Equation]
V 0 , m (cid:88) i =
[Equation]
(cid:62)
[Equation]
(cid:43)(cid:35)
+
E
[Equation]
i
[Equation] [Equation]
1 } c
[Equation]
i
[Equation]
[ m ] (cid:34)
[Equation]
(cid:107) V
[Equation]
V 0 (cid:107)
[Equation]
r (cid:42)
V 0 , m (cid:88) i =
ξ i x (cid:62) i (cid:43)(cid:35) =
[Equation]
m ] (cid:34)
[Equation]
(cid:107)
[Equation]
(cid:107) F
[Equation]
r (cid:42)
V
[Equation]
V 0 , m (cid:88) i =
[Equation]
(cid:62) i (cid:43)(cid:35)
+
[Equation]
[ m ] (cid:34)(cid:42)
V 0 , m (cid:88)
i
[Equation]
ξ
[Equation]
(cid:62)
[Equation]
(cid:43)(cid:35)
[Equation]
V − V 0 (cid:107) F ≤ r (cid:42)
V − V 0 , m (cid:88) i =
ξ i x (cid:62) i (cid:43)(cid:35) ≤ r
E ξ i ∈{± 1 } c ,i ∈ [ m ] (cid:34)(cid:13)(cid:13)(cid:13)(cid:13)(cid:13) m (cid:88) i =
ξ i x (cid:62) i (cid:13)(cid:13)(cid:13)(cid:13)(cid:13)
F (cid:35) ( i ) ≤ r
E ξ i ∈{± 1 } c ,i ∈ [ m ]   (cid:13)(cid:13)(cid:13)(cid:13)(cid:13) m (cid:88) i =
ξ i x (cid:62) i (cid:13)(cid:13)(cid:13)(cid:13)(cid:13)
F   1 /= r   c (cid:88) j =
E ξ ∈{± 1 } m  
(cid:13) (cid:13)(cid:13)(cid:13)(cid:13) m (cid:88) i =
ξ i x (cid:62) i (cid:13)(cid:13)(cid:13)(cid:13)(cid:13)
F   
 1 /= r √ c (cid:107) X (cid:107) F .
We next show that the Rademacher complexity of the class of networks deﬁned in (5) and (4) can be decomposed to that of hidden units.
Lemma 9 (Rademacher Decomposition) .
Given a training set S = { x i } mi =1 and γ > 0 , Rademacher complexity of the class F W deﬁned in equations (5) and (4) is bounded as follows:
[Equation]
Proof.
We prove the inequality in the lemma statement using induction on t in the following inequality:
[Equation]
where for simplicity of the notation
[Equation]
we let φ t
[Equation]
mi = t +1 ξ i 1 (cid:96) γ ( V
[ Ux i ] + , y i ) .
The above statement holds trivially for the base case of t = 1 by the deﬁnition of the Rademacher complexity (3).
We now assume that it is true for any t (cid:48) ≤ t and prove it is true for t (cid:48)
=
t + 1 .
[Equation]
The last inequality follows from the √ 2 γ
Lipschitzness of the ramp loss.
The ramp loss is 1 /γ
Lipschitz with respect to each dimension but since the loss at each point only depends on score of the correct labels and the maximum score among other labels, it is √ 2 γ -Lipschitz.
By Lemma 7, the right hand side of the above inequality can be bounded as follows:
[Equation]
E
[Equation]
[Table]
[Equation] [Equation]
[Table]
[Equation]
[Table] [Table]
|
[Table]
[Equation]
[Table] [Table]
=
E
[Equation] [Equation] [Table] [Equation]
[Table] [Equation] [Table] [Equation]
[Table] [Equation] [Table] =
E
[Table] [Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Table]
[Equation]
[Table]
=
E
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
γ
[Equation]
[Table]
j
[Table]
(cid:104)
[Table]
t
[Equation]
v j
[Table] [Table]
u j , x t
[Table]
] + +
[Equation]
[Table] [Table]
=
E
[Equation]
i
[Equation]
1 } c ,i
[Equation]
[ m ] (cid:34) sup ( V , U ) ∈W γ t (cid:88) i
= h (cid:88)
j = (cid:104)
ξ i , v j (cid:105) [ (cid:104) u
j , x i (cid:105) ] + +
[Equation]
This completes the induction proof.
Lemma 10 (Ledoux-Talagrand contraction, Ledoux & Talagrand (1991)) .
Let f : R + → R + be convex and increasing.
Let φ i : R → R satisfy φ i (0)
=
and be L -Lipschitz.
Let ξ i be independent
Rademacher random variables.
For any T ⊆ R n ,
[Equation]
The above lemma will be used in the following proof of Theorem 1.
Proof of Theorem 1.
By Lemma 9, we have:
[Table]
m (cid:88) i
=
[ (cid:104)
u j , x i (cid:105) ]
+ ξ i , (cid:15) (cid:43)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12) (cid:35) =
√
α j
E ξ i ∈{± 1 } c ,i ∈ [ m ] (cid:34) sup (cid:107) u j − u 0 j (cid:107) 2 ≤ β j (cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:42) m (cid:88) i =
[Table]
[ (cid:104) u j , x i
[Table]
+ ξ i ,
[Table]
(cid:35) =
√
α j
E ξ i ∈{± 1 } c ,i ∈ [ m ] (cid:34) sup (cid:107) u j
[Table]
j
[Table]
2 ≤ β j (cid:12)(cid:12)(cid:12)(cid:12)(cid:12) m
[Table]
=
[Table]
c
[Table]
=
[Table] [Table]
u j , x i
[Table]
] +
[Table]
ik (cid:12)(cid:12)(cid:12)(cid:12)(cid:12) (cid:35)
Now we can apply Lemma 10 with n = m × c, f ( x ) = x, T = { ( t ik ) m,ci,k =1 , 1 | t ik = (cid:104)
u j , x i (cid:105)} , φ ik ( x ) =
[ x ] + , ∀ i ∈ [ m ] , k ∈
[ c ] , and we get √ 2 α j
E ξ i ∈{± 1 } c ,i ∈ [ m ] (cid:34)
[Table]
The proof is completed by taking sum of above inequality over j from 1 to h .
C. P ROOF OF T HEOREMS 2 AND
We start by the following covering lemma which allows us to prove the generalization bound in
Theorem 5 without assuming the knowledge of the norms of the network parameters.
The following lemma shows how to cover an (cid:96) p ball with a set that dominates the elements
entry-wise, and bounds the size of a one such cover.
Lemma 11 ( (cid:96) p covering lemma) .
Given any (cid:15), D, β > 0 , p ≥ 2 , consider the set S Dp,β = { x ∈ R D
| (cid:107) x
(cid:107) p ≤ β } .
Then there exist N sets { T i } Ni =1 of the form T i = { x ∈ R D | | x j | ≤ α ij , ∀ j ∈
[ D ] } such that S Dp,β ⊆ (cid:83) Ni =1 T i and (cid:13)(cid:13)
α i (cid:13)(cid:13) 2 ≤ D 1 /p − 1 / 2 β (1 + (cid:15) ) , ∀ i ∈ [ N ] where N = (cid:0) K + D − 1 D − 1 (cid:1) and
K = (cid:24)
D (1 + (cid:15) ) p −(cid:25) .
Proof.
We prove the lemma by construction.
Consider the set
Q =
[Equation]
α
[Equation] [Equation]
α (cid:107) pp = β p (1 + D/K ) (cid:111) .
For any x ∈ S D p,β , consider α (cid:48) such that for any i ∈
[ D ] , α (cid:48) i =
[Equation]
It is clear that | x i | ≤ α (cid:48) i .
Moreover, we have:
[Equation]
It is not possible to conclude α (cid:48) ∈ Q from the above inequality since (cid:107) α (cid:107) pp is not necessarily equal to β p (cid:0) 1 + DK (cid:1) .
However, it is possible to increase the magnitude of the last dimension of α to grow its norm to the desired value.
Let α (cid:48)(cid:48)
i = α (cid:48)
i for i ∈
[ D − 1] and α (cid:48)(cid:48) D = (cid:18)
β p
[Equation] [Equation]
p .
Therefore, we have α (cid:48)(cid:48) ∈ Q and for any i ∈
[ D ] , | x i | ≤ α (cid:48)
i ≤ α (cid:48)(cid:48) i .
Furthermore for any α ∈ Q , we have:
[Equation]
where the ﬁrst inequality is based on relationship between (cid:96) 2 and (cid:96) p and the rest follows from deﬁnition of Q and K .
Therefore, to complete the proof, we only need to bound the size of the set Q .
The size of the set Q is equal to the number of unique solutions for the problem (cid:80) Di
=1 z i = K
+ D for non-zero integer variables
z i , which is (cid:0) K + D − 1 D − 1 (cid:1) .
Lemma 12.
For any h, p ≥ 2 , d, c, γ, µ > 0 , δ ∈ (0 , 1) and U 0 ∈ R h × d , with probability 1 − δ over the choice of the training set S
= { x i } mi =1 ⊂ R d , for any function f ( x ) =
V [ Ux ] + , such that
V ∈ R
[Equation]
× h , U ∈ R
[Equation]
× d , (cid:107) V
[Equation]
p, 2 ≤ C 1 , (cid:107) U − U 0 (cid:107) p, 2 ≤ C 2 , the generalization error is bounded as follows:
[Equation]
where N p,h = (cid:0) (cid:100) h/µ (cid:101) + h − 2 h −(cid:1) and (cid:107) .
(cid:107) p, 2 is the (cid:96) p norm of the column (cid:96) 2 norms.
Proof.
The proof of this lemma follows from using the result of Theorem 1 and taking a union bound to cover all the possible values of { V | (cid:107) V (cid:107) p, 2 ≤ C 1 } and U =
{ U | (cid:13)(cid:13)
U − U
(cid:13)(cid:13) p, 2 ≤ C 2 } .
Note that ∀ x ∈ R h and p ≥ 2 , we have (cid:107) x (cid:107) 2 ≤ h 12 − 1 p (cid:107) x
(cid:107) p .
Recall the result of Theorem 1, given any ﬁxed α , β , we have
[Equation]
By Lemma 11, picking (cid:15) =
((1 + µ ) 1 /p − 1) , we can ﬁnd a set of vectors, { α i } N p,h i =1 , where
K = (cid:108) hµ (cid:109) , N p,h = (cid:0) K + h − 2 h − 1 (cid:1) such that ∀ x , (cid:107) x (cid:107) p
≤ C 1 , ∃ 1 ≤ i ≤ N p,h , x j ≤ α ij , ∀ j ∈ [ h ] .
Similarly, picking (cid:15) =
((1 + µ ) 1 /p − 1) , we can ﬁnd a set of vectors, { β i } N p,h i =1 , where K = (cid:108) hµ (cid:109) , N p,h = (cid:0) K + h − 2 h − 1 (cid:1) such that ∀ x , (cid:107) x (cid:107) p ≤ C 2 , ∃ 1 ≤ i ≤ N p,h , x j ≤ β ij , ∀ j ∈
[ h ] .
Lemma 13.
For any h, p ≥ 2 , c, d, γ, µ > 0 , δ ∈ (0 , 1) and U 0 ∈ R h × d , with probability 1 − δ over the choice of the training set S
= { x i } mi =1 ⊂ R d , for any function f ( x ) =
V [ Ux ] + such that
V ∈ R c
× h and U ∈ R h × d , the generalization error is bounded as follows:
[Equation]
where N p,h = (cid:0) (cid:100) h/µ (cid:101) + h − 2 h −(cid:1) and (cid:107) .
(cid:107) p, 2 is the (cid:96) p norm of the column (cid:96) 2 norms.
Proof.
This lemma can be proved by directly applying union bound on Lemma 12 with for every C 1 ∈ (cid:110)
i h 1 / 2 − 1 /p | i ∈ (cid:104)(cid:108) γ √ m 4 (cid:109)(cid:105)(cid:111) and every C 2 ∈ (cid:110)
i
[Equation]
(cid:107) X (cid:107) F | i ∈ (cid:104)(cid:108) γ √ m (cid:109)(cid:105)(cid:111) .
For (cid:107) V (cid:62) (cid:107) p, 2 ≤ 1 h 1 / 2 − 1 /p , we can use the bound where C 1 = 1 , and the additional constant 1 in Eq.
12 will cover that.
The same is true for the case of (cid:107) U (cid:107) p, 2 ≤ i h 1 / 2 − 1 /p (cid:107) X (cid:107) F .
When any of h 1 / 2 − 1 /p (cid:107) V (cid:62) (cid:107) p, 2 and h 1 / 2 − 1 /p (cid:107) X (cid:107) F (cid:107) U (cid:107) p, 2 is larger than (cid:108) γ √ m 4 (cid:109) , the second term in Eq.
12 is larger than 1 thus holds trivially.
For the rest of the case, there exists ( C 1 , C 2 ) such that h 1 / 2 − 1 /p C 1 ≤ h 1 / 2 − 1 /p (cid:107) V (cid:62) (cid:107) p, 2 + and h 1 / 2 − 1 /p C 2 ≤ h 1 / 2 − 1 /p (cid:107) X (cid:107) F (cid:107) X (cid:107) F (cid:107) U (cid:107) p, 2 + 1 .
Finally, we have γ √ m≥ 1 otherwise the second term in Eq.
12 is larger than 1.
Therefore, (cid:108) γ √ m 4 (cid:109) ≤ γ √ m
[Equation]
γ √ m
[Equation]
We next use the general results in Lemma 13 to give speciﬁc results for the case p = 2 .
Lemma 14.
For any h ≥ 2 , c, d, γ > 0 , δ ∈ (0 , 1) and U 0 ∈ R h × d , with probability 1 − δ over the choice of the training set S
= { x i } mi =1 ⊂ R d , for any function f ( x ) =
V [ Ux ] + such that V ∈ R c × h and U ∈ R h × d , the generalization error is bounded as follows:
[Equation]
Proof.
To prove the lemma, we directly upper bound the generalization bound given in Lemmafor p = 2 and µ = 3 √ 24 − 1 .
For this choice of µ and p , we have 4( µ + 1) 2 /p ≤ 3 √ 2 and ln N p,h is bounded as follows:
[Equation]
Proof of Theorem 2.
The proof directly follows from Lemma 14 and using ˜ O notation to hide the constants and logarithmic factors.
Next lemma states a generalization bound for any p ≥ 2 , which is looser than 14 for p = 2 due to extra constants and logarithmic factors.
Lemma 15.
For any h, p ≥ 2 , c, d, γ > 0 , δ ∈ (0 , 1) and U 0 ∈ R h × d , with probability 1 − δ over the choice of the training set S
= { x i } mi =1 ⊂ R d , for any function f ( x ) =
V [ Ux ] + such that
V ∈ R c
× h and U ∈ R h × d , the generalization error is bounded as follows:
[Equation] [Equation]
p
[Equation]
2 is the (cid:96) p norm of the column (cid:96) 2 norms.
Proof.
To prove the lemma, we directly upper bound the generalization bound given in Lemma 13 for µ = e p − 1 .
For this choice of µ and p , we have ( µ + 1) 2 /p
=
e 2 .
Furthermore, if µ ≥ h , N p,h = 0 , otherwise ln N p,h is bounded as follows:
[Equation]
Since the right hand side of the above inequality is greater than zero for µ ≥ h , it is true for every µ > 0 .
Proof of Theorem 5.
The proof directly follows from Lemma 15 and using ˜ O notation to hide the constants and logarithmic factors.
C. P ROOF OF THE L OWER B OUND
Proof of Theorem 3.
We will start with the case h
= d = 2 k , m = n 2 k for some k, n ∈ N .
We will pick V = α (cid:62) =
[ α 1 . . .
α 2 k ] for every ξ , and S =
{ x i } mi =1 , where x i :=
e (cid:100) in (cid:101) .
That is, the whole dataset are divides into 2 k groups, while each group has n copies of a different element in standard orthonormal basis.
We further deﬁne (cid:15) j ( ξ ) = jn (cid:80) ( j − 1) n + ξ i , ∀ j ∈ [2 k ] and F = ( f 1 , f 2 , . . .
, f 2 k ) ∈ {− 2 − k/ 2 , 2 − k/ 2 } 2 k × 2 k be the Hadamard matrix which satisﬁes (cid:104) f
i , f j (cid:105) =
δ ij .
Note that for s ∈ R d , s j = α j β j , ∀ j ∈ [ d ] , it holds that ∀ i ∈
[ d ] , max {(cid:104) s , [ f i ] + (cid:105) , (cid:104) s , [ − f i ] + (cid:105)} ≥ 1 2 ( (cid:104) s , [ f i ] + (cid:105) + (cid:104) s , [ − f i ] + (cid:105) )
= (cid:80) 2 k j =
s j | f ji | = 2 − k 2 − 1 α (cid:62) β .
Thus without loss of generality, we can assume ∀ i ∈
[2 k ] , (cid:104) s , [ f i ] + (cid:105) ≥ 2 − k 2 − 1 α (cid:62) β by ﬂipping the signs of f i .
For any ξ ∈ {− 1 , 1 } n , let Diag ( β ) be the square diagonal matrix with its diagonal equal to β and (cid:101) F ( ξ ) be the following:
[Equation]
F ( ξ )
[Equation]
= [ (cid:101) f 1 , (cid:101) f 2 , . . .
, (cid:101) f 2 k ] such that if (cid:15) i ( ξ ) ≥ 0 , (cid:101) f
i = f i , and if (cid:15) i ( ξ ) < 0 , (cid:101) f
i = 0 ,
and we will choose U ( ξ ) as Diag ( β ) × (cid:101) F ( ξ ) .
Since F is orthonormal, by the deﬁnition of (cid:101) F ( ξ ) , we have (cid:107) (cid:101) F ( ξ ) (cid:107) 2 ≤ 1 and the 2-norm of each row of (cid:101) F is upper bounded by 1.
Therefore, we have (cid:107) U ( ξ ) (cid:107) 2 ≤ (cid:107) Diag ( β ) (cid:107) 2 (cid:107) (cid:101) F ( ξ ) (cid:107) 2 ≤ max i β i , and
[Equation]
˜ F ( ξ ) (cid:107) 2 ≤ β i .
In other words, f ( x ) =
V [ U ( ξ ) x ] + ∈ F W (cid:48) .
We will omit the index ξ when it’s clear.
Now we have
[Equation]
Note that
[Equation]
The last inequality uses the previous assumption, that ∀ j ∈
[Equation] [Equation]
+
[Equation]
Thus,
[Equation]
where the last inequality is by Lemma 7.
For arbitrary d = h ≤ m , d, h, m ∈ Z + , let k = (cid:98) log 2 d (cid:99) , d (cid:48)
=
h (cid:48)
=
2 k , m (cid:48)
= (cid:98) m 2 k (cid:99) ∗ 2 k .
Then we have h (cid:48) ≥ h 2 , m (cid:48) ≥ m 2 .
Thus there exists S ⊆
[ h ] , such that (cid:80) i ∈
S
α i β i ≥ (cid:80) hi
=
α
i β i .
Therefore we can pick h (cid:48) hidden units out of h hidden units, d (cid:48) input dimensions out of d dimensions, m (cid:48) input samples out of m to construct a lower bound of (cid:80) i ∈
Sα i β
[Equation]