Decision boundary variability and generalization in neural networks

This paper discovers that the neural network with lower decision boundary ( DB ) variability has better generalizability . Two new notions , algorithm DB variability and ( , η ) -data DB variability , are proposed to measure the decision boundary variability from the algorithm and data perspectives . Extensive experiments show significant negative correlations between the decision boundary variability and the generalizability . From the theoretical view , two lower bounds based on algorithm DB variability are proposed and do not explicity depend on the sample size . By Chebyshev ’ s inequality , we also prove two upper bounds of O ( √ AV ( fQ , D ) /m ( k − 1 ) ) and O ( 1√ m + + η log 1η ) based on algorithm and data DB variability , respectively . The algorithm DB variability upper bound is easier to calculate in practice , while the data DB variability upper bound relies on less assumptions . Moreover , the bounds do not explicitly depend on the network size , which is usually prohibitively large in deep learning . 1 INTRODUCTION . Neural networks ( NNs ) have achieved significant success in vast applications ( Krizhevsky et al. , 2012 ; Vaswani et al. , 2017 ) . However , the advance of NNs is arduous to be characterized by canonical statistical hypothesis complexity , such as VC-dimension ( Vapnik et al. , 1994 ) or Rademacher complexity ( Bartlett & Mendelson , 2002 ) . Considering the intimate connection between low variance and significant performance in learning theory , we investigate decision boundaries ( DBs ) from the perspective of variability in this paper . For neural networks , the decision boundary variability is largely caused by ( 1 ) the randomness from the training algorithm , and ( 2 ) the training data . In this paper , they are measured by two new terms , algorithm DB variability and ( , η ) -data DB variability , and networks with lower DB variability are proved to possess better generalization performance . Algorithm DB variability measures the variability of DBs in different training repeats , and extensive experiments are conducted on CIFAR-10 , and CIFAR-100 ( Krizhevsky & Hinton , 2009 ) datasets to explore the factors influence algorithm DB variability . We visualize the trend of the algorithm DB variability with respect to ( w.r.t . ) different training strategies , training time , sample sizes , and label noise . The empirical results present the negative correlation between algorithm DB variability and the test accuracy in all scenarios , which suggests that the algorithm DB variability largely indicates the generalization of neural networks . From the theoretical view , two lower bounds and an upper bound of the generalization error are proved based on the algorithm DB variability . The upper bound has a rate of O ( √ AV ( fQ , D ) /m ( k − 1 ) ) , where AV ( fQ , D ) is the algorithm DB variability for fQ on data generating distribution D , m is the sample size , and k is the number of classes . To present how the training data influences the decision boundary variability , the ( , η ) -data DB variability is introduced by employing the η-subset to reconstruct decision boundaries with error ( see Definition 5.1 ) . If a decision boundary can be reconstructed by training on a smaller η-subset with a smaller reconstruction error , the decision boundary possesses smaller data DB variability . Moreover , an η- curve can be drawn by varying the value of η and numerically evaluating the label mismatch rate . The area under the η- curve could be a more elaborate indicator for the generalization of NNs because the curve contains richer information than the algorithm DB variability . An O ( 1√ m + + η log 1η ) generalization bound based on the ( , η ) -data DB variability is established theoretically to enhance the relationship between the generalization of NNs and DB variability . Compared to the algorithm DB variability upper bound , the data DB variability bound does not depend on additional Assumption 2 , while the algorithm DB variability is easier to calculate than data DB variability in practice . Moreover , in contrast to many existing generalization bounds based on hypothesis complexity ( Bartlett et al. , 2019 ; Golowich et al. , 2018 ; Bartlett et al. , 2017 ) that require access to the network weight , our generalization bounds based on DB variability only demand the network predictions and thus have advantages in empirically approximating the generalization bound in ( 1 ) black-model settings , where model parameters are unavailable ; and ( 2 ) over-parameterized settings , where calculating the weight norm is of prohibitively high computing burden . 2 RELATED WORKS . Deep learning theory . Due to the bias-variance trade-off , model complexity faces a dilemma in conventional wisdom ( Mohri et al. , 2018 ) . Recently , Zhang et al . ( 2021 ) reveal the surprising ability of neural networks in fitting noise , but the networks still have impressive generalization performance in practice . This gap between the well-known bias-variance trade-off and the universal approximation ability for NNs draws attention to numerous researchers ( Belkin et al. , 2019 ; Nakkiran et al. , 2019 ) . Many works attribute the success of NNs to the effectiveness of the stochastic gradient descent ( SGD ) algorithm ( Bottou , 2010 ; Hardt et al. , 2016 ; Jin et al. , 2017 ) . Some empirical studies also explain the decent performance of networks by uncovering their learning properties ( Nakkiran et al. , 2020 ; Jiang et al. , 2021 ; He et al. , 2021 ) . For instance , neural networks tend to fit the low-frequency information first ( Rahaman et al. , 2019 ; Xu et al. , 2019 ) and gradually learn a more complex function ( Kalimeris et al. , 2019 ) during the training procedure . Decision boundaries and generalization . Recent studies attempt to understand neural networks from the aspect of decision boundaries ( He et al. , 2018 ; Karimi et al. , 2019 ) . Guan & Loew ( 2020 ) empirically show the negative correlation between the complexity of decision boundary and generalization performance . Mickisch et al . ( 2020 ) reveal the phenomenon that the distance from data to decision boundaries continuously decreases during the training procedure . More recently , researchers find that NNs only rely on the most discriminative or simplest features to construct the DBs ( Ortiz-Jimenez et al. , 2020 ; Shah et al. , 2020 ) . Instead , our approach is different from these former methods by considering decision boundary variability , which is empirically and theoretically shown to closely correlate with the generalization in neural networks . Adversarial training and generalization . It has been shown that the adversarial examples , which are created by adding non-perceivable perturbation on the input data , can completely mislead the NNs ( Szegedy et al. , 2013 ; Goodfellow et al. , 2014 ) . To tackle this problem , adversarial training is proposed to improve the robustness of the NNs through continuous training on adversarial examples ( Madry et al. , 2017 ) . Nevertheless , Su et al . ( 2018 ) and Zhang et al . ( 2019 ) show a trade-off between the robustness and the generalization performance of NNs . 3 PRELIMINARIES . We denote the training set by S = { ( xi , yi ) , i = 1 , . . . , m } , where xi ∈ Rn , n is the dimension of input data , yi ∈ { 1 , . . . , k } , k is the number of classes , and m = |S| is the training sample size . We assume that ( xi , yi ) are independent and identically distributed ( i.i.d . ) random variables drawn from the data generating distribution D. Denote the classifier as fθ ( x ) : Rn → Rk , which is a neural network parameterized by θ . The output of fθ ( x ) is a k-dimensional vector and is assumed to be a discrete probability density function . Let f ( i ) θ ( x ) be the i-th component of fθ ( x ) , hence∑k i=1 f ( i ) θ ( x ) = 1 . We define T ( fθ , x ) = { i ∈ { 1 , · · · , k } |f ( i ) θ ( x ) = maxj f ( j ) θ ( x ) } to denote the set of predicted labels by fθ on x . Due to the randomness of the learning algorithm A , let Q ( θ ) = A ( S ) denote the posteriori distribution returned by the learning algorithm A leveraged on the training set S. Hence , we focus on the Gibbs classifier ( a.k.a . random classifier ) fQ = { fθ|θ ∼ Q } . 0− 1 loss is employed in this paper , and the expected risks in terms of θ and Q are defined as : RD ( θ ) = E ( x , y ) ∼D [ I ( y /∈ T ( fθ , x ) ) ] ( 1 ) and RD ( Q ) = E ( x , y ) ∼DEθ∼Q [ I ( y /∈ T ( fθ , x ) ) ] , ( 2 ) respectively . Here I ( · ) is the indicator function . Since the data generating distributionD is unknown , evaluating the expected risk RD is not practical . Therefore , it is a practical way to estimate the expected risk by the empirical riskRS , which is defined as : RS ( θ ) = E ( x , y ) ∼S [ I ( y /∈ T ( fθ , x ) ) ] = 1 m m∑ i=1 I ( yi /∈ T ( fθ , xi ) ) ( 3 ) RS ( Q ) = E ( x , y ) ∼SEθ∼Q [ I ( y /∈ T ( fθ , x ) ) ] = 1 m m∑ i=1 Eθ∼Q [ I ( yi /∈ T ( fθ , xi ) ) ] , ( 4 ) where ( xi , yi ) ∈ S and m = |S| . 3.1 DECISION BOUNDARY . If the output k-dimensional vector fθ ( x ) on the input example x has a tie , i.e. , the maximum value of the vector is not unique , then x is considered to locate on the decision boundary of fθ . With this idea , the decision boundary can be formally defined as below : Definition 3.1 ( decision boundary ) . Let fθ ( x ) : Rn → Rk be a classifier network parameterized by θ . Then the decision boundary of fθ is defined by { x ∈ Rn|∃i , j ∈ { 1 , · · · , k } , i 6= j , f ( i ) θ ( x ) = f ( j ) θ ( x ) = maxq f ( q ) θ ( x ) } ( 5 ) After defining the decision boundary , we have the following remark : Remark 1 . ( 1 ) If an input example ( x , y ) is not located on the decision boundary of fθ , T ( fθ , x ) is a singleton , and we have I ( y /∈ T ( fθ , x ) ) = I ( y 6= T ( fθ , x ) ) . ( 6 ) ( 2 ) If the input x is a boundary point , in practice , we randomly draw a label from the set T ( fθ , x ) as the prediction of fθ on x .

Summary: Decision boundary variability is measured in two ways. One method depends on the algorithm, or the random seed and reflects how much the boundaries change wen retraining the same network on the same data. The other technique reflects the variability across different amounts of training data. Generalization bounds derived from these two quantities are presented.