P REDICTING THE G ENERALIZATION G AP IN D EEP N ETWORKS WITH M ARGIN D ISTRIBUTIONS
A BSTRACT
Recent research has demonstrated that deep neural networks can perfectly ﬁt randomly labeled data, but with very poor accuracy on held out data.
This phenomenon indicates that loss functions such as cross-entropy are not a reliable indicator of generalization.
This leads to the crucial question of how generalization gap should be predicted from the training data and network parameters.
In this paper, we propose such a measure, and conduct extensive empirical studies on how well it can predict the generalization gap.
Our measure is based on the concept of margin distribution, which are the distances of training points to the decision boundary.
We ﬁnd that it is necessary to use margin distributions at multiple layers of a deep network.
On the CIFAR-10 and the CIFAR-100 datasets, our proposed measure correlates very strongly with the generalization gap.
In addition, we ﬁnd the following other factors to be of importance: normalizing margin values for scale independence, using characterizations of margin distribution rather than just the margin (closest distance to decision boundary), and working in log space instead of linear space (effectively using a product of margins rather than a sum).
Our measure can be easily applied to feedforward deep networks with any architecture and may point towards new training loss functions that could enable better generalization.
I NTRODUCTION
Generalization, the ability of a classiﬁer to perform well on unseen examples, is a desideratum for progress towards real-world deployment of deep neural networks in domains such as autonomous cars and healthcare.
Until recently, it was commonly believed that deep networks generalize well to unseen examples.
This was based on empirical evidence about performance on held-out dataset.
However, new research has started to question this assumption.
Adversarial examples cause networks to misclassify even slightly perturbed images at very high rates (Goodfellow et al., 2014; Papernot et al., 2016).
In addition, deep networks can overﬁt to arbitrarily corrupted data (Zhang et al., 2016), and they are sensitive to small geometric transformations (Azulay & Weiss, 2018; Engstrom et al., 2017).
These results have led to the important question about how the generalization gap (difference between train and test accuracy) of a deep network can be predicted using the training data and network parameters .
Since in all of the above cases, the training loss is usually very small, it is clear that existing losses such as cross-entropy cannot serve that purpose.
It has also been shown (e.g. in
Zhang et al.
that regularizers such as weight decay cannot solve this problem either.
Consequently, a number of recent works (Neyshabur et al., 2017b; Kawaguchi et al., 2017; Bartlett et al., 2017; Poggio et al., 2017; Arora et al., 2018) have started to address this question, proposing generalization bounds based on analyses of network complexity or noise stability properties.
However, a thorough empirical assessment of these bounds in terms of how accurately they can predict the generalization gap across various practical settings is not yet available.
In this work, we propose a new quantity for predicting generalization gap of a feedforward neural network.
Using the notion of margin in support vector machines (Vapnik, 1995) and extension to deep networks (Elsayed et al., 2018), we develop a measure that shows a strong correlation with generalization gap and signiﬁcantly outperforms recently developed theoretical bounds on [Figure] generalization 2 .
This is empirically shown by studying a wide range of deep networks trained on the CIFAR-10 and CIFAR-100 datasets.
The measure presented in this paper may be useful for a constructing new loss functions with better generalization.
Besides improvement in the prediction of the generalization gap, our work is distinct from recently developed bounds and margin deﬁnitions in a number of ways: 1.
These recently developed bounds are typically functions of weight norms (such as the spectral, Frobenius or various mixed norms).
Consequently, they cannot capture variations in network topology that are not reﬂected in the weight norms, e.g. adding residual connections (He et al., 2016) without careful additional engineering based on the topology changes.
Furthermore, some of the bounds require speciﬁc treatment for nonlinear activations.
Our proposed measure can handle any feedforward deep network.
Although some of these bounds involve margin, the margin is only deﬁned and measured at the output layer (Bartlett et al., 2017; Neyshabur et al., 2017b).
For a deep network, however, margin can be deﬁned at any layer (Elsayed et al., 2018).
We show that measuring margin at a single layer does not sufﬁce to capture generalization gap.
We argue that it is crucial to use margin information across layers and show that this signiﬁcantly improves generalization gap prediction.
The common deﬁnition of margin, as used in the recent bounds e.g. Neyshabur et al.
(2017b), or as extended to deep networks, is based on the closest distance of the training points to the decision boundary.
However, this notion is brittle and sensitive to outliers.
In contrast, we adopt margin distribution (Garg et al., 2002; Langford & Shawe-Taylor, 2002; Zhang & Zhou, 2017; 2018) by looking at the entire distribution of distances.
This is shown to have far better prediction power.
We argue that the direct extension of margin deﬁnition to deep networks (Elsayed et al., 2018), although allowing margin to be deﬁned on all layers of the model, is unable to capture generalization gap without proper normalization.
We propose a simple normalization scheme that signiﬁcantly boosts prediction accuracy.
R ELATED W ORK
The recent seminal work of Zhang et al.
(2016) has brought into focus the question of how generalization can be measured from training data.
They showed that deep networks can easily learn to ﬁt randomly labeled data with extremely high accuracy, but with arbitrarily low generalization capability.
This overﬁtting is not countered by deploying commonly used regularizers.
The work of Bartlett et al.
(2017) proposes a measure based on the ratio of two quantities: the margin distribution measured at the output layer of the network; and a spectral complexity measure related to the network’s Lipschitz constant.
Their normalized margin distribution provides a strong indication of the complexity of the learning task, e.g. the distribution is skewed towards the origin (lower normalized margin) for training with random labels.
Neyshabur et al.
(2017b;a) also develop bounds based on the product of norms of the weights across layers.
Arora et al.
(2018) develop bounds based on noise stability properties of networks: more stability implies better generalization.
Using these criteria, they are able to derive stronger generalization bounds than previous works.
The margin distribution (speciﬁcally, boosting of margins across the training set) has been shown to correspond to generalization properties in the literature on linear models (Schapire et al., 1998): they used this connection to explain the effectiveness of boosting and bagging techniques.
Reyzin &
Schapire (2006) showed that it was important to control the complexity of a classiﬁer when measuring margin, which calls for some type of normalization.
In the linear case (SVM), margin is naturally deﬁned as a function of norm of the weights Vapnik (1995).
In the case of deep networks, true margin is intractable.
Recent work (Elsayed et al., 2018) proposed a linearization to approximate the margin, and deﬁned the margin at any layer of the network.
(Sokolic et al., 2016) provide another approximation to the margin based on the norm of the Jacobian with respect to the input layer.
They show that maximizing their approximations to the margin leads to improved generalization.
However, their analysis was restricted to margin at the input layer.
Poggio et al.
(2017) and Liao et al.
(2018) propose a normalized cross-entropy measure that correlates well with test loss.
Their proposed normalized loss trades off conﬁdence of predictions with stability, which leads to better correlation with test accuracy, leading to a signiﬁcant lowering of output margin.
P REDICTION OF G ENERALIZATION G AP
In this section, we introduce our margin-based measure.
We ﬁrst explain the construction scheme for obtaining the margin distribution.
We then squeeze the distributional information of the margin to a small number of statistics.
Finally, we regress these statistics to the value of the generalization gap.
We assess prediction quality by applying the learned regression coefﬁcients to predict the generalization gap of unseen models.
We will start with providing a motivation for using the margins at the hidden layers which is supported by our empirical ﬁndings.
SVM owes a large part of its success to the kernel that allows for inner product in a higher and richer feature space.
At its crux, the primal kernel SVM problem is separated into the feature extractor and the classiﬁer on the extracted features.
We can separate any feed forward network at any given hidden layer and treat the hidden representation as a feature map.
From this view, the layers that precede this hidden layer can be treated as a learned feature extractor and then the layers that come after are naturally the classiﬁer.
If the margins at the input layers or the output layers play important roles in generalization of the classiﬁer, it is a natural conjecture that the margins at these hidden representations are also important in generalization.
In fact, if we ignore the optimization procedure and focus on a converged network, generalization theories developed on the input such as Lv et al. (2019) can be easily extended to the hidden layers or the extracted features.
3. M ARGIN A PPROXIMATION
First, we establish some notation.
Consider a classiﬁcation problem with n classes.
We assume a classiﬁer f consists of non-linear functions
f i : X → R , for i = 1 , . . . , n that generate a prediction score for classifying the input vector x ∈ X to class i .
The predicted label is decided by the class with maximal score, i.e. i ∗ = arg max
i f i ( x ) .
Deﬁne the decision boundary for each class pair ( i, j ) as:
[Equation]
Under this deﬁnition, the l p distance of a point x to the decision boundary D ( i,j ) can be expressed as the smallest displacement of the point that results in a score tie:
[Equation]
Unlike an SVM, computing the “exact” distance of a point to the decision boundary (Eq. 2) for a deep network is intractable 3 .
In this work, we adopt the approximation scheme from Elsayed et al.
(2018) to capture the distance of a point to the decision boundary.
This a ﬁrst-order Taylor approximation to the true distance Eq.
Formally, given an input x to a network, denote its representation at the l th layer (the layer activation vector) by x l .
For the input layer, let l = 0 and thus x 0 = x .
Then for p = 2 , the distance of the representation vector x l to the decision boundary for class pair ( i, j ) is given by the following approximation:
[Equation]
Here f i ( x l ) represents the output (logit) of the network logit i given x l .
Note that this distance can be positive or negative, denoting whether the training sample is on the “correct” or “wrong” side of the decision boundary respectively.
This distance is well deﬁned for all ( i, j ) pairs, but in this work we assume that i always refers to the ground truth label and j refers to the second highest or highest class (if the point is misclassiﬁed).
The training data x induces a distribution of distances at each layer l which, following earlier naming convention (Garg et al., 2002; Langford & Shawe-Taylor, 2002), we refer to as margin distribution (at layer l ).
For margin distribution, we only consider distances with positive sign (we ignore all misclassiﬁed training points).
Such design choice facilitates our empirical analysis when we transform our features (e.g. log transform); further, it has also been suggested that it may be possible to obtain a better generalization bound by only considering the correct examples when the classiﬁer classiﬁes a signiﬁcant proportion of the training examples correctly, which is usually the case for neural networks (Bartlett, 1998).
For completeness, the results with negative margins are included in appendix Sec. 7.
A problem with plain distances and their associated distribution is that they can be trivially boosted without any signiﬁcant change in the way classiﬁer separates the classes.
For example, consider multiplying weights at a layer by a constant and dividing weights in the following layer by the same constant.
In a ReLU network, due to positive homogeneity property (Liao et al., 2018), this operation does not affect how the network classiﬁes a point, but it changes the distances to the decision boundary 4 .
To offset the scaling effect, we normalize the margin distribution.
Consider margin distribution at some layer l , and let x lk be the representation vector for training sample k .
We compute the variance of each coordinate of { x lk } separately, and then sum these individual variances.
This quantity is called total variation of x l .
The square root of this quantity relates to the scale of the distribution.
That is, if x l is scaled by a factor, so is the square root of the total variation.
Thus, by dividing distances by the square root of total variation, we can construct a margin distribution invariant to scaling.
More concretely, the total variation is computed as:
[Equation]
i.e. the trace of the empirical covariance matrix of activations.
Using the total variation, the normalized margin is speciﬁed by:
[Equation]
While the quantity is relatively primitive and easy to compute, Fig. 1 (top) shows that the normalizedmargin distributions based on Eq.
5 have the desirable effect of becoming heavier tailed and shifting to the right (increasing margin) as generalization gap decreases.
We ﬁnd that this effect holds across a range of networks trained with different hyper-parameters.
3. S UMMARIZING THE M ARGIN D ISTRIBUTION
Instead of working directly with the (normalized) margin distribution, it is easier to analyze a compact signature of that.
The moments of a distribution are a natural criterion for this purpose.
Perhaps the most standard way of doing this is computing the empirical moments from the samples and then take the n th root of the n th moment.
In our experiments, we used the ﬁrst ﬁve moments.
However, it is a well-known phenomenon that the estimation of higher order moments based on samples can be unreliable.
Therefore, we also consider an alternate way to construct the distribution’s signature.
Given a set of distances D = { ˆ d m } nm =1 , which constitute the margin distribution.
We use the median
Q 2 , ﬁrst quartile Q 1 and third quartile Q 3 of the normalized margin distribution, along with the two fences that indicate variability outside the upper and lower quartiles.
There are many variations for fences, but in this work, with IQR =
Q 3 − Q 1 , we deﬁne the upper fence to be max( { ˆ d m : ˆ d m ∈
D ∧ ˆ d m ≤ Q 3 + 1 . 5 IQR } ) and the lower fence to be min( { ˆ d m : ˆ d m ∈ D
∧ ˆ d m ≥ Q 1 − 1 .
5 IQR } )
(McGill et al., 1978).
These 5 statistics form the quartile description that summarizes the normalized margin distribution at a speciﬁc layer, as shown in the box plots of Fig.
We will later see that both signature representations are able to predict the generalization gap, with the second signature working slightly better.
A number of prior works such as Bartlett et al.
(2017), Neyshabur et al.
(2017b),
Liu et al.
(2016), Sun et al.
(2015), Sokolic et al.
(2016), and Liang et al.
(2017) have focused on analyzing or maximizing the margin at either the input or the output layer of a deep network.
Since a deep network has many hidden layers with evolving representations, it is not immediately clear which of the layer margins is of importance for improving generalization.
Our experiments reveal that margin distribution from all of the layers of the network contribute to prediction of generalization gap.
This is also clear from
Fig.
1 (top): comparing the input layer (layer 0) margin distributions between the left and right plots, the input layer distribution shifts slightly left, but the other layer distributions shift the other way.
For example, if we use quartile signature, we have 5 L components in this vector, where L is the total number of layers in the network.
We incorporate dependence on all layers simply by concatenating margin signatures of all layers into a single combined vector θ that we refer to as total signature .
Empirically, we found constructing the total signature based on four evenly-spaced layers ( input, and 3 hidden layers ) sufﬁciently captures the variation in the distributions and generalization gap, and also makes the signature agnostic to the depth of the network.
3. E VALUATION M ETRICS
Our goal is to predict the generalization gap, i.e. the difference between training and test accuracy at the end of training, based on total signature θ of a trained model.
We use the simplest prediction model, i.e. a linear form ˆ g = a T φ ( θ ) + b , where a ∈ R dim( θ ) and b ∈ R are parameters of the predictor, and φ : R → R is a function applied element-wise to θ .
Speciﬁcally, we will explore two choices of φ : the identity φ ( x ) = x and entry-wise log transform φ ( x ) =
log( x ) , which correspond to additive and multiplicative combination of margin statistics respectively.
We do not claim this model is the true relation, but rather it is a simple model for prediction; and our results suggest that it is a surprisingly good approximation.
In order to estimate predictor parameters a , b , we generate a pool of n pretrained models (covering different datasets, architectures, regularization schemes, etc.
as explained in Sec. 4) each of which gives one instance of the pair θ , g ( g being the generalization gap for that model).
We then ﬁnd a , b by minimizing mean squared error: ( a ∗ , b ∗ ) =
arg min a ,b (cid:80) i ( a T φ ( θ i )
+ b − g i ) 2 , where i indexes the i th model in the pool.
The next step is to assess the prediction quality.
We consider two metrics for this.
The ﬁrst metric examines quality of predictions on unseen models.
For that, we consider a held-out pool of m models, different from those used to estimate ( a , b ) , and compute the value of ˆ g on them via ˆ g = a T φ ( θ ) + b .
In order to quantify the discrepancy between predicted gap ˆ g and ground truth gap g we use the notion of coefﬁcient of determination ( R 2 )
(Glantz et al., 1990):
[Equation]
R 2 measures what fraction of data variance can be explained by the linear model 5 (it ranges fromto 1 on training points but can be outside that range on unseen points).
To be precise, we use k-fold validation to study how the predictor can perform on held out pool of trained deep networks.
We use 90/10 split, ﬁt the linear model with the training pool, and measure R 2 on the held out pool.
The performance is averaged over the 10 splits.
Since R 2 is now not measured on the training pool, it does not suffer from high data dimension and can be negative.
In all of our experiments, we use k = 10 .
We provide a subset of residual plots and corresponding univariate F-Test for the experiments in the appendix (Sec. 8).
The F-score also indicates how important each individual variable is.
The second metric examines how well the model ﬁts based on the provided training pool; it does not require a test pool.
To characterize this, we use adjusted ¯ R 2 (Glantz et al., 1990) deﬁned as:
[Equation]
The ¯ R 2 can be negative when the data is non-linear.
Note that ¯ R 2 is always smaller than R 2 .
Intuitively, ¯ R 2 penalizes the model if the number of features is high relative to the available data points.
The closer ¯ R 2 is to 1, the better the model ﬁts.
Using ¯ R 2 is a simple yet effective method to test the ﬁtness of linear model and is independent of the scale of the target, making it a more illustrative metric than residuals.
E XPERIMENTS
We tested our measure of generalization gap ˆ g , along with baseline measures, on a number of deep networks and architectures: nine-layer convolutional networks on CIFAR-10 (10 with input layer), and 32-layer residual networks on both CIFAR-10 and CIFAR-100 datasets
. 4. C ONVOLUTIONAL N EURAL N ETWORKS ON CIFAR-
Using the CIFAR-10 dataset, we train 216 nine-layer convolutional networks with different settings of hyperparameters and training techniques.
We apply weight decay and dropout with different strengths; we use networks with and without batch norm and data augmentation; we change the number of hidden units in the hidden layers.
Finally, we also include training with and without corrupted labels, as introduced in Zhang et al.
(2016); we use a ﬁxed amount of 20% corruption of the true labels.
The accuracy on the test set ranges from 60% to 90 .
5% and the generalization gap ranges from 1% to 35% .
In standard settings, creating neural network models with small generalization gap is difﬁcult; in order to create sufﬁciently diverse generalization behaviors, we limit some models’ capacities by large weight regularization which decreases generalization gap by lowering the training accuracy.
All networks are trained by SGD with momentum.
Further details are provided in the supplementary material (Sec. 6).
For each trained network, we compute the depth-agnostic signature of the normalized margin distribution (see Sec. 3).
This results in a 20-dimensional signature vector.
We estimate the parameters of the linear predictor ( a , b ) with the log transform φ ( x ) = log( x ) and using the 20 -dimensional signature vector θ .
Fig.
2 (left) shows the resulting scatter plot of the predicted generalization gap ˆ g and the true generalization gap g .
As it can be seen, it is very close to being linear across the range of generalization gaps, and this is also supported by the ¯ R 2 of the model, which is 0 .
96 (max is 1).
As a ﬁrst baseline method, we compare against the work of Bartlett et al.
(2017) which provides one of the best generalization bounds currently known for deep networks.
This work also constructs a margin distribution for the network, but in a different way.
To make a fair comparison, we extract the same signature θ from their margin distribution.
Since their margin distribution can only be deﬁned for the output layer, their θ is 5-dimensional for any network.
The resulting ﬁt is shown in
Fig. 2(right).
It is clearly a poorer ﬁt than that of our signature, with a signiﬁcantly lower ¯ R 2 of 0 . 72 .
For a fairer comparison, we also reduced our signature θ from 20 dimensions to the best performing 4 dimensions (even one dimension less than what we used for Bartlett’s) by dropping 16 components in our θ .
This is shown in Fig.
2 (middle) and has a ¯ R 2 of 0 . 89 , which is poorer than our complete θ but still signiﬁcantly higher than that of Bartlett et al.
In addition, we considered two other baseline comparisons: Sokolic et al.
(2016), where margin at input is deﬁned as a function of [Table] adjusted; kf indicates k-fold; mse indicates mean squared error in 10 − 3 ; N indicates negative. the Jacobian of output (logits) with respect to input; and Elsayed et al.
(2018) where the linearized approximation to margin is derived (for the same layers where we use our normalized margin approximation). [Figure]
To quantify the effect of the normalization, different layers, feature transformation etc.
, we conduct a number of ablation experiments with the following conﬁguration: 1.
linear / log : Use signature transform of φ ( x ) = x or φ ( x ) = log( x ) ; 2.
sl :
Use signature from the single best layer ( θ ∈ R 5 );
Use only the best signature all the layers
∈ layer can be found in moments the normalized spectrally where the statistics are measured
unnorm indicates no normalization.
In
Table 1, we list the ¯ R 2 from ﬁtting models based on each of these scenarios.
We see that, both quartile and moment signatures perform similarly, lending support to our thesis that the margin distribution, rather than the smallest or largest margin, is of importance in the context of generalization.
4. R ESIDUAL N ETWORKS ON CIFAR-
On the CIFAR-10 dataset, we train 216 convolutional networks with residual connections; these networks are 32 layers deep with standard ResNet 32 topology (He et al., 2016).
Since it is difﬁcult to train ResNet without activation normalization, we created generalization gap variation with batch normalization (Ioffe & Szegedy, 2015) and group normalization (Wu & He, 2018).
We further use different initial learning rates.
The range of accuracy on the test set ranges from 83% to 93 .
5% and generalization gap from 6% to 13 .
The residual networks were much deeper, and so we only chose 4 layers for feature-length compatibility with the shallower convoluational networks.
This design choice also facilitates ease of analysis and circumvents the dependency on depth of the models.
Table 1 shows the ¯ R 2 .
Note in the presence of residual connections that use convolution instead of identity and identity blocks that span more than one convolutional layers, it is not immediately clear how to properly apply the bounds of Bartlett et al.
(third from last row) without morphing the topology of the architecture and careful design of reference matrices.
As such, we omit them for
ResNet.
Fig.
3 (left) shows the ﬁt for the resnet models, with ¯ R 2 = 0 . 87 .
Fig.
3 (middle) and Fig.(right) compare the log normalized density plots of a CIFAR-10 resnet and CIFAR-10 CNN.
The plots show that the Resnet achieves a better margin distribution, correlated with greater test accuracy, even though it was trained without data augmentation. [Figure]
4. R ES N ET ON CIFAR-
On the CIFAR-100 dataset, we trained 324 ResNet-32 with the same variation in hyperparameter settings as for the networks for CIFAR-10 with one additional initial learning rate.
The range of accuracy on the test set ranges from 12% to 73% and the generalization gap ranges from 1% to 75% .
1 shows ¯ R 2 for a number of ablation experiments and the full feature set.
Fig.
7 (left) shows the ﬁt of predicted and true generalization gaps over the networks ( ¯ R 2 = 0 . 97 ).
Fig.
7 (middle) and Fig.
7 (right) compare a CIFAR-100 residual network and a CIFAR-10 residual network with the same architecture and hyperparameters.
Under these settings, the CIFAR-100 network achieves 44% test accuracy, whereas CIFAR-10 achieves 61% .
The resulting normalized margin density plots clearly reﬂect the better generalization achieved by CIFAR-10: the densities at all layers are wider and shifted to the right.
Thus, the normalized margin distributions reﬂect the relative “difﬁculty” of a particular dataset for a given architecture.
D ISCUSSION
We have presented a predictor for generalization gap based on margin distribution in deep networks and conducted extensive experiments to assess it.
Our results show that our scheme achieves a high adjusted coefﬁcient of determination (a linear regression predicts generalization gap accurately).
Speciﬁcally, the predictor uses normalized margin distribution across multiple layers of the network.
The best predictor uses quartiles of the distribution combined in multiplicative way (additive in log transform).
Compared to the strong baseline of spectral complexity normalized output margin (Bartlett et al., 2017), our scheme exhibits much higher predictive power and can be applied to any feedforward network (including ResNets, unlike generalization bounds such as (Bartlett et al., 2017;
Neyshabur et al., 2017b; Arora et al., 2018)).
Our ﬁndings could be a stepping stone for studying new generalization theories and new loss functions with better generalization properties.
We include the results on cross architecture and cross data comparison as well as some ﬁnal thoughts in Appendix
Sec. 9.
[Figure]
A CKNOWLEDGMENTS
We are thankful to Gamaleldin Elsayed (Google), Tomer Koren (Google), Sergey Ioffe (Google),
Vighnesh Birodkar (Google), Shraman Ray Chaudhuri (Google), Kevin Regan (Google), Behnam
Neyshabur (NYU) and Dylan Foster (Cornell), for discussions and helpful feedbacks.
A PPENDIX : E XPERIMENTAL D ETAILS 6. CNN + CIFAR-
We use an architecture very similar to Network in Network (Lin et al.
, but we remove all dropout and max pool from the network.
[Table]
To create generalization gap in this model
[Table]
we make the following modiﬁcation to the base architecture:
Use channel size of 192, 288, and 384 to create different width 2.
Train with and without batch norm at all convolutional layers 3.
Apply dropout at layer 3 and 6 with p = 0 . 0 , 0 . 2 , 0 .4.
Apply l 2 regularization with λ = 0 . 0 , 0 .
Train with and without data augmentation with random cropping, ﬂipping and shifting 6.
Train each conﬁguration twice
In total this gives us 3 × 2 × 3 × 3 × 2 × 2 = 216 different network architectures.
The models are trained with SGD with momentum ( α = 0 . 9 ) at minibatch size of 128 and intial learning rate of 0.01.
All networks are trained for 380 epoch with 10 × learning rate decay at interval of 100 epoch.
6. R ES N ET 32 + CIFAR-
For this experiments, we use the standard ResNet 32 architectures.
We consider down sampling to the marker of a stage, so there are in total 3 stages in the ResNet 32 architecture.
To create generalization gap in this model, we make the following modiﬁcations to the architecture:
Use network width that are 1 × , 2 × , 4 × wider in number of channels.
Train with batch norm or group norm (Wu & He, 2018) 3.
Train with initial learning rate of 0 . 01 , 0 .4.
Apply l 2 regularization with λ = 0 . 0 , 0 .
Trian with and without data augmentation with random cropping, ﬂipping and shifting 6.
Train each conﬁguration 3 times
In total this gives us 3 × 2 × 2 × 3 × 2 × 3 = 216 different network architectures.
The models are trained with SGD with momentum ( α = 0 . 9 ) at minibatch size of 128.
All networks are trained for 380 epoch with 10 × learning rate decay at interval of 100 epoch.
6. R ES N ET 32 + CIFAR-
For this experiments, we use the standard ResNet 32 architectures.
We consider down sampling to the marker of a stage, so there are in total 3 stages in the ResNet 32 architecture.
To create generalization gap in this model, we make the following modiﬁcations to the architecture:
Use network width that are 1 × , 2 × , 4 × wider in number of channels.
Train with batch norm or group norm (Wu & He, 2018) 3.
Train with initial learning rate of 0 . 1 , 0 . 01 , 0 .4.
Apply l 2 regularization with λ = 0 . 0 , 0 .
Trian with and without data augmentation with random cropping, ﬂipping and shifting 6.
Train each conﬁguration 3 times
In total this gives us 3 × 2 × 3 × 3 × 2 × 3 = 324 different network architectures.
The models are trained with SGD with momentum ( α = 0 . 9 ) at minibatch size of 128.
All networks are trained for 380 epoch with 10 × learning rate decay at interval of 100 epoch.
A PPENDIX : M ORE R EGRESSION R ESULTS 7. A NALYSIS WITH N EGATIVE M ARGINS
The last two rows contain the results of including the negative margins and regress against both the gap (generalization gap) and against acc (test accuracy).
We see that including when negative margin is included, it is in general easier to predict the accuracy of the models rather than the gap itself.
For convenience, we have reproduced Table 1.
[Table]
[Table] [Table]
[Table]
best
[Table]
spectral + log 0.
[Table]
Jacobian + log 0.
N 5.
[Table]
7. A NALYSIS FOR I NDIVIDUAL L AYER ’ S M ARGIN D ISTRIBUTIONS
This is a comparison of different individual layer’s predictive power by using only the margin distribution at that layer.
This results illustrates the importance of margins in the hidden layers.
[Table]
+CIFAR
[Table]
Experiment Settings
[Table]
all layer
[Table]
A PPENDIX : F URTHER A NALYSIS OF R EGRESSION 8.
CNN + CIFAR-10 + A LL Q UARTILE S IGNATURE lower fence
[Table]
[Table]
37e
[Table]
[Table]
.31e
[Table]
[Figure]
[Table]
[Figure]
[Table]
A PPENDIX : S OME O BSERVATIONS AND C ONJECTURES
Everythig here uses the full quartile description.
9. C ROSS A RCHITECTURE C OMPARISON
We perform regression analysis with both base CNN and ResNet32 on CIFAR-10.
The resulting ¯
R 2 = 0 .
91 and the k-fold R 2 = 0 . 88 .
This suggests that the same coefﬁcient works generally well across architectures provided they are trained on the same data.
Somehow, the distribution at thelocations of the networks are comparable even though the depths are vastly different.
[Figure]
We perform regression analysis with ResNet32 on both CIFAR-10 and CIFAR-100.
The resulting ¯
R 2 = 0 .
96 and the k-fold R 2 = 0 .
This suggests that the same coefﬁcient works generally well across dataset of the same architecture.
9. C ROSS E VERYTHING
We join all our experiment data and the resulting The resulting ¯ R 2 = 0 .
93 and the k-fold R 2 = 0 .
It is perhaps surprising that a set of coefﬁcient exists across both datasets and architectures.
9. I MPLICATIONS ON G ENERALIZATION B OUNDS
We believe that the method developed here can be used in complementary with existing generalization bound; more sophisticated engineering of the predictor may be used to actually verify what kind of function the generalization bound should look like up to constant factor or exponents; it may be helpful for developing generalization bound tighter than the existing ones.