Implicit Bias in Leaky ReLU Networks Trained on High-Dimensional Data
Spencer Frei, Gal Vardi, Peter L. Bartlett, Nathan Srebro, Wei Hu
Introduction
Neural networks trained by gradient descent appear to generalize well in many settings, even when trained without explicit regularization. It is thus understood that the usage of gradient-based optimization imposes an implicit bias towards particular solutions which enjoy favorable properties. The nature of this implicit regularization effect—and its dependence on the structure of the training data, the architecture of the network, and the particular gradient-based optimization algorithm—is thus a central object of study in the theory of deep learning.
For gradient flow, we consider the standard leaky ReLU activation, . Our starting point in this setting is recent work by [LL20, JT20] that show that, provided the network interpolates the training data at some time, gradient flow on homogeneous networks, such as two-layer leaky ReLU networks, converges (in direction) to a network that satisfies the Karush–Kuhn–Tucker (KKT) conditions for the margin-maximization problem,
For gradient descent, we consider a smoothed approximation to the leaky ReLU activation, and consider training that starts from a random initialization with small initialization variance. Our result for gradient flow on the standard leaky ReLU activation suggests that gradient descent with small-enough step size should eventually produce a network for which has small rank. However, the asymptotic characterization of trained neural networks in terms of KKT points of a margin-maximization problem relies heavily upon the infinite-time limit. This leaves open what happens in finite time. Towards this end, we consider the stable rank of the weight matrix found by gradient descent at time , defined as , the square of the ratio of the Frobenius norm to the spectral norm of . We show that after the first step of gradient descent, the stable rank of the weight matrix reduces from something that is of order to that which is at most an absolute constant, independent of , , or the number of samples. Further, throughout the training trajectory the stable rank of the network is never larger than some absolute constant.
We conclude by verifying our results with experiments. We first confirm our theoretical predictions for binary classification problems with high-dimensional data. We then consider the stable rank of two-layer networks trained by SGD for the CIFAR10 dataset, which is not high-dimensional. We notice that the scale of the initialization plays a crucial role in the stable rank of the weights found by gradient descent: with default TensorFlow initialization, the stable rank of a network with neurons never falls below 74, while with a smaller initialization variance, the stable rank quickly drops to 3.25, and only begins to increase above 10 when the network begins to overfit.
The literature on the implicit bias in neural networks has rapidly expanded in recent years, and cannot be reasonably surveyed here (see [Var22] for a survey). In what follows, we discuss results which apply to two-layer ReLU or leaky ReLU networks in classification settings.
By [LL20] and [JT20], homogeneous neural networks (and specifically two-layer leaky ReLU networks, which are the focus of this paper) trained with exponentially-tailed classification losses converge in direction to a KKT point of the maximum-margin problem. Our analysis of the implicit bias relies on this result. We note that the aforementioned KKT point may not be a global optimum (see a discussion in Section 3).
[CB20] studied the dynamics of gradient flow on infinite-width homogeneous two-layer networks with exponentially-tailed losses, and showed bias towards margin maximization w.r.t. a certain function norm known as the variation norm. [PL20] studied the implicit bias in two-layer ReLU networks trained on orthogonally separable data (i.e., where for every pair of labeled examples we have if and otherwise). [SVL22] proved implicit bias towards minimizing the number of linear regions in univariate two-layer ReLU networks. Implicit bias in neural networks trained with nearly-orthogonal data was previously studied in [VYS22]. Their assumptions on the training data are similar to ours, but they consider ReLU networks and prove bias towards non-robust networks. Their results do not have any clear implications for our setting.
Implicit bias towards rank minimization was also studied in several other papers. [JT19, JT20] showed that in linear networks of output dimension , gradient flow with exponentially-tailed losses converges to networks where the weight matrix of every layer is of rank . [TVS22] showed that the bias towards margin maximization in homogeneous ReLU networks may induce a certain bias towards rank minimization in the weight matrices of sufficiently deep ReLU networks. Finally, implicit bias towards rank minimization was also studied in regression settings. See, e.g., [Aro+19, RC20, LLL21, TVS22].
Neural network optimization.
This work can be considered in the context of other work on developing optimization guarantees for neural networks trained by gradient descent. A line of work based on the neural tangent kernel approximation [JGH18] showed that global convergence of gradient descent is possible if the network is sufficiently wide and stays close to its random initialization [ALS19, Zou+19, Du+19, Aro+19a, SJL19, FCG19]. These results do not hold if the network has constant width or if the variance of the random initialization is small, both of which are permitted with our analysis.
A series of works have explored the training dynamics of gradient descent when the data is linearly separable (such as is the case when the input dimension is larger than the number of samples, as we consider here). [Bru+18] showed that in two-layer leaky ReLU networks, SGD on the hinge loss for linearly separable data converges to zero loss. [FCG21] showed that even when a constant fraction of the training labels are corrupted by an adversary, in two-layer leaky ReLU networks, SGD on the logistic loss produces neural networks that have generalization error close to the label noise rate. As we mentioned above, both [Lyu+21] and [SBG21] considered two-layer leaky ReLU networks trained by gradient-based methods on linearly separable datasets.
Training of neural networks for high-dimensional data.
The training dynamics of neural networks for high-dimensional data has been studied in a number of recent works. [Cao+22] studied two-layer convolutional networks trained on an image-patch data model and showed how a low signal-to-noise ratio can result in harmful overfitting, while a high signal-to-noise ratio allows for good generalization performance. [SBG22] considered a similar image-patch signal model and studied how data augmentation can improve generalization performance of two-layer convolutional networks. [FCB22] showed that two-layer fully connected networks trained on high-dimensional mixture model data can exhibit a ‘benign overfitting’ phenomenon. [FCB22a] studied the feature-learning process for two-layer ReLU networks trained on noisy 2-xor clustered data and showed that early-stopped networks can generalize well even in high-dimensional settings. [BPF22] studied the dynamics of gradient flow on the squared loss for two-layer ReLU networks with orthogonal inputs.
Preliminaries
Neural networks.
In this work we consider depth- neural networks, where the second layer is fixed and only the first layer is trained. Thus, a neural network with parameters is defined as
Gradient descent and gradient flow.
Gradient flow captures the behavior of gradient descent with an infinitesimally small step size. The trajectory of gradient flow is defined such that starting from an initial point , the dynamics of obeys the differential equation . When is non-differentiable, the dynamics of gradient flow obeys the differential equation , where denotes the Clarke subdifferential, which is a generalization of the derivative for non-differentiable functions (see Appendix A for a formal definition).
Asymptotic Analysis of the Implicit Bias
In this section, we study the implicit bias of gradient flow in the limit . Our results build on a theorem by [LL20] and [JT20], which considers the implicit bias in homogeneous neural networks. Let be a neural network parameterized by , where we view as a vector. The network is homogeneous if there exists such that for every and we have . We say that a trajectory of gradient flow converges in direction to if . Their theorem can be stated as follows.
Let be a homogeneous ReLU or leaky ReLU neural network parameterized by . Consider minimizing either the exponential or the logistic loss over a binary classification dataset using gradient flow. Assume that there exists time such that . Then, gradient flow converges in direction to a first order stationary point (KKT point) of the following maximum-margin problem in parameter space:
Moreover, and as .
Note that in leaky ReLU networks Problem (1) is non-smooth. Hence, the KKT conditions are defined using the Clarke subdifferential. See Appendix A for more details of the KKT conditions. The theorem implies that even though there might be many possible directions that classify the dataset correctly, gradient flow converges only to directions that are KKT points of Problem (1). We note that such a KKT point is not necessarily a global/local optimum (cf. [VSS21, Lyu+21]). Thus, under the theorem’s assumptions, gradient flow may not converge to an optimum of Problem (1), but it is guaranteed to converge to a KKT point.
We now state our main result for this section. For convenience, we will use different notations for positive neurons (i.e., where ) and negative neurons (i.e., where ). Namely,
Note that . We assume that .
Let be the leaky ReLU network from \tagform@2 and let be a KKT point of Problem (1). Then, the following hold:
and , where for every . Furthermore, for all we have and .
is a global optimum of Problem (1). Moreover, this global optimum is unique.
The pair from item 2 is the global optimum of the following convex problem:
Note that by the above theorem, the KKT points possess very strong properties: the weight matrix is of rank at most , there is margin maximization in parameter space, in function space the predictor has a linear decision boundary, there may not be margin maximization in predictor space, but the predictor maximizes the margin approximately within a factor of . Note that if (i.e., ) and is roughly , then we get margin maximization also in predictor space. We remark that variants of items 2, 5 and 6 were shown in [SBG21] under a different assumption called Neural Agreement Regime (as we discussed in the related work section).In fact, the main challenge in our proof is to show that a property similar to their assumption holds in every KKT point in our setting.
The proof of Theorem 3.2 is given in Appendix B. We now briefly discuss the proof idea. Since satisfies the KKT conditions of Problem (1), then there are such that for every we have
where is a subgradient of at . Also we have for all , and if . We prove strictly positive upper and lower bounds for each of the ’s. Since the ’s are strictly positive, the KKT conditions show that the margin constraints are satisfied with equalities, i.e., part 1 of the theorem. By leveraging these bounds on the ’s we also derive the remaining parts of the theorem.
The proof of Lemma 3.3 is provided in Appendix C.
By Theorem 3.2, if the data points are nearly orthogonal then every KKT point of Problem (1) satisfies items 1-7 there. It leaves open the question of whether gradient flow converges to a KKT point. By Theorem 3.1, in order to prove convergence to a KKT point, it suffices to show that there exists time where . In the following theorem we show that such exists, regardless of the initialization of gradient flow (the theorem holds both for the logistic and the exponential losses).
Consider gradient flow on a the network from \tagform@2 w.r.t. a dataset that satisfies the assumption from Theorem 3.2. Then, there exists a finite time such that for all we have .
We prove the theorem in Appendix D. Combining Theorems 3.1, 3.2 and 3.4, we get the following corollary:
Consider gradient flow on the network from \tagform@2 w.r.t. a dataset that satisfies the assumption from Theorem 3.2. Then, gradient flow converges to zero loss, and converges in direction to a weight matrix that satisfies items 1-7 from Theorem 3.2.
Non-Asymptotic Analysis of the Implicit Bias
We shall refer to functions satisfying the above properties as -leaky, -smooth. Note that such functions are not necessarily homogeneous. Examples of such functions are any smoothed approximation to the leaky ReLU that is zero at the origin. One such example is: , which is -leaky and -smooth (see Figure 3 in the appendix for a side-by-side plot of this activation with the standard leaky ReLU).
We next introduce the definition of stable rank [RV07].
With the above conditions in hand, we can state our main theorem for this section.
The empirical risk under the logistic loss is driven to zero:
The stable rank of the weights throughout the gradient descent trajectory satisfies,
We now make a few remarks on the above theorem. We note that the assumption on the training data is the same as in Theorem 3.2 up to constants (treating as a constant), and is satisfied in many settings when (see Lemma 3.3).
For the first part of the theorem, we show that despite the non-convexity of the underlying optimization problem, gradient descent can efficiently minimize the training error, driving the empirical risk to zero.
The third part of the theorem is perhaps the most interesting one. In Theorem 3.2, we showed that for the standard leaky ReLU activation trained on nearly-orthogonal data with gradient flow, the asymptotic true rank of the network is at most 2. By contrast, Theorem 4.2 shows that the stable rank of neural networks with -leaky, -smooth activations trained by gradient descent have a constant stable rank after the first step of gradient descent and the rank remains bounded by a constant throughout the trajectory. Note that at initialization, by standard concentration bounds for random matrices (see, e.g., [Ver10]), the stable rank satisfies
so that Theorem 4.2 implies that gradient descent drastically reduces the rank of the matrix after just one step.
Implications of the Implicit Bias and Empirical Observations
The results in the preceding sections show a remarkable simplicity bias of gradient-based optimization when training two-layer networks with leaky activations on sufficiently high-dimensional data. For gradient flow, regardless of the initialization, the learned network has a linear decision boundary, even when the labels are some nonlinear function of the input features and when the network has the capacity to approximate any continuous function. With our analysis of gradient descent, we showed that the bias towards producing low-complexity networks (as measured by the stable rank of the network) is something that occurs quickly following random initialization, provided the initialization scale is small enough.
The linear classifier performs optimally for this distribution, and so the implicit bias of gradient descent towards low-rank classifiers (and of gradient flow towards linear decision boundaries) for high-dimensional data could in principle be helpful for allowing neural networks trained on such data to generalize well for this distribution. Indeed, as shown by [CL21], since while for , provided and for , the assumptions in Theorem 4.2 hold. Thus, gradient descent on two-layer networks with -leaky, -smooth activations, the empirical risk is driven to zero and the stable rank of the network is constant after the first step of gradient descent. In this setting, [FCB22] recently showed that such networks also achieve minimax-optimal generalization error. This shows that the implicit bias towards classifiers with constant rank can be beneficial in distributional settings where linear classifiers can perform well.
On the other hand, the same implicit bias can be harmful if the training data come from a distribution that does not align with this bias. Consider the noisy 2-xor distribution defined by where , where are orthogonal with identical norms, , and . Then every linear classifier achieves 50% test error on . Moreover, provided for , by the same reasoning in the preceding paragraph the assumptions needed for Theorem 3.2 are satisfied provided . In this setting, regardless of the initialization, by Theorem 3.2 the limit of gradient flow produces a neural network which has a linear decision boundary and thus achieves 50% test error.
Thus, the implicit bias can be beneficial in some settings and harmful in others. Theorem 4.2 and Lemma 3.3 suggest that the relationship between the input dimension and the number of samples, as well as the initialization variance, can influence how quickly gradient descent finds low-rank networks. In Figure 1 we examine these factors for two-layer nets trained on a Gaussian mixture model distribution (see Appendix F for experimental details). We see that the bias towards rank reduction increases as the dimension increases and the initialization scale decreases, as suggested by our theory. Moreover, it appears that the initialization scale is more influential for determining the rank reduction than training gradient descent for longer. In Appendix F we provide more detailed empirical investigations into this phenomenon.
In Figure 2, we investigate whether or not the initialization scale’s effect on the rank reduction of gradient descent occurs in settings not covered by our theory, namely in two-layer ReLU networks with bias terms trained by SGD on CIFAR-10. We consider two different initialization schemes: (1) Glorot uniform, the default TensorFlow initialization scheme with standard deviation of order , and (2) a uniform initialization scheme with smaller standard deviation than that of the Glorot uniform initialization. In the default initialization scheme, it appears that a reduction in the rank of the network only comes in the late stages of training, and the smallest stable rank achieved by the network within steps is 74.0. On the other hand, with the smaller initialization scheme, the rank reduction comes rapidly, and the smallest stable rank achieved by the network is 3.25. It is also interesting to note that in the small initialization setting, after gradient descent rapidly produces low-rank weights, the rank of the trained network begins to increase only when the gap between the train and test accuracy begin to diverge.
Conclusion
In this work, we characterized the implicit bias of gradient flow and gradient descent for two-layer leaky ReLU networks when trained on high-dimensional datasets. For both gradient flow and gradient descent, we proved convergence to near-zero training loss and that there is an implicit bias towards low-rank networks. For gradient flow, we showed a number of additional implicit biases: the weights are (unique) global maxima of the associated margin maximization problem, and the decision boundary of the learned network is linear. For gradient descent, we provided experimental evidence which suggests that small initialization variance is important for gradient descent’s ability to quickly produce low-rank networks.
Acknowledgements
We thank Matus Telgarsky for helpful discussions. This work was done in part while the authors were visiting the Simons Institute for the Theory of Computing as a part of the Deep Learning Theory Summer Cluster. SF, GV, PB, and NS acknowledge the support of the NSF and the Simons Foundation for the Collaboration on the Theoretical Foundations of Deep Learning through awards DMS-2031883 and #814639.
Appendix A Preliminaries on the Clarke Subdifferential and the KKT Conditions
Below we review the definition of the KKT conditions for non-smooth optimization problems (cf. [LL20, Dut+13]).
Consider the following optimization problem
;
For all we have .
Appendix B Proof of Theorem 3.2
We start with some notations. We denote . Thus, our assumption on can be written as . Since satisfies the KKT conditions of Problem (1), then there are such that for every we have
where is a subgradient of at , i.e., if then , if then and otherwise is some value in . Also we have for all , and if . Likewise, for all we have
where is defined similarly to . The proof of the theorem follows from the following lemmas.
For all we have . Furthermore, for all .
Let and suppose that . Let . Since then , and hence by the KKT conditions we must have .
Case 1: Assume that . Using \tagform@6 and (7), we have
Using for , the above is at most
By our assumption on , we can bound the above expression by
Thus, we obtain in contradiction to .
Case 2: Assume that . A similar calculation to the one given in case 1 (which we do not repeat for conciseness) implies that , in contradiction to . It concludes the proof of .
Finally, since and the derivative of is lower bounded by , then for all we have
and hence . ∎
For all we have . Furthermore, for all .
Suppose that there is such that . Using \tagform@6 and (7), we have
Using for and , the above is at most
Combining the above with our assumption on , we get
in contradiction to Lemma B.1. It concludes the proof of .
Finally, since and the derivative of is upper bounded by , then for all we have
and hence . ∎
For all we have .
By Lemma B.2 we have for all , and hence by the KKT conditions we must have . ∎
Moreover, for all we have: for every , and for every .
Fix . By \tagform@6 for all we have
By Lemma B.1 and Lemma B.2, and using for all , the above is larger than
Thus, , which implies .
By Lemma B.1 and Lemma B.2, and using for all , the above is smaller than
Thus, , which implies .
Since the above expression holds for all then we have .
By similar arguments (which we do not repeat for conciseness) we also get
and for all and . ∎
By the above lemma, we may denote and , and denote .
The pair is a unique global optimum of the Problem (3).
First, we remark that a variant of the this lemma appears in [SBG21]. They proved the claim under an assumption called Neural Agreement Regime (NAR), and Lemma B.4 implies that this assumption holds in our setting.
Note that the objective in Problem (3) is strictly convex and the constraints are affine. Hence, its KKT conditions are sufficient for global optimality, and the global optimum is unique. It remains to show that satisfy the KKT conditions.
Firstly, note that satisfy the constraints. Indeed, by Lemma B.4, for every we have and . Combining it with Lemma B.3 we get
Similarly, for every we have and . Together with Lemma B.3 we get
Next, we need to show that there are such that
By setting for all , Lemma B.4 implies that the above equations hold.
Finally, we need to show that for all where the corresponding constraint holds with a strict inequality. However, by \tagform@8 and (9) all constraints hold with an equality. ∎
The weight matrix is a unique global optimum of Problem (1).
Now, let be a global optimum of Problem (1). By [LL20], the KKT conditions of this problem are necessary for optimality, and hence they are satisfied by . Therefore, we have . Thus, is a unique global optimum. ∎
First, We remark that a variant of the this lemma appears in [SBG21]. They proved the claim under an assumption called Neural Agreement Regime (NAR), and Lemma B.4 implies that this assumption holds in our setting.
Case 1: If and then , and thus .
Case 2: If and then and .
Case 3: If and then and .
Case 4: If and then , and thus . ∎
where for all . Since are linearly independent, then given there is a unique choice of that satisfy the above equations.
Since satisfy the KKT conditions of Problem (3), we can find as follows. Let be such that the KKT conditions of Problem (3) hold. From the stationarity condition we have
Since are linearly independent, combining the above with \tagform@10 and (11) implies for all . Therefore, all constraints in Problem (3) must hold with an equality. Namely, we have
Solving the above equations, we get , and .
Thus, a KKT point of Problem (1) must satisfy \tagform@10 and (11) with the above ’s. Now, consider
We need to show that does not satisfy the KKT conditions of the problem
Using the above equations, it is easy to verify that for all . ∎
By Lemma B.4, for all we have and . Hence
Likewise, by Lemma B.4, for all we have and . Hence
Thus, it remains to obtain an upper bound for .
Note that satisfy the constraints in Problem (3). Indeed, for we have
where the last inequality is since .
By Lemma B.5 the pair is a global optimum of Problem (3). Hence
which implies as required. ∎
Appendix C Proof of Lemma 3.3
According to the distribution assumption in the lemma, we can write where .The proof below holds more generally when has independent subgaussian entries. By Hanson-Wright inequality [RV13, Theorem 2.1], we have for any ,
Let for a sufficiently large constant . Taking a union bound over all , we have that with probability at least , for all simultaneously.
For , we have . Hence we can apply a standard tail bound to obtain
Because we have known that with probability at least , we have
Then we can take for a sufficiently large constant and apply a union bound over all , which gives for all with probability at least
Appendix D Proof of Theorem 3.4
To prove Theorem 3.4, we need to show that for some , for all . To do so, we will first show a proxy PL inequality [FG21], and then use this to argue that the loss must eventually be smaller than .
We begin by showing that the vector correctly classifies the training data with a positive margin. To see this, note that for any ,
Inequality uses the theorem’s assumption that . Inequality uses that . To show how large of a margin gets on the training data, we bound its norm. We have,
Denoting , , and , substituting the above display into \tagform@13 we get for any ,
then since the above allows for the following proxy-PL inequality,
Let us now calculate how long until we reach the point where . Define
Since is decreasing, we thus have for all times , we have .
Appendix E Proof of Theorem 4.2
In this section, we provide a proof of Theorem 4.2. An overview of our proof is as follows.
In Section E.1 we provide basic concentration arguments about the random initialization.
In Section E.2 we show that the neural network output and the logistic loss objective function are smooth as a function of the parameters.
In Section E.4 we leverage the above structural result to provide a good upper bound on .
In Section E.5 we provide a lower bound for .
In Section E.6 we show that a proxy-PL inequality is satisfied.
We conclude the proof of Theorem 4.2 in Section E.7 by putting together the preceding items to bound the stable rank and to show that .
Let us denote by , where and , . For a given probability threshold , we make the following assumptions moving forward:
Step-size , where is -smooth and -leaky.
We shall also use the following notation to refer to the sigmoid losses that appear throughout the analysis of gradient descent training for the logistic loss,
With probability at least over the random initialization, the following holds. First, we have the following upper bounds for the spectral norm and per-neuron norms at initialization,
For the first part of the lemma, note that for fixed , there are i.i.d. such that
By concentration of the distribution [LM00, Lemma 1], for any ,
In particular, if we let , we have that with probability at least , for all ,
E.2 Smoothness of network output and loss
In this sub-section, we show that the network output and the logistic loss satisfy a number of smoothness properties, owing to the fact that is -smooth (i.e., exists and ).
We next show that the empirical risk is smooth, in the sense that the gradient norm is bounded by the loss itself and that the gradients are Lipschitz.
where is defined in \tagform@16. Additionally,
E.3 Loss ratio bound
In this section, we prove a key structural result which we will refer to as a ‘loss ratio bound’.
Let be a -leaky, -smooth activation. Define , and let us denote . Suppose that for all , we have,
Then under Assumptions (A1) and (A2), we have with probability at least ,
Our proof largely follows that used by [FCB22], who showed a loss ratio bound for gradient descent-trained two-layer networks with -leaky, -smooth activations when the data comes from a mixture of isotropic log-concave distributions. We generalize their proof technique to accommodate general training data for which the samples are nearly orthogonal in the sense that . Additionally, we provide a more general proof technique that illustrates how a loss ratio bound could hold for activations for which is not bounded from below by an absolute constant (like the ReLU), as well as for training data which are not necessarily nearly-orthogonal. We begin by describing two conditions which form the basis of this more general proof technique. The first condition concerns near-orthogonality of the gradients of the network, rather than the samples as in the assumption for Theorem 4.2.
We say that near-orthogonality of gradients holds at time if, for a some absolute constant , for any ,
Note that for linear classifiers—i.e., with —near-orthogonality of gradients is equivalent to near-orthogonality of samples, since in this setting . It is clear that this is a more general condition than near-orthogonality of samples.
The next condition we call gradient persistence, which roughly states that the gradients of the network with respect to a sample has large norm whenever that sample has large norm.
We say that gradient persistence holds at time if there is a constant such that for all ,
Gradient persistence essentially states that there is no possibility of a ‘vanishing gradient’ problem.
Next, we show that Lipschitz activation functions that are also ‘leaky’ in the sense that everywhere, allow for both gradient persistence and, when the samples are nearly-orthogonal, near-orthogonality of gradients.
Suppose is such that for all for some absolute constant . Suppose that for some , for all we have,
Then for all times , the gradients are nearly-orthogonal (Condition E.5) with and gradient persistence (Condition E.6) holds for .
Since for all , we therefore see that gradient persistence holds with :
Similarly, we see that the gradients are nearly-orthogonal, since
where uses that is 1-Lipschitz and uses the assumption on the near-orthogonality of the samples. ∎
We can now begin to prove Lemma E.4. We remind the reader of the notation for the sigmoid loss,
We follow the same proof technique of [FCB22], whereby in order to control the ratio of the sigmoid losses we show instead that the ratio of the exponential losses is small and that this suffices for showing the sigmoid losses is small. As we mention above, we generalize their analysis to emphasize that near-orthogonality of gradients and gradient persistence suffice for showing the loss ratio does not grow significantly.
Denote where and , and let be an arbitrary 1-Lipschitz and -smooth activation. Suppose that near-orthogonality of gradients (Condition E.5) holds for some and gradient persistence (Condition E.6) hold at time for some . Provided and , then for any we have,
It suffices to consider and . For notational simplicity denote
We now calculate the exponential loss ratio between two samples at time in terms of the exponential loss ratio at time .
Inequality uses Lemma E.2 while uses the definition of . We now proceed in a manner similar to [FCB22] to bound each of the three terms in the product separately. For the first term, since gradient persistence (Condition E.6) holds at time , we have for any ,
On the other hand, since is 1-Lipschitz we also have
Putting the preceding two displays together, we get
Inequality uses \tagform@18, and the equality uses the definition . This bounds the first term in \tagform@17.
For the second term, we use the fact that the gradients are nearly orthogonal at time (Condition E.5) and the lemma’s assumption on to get for any ,
Inequality uses the triangle inequality. Inequality uses \tagform@20. The inequality uses \tagform@18.
Finally, for the third term of \tagform@17, we have
Inequality uses Lemma E.3, while uses the lemma’s assumption that is smaller than . Putting \tagform@19, \tagform@21 and \tagform@22 into \tagform@17, we get
Lemma E.8 shows that if the sigmoid loss ratio is large, then for a small-enough step-size, the exponential loss ratio will contract at the following interation. This motivates understanding how the exponential loss ratios relate to the sigmoid loss ratios. We recall the following fact, shown in [FCB22, Fact A.2 ].
and if , then we also have
This fact demonstrates that if we can ensure that the inputs to the losses is positive, then we can essentially treat the sigmoid and exponential losses interchangeably. Thus, if the network is able to interpolate the training data at a given time , we can swap the sigmoid loss ratio appearing in Lemma E.8 with the exponential loss, and argue that if the exponential loss is too large at a given iteration, it will contract the following one. This allows for the exponential losses to be bounded throughout gradient descent. We formalize this in the following lemma.
Denote where and . Let be an arbitrary 1-Lipschitz and -smooth activation. Suppose that,
Gradient persistence (Condition E.6) holds at time for some , and
Near-orthogonality of gradients (Condition E.5) holds at time for some ,
For some , an exponential loss ratio bound holds at time with,
The network interpolates the training data at time : for all .
Then, provided the learning rate satisfies , we have an exponential loss ratio bound at time as well,
As in the proof of Lemma E.8, it suffices to prove that the ratio of the exponential loss for the first sample to the exponential loss for the second sample is bounded by . Let us again denote
Above, inequality follows since . The equality uses that . Inequality uses that , the lemma’s assumption on the step-size, , and that . The inequality uses the proposition’s assumption that the network interpolates the training data at time , so that the ratio of exponential losses is at most twice the ratio of the sigmoid losses by Fact E.9. The final inequality follows by the case assumption that .
Inequality uses the Case 2 assumption that . Inequality uses the proposition’s assumption that the exponential loss ratio at time is at most , so that the sigmoid loss ratio is at most by Fact E.9 (note that the sigmoid loss ratio is at least by the case assumption and as ). The equality uses that . The final inequality follows as we can write
The first inequality above uses that for , and the final inequality follows by the assumption that . This proves above, so that in Case 2, the exponential loss ratio decreases at the following iteration.
In summary, the preceding proposition demonstrates that a loss ratio bound can hold for general Lipschitz and smooth activations provided the following four conditions hold for some time :
an exponential loss ratio bound holds at time ;
near-orthogonality of the gradients holds for all times ;
gradient persistence holds at all times ; and
the network interpolates the training data for all times .
This is because the proposition guarantees that once you interpolate the training data, if the gradients are nearly-orthogonal and gradient persistence holds, the maximum ratio of the exponential losses does not become any larger than the maximum ratio at time . Note that the above proof outline does not rely upon the training data being nearly orthogonal, nor that the activations are ‘leaky’, and thus may be applicable to more general settings than the ones we consider in this work.
On the other hand, when the training data is nearly-orthogonal and the activations are -leaky and -smooth activations, Fact E.7 shows that (2) and (3) above hold for all times . Thus, to show a loss ratio bound in this setting, the main task is to show items (1) and (4) above. Towards this end, we present the final auxiliary lemma that will be used in the proof of Lemma E.4. A similar lemma appeared in [FCB22, Lemma A.3 ], and our proof is only a small modification of their proof. For completeness, we provide its proof in detail here.
Let be a -leaky, -smooth activation. Then the following hold with probability at least over the random initialization.
An exponential loss ratio bound holds at initialization:
If there is an absolute constant such that at time we have , and if for all we have
then for , we have
If for all we have , then under Assumptions (A1) and (A2), at time and for all samples , we have .
We shall prove each part of the lemma in sequence.
Part (a).
Since is 1-Lipschitz and , Cauchy–Schwarz implies
Applying this bound to the network output for each sample at initialization, we get
Inequality uses Lemma E.1, while inequality and follow by Assumptions (A2) and (A1), respectively. We therefore have,
Part (b).
Let . Let us re-introduce the notation . By Lemma E.2, we know
where Inequality uses Lemma E.3. Continuing we get that
Inequality uses the lemma’s assumption that . Inequality uses that is -leaky and 1-Lipschitz (see eq. \tagform@27). Inequality uses that the assumption that the samples are nearly-orthogonal,
Inequality uses the definition . Inequality again uses the lemma’s assumption of a sigmoid loss ratio bound, so that
The final inequality follows since the step-size is small enough. This completes part (b) of this lemma.
Part (c).
Note that by \tagform@25, . Since is monotone this implies the sigmoid losses at initialization satisfy and so
Thus, the assumption that and Assumption (A1) allow for us to apply part (b) of this lemma as follows,
We now have all of the pieces necessary to prove Lemma E.4.
In order to show that the ratio of the losses is bounded, it suffices to show that the ratio of exponential losses is bounded, since by Fact E.9,
We will prove the lemma by first showing an exponential loss ratio holds at time and , and then use an inductive argument based on Proposition E.10 with .
By part (a) of Lemma E.11, the exponential loss ratio at time is at most . To see the loss ratio holds at time , first note that by assumption, we have that the samples satisfy,
Because is a -leaky, -smooth activation, by Fact E.7 this implies that gradient persistence (Condition E.6) holds with and near-orthogonality of gradients (Condition E.5) holds for all times with . By Assumption (A1), we can therefore apply Lemma E.8 at time , so that we have for any ,
Inequality uses that , while inequality uses that the step-size is sufficiently small by Assumption (A1). Therefore, the exponential loss ratio at times and is at most .
Now suppose by induction that at times , the exponential loss ratio is at most , and consider . (The cases and were just proved above.) By the induction hypothesis and \tagform@29, the sigmoid loss ratio from times is at most . By Assumption (A1), the step-size satisfies
Further, the samples satisfy \tagform@30, so that
Thus all parts of Lemma E.11 hold with . By part (b) of that lemma, the unnormalized margin for each sample increased for every time :
Since the network interpolates the training data at time by part (c) of Lemma E.11, this implies
Finally, since the learning rate satisfies , all of the conditions necessary to apply Proposition E.10 hold. This proposition shows that the exponential loss ratio at time is at most . This completes the induction so that the exponential loss ratio is at most throughout gradient descent, which by \tagform@29 implies that the sigmoid loss ratio is at most . ∎
E.4 Upper bound for the Frobenius norm
In this section we prove an upper bound for the Frobenius norm of the first-layer weights (recall that ). Our proof follows by first bounding the Frobenius norm up to time using the triangle inequality,
The standard approach from here is to bound the gradient norm as follows,
However, this bound for the Frobenius norm leads to a stable rank bound that grows with (compare with the lower bound for the spectral norm in Lemma E.13). In Lemma E.12, we prove a tighter upper bound on the Frobenius norm that implies that the stable rank is at most an absolute constant. Our proof uses the loss ratio bound of Lemma E.4 to develop a sharper upper bound for , using a similar approach to that of [FCB22, Lemma 4.10 ].
Let , , , and denote as the upper bound on the sigmoid loss ratio from Lemma E.4. Suppose that for all the training data satisfy,
Then under Assumptions (A1) and (A2), with probability at least , for any ,
We now consider the squared gradient norm with respect to the -th neuron:
Above, inequality uses that . Inequality uses that is 1-Lipschitz. Inequality uses the loss ratio bound in Lemma E.4, and inequality uses the lemma’s assumption about the near-orthogonality of the samples. We can thus continue,
The final inequality uses the loss ratio bound so that we have
Finally, taking square roots of \tagform@33 and applying this bound on the norm in Inequality \tagform@32 above we conclude that
establishing our claim for the upper bound on . For the bound on the Frobenius norm, we have an analogue of \tagform@32,
and we can simply use that and
E.5 Lower bound for the spectral norm
We next show that the spectral norm is large. The proof follows by showing that after the first step of gradient descent, every neuron is highly correlated with the vector .
Let , and . Let . Suppose that for all the training data satisfy,
Then, under Assumptions (A1) and (A2), with probability at least , we have the following lower bound for the spectral norm of the weights for any :
We shall show that every neuron is highly correlated with the vector . By definition,
Inequality uses the lemma’s assumption that . Inequality uses that is -leaky and . Telescoping, we get
On the other hand, by Lemma E.1, we know that
By the lemma’s assumption that , we have
Substituting this inequality into the previous display, we get
where uses \tagform@35, uses Assumption (A2) and that so that,
and uses \tagform@37. Continuing from \tagform@34 we get
where the last inequality uses \tagform@38.
Negative neurons.
The argument in this case is essentially identical. If , then
where the inequalities and follow using an identical logic to the positive neuron case. We therefore have for negative neurons,
An identical argument used for the positive neurons to derive \tagform@39 shows that for negative neurons we have and hence
To see the claim about the spectral norm, first note that since , and hence . We thus can calculate,
Inequality uses \tagform@41 and inequality uses the upper bound for given in \tagform@36. This completes the proof. ∎
E.6 Proxy PL inequality
Our final task for the proof of Theorem 4.2 is to show that . We do so by establishing a variant of the Polyak–Lojasiewicz (PL) inequality called a proxy PL inequality [FG21, Definition 1.2].
Let , , and . Let . Suppose the training data satisfy, for all ,
For a -leaky activation, the following proxy-PL inequality holds for any :
Let and define the matrix as having rows . Then, , and we have for each ,
Inequality uses the lemma’s assumption that . Inequality uses that , and inequality uses that . We therefore have,
where the final inequality uses the calculation \tagform@36.
E.7 Proof of Theorem 4.2
We are now in a position to provide the proof of Theorem 4.2. For the reader’s convenience, we re-state the theorem below.
We prove the theorem in parts. We first note that all of the results of Lemma E.1, Lemma E.12, Lemma E.13, and Lemma E.14 hold with probability at least over the random initialization.
This is a simple consequence of the proxy-PL inequality given in Lemma E.14 since is smooth; a small modification of the proof of [FCB22, Lemma 4.12 ] suffices. In particular, since by Lemma E.3 the loss has -Lipschitz gradients, we have
Applying the proxy-PL inequality of Lemma E.14 and using that we thus have
We know from the proof of Lemma E.4 (see \tagform@31) that the unnormalized margin increases for each sample for all times. Since is monotone, this implies is decreasing and hence so is , which implies
Since for each , is at most an absolute constant, and since is an absolute constant this completes the proof for the first part of the theorem.
Norms driven to infinity.
We showed in Lemma E.13 (see \tagform@41 and \tagform@36) that for each and for each ,
Stable rank is constant.
We will use the upper bound for the Frobenius norm from Lemma E.12 and the lower bound for the spectral norm from Lemma E.13. We consider two cases.
In this instance, by Lemma E.12, we have the chain of inequalities,
We can thus use Lemma E.13 and Lemma E.12 to bound the ratio of the Frobenius norm to the spectral norm:
Appendix F Experiment Details
We describe below the two experimental settings we consider.
In Figure 4, we provide additional empirical observations on how the learning rate can affect the initialization scale’s influence on the stable rank of the trained network as we showed in Figure 1. We fix and otherwise use the same setup for Figure 1 described in the previous paragraph. When the learning rate is the smaller value of , training for longer can reduce the (stable) rank of the network, while for the larger learning rate of most of the rank reduction occurs in the first step of gradient descent.
F.2 CIFAR10
We use the standard 10-class CIFAR10 dataset with pixel values normalized to be between 0 and 1 (dividing each pixel value by 255). We consider a standard two-layer network with 512 neurons with ReLU activations with biases and with second-layer weights trained. We train for steps with SGD with batch size 128 and a learning rate of . Figure 2 shows the average over 5 independent random initializations with shaded area corresponding to plus or minus one standard deviation.
For the second-layer initialization we use the standard TensorFlow Dense layer initialization, which uses Glorot Uniform with standard deviation (since the network has 10 outputs). For the first-layer initialization, we consider two different initialization schemes.