ON BREIMAN’S DILEMMA IN NEURAL NETWORKS: SUCCESS AND FAILURE OF NORMALIZED MARGINS

1 INTRODUCTION . Margin , as a measurement of the robustness allowing some perturbations on classifier without changing its decision on training data , has a long history in characterizing the performance of classification algorithms in machine learning . As early as Novikoff ( 1962 ) , it played a central role in the proof on finite-stopping or convergence of perceptron algorithm when training data is separable . Equipped with convex optimization technique , a plethora of large margin classifiers are triggered by support vector machines ( Cortes & Vapnik , 1995 ; Vapnik , 1998 ) . AdaBoost , an iterative algorithm to combine an ensemble of classifiers proposed by Freund & Schapire ( 1997 ) , often exhibits a resistance to overfitting phenomenon that during the training process the generalization error keeps on non-increasing when the training error drops to zero . Toward deciphering the such a resistance of overfitting phenomenon , Schapire et al . ( 1998 ) proposed an explanation that the training process keeps on improving a notion of classification margins in boosting , among later works on consistency of boosting with early stopping regularization ( Bühlmann & Yu , 2002 ; Zhang & Yu , 2005 ; Yao et al. , 2007 ) . Lately such a resistance to overfitting is again observed in deep neural networks with overparameterized models ( Zhang et al. , 2016 ) . A renaissance of margin theory is proposed by Bartlett et al . ( 2017 ) with a normalization of network using Lipschitz constants bounded by products of operator spectral norms . It inspires many further investigations in various settings ( Miyato et al. , 2018 ; Neyshabur et al. , 2018 ; Liao et al. , 2018 ) . However , the improvement of margin distributions does not necessarily guarantee a better generalization performance , which is at least traced back to ( Breiman , 1999 ) in his effort to understanding AdaBoost . In this work , Breiman designed an algorithm arc-gv such that the margin can be maximized via a prediction game , then he demonstrated an example that one can achieve uniformly larger margin distributions on training data than AdaBoost but suffer a higher generalization error . In the end of this paper , Breiman made the following comments with a dilemma : ” The results above leave us in a quandary . The laboratory results for various arcing algorithms are excellent , but the theory is in disarray . The evidence is that if we try too hard to make the margins larger , then overfitting sets in . ... My sense of it is that we just do not understand enough about what is going on. ” Breiman ’ s dilemma triggers some further explorations to understand the limitation of margin theory in boosting ( Reyzin & Schapire , 2006 ; Wang et al. , 2008 ; 2011 ) . In particular , Reyzin & Schapire ( 2006 ) points out that the trees found by arg-gv have larger model complexity in terms of deeper average depth than AdaBoost , suggesting that margin maximization in arc-gv does not necessarily control the model complexity . The latter works provide tighter bounds based on VC-dimension and optimized quantile training margins , which however do not apply to over-parametrized models in deep neural networks and the case where the training margin distributions are uniformly improved . In this paper , we are going to revisit Breiman ’ s dilemma in the scenario of deep neural networks . Both the success and failure can be seen on normalized margin based bounds on generalization error . First of all , let ’ s look at the following illustration example . Example ( Breiman ’ s Dilemma with a CNN ) . A basic 5-layer convolutional neural network of c channels ( see Section 3 for details ) is trained with CIFAR-10 dataset whose 10 percent labels are randomly permuted . When c = 50 with 92 , 610 parameters , Figure 1 ( a ) shows the training error and generalization ( test ) error in solid curves . From the generalization error in ( a ) one can see that overfitting indeed happens after about 10 epochs , despite that training error continuously drops down to zero . One can successfully predict such an overfitting phenomenon from Figure 1 ( b ) , the evolution of normalized margin distributions defined later in this paper . In ( b ) , while small margins are monotonically improved during training , large margins undergoes a phase transition from increase to decrease around 10 epochs such that one can predict the tendency of generalization error in ( a ) using large margin dynamics . Two particular sections of large margin dynamics are highlighted in ( b ) , one at 8.3 on x-axis that measures the percentage of normalized training margins no more than 8.3 ( training margin error ) and the other at 0.8 on y-axis that measures the normalized margins at quantile q = 0.8 ( i.e . 1/γ̂q , t ) . Both of them meet the tendency of generalization error in ( a ) and find good early stopping time to avoid overfitting . However , as we increase the channel number to c = 400 with about 5.8M parameters and retrain the model , ( c ) shows a similar overfitting phenomenon in generalization error ; on the other hand , ( d ) exhibits a monotonic improvement of normalized margin distributions without a phase transition during the training and thus fails to capture the overfitting . This demonstrates the Breiman ’ s dilemma in CNN . A key insight behind this dilemma , is that one needs a trade-off between the model expression power and the complexity of the dataset to endorse margin bounds a prediction power . On one hand , when the model has a limited expression power relative to the training dataset , in the sense that the training margin distributions CAN NOT be uniformly improved during training , the generalization or test error may be predicted from dynamics of normalized margin distributions . On the other hand , if we push too hard to improve the margin by giving model too much degree of freedom such that the training margins are uniformly improved during training process , the predictability may be lost . A trade-off is thus necessary to balance the complexity of model and dataset , otherwise one is doomed to meet Breiman ’ s dilemma when the models arbitrarily increase the expression power . The example above shows that the expression power of models relative to the complexity of dataset , can be observed from the dynamics of normalized margins in training , instead of counting the number of parameters in neural networks . In the sequel , our main contributions are to make these precise by revisiting the Rademacher complexity bounds with Lipschitz constants ( Bartlett et al. , 2017 ) . • With the Lipschitz-normalized margins , a linear inequality is established between training margin and test margin in Theorem 1 . When both training and test normalized margin distributions undergo similar phase transitions on increase-decrease during the training process , one may predict the generalization error based on the training margins as illustrated in Figure 1 . • In a dual direction , one can define a quantile margin via the inverse of margin distribution functions , to establish another linear inequality between the inverse quantile margins and the test margins as shown in Theorem 2 . Quantile margin is far easier to tune in practice and enjoys a stronger prediction power exploiting an adaptive selection of margins along model training . • In all cases , Breiman ’ s dilemma may fail both of the methods above when dynamics of normalized training margins undergo different phase transitions to that of test margins during training , where a uniform improvement of margins results in overfitting . Section 2 describes our method to derive the two linear inequalities of generalization bounds above . Extensive experimental results are shown in Section 3 and Appendix with basic CNNs , AlexNet , VGG , ResNet , and various datasets including CIFAR10 , CIFAR100 , and mini-Imagenet . 2 METHOD . Let X be the input space ( e.g . X ⊂ RC×W×H in image classification ) and Y : = { 1 , . . . , K } be the space of K classes . Consider a sample set of n observations S = { ( x1 , y1 ) , . . . , ( xn , yn ) : xi ∈ X , yi ∈ Y } that are drawn i.i.d . from PX , Y . For any function f : X → R , let Pf = ∫ X f ( X ) dP be the population expectation and Pnf = ( 1/n ) ∑n i=1 f ( xi ) be the sample average . Define F to be the space of functions represented by neural networks , F = { f : X → RK , f ( x ) = Wlσl ( xl ) +bl , xi = σi ( Wi−1xi−1+bi−1 ) , i = 1 , . . . , l , x0 = x } , ( 1 ) where l is the depth of the network , Wi is the weight matrix corresponding to a linear operator on xi and σi stands for either element-wise activation function ( e.g . ReLU ) or pooling operator that are assumed to be Lipschitz bounded with constant Lσi and satisfying σi ( 0 ) = 0 . For example , in convolutional network , Wixi + bi = wi ∗ xi + bi where ∗ stands for the convolution between input tensor xl and kernel tensor wl . We equip F with the Lipschitz semi-norm , for each f , ‖f‖F : = sup x 6=x′ ‖f ( x ) − f ( x′ ) ‖2 ‖x− x′‖2 ≤ Lσ l∏ i=1 ‖Wi‖σ : = Lf , ( 2 ) where ‖ · ‖σ is the spectral norm and Lσ = ∏L i=1 Lσi . For all the examples in this paper , we use ReLU activation σi that leads to Lσi = 1 . Moreover we consider the following family of hypothesis mapping , H = { h ( x ) = [ f ( x ) ] y : X → R , f ∈ F , y ∈ Y } , ( 3 ) where [ · ] j denotes the jth coordinate and we further define the following class induced by Lipschitz semi-norm bound on F , HL = { h ( x ) = [ f ( x ) ] y : X → R , h ( x ) = [ f ( x ) ] y ∈ H with ‖f‖F ≤ L , y ∈ Y } . ( 4 ) Lastly , rather than merely looking at whether a prediction f ( x ) on y is correct or not , we also consider the margin defined as ζ ( f ( x ) , y ) = [ f ( x ) ] y−max { j : j 6=y } [ f ( x ) ] j . Therefore , we can define the ramp loss and margin error depending on the confidence of predictions . Given two thresholds γ2 > γ1 ≥ 0 , define a ramp loss to be ` ( γ1 , γ2 ) ( ζ ) = 1 ζ < γ1 , − 1∆ ( ζ − γ2 ) γ1 ≤ ζ ≤ γ2,0 ζ > γ2 , where ∆ : = γ2 − γ1 . In particular γ1 = 0 and γ2 = γ , we also write ` γ = ` γ for simplicity . Define the margin error to measure if f has margin no more than a threshold γ , eγ ( f ( x ) , y ) = { 1 ζ ( f ( x ) , y ) ≤ γ 0 ζ ( f ( x ) , y ) > γ . ( 5 ) In particular , e0 ( f ( x ) , y ) is the common mis-classification error and E [ e0 ( f ( x ) , y ) ] = P [ ζ ( f ( x ) , y ) < 0 ] . Note that e0 ≤ ` γ ≤ eγ , and ` γ is Lipschitz bounded by 1/γ . The central question we try to answer is , can we find a proper upper bound to predict the tendency of the generalization error along training , such that one can early stop the training near the epoch that P [ ζ ( ft ( x ) , y ) < 0 ] is minimized ? The answer is both a yes and a no ! We begin with the following lemma , as a typical result in multi-label classification from the uniform law of large numbers ( Koltchinskii et al. , 2002 ) . Lemma 2.1 . Given a γ0 > 0 , then , for any δ ∈ ( 0 , 1 ) , with probability at least 1− δ , the following holds for any f ∈ F with ‖f‖F ≤ L , E [ ` γ0 ( f ( x ) , y ) ] ≤ 1 n n∑ i=1 [ ` γ0 ( f ( xi ) , yi ) ] + 2K2 γ0 Rn ( HL ) + √ log ( 1/δ ) 2n ( 6 ) where Rn ( HL ) = Exi , εi sup h∈HL 1 n n∑ i=1 εih ( xi ) ( 7 ) is the Rademacher complexity of function class HL with respect to n samples , and the expectation is taken over xi , εi , i = 1 , ... , n. Unfortunately , direct application of such bound for a constant γ0 will suffer from the so-called scaling problem . The following proposition gives an lower bound of Rademacher complexity term , whose proof is provided in Appendix D. Proposition 1 . Consider the networks with ReLU activation functions . For any L > 0 , there holds , Rn ( HL ) ≥ CLES [ √ x21 + . . .+ x 2 n ] ( 8 ) where C > 0 is a constant that does not depend on S. The lemma tells us if L → ∞ , upper bound ( 6 ) becomes trivial since Rn ( HL ) → ∞ . In fact , both Telgarsky ( 2013 ) and Soudry et al . ( 2018 ) show that with gradient descent , the norm of estimator ’ s weight in logistic regression and general boosting ( including exponential loss ) , respectively , will go to infinity at a growth rate log ( t ) when the data is linearly separable . As for the deep neural network with cross-entropy loss , the input of last layer is usually be viewed as features extracted from original input . Training the last layer with other layers fixed is exactly a logistic regression , and the feature is linearly separable as long as the training error achieves zero . Therefore , without any normalization , the hypothesis space along training has no upper bound on L and the upper bound ( 6 ) is useless . Besides , even for a fixed L , the complexity termRn ( HL ) is computationally intractable . The first remedy is to restrict our attention on H1 by normalizing f with its Lipschitz semi-norm ‖f‖F or its upper bounds . Note that a normalized network f̃ = f/C has the same mis-classification error as f for all C > 0 . For the choice of C , it ’ s hard in practice to directly compute the Lipschitz semi-norm of a network , but instead some approximate estimates on the upper bound Lf in ( 2 ) are available as discussed in Appendix A . In the sequel , let f̃ = f/Lf be the normalized network and h̃ = h/Lf = ζ ( f , y ) /Lf = ζ ( f̃ , y ) ∈ H1 be the corresponding normalized hypothesis function . Now a simple idea is to regard Rn ( H1 ) as a constant and predict the tendency of generalization error via training margin error of the normalized network , that avoids the scaling problem and the computation of complexity term . The following theorem makes this precise . Theorem 1 . Given γ1 and γ2 such that γ2 > γ1 ≥ 0 and ∆ : = γ2 − γ1 ≥ 0 , for any δ > 0 , with probability at least 1− δ , along the training epoch t = 1 , . . . , T , the following holds for each ft , P [ ζ ( f̃t ( x ) , y ) < γ1 ] ≤ Pn1 [ ζ ( f̃t ( x ) , y ) < γ2 ] + CH ∆ + √ log ( 1/δ ) 2n ( 9 ) where CH = 2K2Rn ( H1 ) . Remark . In particular , when we take γ1 = 0 and γ2 = γ > 0 , the bound above becomes , P [ ζ ( ft ( x ) , y ) < 0 ] ≤ Pn [ ζ ( f̃t ( xi ) , yi ) < γ ] + CH γ + √ log ( 1/δ ) 2n ( 10 ) Theorem 1 says , we can bound the normalized test margin distribution P [ ζ ( f̃t ( x ) , y ) < γ1 ] by the normalized training margin distribution Pn [ ζ ( f̃t ( x ) , y ) < γ2 ] . Recently Liao et al . ( 2018 ) investigates for normalized networks , the strong linear relationship between cross-entropy training loss and test loss when the training epochs are large enough . As a contrast , we consider the whole training process and normalized margins . In particular , we hope to predict the trend of generalization error by choosing γ1 = 0 and a proper γ . For this purpose , the following facts are important . First , we do not expect the bound , for example ( 10 ) , is tight for every choice of γ > 0 , instead we hope there exists some γ such that the training margin error nearly monotonically changes with generalization error . Figure 2 shows the existence of such γ such that the training margin error successfully recover the tendency of generalization error on CIFAR10 dataset . Moreover , in Appendix Figure 8 shows the rank correlation between training margin error at various γ and training/test error . Second , the normalizing factor is not necessarily to be an upper bound of Lipschitz semi-norm . The key point is to prevent the complexity term of the normalized network going to infinity . Since for any constant c > 0 , normalization by L̄ = cL works in practice where the constant could be absorbed to γ , we could ignore the Lipschitz constant introduced by general activation functions in the middle layers . However , it is a natural question whether a reasonable γ with prediction power exists . A simple example in Figure 1 shows , once the training margin distribution is uniformly improved , dynamic of training margin error fails to detect the minimum of generalization error in the early stage . This is because when network structure becomes complex enough , the training margin distribution could be more easily improved but the the generalization error may overfit . This is exactly the same observation in Breiman ( 1999 ) to doubt the margin theory in boosting type algorithms . More detailed discussions will be given in Section 3.2 . The most serious limitation of Theorem 1 lies in we must fix a γ along the complete training process . In fact , the first term and second term in the bound ( 10 ) vary in the opposite directions with respect to γ , and thus different ft may prefer different γ for a trade-off . As in Figure 1 ( b ) of the example , while choosing γ is to fix an x-coordinate section of margin distributions , its dual is to look for a y-section which leads to different margins for different ft . This motivates the quantile margin in the following theorem . Let γ̂q , f be the qth quantile margin of the network f with respect to sample S , γ̂q , f = inf { γ : Pn1 [ ζ ( f ( xi ) , yi ) ≤ γ ] ≥ q } . ( 11 ) Theorem 2 . Assume the input space is bounded by M > 0 , that is ‖x‖2 ≤ M , ∀x ∈ X . Given a quantile q ∈ [ 0 , 1 ] , for any δ ∈ ( 0 , 1 ) and τ > 0 , the following holds with probability at least 1− δ for all ft satisfying γ̂q , f̃t > τ , P [ ζ ( ft ( x ) , y ) < 0 ] ≤ Cq + CH γ̂q , f̃t ( 12 ) Cq = q + √ log ( 2/δ ) 2n + √ log log2 ( 4 ( M+l ) /τ ) n and CH = 4K 2Rn ( H1 ) . Remark . We simply denote γq , t for γq , f̃t when there is no confusion . Compared with the bound ( 10 ) , ( 12 ) make the choice of γ varying with ft and the cost is an additional constant term C2q and the constraint γ̂q , t > τ that typically holds for large enough q in practice . In applications , stochastic gradient descent ( SGD ) often effectively improves the training margin distributions along the drops of training errors , a small enough τ and large enough q usually meet γ̂q , t > τ . Moreover , even with the choice τ = exp ( −B ) , constant term√ [ log log2 ( 4 ( M + l ) /τ ) ] /n = O ( √ logB/n ) is still negligible and thus very little cost is paid in the upper bound . In practice , tuning q ∈ [ 0 , 1 ] is far easier than tuning γ > 0 directly and setting a large enough q ≥ 0.9 usually provides us lots of information about the generalization performance . The quantile margin works effectively when the dynamics of large margin distributions reflects the behavior of generalization error , e.g . Figure 1 . In this case , after certain epochs of training , the large margins have to be sacrificed to further improve small margins to reduce the training loss , that typically indicates a possible saturation or overfitting in test error .

Summary: The authors found that general generalization bounds fail to capture the ramp loss. However, once the network scaled by its Lipschitz constant, it becomes efficient to get an upper bound of generalization error, while also needs to trade-off the constant in the margin error. Due to the limitation of fixing the constant in margin error, the authors  tried to use the quantile margin to change the bound, which is easy to tune the hyper-parameter. They also conducted the experiments that the quantile margin generalization bound could be used to predict the tendency of loss curve both in training and test in some sense.