On the Reflection of Sensitivity in the Generalization Error

Even though recent works have brought some insight into the performance improvement of techniques used in state-of-the-art deep-learning models , more work is needed to understand the generalization properties of over-parameterized deep neural networks . We shed light on this matter by linking the loss function to the output ’ s sensitivity to its input . We find a rather strong empirical relation between the output sensitivity and the variance in the bias-variance decomposition of the loss function , which hints on using sensitivity as a metric for comparing generalization performance of networks , without requiring labeled data . We find that sensitivity is decreased by applying popular methods which improve the generalization performance of the model , such as ( 1 ) using a deep network rather than a wide one , ( 2 ) adding convolutional layers to baseline classifiers instead of adding fully connected layers , ( 3 ) using batch normalization , dropout and max-pooling , and ( 4 ) applying parameter initialization techniques . 1 INTRODUCTION . In machine-learning tasks , the main challenge a network designer faces is to find a model that learns the training data and that is able to predict the output of unseen data with high accuracy . The first part is easily achievable in current over-parameterized deep neural networks . Yet the second part , referred to as generalization , demands careful expert hand-tuning ( LeCun et al . ( 2015 ) , Goodfellow et al . ( 2016 ) ) . Modern convolutional neural network ( CNN ) architectures that achieve state-of-the-art results in computer-vision tasks , such as ResNet ( He et al. , 2016 ) and VGG ( Simonyan & Zisserman , 2014 ) , attain high-generalization performance . Part of their success is due to recent advances in hardware and the availability of large amounts of data . However , among models applying these resources , some outperform others . Hence , the key questions about when and why some models generalize , still remain a mystery ( Neyshabur et al. , 2017 ) . In this paper , by investigating the link between sensitivity and generalization , we get one step closer to understanding the generalization properties of neural networks . Our findings suggest a relation between the sensitivity metric and the variance term in the bias-variance decomposition of the test loss ( Geman et al . ( 1992 ) , Tibshirani ( 1996 ) , Neal et al . ( 2018 ) ) . This relation provides us with some intuition about the link , when the bias is small , between sensitivity and loss . We present strong empirical results on the link between the sensitivity and the test loss in well-established deep neural networks with ReLU ( Nair & Hinton , 2010 ) non-linearity . Building on this relation , we can use the sensitivity metric to examine which network is more prone to overfitting , and we rediscover the generalization properties of certain structures . We provide numerical evidence that a significant decrease in the network output ’ s sensitivity to input perturbations can be a good predictor of the generalization capability of certain techniques used in state-of-the-art models , such as batch normalization ( Ioffe & Szegedy , 2015 ) and He initialization ( He et al. , 2015 ) . Sensitivity also supports the commonly accepted observation that depth is better than width in deep neural networks ( Bengio & Delalleau ( 2011 ) , Montufar et al . ( 2014 ) , Telgarsky ( 2016 ) , Mhaskar et al . ( 2017 ) ) . Furthermore , in certain settings , the sensitivity of untrained networks can be used as a proxy for the generalization error of trained networks . 2 RELATED WORK . Recently , Sokolić et al . ( 2017 ) suggested bounding the generalization error of deep neural networks with the spectral norm of the input-output Jacobian matrix , a measure of output sensitivity to its inputs . Empirical support for their conclusions is provided in Novak et al . ( 2018 ) through experiments on fully connected neural networks . Further research is needed to determine the conditions that are required to compare the generalization performance of models by using sensitivity metrics . For this purpose , we provide theoretical and empirical insights to the link between sensitivity and generalization by studying the relation between sensitivity and the variance term in the bias-variance decomposition of the loss function . To the best of our knowledge , this work is the first to find such a relation . In our work , we not only elaborate on the relation between sensitivity and loss for a wide range of networks ( not limited to fully connected ) but also empirically show that many state-of-the-art methods improve performance alongside reducing the sensitivity of the network . To avoid overfitting in deep-learning architectures , regularization techniques are applied : for example , weight decay , early stopping , dropout ( Srivastava et al. , 2014 ) , and batch normalization ( BN ) ( Ioffe & Szegedy , 2015 ) . Ioffe & Szegedy ( 2015 ) argues that the reason for the success of BN is that it addresses the internal-covariant-shift phenomenon . However , Santurkar et al . ( 2018 ) argues against this belief and explains that the success of BN is due to its ability to make the optimization landscape smoother . Here , we look at the success of dropout and BN from another perspective . These methods decrease the output sensitivity to random input perturbations in a same manner as decreasing the test loss , resulting in better generalization performance . Designing neural network architectures is one of the main challenges in machine-learning tasks . One major line of work in this regard is comparing deep and shallow networks ( Bengio & Delalleau ( 2011 ) , Mhaskar et al . ( 2017 ) , Wu et al . ( 2019 ) , Ba & Caruana ( 2014 ) , Montufar et al . ( 2014 ) , and Simonyan & Zisserman ( 2014 ) ) . It is shown in Telgarsky ( 2016 ) that to approximate a deep network , a shallow network requires an exponentially larger number of units per layer . After finding a satisfactory architecture , the trainability of the network needs to be carefully assessed . In order to avoid exploding or vanishing gradients , Glorot & Bengio ( 2010 ) and He et al . ( 2015 ) introduce parameter initialization techniques that are widely used in current frameworks . By linking sensitivity and generalization , we present a new viewpoint on understanding the success of current state-of-the-art architectures and techniques . Previous theoretical studies attempting to solve the mystery of generalization mostly include generalization error ( GE ) bounds that use complexity measures such as VC-dimension and Rademacher complexities ( Xu & Mannor ( 2012 ) , Kawaguchi et al . ( 2017 ) , Arora et al . ( 2018 ) , and Sokolić et al . ( 2017 ) ) . GE depends not only on the architecture of the network , but also on the structure of the data itself1 . This is why the same network has a lower GE when trained with structured data than with random data ( Zhang et al. , 2016 ) . Here , we do not study GE bounds ; however , in order to find complexity measures to bound GE , we should take note of the link between sensitivity and generalization . There has been research on sensitivity analysis in neural networks with sigmoid and tanh activation functions ( Dimopoulos et al . ( 1995 ) , Fu & Chen ( 1993 ) , and Zeng & Yeung ( 2001 ) ) . Yang et al . ( 2013 ) introduce a sensitivity-based ensemble approach which selects individual networks with diverse sensitivity values from a pool of trained networks . Piche ( 1995 ) performs a sensitivity analysis in neural networks to determine the required precision of the weight updates in each iteration . In this work , we extend these results to networks with ReLU non-linearity with a different goal ; to study the relation between sensitivity and generalization error in the state-of-the-art deep neural networks . The metrics used for evaluating the network performance on training data can not reflect generalization , because an over-parameterized model can achieve zero training loss for networks trained with randomly labeled data ( Zhang et al. , 2016 ) . There have been recent attempts to predict the test loss for supervised-learning tasks ( Novak et al . ( 2018 ) , Jiang et al . ( 2018 ) , and Wang et al . ( 2018 ) ) . Philipp & Carbonell ( 2018 ) introduces the non-linearity coefficient ( NLC ) as a gradient-based complexity measure of the neural network , which is empirically shown to be a predictor of the test error for fully connected neural networks . According to our results on both fully connected and convolutional neural networks , sensitivity is also a predictor of the test error , even before the networks are trained , which suggests sensitivity as a computationally inexpensive architecture-selection metric . 1In this work , we do not investigate the structure of the data set . Paper Outline . We formally define loss and sensitivity metrics in Section 3.1 and Section 3.2 , respectively . In Section 4 , we state the main findings of the paper and present the numerical and analytical results supporting that . Later in Section 5 , we propose a possible proxy for generalization properties of certain structures and certain methods . Finally in Section 6 , we further discuss the observations followed up by a conclusion in Section 7 . The empirical results presented in the paper are for an image-classification task on the CIFAR-10 dataset . In Appendix 8.6 , we present the empirical results for MNIST and CIFAR-100 datasets . In Appendix 8.7 , we present the empirical results for a regression task with the Boston housing dataset . 3 PRELIMINARIES . Consider a supervised-learning task , where the model predicts ground-truth output y ∈ Y : = RK for an input x ∈ X : = RD . The predictor Fθ : X → Y is a deep neural network parameterized by the parameter vector θ that is learned on the training dataset τt by using the stochastic learning algorithm A . The training dataset τt and the testing dataset τv consist of i.i.d . samples drawn from the data distribution p. With some abuse of notation , we use ∼ when the samples are uniformly drawn both from a set of samples and from a probability distribution . 3.1 LOSS . Our main focus is a classification task where the loss function is the cross-entropy criterion . The average test loss can be defined as L = Eθ∗ [ Lθ∗ ] = Eθ∗ [ E ( x , y ) ∼τv [ − K∑ k=1 yk logF kθ∗ ( x ) ] ] , ( 1 ) where θ∗ is the random2 parameter vector found by A minimizing the train loss defined on τt , K is the number of classes and F kθ∗ is the k-th entry of the vector Fθ∗ , which is the output of the softmax layer , i.e. , Fθ∗ = softmax ( fθ∗ ( x ) ) , where fθ∗ ( x ) is the output of the last layer of the network . In classification tasks , the output space is Y : = [ 0 , 1 ] K , and the output vector is the probability assigned to each class . 3.2 SENSITIVITY . Let us inject an external noise to the input of the network and compute the noise in the output . If the original input vector is x ∈ X and we add an i.i.d . normal noise vector εx ∼ N ( 0 , σ2εxI ) to the input , then the output noise due to the input noise εx ∈ X is εy = fθ ( x + εx ) − fθ ( x ) ∈ Y . We use the variance of the output noise3 , averaged over its K entries , as a measure of sensitivity : Sθ = Var ( εy ) . The average sensitivity is S = Eθ [ Sθ ] = Eθ [ Var ( εy ) ] = Eθ [ Varx , εx [ 1 K K∑ k=1 εky ] ] , ( 2 ) where εky is the k-th entry of the vector εy . In the following sections , we use Sbefore = Eθ [ Sθ ] and Safter = Eθ∗ [ Sθ∗ ] when the expectation is over the network parameters before and after training , respectively . We consider unspecific sensitivity ( the average over the entries of the output noise ) , which requires unlabeled data samples , as opposed to specific sensitivity ( the sensitivity of the output of the desired class ) ( Tartaglione et al. , 2018 ) . By expanding Equation ( 2 ) up to the first order , the sensitivity S is approximated by the product of the variance of the input noise vector σ2εx and the square of the Frobenius norm of the Jacobian of the output of the network ( Novak et al. , 2018 ) . In experiments , we prefer S to the Jacobian , because in order to compute S it is enough to look at the network as a black box that given an input , generates an output , without requiring further knowledge of the model . 2The randomness is introduced by the stochastic optimization algorithm A and the randomized parameter initialization technique . 3Note that we consider the output of the neural network and not the output of the softmax layer . The softmax layer can be interpreted as a normalizing layer pushing the values to be between 0 and 1 .

Summary: This paper examines generalization performance of various neural network architectures in terms of a sensitivity metric that approximates how the error responds to perturbations of the input. A crude argument is presented for how the proposed sensitivity metric captures the variance term in the standard bias-variance decomposition of the loss. A number of experimental results are presented that show strong correlation between the sensitivity metric and the empirical test loss.