Exploring Generalization in Deep Learning
Paper · 2017 · Behnam Neyshabur, Srinadh Bhojanapalli, David McAllester et al.
Summary
A deep network can fit its training examples perfectly and still make poor predictions on new examples. It can also contain far more adjustable parameters than training examples and nonetheless predict well. Exploring Generalization in Deep Learning investigates what distinguishes these outcomes. The authors ask whether the relevant difference lies in the size of the weights, the confidence of the predictions, the sensitivity of the training loss to parameter changes, or some combination of these properties. Their aim is to identify a useful measure of complexity for a trained network: something that can support a generalization guarantee and also explain behavior observed in experiments.
The central finding is that scale matters. A weight norm, which measures the magnitude of the parameters, cannot be interpreted without considering the scale of the network’s outputs. Multiplying or dividing weights can change that norm without changing which class wins. The authors therefore compare norms relative to prediction margins: the separation between the correct class score and its strongest competitor. They apply similar reasoning to sharpness, a measure of how much the training loss increases when parameters are perturbed. Sharpness alone can give misleading comparisons. In their experiments, networks trained on random labels can sometimes look less sharp than networks trained on meaningful labels, despite their worse ability to generalize.
The paper connects expected sharpness to PAC-Bayes analysis, which bounds the average error of a predictor whose parameters are randomly perturbed. This framework introduces a necessary tradeoff. Small perturbations usually preserve training performance, but they incur a larger complexity penalty relative to a reference distribution. Larger perturbations reduce that penalty while potentially damaging predictions. Examining expected sharpness together with this penalty distinguishes meaningful-label training from random-label memorization more successfully than sharpness alone. The joint comparison also helps distinguish networks that fit the same genuine training examples but generalize differently.
These explanations remain incomplete. In a width experiment on MNIST, larger networks continue to improve after smaller networks already fit the training data, yet the investigated complexity measures eventually fail to follow that improvement. The authors also derive sufficient conditions under which expected sharpness can be bounded without the unfavorable exponential dependence on depth found in several earlier bounds. Those conditions concern interactions between layers, sensitivity of activation patterns, and concentration of weight magnitude in individual hidden units. The contribution is therefore both a set of partial explanations and a disciplined way to test them. The paper does not identify a single quantity that explains every result, and it leaves open how optimization systematically selects solutions with favorable complexity.
Interesting ideas
Normalize before comparing. A numerical property of a trained system is useful only if its scale has a consistent meaning. Here, weight magnitude can change because the output scores have grown, rather than because the decision rule has become more complicated. Dividing an appropriate norm by a prediction margin removes this source of confusion. The reusable principle is broader than neural networks: before comparing a proposed quality measure across runs, ask whether an irrelevant rescaling can change it. This applies wherever an internal score has arbitrary units but the final decision depends only on ordering or a threshold.
Test explanations against several phenomena. A measure that separates meaningful labels from random labels has passed an important test, but it has not explained generalization as a whole. The paper also asks whether the measure ranks different solutions within a fixed architecture and whether it explains improvements from increasing width. These comparisons expose failures that a single successful experiment would hide. Researchers can borrow this approach when evaluating explanations of optimization, robustness, or transfer: choose several observations that the explanation ought to cover, including one likely to challenge its assumptions.
Compare tradeoff curves. Expected sharpness and the PAC-Bayes complexity penalty move in opposing directions as perturbation magnitude changes. Collapsing them immediately into a single score can hide this relationship, especially when the bound combining them is loose. The authors instead examine curves showing the two quantities together. This makes it possible to compare networks at a similar loss increase or a similar complexity penalty. The same approach is useful whenever a measurement depends on an adjustable tolerance, noise level, compression strength, or regularization setting.
Hold genuine training success fixed. The confusion-set experiment creates solutions that all fit the same genuine training subset, while additional randomly labeled examples push them towards different test behavior. This makes training accuracy an inadequate explanation by construction and gives a proposed complexity measure a more demanding task. The idea can be reused in controlled studies of memorization: keep the task of interest fixed, introduce a deliberate source of conflicting demands, and ask which diagnostics track the resulting loss of generalization.
Keep every architecture-dependent factor. A plotted norm may fall as width increases, yet the capacity expression containing that norm may also include width factors that rise. Ignoring those factors can reverse the interpretation. The paper’s width analysis makes this distinction decisive for path-based and spectral measures. When borrowing a theoretical diagnostic, carry its assumptions and structural dependencies into the empirical comparison. A convenient component of a bound is not automatically a valid substitute for the entire bound.
Separate parameter changes from structural changes. In a ReLU network, perturbing weights affects both numerical calculations and which units are active. The sharpness proof handles these effects separately before combining them. This decomposition makes the argument easier to inspect and identifies different failure mechanisms. It is a useful design principle for analyzing systems with switches, gates, thresholds, or discrete decisions: first study perturbations with the active structure held fixed, then study the extra error caused by changing that structure.
Deep dive: Exploring Generalization in Deep Learning
Why deep networks generalize beyond their training data, how norms and sharpness help explain it, and where those explanations fail. · about 34 minutes to read
How Mova uses it
For Mova, a small transparent language system implemented in Rust, the most direct contribution is a standard for evaluating explanations. A compact implementation and an inspectable parameter set do not, by themselves, establish why a learned component succeeds on unfamiliar language. The paper encourages a more specific question: which measurable property of a fitted component distinguishes reusable structure from memorization? Applying that question would fit Mova’s emphasis on transparency, because it asks for an explanation that can be checked against behavior.
A concrete possibility concerns any learned component that assigns scores to alternative linguistic decisions. Mova could record the gap between the score of the correct alternative and the strongest competing score, then examine the distribution of those gaps on training examples. If parameter magnitudes are also reported, the margins would help determine whether a larger norm reflects a meaningful change in decision structure or merely a change in score scale. This is a proposed diagnostic, not an established feature of Mova.
The paper also suggests a controlled evaluation for such a component. Train on genuine labels and compare that run with training on randomized labels, keeping the architecture and optimization procedure matched. Both runs may achieve very low training error, but a useful complexity diagnostic should distinguish their different relationship to unseen examples. For Mova, this would be an investigation of learned behavior rather than a reason to replace explicit linguistic rules. The experiment becomes relevant only where there is a trainable predictor and a well-defined supervised task.
A further possibility is to expose a perturbation curve. Instead of declaring a component stable after testing one arbitrary amount of parameter noise, Mova could measure how prediction loss changes across perturbation magnitudes. If a PAC-Bayes interpretation were attempted, that curve would need an accompanying complexity term and a defensible reference distribution. Simply adding noise and observing little damage would not reproduce the paper’s argument. The attraction for a transparent system is that the assumptions, perturbation rule, and observed changes could all be made inspectable.
The theoretical transfer has clear limits. The paper studies feedforward ReLU networks and experiments with image classification. Its conditions on layer interactions and activation changes do not automatically apply to a language system merely because that system has parameters. Symbolic components, discrete search procedures, and other architectures would need their own analysis. No implementation of the paper’s measures or guarantees in Mova is established here. The honest use is therefore methodological: normalize comparisons, test against memorization controls, preserve the complete complexity expression, and distinguish measured stability from a proven generalization guarantee.
The problem and its context
Generalization is the ability to perform well beyond the examples used during training. In supervised machine learning, training error reports performance on those familiar examples, while test error estimates performance on independent examples. The difference matters because fitting a finite collection of input–label pairs is not the same task as discovering a relationship that continues to hold elsewhere.
Deep networks sharpen this distinction. As the paper describes, stochastic gradient descent can find parameters with very low training error despite a complicated, non-convex optimization landscape. More surprisingly, the resulting networks can generalize even when their parameter count exceeds the amount of training data. A simple explanation based on having too few adjustable quantities to memorize the data is therefore unavailable.
The problem becomes especially clear when labels are randomized. The same architecture that learns a useful relationship from genuine labels can also fit labels that lack that relationship. Architecture alone consequently cannot explain why one fitted network succeeds on new examples while another does not. Both belong to the same broad class of representable functions. Both can satisfy the training objective. Their generalization behavior differs because the particular fitted solutions differ.
The choice among successful training solutions
An overparameterized network can have many parameter settings that minimize training error. Some may capture useful structure; others may mainly accommodate the observed sample. Optimization therefore does more than find a low objective value. Through initialization, update rules, learning rate, and stopping behavior, it also influences which successful solution is reached.
The paper situates this question alongside earlier observations about optimization. Path-SGD was designed around invariance to a particular rescaling of network weights and was reported to improve generalization over ordinary SGD in feedforward and recurrent settings. Work on large-batch training connected worse generalization with sharper solutions. Another cited line of research analyzed the stability of SGD for convex objectives.
These earlier results motivate the search for implicit regularization: a preference created by the learning procedure even when no explicit penalty is added to the objective. A training algorithm may favor some kinds of solutions over others. To explain generalization through that preference, however, researchers need a useful description of what the favored solutions have in common.
The authors formulate two demands on a candidate complexity measure. It must be strong enough to support a generalization argument. It must also assign favorable values to the networks that training actually produces when those networks generalize well. These demands are related but distinct. A valid theoretical bound can still be too loose or too poorly aligned with practice to explain observed differences.
Why counting parameters is insufficient
Parameter counting provides information about what an architecture can represent. With finite-precision parameters, the total representational capacity grows with the number of stored quantities. The paper also discusses VC dimension, a formal measure of the variety of label assignments a hypothesis class can express.
For ReLU networks, the cited capacity results depend on both depth and parameter count. This helps characterize the entire architecture, including solutions that would generalize poorly. It does not distinguish a useful trained solution from a memorizing solution inside that architecture.
There is a second difficulty. Increasing the number of hidden units can improve test performance even when training error has already stopped improving. A measure that necessarily treats the larger architecture as more complex moves in the wrong direction for explaining that result. The challenge is to measure the effective complexity of the selected solution, rather than only the maximum expressive power available to the architecture.
This distinction is central to the paper’s experimental design. The authors do not deny that large networks have substantial capacity. Their random-label experiments depend on that capacity. They ask why ordinary training on meaningful data can produce a solution that uses the available flexibility in a way that supports prediction beyond the sample.
Earlier alternatives to size
The paper draws an analogy with linear prediction. In that setting, weight norms and prediction margins can control capacity without relying primarily on the number of coordinates. A large parameter vector need not imply an equally demanding learning problem if its magnitude and separation properties are favorable.
A related analogy comes from matrix factorization. The authors describe trace norm and max norm as possible inductive biases that can be more appropriate than rank-based counting. The broader lesson is that the shape or magnitude of a solution can matter more than the nominal size of its representation.
For neural networks, earlier work had already developed norm-based capacity measures. These include products of layer norms and path norms, which aggregate products of weights along routes through the network. Another proposed explanation was sharpness: whether a small change in parameters causes a large increase in training loss.
PAC-Bayes analysis offered a further perspective. Rather than evaluating only one fixed parameter vector, it studies a distribution of predictors and compares that distribution with a reference chosen independently of the training sample. The paper connects this perspective to expected sharpness, making explicit why sensitivity to noise must be considered alongside another complexity quantity.
The authors also acknowledge related PAC-Bayes work that optimized Gaussian perturbation distributions numerically and obtained informative bounds for a binary MNIST task. Their own emphasis differs. They use the framework to understand the roles of sharpness and weight magnitude, and to assess whether those roles explain several empirical phenomena.
The method, step by step
The paper combines theoretical analysis with diagnostic experiments. It does not introduce a replacement training architecture or a new supervised objective. Instead, it trains networks under controlled conditions, computes proposed complexity measures, and asks whether those measures follow the observed generalization behavior.
Testing explanations of generalization
The steps in order.
Represent the network and the learning problem
The basic mathematical object is a feedforward network with ReLU activations.
f_w(x) = W_d φ(W_{d−1} φ(… φ(W_1 x) …)))
Here, x is the input, w denotes all parameters collectively, W_i is the weight matrix at layer i, and d is the network depth. The function f_w returns the output scores. The activation φ replaces a negative input with zero and leaves a positive input unchanged.
φ(z) = max{0, z}
The symbol z denotes an activation input. For vector inputs, this operation is applied separately to each coordinate. The threshold at zero is important because weight perturbations can move a unit from the inactive side to the active side, changing the network’s effective computation.
The width of layer i is h_i, with h_0 giving the input dimension. Accordingly, W_i maps the previous layer’s representation into the current one. For a particular input and parameter setting, a diagonal matrix D_i records which ReLU units are active. Its diagonal entries act as switches.
This permits a second view of the network: once the switches are fixed, the output is a product of matrices applied to the input. The network is still nonlinear overall because the switches depend on the input and weights. Nevertheless, this representation is valuable for analyzing perturbations, since it separates changes to matrix entries from changes to the switches.
The authors distinguish expected loss from empirical loss. Expected loss, written L, averages over the underlying data distribution. Empirical loss, written L̂, averages over the training sample. Generalization analysis asks how the former can be controlled using the latter together with a measure of complexity.
Restrict attention to solutions of bounded complexity
Rather than assigning one complexity value to an entire architecture, the paper considers a measure M that assigns a non-negative value to an individual hypothesis. Some candidate measures can also depend on the training sample, provided that dependence is handled correctly in the guarantee.
H_{M,α} = {h ∈ H : M(h) ≤ α}
H is the full hypothesis class, h is one candidate predictor, M(h) is its complexity, and α is a threshold. The set H_{M,α} contains only predictors whose complexity does not exceed that threshold.
The purpose of this construction is to shift the question from everything the architecture could express to the subset containing the learned solution. If that solution has low complexity, and the training algorithm tends to select such solutions, useful generalization may be possible even when the full architecture has very high capacity.
The authors are careful about what their capacity comparisons mean. Their theoretical expressions provide a rough yardstick for trends and relative behavior. They are not presented as precise numerical predictions of test error. This distinction becomes important when empirical curves are used to judge whether a measure moves in the appropriate direction.
Measure prediction margins
Weight norms require a reference scale. Classification decisions depend on which output score is largest, so increasing all scores in a suitable way need not change the predicted class. A norm that grows with this transformation cannot be interpreted independently of output scale.
The paper uses the prediction margin to supply that scale.
margin_w(x, y_true) = f_w(x)[y_true] − max_{y ≠ y_true} f_w(x)[y]
The pair x and y_true consists of an input and its correct label. The expression f_w(x)[y] is the score assigned to label y. The maximum selects the strongest incorrect alternative. A positive margin means that the correct label wins; its magnitude describes how far ahead it is.
Using the smallest margin over the training sample would make the comparison sensitive to an extreme example. It would also make the scale depend strongly on sample size. The authors therefore use a lower-tail margin that permits a small fraction of examples to fall below it.
In the experiments, the chosen statistic is the 5th-percentile training margin. They also report that reasonable alternative choices yield similar qualitative comparisons, discussing ε values between 0.001 and 0.1. The important feature is that the normalization reflects a substantial part of the sample instead of one unusually difficult point.
The paper also interprets margin through output perturbations. A prediction with a larger score separation can tolerate a larger change in its scores before its classification changes. At the sample level, the corresponding tolerance can allow a small increase in error rather than insisting that every prediction remain unchanged.
This connects normalization to learning guarantees. Scaling outputs so that the reference margin has a fixed value makes it possible to relate a margin-sensitive loss to classification error. The margin is therefore more than a plotting convenience: it supplies information that a raw parameter norm lacks.
Compute the norm-based quantities
The authors investigate several ways to aggregate weight magnitude. The Frobenius norm measures the collective squared magnitude of a matrix’s entries. The spectral norm measures its largest amplification of a vector under the Euclidean norm. Path norms aggregate products of weights along complete input-to-output paths.
For a measure that scales in the same way as the network output, division by the margin removes the arbitrary output scale.
complexity_scale(w) = ‖w‖_M / γ_margin
The notation ‖w‖_M stands for an appropriate parameter measure, and γ_margin is the chosen sample-level margin. This expression describes the normalization principle. The actual capacity expressions can square the ratio and include additional depth or width factors.
For the Frobenius-based comparison, the paper gives the following proportional capacity expression.
capacity_F ∝ γ_margin^(−2) ∏_{i=1}^d 4‖W_i‖_F²
The symbol ∝ indicates proportional scaling instead of an exact equality. The product multiplies one contribution from each layer, and ‖W_i‖_F is the Frobenius norm of that layer’s weight matrix. The squared inverse margin compensates for output scale.
The path-based expressions look at routes through the network.
capacity_path1 ∝ γ_margin^(−2) (Σ_j |∏_{i=1}^d 2W_i[j_i, j_{i−1}]|)²
The index j identifies a complete path by choosing a node in every layer, including input and output. The matrix entry W_i[j_i, j_{i−1}] is the weight on that path between adjacent layers. The inner product multiplies its weights, the absolute value removes sign cancellation between paths, and the sum aggregates all paths.
The corresponding squared-path expression includes explicit width factors.
capacity_path2 ∝ γ_margin^(−2) Σ_j ∏_{i=1}^d 4h_i W_i[j_i, j_{i−1}]²
The quantities h_i are layer widths. Their presence matters when comparing architectures of different sizes. A decline in the path-weight component alone does not establish a decline in the capacity expression.
The spectral expression has the same caution.
capacity_spectral ∝ γ_margin^(−2) ∏_{i=1}^d h_i ‖W_i‖_2²
Here, ‖W_i‖_2 is the spectral norm. Again, the expression includes both a norm contribution and a width contribution.
For comparisons within a fixed architecture, the authors’ plots omit factors that depend only on fixed depth or width. That is reasonable for examining relative changes under those fixed conditions. When width changes, however, those factors must be restored before making claims about the complete measure.
The paper also discusses node rescaling. Multiplying a hidden unit’s incoming weights by a positive factor and dividing its outgoing weights by the same factor can preserve the function. Path-based quantities are motivated in part by invariance to this reparameterization. This is another example of the paper’s recurring requirement: a complexity comparison should respect transformations that leave behavior unchanged.
Distinguish input robustness from parameter robustness
Several norm quantities bound how strongly outputs can change when inputs change. This is Lipschitz continuity: nearby inputs must produce outputs whose separation is limited by a constant times the input distance.
|f(x) − f(y)| ≤ C_M M(x, y)
The function M measures distance between inputs x and y, while C_M is the Lipschitz constant for that distance. The displayed form concerns a scalar output; its role is to express controlled sensitivity to the input.
This property sounds promising, but the paper explains why it is not enough on its own. Generalization arguments based on covering the input space can require a number of regions that grows exponentially with input dimension. Bounding local sensitivity does not automatically make the entire domain easy to learn.
The authors therefore distinguish input robustness from the stronger structure captured by some norm-based arguments. They also distinguish both from sharpness, which perturbs the parameters while keeping the evaluated examples fixed.
Measure worst-case sharpness
The sharpness definition examined in the paper asks how much empirical loss can rise under bounded changes to individual parameters.
ζ_α(w) = [max_{|ε_i| ≤ α(|w_i| + 1)} L̂(f_{w+ε}) − L̂(f_w)] / [1 + L̂(f_w)]
The vector ε contains parameter perturbations, ε_i is its coordinate corresponding to parameter w_i, and α controls the allowed magnitude. The maximum searches for a damaging perturbation inside the specified region. The denominator adjusts for the original empirical loss.
When the original loss is tiny, the denominator has little influence. The main quantity is the largest loss increase found nearby. A low value suggests that the solution remains successful throughout that parameter neighborhood.
In the experiments, the perturbation limit uses α=5.10⁻⁴. The authors approximate the damaging perturbation through 2000 stochastic gradient-ascent updates, using a mini-batch size of 64, a step size of 0.01, and momentum 0.9.
This procedure is operationally clear, but it does not remove dependence on parameter scale. Nor does a single neighborhood size reveal the full relationship between perturbation tolerance and complexity. These concerns motivate the expected-sharpness analysis.
Replace a worst-case neighborhood with random perturbations
Expected sharpness averages the loss increase under a specified noise distribution.
expected_sharpness(w, Q) = E_ε[L̂(f_{w+ε})] − L̂(f_w)
The expectation E_ε averages over perturbations ε, and Q denotes the resulting distribution over perturbed predictors. Unlike worst-case sharpness, this quantity describes typical loss changes under the selected distribution rather than the most damaging admissible change.
The paper uses Gaussian perturbations centered at zero. For its empirical curves, the standard deviation depends on the magnitude of each parameter.
σ_i = α(10|w_i| + 1)
The quantity σ_i is the noise standard deviation for parameter w_i, and α is varied to sweep through perturbation strengths. The magnitude-dependent rule allows different coordinates to receive different absolute noise levels.
Expected sharpness is estimated using 1000 random perturbations. Each perturbation is evaluated through an average over a mini-batch of size 64. The resulting estimate is therefore a sampled diagnostic, with randomness from both parameter noise and example selection.
Interpret expected sharpness through PAC-Bayes
PAC-Bayes analysis concerns a distribution Q over predictors and a reference distribution P selected independently of the training sample. Though Q is sometimes called a posterior, the paper does not require it to be a Bayesian posterior obtained through Bayesian inference.
The relevant bound separates the original training loss, expected sharpness, and a divergence penalty.
E_ε[L(f_{w+ε})] ≤ L̂(f_w) + expected_sharpness(w, Q) + 4√[(KL(Q‖P) + ln(2m/δ))/m]
The quantity m is the training-sample size. The parameter δ controls the probability that the guarantee fails over the draw of that sample. KL(Q‖P) is Kullback–Leibler divergence, measuring how far the perturbation distribution is from the reference. The natural logarithm is written ln.
The left side is the expected population loss of the randomized predictor. This is an important qualification: the guarantee directly concerns predictions after drawing parameter noise. It does not automatically become an identical guarantee for the unperturbed network.
For Gaussian distributions with a shared spherical variance, the divergence becomes a scaled squared norm.
KL(Q‖P) = ‖w‖_2² / (2σ²)
The vector w is the center of Q, P is centered at zero, and σ² is the common variance in each coordinate. Larger σ makes this divergence contribution smaller, but larger noise can increase expected sharpness.
This is the paper’s key balancing argument. A tiny perturbation region is easy to survive but costly in the divergence term. A broad region can reduce that penalty while making the predictor less reliable. Neither side should be assessed in isolation.
The appendix reports the following weighted quantity for the empirical perturbation sweep.
KL_plot = α^(−2) Σ_i (w_i / (10|w_i| + 1))²
The sum runs over parameter coordinates, and α is the same perturbation-scale variable used in the noise standard deviations. This is the quantity used to position points along the complexity axis of the experimental comparisons.
The authors prefer displaying expected sharpness against this weighted norm-related quantity over immediately optimizing a single numerical bound. Their reason is that the available way of combining the terms is loose. Curves preserve information about the tradeoff without pretending that a particular scalar combination precisely predicts test error.
Analyze what keeps expected sharpness small
The theoretical analysis asks why networks with similar norms can have different sensitivity to perturbations. The answer involves interactions between layers and the behavior of the activation switches.
The condition called C1 prevents neighboring blocks of computation from almost cancelling or interacting too weakly. If the original output is small because substantial intermediate computations cancel, modest weight noise can cause a large relative output change. The parameter μ measures the strength of the interaction condition; smaller μ leads to a worse bound.
Condition C2 limits the concentration of activation inputs near the ReLU switching threshold. If many units are close to changing state, a small perturbation can alter the active computation substantially. The constant C_2 controls this sensitivity.
Condition C3 limits unusually large incoming weights at individual hidden units relative to the active layer’s overall weight magnitude.
h_i ‖W_i‖_{2,∞}² ≤ C_3² ‖D_iW_i‖_F²
The quantity ‖W_i‖_{2,∞} is the largest Euclidean norm among incoming weight vectors in layer i. Multiplication by h_i compares that largest value with the layer-wide quantity on the right. The constant C_3 bounds the allowed imbalance.
The proof first holds the activation pattern fixed and studies perturbations of the resulting matrix product. It then bounds the additional output change caused by activation switches. A loss Lipschitz constant, C_L, converts output changes into loss changes.
One resulting expected-sharpness expression has the following structure.
E_ε[L̂(f_{w+ε})] − L̂(f_w) ≤ O((∏_i(1+γ_i) − 1 + ∏_i(1+γ_i C_2 C_3)(∏_i(1+γ_i C_δ C_2) − 1)) C_L Σ_{x∈S}‖f_w(x)‖_F/m)
The set S is the training sample, and the sum averages output magnitudes across it. The notation O suppresses constants in the bound. The first product contribution describes perturbations with activations held fixed; the additional contribution accounts for changing activations.
The normalized layer noise is defined using active-layer weight magnitude.
γ_i = σ_i√h_i√h_{i−1} / (μ²‖D_iW_i‖_F)
Here, σ_i is the Gaussian noise standard deviation at layer i. The widths h_i and h_{i−1} determine the dimensions of that layer’s weight matrix. This γ_i is a layer perturbation quantity, distinct from the prediction margin γ_margin.
The logarithmic factor is:
C_δ = 2√ln(dh/δ)
The symbol h is the largest layer width, d is depth, and δ is the probability parameter. Combining the sharpness estimate with the PAC-Bayes penalty gives the generalization argument.
The authors then choose layerwise perturbation scales in a way that removes an unfavorable exponential dependence on depth from the resulting analysis. This improvement is conditional on the network satisfying C1, C2, and C3. It is not a claim that arbitrary deep networks have small sharpness or that depth ceases to matter.
Train the experimental networks consistently
The width experiment uses a ReLU perceptron on MNIST, varying its hidden-layer size. It excludes Batch Normalization and dropout. This simplifies the comparison by avoiding those additional components while examining how width changes the fitted solution.
The other main experiments use a modified VGG architecture on CIFAR10. Its convolutional stacks use the configurations 2×[64,3,3,1], 2×[128,3,3,1], 2×[256,3,3,1], and 2×[512,3,3,1]. Batch Normalization precedes ReLU activations. After the stacks, the architecture applies max-pooling and dropout, then average pooling; a fully connected layer containing 512 hidden units precedes the final linear layer used for prediction.
Across experiments, SGD uses mini-batches of 64, a learning rate of 0.01, and momentum 0.9. Weight decay is absent. Where perfect training classification is attainable, optimization continues until cross-entropy is below 10⁻⁴.
Before computing norms for networks containing Batch Normalization, the authors convert the parameterization to an equivalent network without that component. The represented function remains the same. This step makes the norm calculation correspond to the form being analyzed rather than an arbitrary distribution of scale across components.
Experiments and results
The experiments evaluate explanations of generalization rather than the performance of a newly proposed classifier. The comparisons are between label conditions, training constraints, and network widths. Training error, test error, normalized norms, worst-case sharpness, and expected-sharpness tradeoff curves play different roles: the errors establish behavior, while the other quantities are candidate explanations.
The main results are reported as curves. The paper’s prose supplies important settings and thresholds, but it does not tabulate precise test-error values for the main comparisons. Accordingly, the numerical conclusions should remain at that level. The reported evidence supports statements about direction, separation, and failure of an explanation, without supplying an exact test-error improvement for every setting.
Genuine labels and random labels
The first comparison trains a VGG network on CIFAR10 subsets with either genuine labels or randomized labels. Every resulting network in this comparison reaches perfect training classification. Training success alone therefore cannot distinguish learning a meaningful relationship from memorizing the assigned labels.
VGG on CIFAR10 subsets, training classification error
Both label conditions fit their training examples perfectly.
The numbers
| System or setting | training classification error |
|---|---|
| Random labels | 0 |
| True labels (this paper) | 0 |
The star identifies the genuine-label reference condition. It does not indicate a lower training error: the chart records a tie on that metric. The meaningful distinction appears in generalization and in the candidate complexity diagnostics.
All the investigated normalized norms are higher for networks trained with random labels than for those trained with genuine labels. The separation also grows as the training subset becomes larger. This is consistent with the authors’ expectation that each additional random assignment demands further accommodation, whereas additional meaningful examples can reinforce an existing relationship.
The different rates of growth are most pronounced for the Frobenius-based and squared-path comparisons. The result supports these measures as useful diagnostics for this particular distinction. It does not establish that any one of them predicts an exact amount of test error.
Worst-case sharpness behaves less reliably. In part of the comparison, the random-label networks appear less sharp in spite of their unfavorable generalization. This directly challenges the interpretation that a lower value of the chosen sharpness definition is sufficient evidence of a better solution.
The expected-sharpness tradeoff curves behave more plausibly. Genuine-label training occupies more favorable combinations of expected loss increase and the weighted norm-related penalty. At an expected sharpness of 0.05, the paper reports that random-label networks require a larger norm-related quantity. The comparison therefore recovers information that a single sharpness measurement misses.
Different solutions for the same genuine training subset
The confusion-set experiment fixes a CIFAR10 training subset containing 10,000 genuinely labeled examples. Additional CIFAR10 examples receive random labels and form a confusion set. The authors vary the size of that set while training on the combined data.
The resulting networks fit the genuine subset perfectly, and the construction generally also allows perfect classification of the confusion examples. Evaluation uses an independent test set. As the confusion set grows, test error rises even though genuine training error remains unchanged.
This is a stronger test than simply comparing separate true-label and random-label tasks. Every network remains successful on the same genuine examples. What changes is the additional memorization demand placed on the fitted solution.
Norm-based measures track the worsening test behavior in this experiment. Worst-case sharpness again performs poorly as an explanation. The joint expected-sharpness comparison is more informative: when expected sharpness is held at a given level, networks with worse test performance require a larger norm-related penalty.
The paper does not give exact test-error values for these settings in its prose. Its conclusion is about how the diagnostic curves relate to the increasing confusion-set demand, instead of a numerical ranking of particular confusion-set sizes.
Wider networks on MNIST
The width experiment provides the paper’s clearest counterexample to a complete explanation. A ReLU perceptron with 32 hidden units can already fit the MNIST training examples. Increasing width nevertheless improves test performance.
Up to 128 hidden units, the normalized norm comparisons move in the expected direction: they decrease as generalization improves. Beyond that region, the agreement breaks down. The Frobenius-based quantity and the absolute-path quantity increase with further width.
The squared-path quantity may initially seem more promising when only its plotted weight-dependent component is considered. Its full capacity expression, however, includes width factors. Once those are included, the explanation no longer follows the improving test behavior.
The spectral comparison faces a similar problem. Its margin-based capacity expression contains architecture-dependent factors, and even the plotted spectral quantity eventually increases beyond 512 hidden units. The alternative route through input Lipschitz continuity is also theoretically loose.
The expected-sharpness tradeoff improves through width 128 but fails to explain the continued benefit of larger networks. This result prevents the paper from treating its preferred joint diagnostic as a universal account.
Checking the sharpness assumptions
For the theoretical conditions, the authors examine a feedforward network with 10 layers and 1000 hidden units per layer on MNIST. The network contains more than 10,000,000 parameters. They numerically assess the interaction, activation-sensitivity, and weight-concentration quantities associated with C1, C2, and C3.
The reported empirical ranges are μ≥1/4, C_2≤5, and C_3≤3. These values support the claim that the sufficient conditions need not describe only pathological or artificially constructed networks. They can have moderate values in the examined trained network.
The appendix also compares trained weights with random initialization. The condition-related measurements are similar in those comparisons. That observation matters for interpretation: the conditions help establish a possible sharpness bound, but their measured values do not on their own explain everything that learning changes.
What the ablations show
The paper offers controlled comparisons and diagnostic analyses rather than a conventional component-removal study. Its question is whether a proposed explanation survives changes that should matter for generalization. Each comparison holds some properties fixed while deliberately changing others.
Random labels separate fitting from useful learning
Randomizing labels preserves the inputs and the expressive resources of the architecture while disrupting the meaningful target relationship. Because the network still reaches perfect training classification, the experiment demonstrates why architecture-level capacity cannot be the entire explanation.
The normalized norm results are encouraging under this control. They assign larger values to the solutions that accommodate arbitrary assignments. The growing separation with training-subset size also fits the proposed distinction between learning shared structure and repeatedly satisfying unrelated constraints.
This control does not establish that a norm is the causal mechanism through which optimization generalizes. It establishes a relationship between the diagnostic and a deliberately extreme change in the learning task. The later width comparison is necessary precisely because a measure can succeed here and fail elsewhere.
The confusion set tests ranking within a fixed task
The confusion-set construction keeps the genuine training subset fixed and adds random constraints. This removes a possible ambiguity in the first experiment: perhaps a measure merely distinguishes different labeling tasks without ranking solutions to a common task.
Here, every network fits the same genuine examples. The worsening independent-test behavior therefore provides a meaningful ordering among successful training solutions. A useful complexity diagnostic should follow that ordering.
The norm and joint expected-sharpness comparisons do so qualitatively. Worst-case sharpness does not. This reinforces the paper’s argument that sensitivity measured at one chosen parameter neighborhood is an incomplete explanation.
The construction also has a scope limit. It deliberately steers optimization by adding randomly labeled examples. It demonstrates that different successful solutions can be generated and assessed, but it is not a comprehensive comparison of naturally occurring differences between optimizers.
The perturbation sweep reveals the missing tradeoff
Changing the perturbation scale changes what stability means. With very small noise, many solutions can preserve their training predictions. With larger noise, the same solutions may become unreliable. A single sharpness value therefore depends heavily on the chosen neighborhood.
The tradeoff curves expose this dependence. Instead of asking whether one network is sharper at an arbitrary noise level, the reader can ask how much divergence penalty is required to maintain a specified expected loss increase.
This is the substantive role of PAC-Bayes in the experiments. It identifies the second quantity that a pure stability comparison omits. The theory explains why making perturbations smaller is not a free route to a favorable complexity assessment.
The result is still comparative rather than a precise forecast. The authors do not claim that the plotted curve can be translated directly into an exact test error. Their preference for displaying both criteria reflects that caution.
Width exposes incomplete explanations
Increasing width is a particularly demanding control because it changes the architecture itself. Factors that were constant in the CIFAR10 comparisons can no longer be dropped.
The paper shows why this matters. A path-weight statistic can improve while the full capacity expression fails to improve because the expression also depends on hidden-layer sizes. The apparent success disappears when the theoretical quantity is reconstructed correctly.
The eventual failure of the expected-sharpness comparison is equally important. It means that combining two sensible ingredients does not automatically capture the effects of overparameterization. The width result remains evidence that a further ingredient, a sharper analysis, or a different description of the selected solution is needed.
Initialization comparisons qualify the structural conditions
The appendix examines the sufficient conditions both before and after training. Similarity between random initialization and learned weights suggests that these conditions are not uniquely created by successful fitting.
That finding does not make the conditions irrelevant. Their role is to prevent particular ways in which noise could be amplified, so they can support a theorem even if they already hold before learning.
It does mean that verifying C1, C2, and C3 is not enough to explain why the trained network solves the task. The bound still depends on training performance, perturbation magnitudes, parameter quantities, and output behavior. The conditions establish a controlled setting for the analysis rather than a complete signature of learned generalization.
Limitations
The authors’ clearest stated limitation is that none of the investigated measures explains every phenomenon. The width experiment supplies a direct failure case. Larger MNIST networks continue to generalize better after the candidate measures stop following that improvement. Any account of the paper that presents normalized norms or expected sharpness as a final answer would omit this central result.
A further limitation stated by the authors concerns optimization. Even when a measure tracks generalization, the paper does not establish precisely why an optimizer should prefer a low value of that measure. Identifying a promising property of a solution and explaining the mechanism that produces that property are different scientific tasks. The connection between optimization and implicit regularization remains unresolved.
Limits acknowledged in the theoretical analysis
The capacity expressions are intended as coarse guides. The authors explicitly avoid treating them as precise numerical predictors of generalization error. Their comparisons focus on trends and relative phenomena, with several terms suppressed when those terms are constant within an experiment.
The norm-based arguments also have unfavorable dependencies in some settings. Several involve depth factors, and the squared-path and spectral expressions include width factors. The paper notes uncertainty about whether all parameter-related dependence in the spectral bound is necessary.
Lipschitz continuity alone gives another weak route. A function can be locally controlled yet still require an enormous covering of a high-dimensional input space. The resulting generalization argument can grow exponentially with input dimension. Accordingly, input smoothness cannot simply replace the more detailed capacity analysis.
The PAC-Bayes combination is also loose. The authors’ decision to inspect tradeoff curves follows from that limitation. A numerical optimum of the displayed bound need not identify a uniquely meaningful operating point for explaining practical performance.
The improved depth analysis requires C1, C2, and C3. These are sufficient conditions excluding weak interlayer interactions, excessive switching sensitivity, and highly concentrated incoming weight magnitude. Their verification in an examined network does not turn the theorem into an unconditional statement about all trained networks.
Limits visible in the experimental setup
A careful reader should distinguish estimated sharpness from an exact mathematical maximum. The worst-case experiment uses a finite stochastic ascent procedure. It searches for damaging perturbations but does not establish that the global maximum over the entire allowed region has been found.
Expected sharpness is also estimated. The authors average over 1000 perturbations, with losses evaluated on mini-batches of size 64. This makes the diagnostic feasible, but it remains a sampled quantity. The paper’s prose does not provide a full uncertainty analysis for every curve.
The experimental coverage is focused. CIFAR10 supports the VGG comparisons, while MNIST supports the width and condition-verification studies. These experiments are informative tests of the proposed measures, but they do not establish the same relationships for arbitrary architectures, objectives, or application domains.
The different experiments also use different architectural components. The width study excludes Batch Normalization and dropout, whereas the modified VGG includes them. The paper therefore offers several complementary tests rather than a single factorial experiment that independently isolates every architectural choice.
The confusion-set procedure is deliberately artificial. That is a strength for constructing solutions with different generalization while preserving genuine training success. It also limits what can be inferred about ordinary training without that intervention. A measure that tracks the confusion-set result has passed a useful stress test, not every possible optimization comparison.
What the guarantees directly concern
The PAC-Bayes bound evaluates a randomized predictor. Its population loss is averaged over parameter perturbations. A careful reader should not silently substitute the unperturbed network into the same statement.
The reference distribution must also meet the independence requirement. Choosing a convenient distribution after inspecting the training sample cannot simply be treated as though it had been fixed beforehand. The paper states the independence condition, and any practical adaptation must preserve the logic supporting it.
There is also a distinction between classification error and cross-entropy. Perfect classification does not imply that cross-entropy has reached its infimum. Continued optimization can enlarge output scores and weight norms while leaving classification decisions unchanged. This is why raw norms can reflect stopping behavior, and why normalization is essential to the authors’ interpretation.
Finally, favorable measurements do not prove causation. A low normalized norm or an attractive tradeoff curve can accompany good test behavior without being the unique reason for that behavior. The paper provides theoretical sufficiency arguments under particular assumptions and empirical associations under particular controls. It does not establish one universal causal explanation of generalization.
What came after
The later citation trail reaches scaling, memorization, compression, safety, and language applications. That breadth is consistent with the importance of the question posed here: what properties of a learned solution explain behavior beyond its training examples? Citation alone, however, does not establish that a later work adopted the same norm, repeated the same experiment, or improved the same bound. The connections below distinguish the subject indicated by each later work from a demonstrated technical continuation.
A Constructive Prediction of the Generalization Error Across Scales addresses generalization across changing scales. It is the closest thematic continuation among these citations because this paper also tests what happens when training-set size and network width change. The difference in emphasis is useful: Neyshabur and colleagues assess candidate complexity explanations, whereas the later title points toward constructive prediction of error. The citation establishes contact with the generalization problem, but it does not by itself show that the later work uses the same PAC-Bayes tradeoff or the same margin normalization.
What Neural Networks Memorize and Why: Discovering the Long Tail via Influence Estimation places memorization itself at the center and identifies influence estimation as its approach. That connects naturally to the distinction between fitting arbitrary labels and learning a reusable relationship. The earlier paper uses random labels and confusion examples as controlled tests of complexity measures. The later work’s title instead points toward investigating what is memorized and why. Its citation should not be read as establishing that every form of memorization is equivalent to the random-label behavior studied here.
GShard concerns scaling through conditional computation and automatic sharding. Its connection is broader: this paper argues that parameter count alone is an inadequate explanation of generalization, which makes the question relevant whenever systems become larger. The later work belongs to the engineering context of GPU and parallel computing. The citation does not establish that GShard validates the sharpness conditions, computes the normalized norms, or uses this paper’s analysis to obtain a generalization guarantee.
Language Modeling Is Compression brings the discussion into the relationship between language prediction and compression. That is adjacent to minimum description length, another way to think about the resources needed to express learned regularities. The connection is conceptual instead of an equivalence established here. A compression-oriented explanation should not be identified with a norm-based capacity measure or a PAC-Bayes divergence without an explicit argument. The citation shows that this paper remains part of a broader conversation about learning and complexity.
Foundational Challenges in Assuring Alignment and Safety extends the citation trail into questions of assurance. The relevant connection is the difficulty of inferring behavior outside observed training conditions, a concern with clear relevance to bias, fairness and safety. This paper’s contribution to that conversation is limited but important: even ordinary predictive generalization is not fully explained by simple size or sharpness diagnostics. Nothing in its experiments establishes an alignment or safety guarantee, and the later citation does not transform its classification bounds into one.
Meta-Learning based Deferred Optimisation for Sentiment and Emotion aware Multi-modal Dialogue Act Classification concerns optimization for a language application involving sentiment and emotion. Its subject places it near the unresolved question of how a training procedure influences behavior beyond its examples. The earlier paper makes that question explicit but does not study dialogue classification or deferred optimization. The citation supports a relationship to the broader problem; it does not establish that the later method implements the same complexity diagnostics.
Across these later works, the most defensible inheritance is a research question and a standard of evidence. Explanations of learning should distinguish representational capacity from the particular solution selected by training. They should account for scale, survive controlled comparisons, and state which observed phenomena remain unexplained. Exploring Generalization in Deep Learning is valuable because it applies that standard to its own preferred ideas, including the experiments where those ideas stop working.
Cite
Cite as Behnam Neyshabur, Srinadh Bhojanapalli, David McAllester and Nathan Srebro. 2017. Exploring Generalization in Deep Learning. arXiv (Cornell University).
@misc{neyshabur2017exploring,
title = {{Exploring Generalization in Deep Learning}},
author = {Behnam Neyshabur, Srinadh Bhojanapalli, David McAllester and Nathan Srebro},
year = {2017},
doi = {10.48550/arxiv.1706.08947},
eprint = {1706.08947},
archivePrefix = {arXiv},
url = {https://doi.org/10.48550/arxiv.1706.08947}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/neyshabur-2017-exploring-generalization-deep-learning/
References
- M. Anthony and P. L. Bartlett. Neural network learning: Theoretical foundations. cambridge university press, 2009. OpenAlex ↗ · Scholar ↗
- P. L. Bartlett. The sample complexity of pattern classification with neural networks: the size of the weights is more important than the size of the network. IEEE transactions on Information Theory, 440 (2):0 525–536, 1998. OpenAlex ↗ · Scholar ↗
- P. L. Bartlett. The impact of the nonlinearity on the VC-dimension of a deep network. Preprint, 2017. OpenAlex ↗ · Scholar ↗
- P. L. Bartlett and S. Mendelson. Rademacher and gaussian complexities: Risk bounds and structural results. Journal of Machine Learning Research, 30 (Nov):0 463–482, 2002. OpenAlex ↗ · Scholar ↗
- P. L. Bartlett, V. Maiorov, and R. Meir. Almost linear vc dimension bounds for piecewise polynomial networks. Neural computation, 100 (8):0 2159–2173, 1998. OpenAlex ↗ · Scholar ↗
- P. Chaudhari, A. Choromanska, S. Soatto, and Y. LeCun. Entropy-sgd: Biasing gradient descent into wide valleys. arXiv preprint arXiv:1611.01838, 2016. OpenAlex ↗ · Scholar ↗
- G. K. Dziugaite and D. M. Roy. Computing nonvacuous generalization bounds for deep (stochastic) neural networks with many more parameters than training data. arXiv preprint arXiv:1703.11008, 2017. OpenAlex ↗ · Scholar ↗
- T. Evgeniou, M. Pontil, and T. Poggio. Regularization networks and support vector machines. Advances in computational mathematics, 130 (1):0 1–50, 2000. OpenAlex ↗ · Scholar ↗
- M. Hardt, B. Recht, and Y. Singer. Train faster, generalize better: Stability of stochastic gradient descent. In ICML, 2016. OpenAlex ↗ · Scholar ↗
- N. Harvey, C. Liaw, and A. Mehrabian. Nearly-tight vc-dimension bounds for piecewise linear neural networks. arXiv preprint arXiv:1703.02930, 2017. OpenAlex ↗ · Scholar ↗
- N. S. Keskar, D. Mudigere, J. Nocedal, M. Smelyanskiy, and P. T. P. Tang. On large-batch training for deep learning: Generalization gap and sharp minima. arXiv preprint arXiv:1609.04836, 2016. OpenAlex ↗ · Scholar ↗
- J. Langford and R. Caruana. (not) bounding the true error. In Proceedings of the 14th International Conference on Neural Information Processing Systems: Natural and Synthetic, pages 809–816. MIT Press, 2001. OpenAlex ↗ · Scholar ↗
- U. v. Luxburg and O. Bousquet. Distance-based classification with lipschitz functions. Journal of Machine Learning Research, 50 (Jun):0 669–695, 2004. OpenAlex ↗ · Scholar ↗
- D. McAllester. Simplified pac-bayesian margin bounds. Lecture notes in computer science, pages 203–215, 2003. OpenAlex ↗ · Scholar ↗
- D. A. McAllester. Some PAC-Bayesian theorems. In Proceedings of the eleventh annual conference on Computational learning theory, pages 230–234. ACM, 1998. OpenAlex ↗ · Scholar ↗
- D. A. McAllester. PAC-Bayesian model averaging. In Proceedings of the twelfth annual conference on Computational learning theory, pages 164–170. ACM, 1999. OpenAlex ↗ · Scholar ↗
- B. Neyshabur, R. Salakhutdinov, and N. Srebro. Path-SGD: Path-normalized optimization in deep neural networks. In Advanced in Neural Information Processsing Systems (NIPS), 2015a. OpenAlex ↗ · Scholar ↗
- B. Neyshabur, R. Tomioka, and N. Srebro. Norm-based capacity control in neural networks. In Proceeding of the 28th Conference on Learning Theory (COLT), 2015b. OpenAlex ↗ · Scholar ↗
- B. Neyshabur, R. Tomioka, and N. Srebro. In search of the real inductive bias: On the role of implicit regularization in deep learning. Proceeding of the International Conference on Learning Representations workshop track, 2015c. OpenAlex ↗ · Scholar ↗
- B. Neyshabur, R. Tomioka, R. Salakhutdinov, and N. Srebro. Data-dependent path normalization in neural networks. In the International Conference on Learning Representations, 2016a. OpenAlex ↗ · Scholar ↗
- B. Neyshabur, Y. Wu, R. Salakhutdinov, and N. Srebro. Path-normalized optimization of recurrent neural networks with relu activations. Advances in Neural Information Processing Systems, 2016b. OpenAlex ↗ · Scholar ↗
- S. Shalev-Shwartz and S. Ben-David. Understanding machine learning: From theory to algorithms. Cambridge university press, 2014. OpenAlex ↗ · Scholar ↗
- K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. our card
- A. J. Smola, B. Schölkopf, and K.-R. Müller. The connection between regularization operators and support vector kernels. Neural networks, 110 (4):0 637–649, 1998. OpenAlex ↗ · Scholar ↗
- J. Sokolic, R. Giryes, G. Sapiro, and M. R. Rodrigues. Generalization error of invariant classifiers. arXiv preprint arXiv:1610.04574, 2016. OpenAlex ↗ · Scholar ↗
- N. Srebro and A. Shraibman. Rank, trace-norm and max-norm. In International Conference on Computational Learning Theory, pages 545–560. Springer Berlin Heidelberg, 2005. OpenAlex ↗ · Scholar ↗
- N. Srebro, J. Rennie, and T. S. Jaakkola. Maximum-margin matrix factorization. In Advances in neural information processing systems, pages 1329–1336, 2005. OpenAlex ↗ · Scholar ↗
- H. Xu and S. Mannor. Robustness and generalization. Machine learning, 860 (3):0 391–423, 2012. OpenAlex ↗ · Scholar ↗
- C. Zhang, S. Bengio, M. Hardt, B. Recht, and O. Vinyals. Understanding deep learning requires rethinking generalization. In International Conference on Learning Representations, 2017. OpenAlex ↗ · Scholar ↗