Source-linked AI summary

Why ResNet Works? Residuals Generalize

Fengxiang He, Tongliang Liu, Dacheng Tao

arXiv:1904.01367v1stat.MLcs.LG

TL;DR

Residual connections improve deep-network training, but their effect on hypothesis complexity and generalization has lacked theoretical explanation. This paper analyzes residual networks through covering numbers and derives generalization guarantees. It finds that, with fixed counts of weight matrices and nonlinearities, residual connections need not increase hypothesis complexity relative to chain-like networks, and it links generalization to controlling weight-matrix norms.

  • Problem

    The paper addresses the limited theoretical evidence explaining why residual connections can reduce training error while preserving generalization in more complex networks.

  • Method

    The paper upper-bounds residual-network hypothesis-space covering numbers and combines these bounds with margin-based statistical-learning results to derive ResNet generalization guarantees.

  • Results

    With fixed total counts of weight matrices and nonlinearities, the covering-number upper bound matches chain-like networks, and ResNet obtains an O(1 / sqrt(N)) margin-based multi-class generalization bound.

  • Takeaways & Limitations

    Residual connections may preserve chain-like hypothesis complexity and generalization, while controlling weight-matrix norms supports good generalization and justifies weight decay.

  • Takeaways & Limitations

    The cross-influence mechanism between residual vines and the stem remains an open problem, constraining the theory’s explanation of their interaction.

Abstract

from arXiv · show

Residual connections significantly boost the performance of deep neural networks. However, there are few theoretical results that address the influence of residuals on the hypothesis complexity and the generalization ability of deep neural networks. This paper studies the influence of residual connections on the hypothesis complexity of the neural network in terms of the covering number of its hypothesis space. We prove that the upper bound of the covering number is the same as chain-like neural networks, if the total numbers of the weight matrices and nonlinearities are fixed, no matter whether they are in the residuals or not. This result demonstrates that residual connections may not increase the hypothesis complexity of the neural network compared with the chain-like counterpart. Based on the upper bound of the covering number, we then obtain an $\mathcal O(1 / \sqrt{N})$ margin-based multi-class generalization bound for ResNet, as an exemplary case of any deep neural network with residual connections. Generalization guarantees for similar state-of-the-art neural network architectures, such as DenseNet and ResNeXt, are straight-forward. From our generalization bound, a practical implementation is summarized: to approach a good generalization ability, we need to use regularization terms to control the magnitude of the norms of weight matrices not to increase too much, which justifies the standard technique of weight decay.

1 Introduction

The paper addresses the limited theoretical analysis of how residual connections affect neural-network complexity and generalization. It bounds hypothesis-space covering numbers and derives a ResNet generalization guarantee, with weight-norm control as the practical implication.

  • Motivation: Residual connections improve training and preserve test performance empirically, but their effect on generalization has received little theoretical analysis.Residual links can reduce training error and accelerate training while maintaining generalization, yet no theoretical evidence had explained this pattern.
  • Main contribution: The covering-number upper bound remains unchanged when the total numbers of weight matrices and nonlinearities are fixed, regardless of whether matrices lie in residuals or the stem.Thus residual connections may not increase hypothesis-space complexity relative to a chain-like network under these fixed-count conditions.
  • Main contribution: O(1 / sqrt(N)) is the resulting generalization-bound rate for ResNet, with N denoting training-sample size.The bound is obtained from the covering-number analysis and serves as an exemplary result for neural networks with residual connections.
  • Practical implication: The bound depends negatively on the product of all weight-matrix norms, motivating regularization that controls their magnitudes.The paper identifies weight decay, using the L2 norm of weights, as a standard implementation justified by this result.

2 Related Works

Related work develops empirical and theoretical measures of neural-network generalization, including Jacobian norms, linear regions, VC dimension, Rademacher complexity, sharpness, robustness, and Fisher-Rao norms.

  • Complexity-based theory: VC-dimension analyses provide O(WL log(W)) upper bounds and Θ(WU) tight bounds for ReLU networks, yielding O(h/N) generalization bounds.Here W, L, and U denote width, depth, and number of hidden units, while h denotes VC dimension.
  • Complexity-based theory: Rademacher-complexity bounds based on layerwise weight-matrix norms can yield O(1 / sqrt(N)) generalization-error bounds with improved depth dependence.Under additional assumptions, these bounds can be independent of network size.
  • Alternative measures: Other theoretical approaches study norm control, sharpness, robustness, scale normalization, and Fisher-Rao norms as explanations of deep-network generalization.Fisher-Rao norm analysis also establishes norm-comparison inequalities connecting it with multiple norm-based complexity measures.
  • Empirical analyses: Empirical studies link generalization to input-output Jacobian norms, linear-region counts, and closeness of the output hypothesis to the data manifold.These findings provide comparative evidence about factors associated with generalization ability.
  • Research gap: Prior theory mainly analyzes chain-like networks, including spectral-normalized margin bounds and PAC-Bayesian results, motivating this paper’s residual-network analysis.The literature also includes broad open problems concerning generalization despite large capacity, instability, nonrobustness, and sharp minima.

3 Preliminary

The preliminary section defines generalization and hypothesis complexity tools for multi-class margin analysis. It connects covering numbers to Rademacher complexity and then to generalization bounds.

  • Generalization concepts: Generalization error is the difference between expected risk and empirical risk, so a generalization bound quantitatively expresses an algorithm’s generalization capability.Expected risk is equivalently described as expected test error, and empirical risk as training error.
  • Complexity measures: Hypothesis complexity is characterized through VC dimension, Rademacher complexity, and covering number, with covering number upper bounding the other complexity measures.These measures are standard tools for analyzing algorithmic generalization.
  • Margin analysis: The multi-class framework defines a margin operator and empirical ramp risk, where empirical ramp risk expresses the hypothesis function’s training error.The setup uses k-class hypotheses F: R^n0 → R^k and a margin parameter λ.
  • From complexity to bounds: A margin-based generalization lemma relates classification error to empirical Rademacher complexity, while another lemma bounds that complexity through covering numbers.Combining the lemmas enables generalization bounds through covering-number upper bounds.
  • Technical assumptions: The analysis assumes measurability and integrability issues can be ignored and that Fubini’s theorem applies with exchangeable integration order.These are explicit technical assumptions used throughout the paper.

4 Stem-Vine Framework

The stem-vine framework represents residual networks as a chain-like stem plus residual vines, each composed of weight matrices and nonlinearities. It formalizes their topology and associated functions.

  • Framework definition: The stem-vine framework is a notation system motivated by the topology of residual networks.The chain-like component is called the stem, while residual connections are called vines.
  • Stem: The stem is represented as a sequence of alternating weight matrices and nonlinearities, with indexed vertices between these operators.The notation tracks matrix counts, nonlinearity counts, layer dimensions, and vertex positions.
  • Vines: Vines connect two stem vertices and are indexed by triples identifying their source vertex, destination vertex, and vine number.Each vine is itself constructed from a series of weight matrices and nonlinearities.
  • Network operations: Weight matrices induce affine transformations, nonlinearities induce nonlinear transformations, and their compositions extract hierarchical features from input data.The framework uses spectrum norms and Lipschitz constants to express transformation intensities.
  • Counting operators: Residual connections can make matrix and nonlinearity counts differ when a vine joins the stem between operators that cannot be merged.The 34-layer ResNet example has more nonlinearities than weight matrices in this situation.
  • Functional notation: The framework defines functions for vines, the stem, intermediate stem outputs, and the final residual-network hypothesis, with Figure 1 providing an example.The notation is applied to multi-class inputs collected as a data matrix.

5 Generalization Bound

The paper derives covering-number bounds for residual networks and uses them to explain why residual connections need not worsen hypothesis complexity or generalization relative to chain-like networks. The analysis further connects these bounds to training-error reductions and weight decay.

  • The framework derives a generalization bound for residual networks by first bounding hypothesis-space covering numbers, then applying margin-based multi-class learning results.The approach is developed generally under the stem-vine framework and instantiated for ResNet.
  • When the total number of weight matrices is fixed, their contribution to covering complexity is invariant whether they occur in the stem or residual vines.This is the central covering-bound property for networks with residual connections.
  • Residual connections require a novel covering-number proof because parallel additions of function spaces cannot be handled directly as layerwise compositions.The proof analyzes vines and then uses induction for the whole network.
  • Adding an identity vine does not affect hypothesis complexity because it introduces no tunable parameters.Its associated covering-number factor equals 1.
  • The cross-influence of residual vines on the stem contribution to the covering bound remains an open problem.Thus, the analysis does not fully characterize all interactions between stem and vine components.
  • The resulting bounds indicate that residual and chain-like networks can have equivalently good worst-case generalization when corresponding weight-matrix counts are fixed.The paper presents this as an explanation for ResNet's generalization despite its competitive training performance.
  • The bound depends on weight-matrix norms, motivating regularization that prevents their magnitudes from increasing too much; weight decay provides this control.The paper links weight decay to improved generalization through its effect on the norms appearing in the bound.

6 Proofs

The proofs build covering-number bounds incrementally for stems, nonlinearities, weight matrices, and residual vines, then derive the stated bounds for general residual networks and ResNet.

  • Proof strategy: The appendix proves covering bounds for single weight matrices, deep networks under the stem-vine framework, ResNet, and ResNet’s generalization bound.The single-matrix affine-transformation bound is the foundation for the subsequent proofs.
  • Stem bounds: An induction procedure propagates covering bounds through the stem by analyzing weight matrices and nonlinearities one at a time.Weight-matrix contributions use norm bounds, while Lipschitz nonlinearities scale cover radii without changing covering numbers.
  • Stem bounds: A weight matrix with norm at most s_j+1 transforms an ε2j+1-cover into an (s_j+1 + 1)ε2j+1-cover.The bound follows by decomposing the approximation error into the propagated prior error and the matrix-cover error.
  • Residual bounds: Residual vines are handled as chain-like subnetworks, and their outputs are combined element-wise with stem outputs when constructing the full network cover.Identity vines have covering number 1 because they contain no tunable parameters.
  • Residual bounds: The proof obtains Theorem 1’s covering bound by adding vines inductively, then applies the resulting construction to prove the ResNet bound.The explicit formulation of the final cover radius ε is omitted because it is considered too complex to benefit the theory.

7 Conclusion and Future Work

The paper develops covering-number and generalization bounds for deep neural networks with residual connections, with extensions to architectures such as DenseNet and ResNeXt. Its whole-hypothesis-space analysis leaves localization-based tightening as future work because concrete evidence and the mechanism remain unresolved.

  • The paper provides an upper bound for the covering number of hypothesis spaces induced by deep neural networks with residual connections.
  • The resulting ResNet covering and generalization bounds can be extended to state-of-the-art architectures such as DenseNet and ResNeXt.The paper describes this extension as straightforward because of the generality of its results.
  • The analysis uses the complexity of the whole hypothesis space rather than localization properties explored by stochastic gradient descent.Recent experiments suggest SGD explores only part of the hypothesis space, motivating localized analysis.
  • Localization properties could yield a tighter upper bound of the generalization error, but concrete supporting evidence and the exact mechanism remain open problems.The authors identify this as future work.
Loading 1904.01367v1…