Learning and Generalization in Overparameterized Neural Networks, Going Beyond Two Layers
Zeyuan Allen-Zhu, Yuanzhi Li, Yingyu Liang
Introduction
Neural network learning has become a key machine learning approach and has achieved remarkable success in a wide range of real-world domains, such as computer vision, speech recognition, and game playing . In contrast to the widely accepted empirical success, much less theory is known. Despite a recent boost of theoretical studies, many questions remain largely open, including fundamental ones about the optimization and generalization in learning neural networks.
One key challenge in analyzing neural networks is that the corresponding optimization is non-convex and is theoretically hard in the general case . This is in sharp contrast to the fact that simple optimization algorithms like stochastic gradient descent (SGD) and its variants usually produce good solutions in practice even on both training and test data. Therefore,
what functions can neural networks provably learn?
Another key challenge is that, in practice, neural networks are heavily overparameterized (e.g., ): the number of learnable parameters is much larger than the number of the training samples. It is observed that overparameterization empirically improves both optimization and generalization, appearing to contradict traditional learning theory.For example, Livni et al. observed that on synthetic data generated from a target network, SGD converges faster when the learned network has more parameters than the target. Perhaps more interestingly, Arora et al. found that overparameterized networks learned in practice can often be compressed to simpler ones with much fewer parameters, without hurting their ability to generalize; however, directly learning such simpler networks runs into worse results due to the optimization difficulty. We also have experiments in Figure 1(a). Therefore,
why do overparameterized networks (found by those training algorithms) generalize?
Most existing works analyzing the learnability of neural networks make unrealistic assumptions about the data distribution (such as being random Gaussian), and/or make strong assumptions about the network (such as using linear activations). Other works focusing on structured data such as sparse coding model and Li and Liang shows that two-layer ReLU networks can learn classification tasks when the data come from mixtures of arbitrary but well-separated distributions.
A theorem without distributional assumptions on data is often more desirable. Indeed, how to obtain a result that does not depend on the data distribution, but only on the concept class itself, lies in the center of PAC-learning which is one of the foundations of machine learning theory . Also, studying non-linear activations is critical because otherwise one can only learn linear functions, which can also be easily learned via linear models without neural networks.
Brutzkus et al. prove that two-layer networks with ReLU activations can learn linearly-separable data (and thus the class of linear functions) using just SGD. This is an (improper) PAC-learning type of result because it makes no assumption on the data distribution. Andoni et al. proves that two-layer networks can learn polynomial functions of degree over -dimensional inputs in sample complexity . Their learner networks use exponential activation functions, where in practice the rectified linear unit (ReLU) activation has been the dominant choice across vastly different domains.
On a separate note, if one treats all but the last layer of neural networks as generating a random feature map, then training only the last layer is a convex task, so one can learn the class of linear functions in this implicit feature space . This result implies low-degree polynomials and compositional kernels can be learned by neural networks in polynomial time. Empirically, training last layer greatly weakens the power of neural networks (see Figure 1).
Our Result. We prove that an important concept class that contains three-layer (resp. two-layer) neural networks equipped with smooth activations can be efficiently learned by three-layer (resp. two-layer) ReLU neural networks via SGD or its variants.
Specifically, suppose in aforementioned class the best network (called the target function or target network) achieves a population risk with respect to some convex loss function. We show that one can learn up to population risk , using three-layer (resp. two-layer) ReLU networks of size greater than a fixed polynomial in the size of the target network, in , and in the “complexity” of the activation function used in the target network. Furthermore, the sample complexity is also polynomial in these parameters, and only poly-logarithmic in the size of the learner ReLU network.
We stress here that this is agnostic PAC-learning because we allow the target function to have error (e.g., can be positive for regression), and is improper learning because the concept class consists of smaller neural networks comparing to the networks being trained.
Our Contributions. We believe our result gives further insights to the fundamental questions about the learning theory of neural networks.
To the best of our knowledge, this is the first result showing that using hidden layers of neural networks one can provably learn the concept class containing two (or even three) layer neural networks with non-trivial activation functions.In contrast, Daniely focuses on training essentially only the last layer (and the hidden-layer movement is negligible). After this paper has appeared online, Arora et al. showed that neural networks can provably learn two-layer networks with a slightly weaker class of smooth activation functions. Namely, the activation functions that are either linear functions or even functions.
Our three-layer result gives the first theoretical proof that learning neural networks, even with non-convex interactions across layers, can still be plausible. In contrast, in the two-layer case the optimization landscape with overparameterization is almost convex ; and in previous studies on the multi-layer case, researchers have weakened the network by applying the so-called NTK (neural tangent kernel) linearization to remove all non-convex interactions .
In fact, the techniques introduced in this work is later used in to show how multi-layer neural networks can provably learn concept classes where no kernel methods can learn efficiently, and used in to show how the initial large learning rate in training a neural network can improve generalization, also not achievable by the convex kernel methods.
To some extent we explain the reason why overparameterization improves testing accuracy: with larger overparameterization, one can hope to learn better target functions with possibly larger size, more complex activations, smaller risk , and to a smaller error .
We establish new tools to tackle the learning process of neural networks in general, which can be useful for studying other network architectures and learning tasks. (E.g., the new tools here have allowed researchers to study also the learning of recurrent neural networks .)
Other Related Works. We acknowledge a different line of research using kernels as improper learners to learn the concept class of neural networks . This is very different from us because we use “neural networks” as learners. In other words, we study the question of “what can neural networks learn” but they study “what alternative methods can replace neural networks.”
There is also a line of work studying the relationship between neural networks and NTKs (neural tangent kernels) . These works study neural networks by considering their “linearized approximations.” There is a known performance gap between the power of real neural networks and the power of their linearized approximations. For instance, ResNet achieves 96% test error on the CIFAR-10 data set but NTK (even with infinite width) achieves 77% . We also illustrate this in Figure 1.
With sufficient overparameterization, for two-layer neural networks Li and Liang and Du et al. show that gradient descent can perfectly fit the training samples when the data is not degenerated. Allen-Zhu et al. show that deep neural networks can also provably fit the training samples in polynomial time. These results do not cover generalization so are not relevant in studying the learnability of neural networks.
2 Why Do Overparameterized Networks Generalize?
Our result above assumes that the learner network is sufficiently overparameterized. So, why does it generalize to the population risk and give small test error? More importantly, why does it generalize with a number of samples that is (almost) independent of the number of parameters?
This question cannot be studied under the traditional VC-dimension learning theory since the VC dimension grows with the number of parameters. Several works explain generalization by studying some other “complexity” of the learned networks. Most related to the discussion here is where the authors prove a generalization bound in the norms (of weight matrices) of each layer, as opposed to the number of parameters. There are two main concerns with those results.
Learnability Trainability Generalization. It is not clear from those results how a network with both low “complexity” and small training loss can be found by the training method. Therefore, they do not directly imply PAC-learnability for non-trivial concept classes (at least for those concept classes studied by this paper).
Their norms are “sparsity induced norms”: for the norm not to scale with the number of hidden neurons , essentially, it requires the number of neurons with non-zero weights not to scale with . This more or less reduces the problem to the non-overparameterized case.
At a high level, our generalization is made possible with the following sequence of conceptual steps.
Good networks with small risks are plentiful: thanks to overparameterization, with high probability over random initialization, there exists a good network in the close neighborhood of any point on the SGD training trajectory. (This corresponds to Section 6.2 and 6.3.)
The optimization in overparameterized neural networks has benign properties: essentially along the training trajectory, there is no second-order critical points for learning three-layer networks, and no first-order critical points for two-layer. (This corresponds to Section 6.4.)
In the learned networks, information is also evenly distributed among neurons, by utilizing either implicit or explicit regularization. This structure allows a new generalization bound that is (almost) independent of the number of neurons. (This corresponds to Section 6.5 and 6.6, and we also empirically verify it in Section 7.1.)
Since practical neural networks are typically overparameterized, we genuinely hope that our results can provide theoretical insights to networks used in various applications.
3 Roadmap
In the main body of this paper, we introduce notations in Section 2, present our main results and contributions for two and three-layer networks in Section 3 and 4, and conclude in Section 5.
For readers interested in our novel techniques, we present in Section 6 an 8-paged proof sketch of our three-layer result. For readers more interested in the practical relevance, we give more experiments in Section 7. In the appendix, we begin with mathematical preliminaries in Appendix A. Our full three-layer proof is in Appendix C. Our two-layer proof is much easier and in Appendix B.
Notations
For notation simplicity, with high probability (or w.h.p.) means with probability for a sufficiently large constant for two-layer network where is the number of hidden neurons, and for three-layer network where are the number of hidden neurons for the first and second layer (to be precisely defined later). In this paper, hides factors of for two-layer networks, or for three-layer networks.
Function complexity. The following notion measures the complexity of any smooth activation function . Suppose . Given a non-negative , the complexity
where is a sufficiently large constant (e.g., ). Intuitively, measures the sample complexity: how many samples are required to learn correctly; while bounds the network size: how much over-parameterization is needed for the algorithm to efficiently learn up to error. It is always true that .Recall \big{(}\frac{\sqrt{\log(1/\varepsilon)}}{\sqrt{i}}C^{*}\big{)}^{i}\leq e^{O(\log(1/\varepsilon))}=\frac{1}{\poly(\varepsilon)} for every . While for or low degree polynomials, and only differ by .
Result for Two-Layer Networks
the complexity of and assume they are bounded.
Standard two-layer networks are special cases of (3.1) (by setting and ). Our formulation (3.1) additionally captures combinations of correlations between non-linear and linear measurements of different directions of .
Learning Process. Let denote the initial value of the hidden weight matrix, and let denote the value at time . (Note that is the matrix of increments.) The weights are initialized with Gaussians and then is updated by the vanilla SGD. More precisely,
entries of and are i.i.d. random Gaussians from ,
entries of each are i.i.d. random Gaussians from for some fixed .We shall choose in the proof due to technical reason. As we shall see in the three-layer case, if weight decay is used, one can relax this to .
For notation simplicity, with high probability (or w.h.p.) means with probability for a sufficiently large constant , and hides factors of .
For every \varepsilon\in\big{(}0,\frac{1}{pk\mathfrak{C}_{\mathfrak{s}}(\phi,1)}\big{)}, there exists
such that for every and every , choosing for the initialization, choosing learning rate \eta=\widetilde{\Theta}\big{(}\frac{1}{\varepsilon km}\big{)} and
with high probability over the random initialization, SGD after iteration satisfies
SGD only takes one example per iteration. Thus, sample complexity is also at most .
We note sample complexity is (almost) independent of , the amount of overparametrization.
2 Our Interpretations
Overparameterization improves generalization. By increasing , Theorem 1 supports more target functions with possibly larger size, more complex activations, and smaller population risk . In other words, when is fixed, among the class of target functions whose complexities are captured by , SGD can learn the best function approximator of the data, with the smallest population risk. This gives intuition how overparameterization improves test error, see Figure 1(a).
Large margin non-linear classifier. Theorem 1 is a nonlinear analogue of the margin theory for linear classifiers. The target function with a small population risk (and of bounded norm) can be viewed as a “large margin non-linear classifier.” In this view, Theorem 1 shows that assuming the existence of such large-margin classifier, SGD finds a good solution with sample complexity mostly determined by the margin, instead of the dimension of the data.
Inductive bias. Recent works (e.g., ) show that when the network is heavily overparameterized (that is, is polynomial in the number of training samples) and no two training samples are identical, then SGD can find a global optimum with classification error (or find a solution with training loss) in polynomial time. This does not come with generalization, since it can even fit random labels. Our theorem, combined with , confirms the inductive bias of SGD for two-layer networks: when the labels are random, SGD finds a network that memorizes the training data; when the labels are (even only approximately) realizable by some target network, then SGD learns and generalizes. This gives an explanation towards the well-known empirical observations of such inductive bias (e.g., ) in the two-layer setting, and is more general than Brutzkus et al. in which the target network is only linear.
Result for Three-Layer Networks
Concept class and target function . This time we consider more powerful target functions of the form
to denote the complexity of the two layers, and assume they are bounded.
Our concept class contains measures of correlations between composite non-linear functions and non-linear functions of the input, there are plenty of functions in this new concept class that may not necessarily have small-complexity representation in the previous formulation (3.1), and as we shall see in Figure 1(a), this is the critical advantage of using three-layer networks compared to two-layer ones or their NTKs. The learnability of this correlation is due to the non-convex interactions between hidden layers. As a comparison, studies the regime where the changes in hidden layers are negligible thus can not show how to learn this concept class with a three-layer network.
are only special cases of (4.1). Also, even in the special case of , the target
captures combinations of correlations of combinations of non-linear measurements in different directions of . This we do not know how to compute using two-layer networks.
In fact, our results of this paper even apply to the following general form:
with the mild requirement that for each . We choose to present the slightly weaker formulation (4.1) for cleaner proofs.
Learner network . Our learners are three-layer networks with
Again for simplicity, we only update and . The weights are randomly initialized as:
entries of and are i.i.d. from ,
entries of and are i.i.d. from ,
entries of each are i.i.d. from for . Recall in our two-layer result we have chosen due to technical reasons; thanks to weight decay, we can simply select in our three-layer case.
As for the optimization algorithm, we use SGD with weight decay and an explicit regularizer.
For some , we will use as the learner network, i.e., linearly scale down by . This is equivalent to replacing , with , , since a ReLU network is positive homogenous. The SGD will start with and slowly decrease it, similar to weight decay.We illustrate the technical necessity of adding weight decay. During training, it is easy to add new information to the current network, but hard to forget “false” information that is already in the network. Such false information can be accumulated from randomness of SGD, non-convex landscapes, and so on. Thus, by scaling down the network we can effectively forget false information.
We also use an explicit regularizer for some with This norm on encourages weights to be more evenly distributed across neurons. It can be replaced with for any constant for our theoretical purpose. We choose for simplicity, and observe that in practice, weights are automatically spread out due to data randomness, so this explicit regularization may not be needed. See Section 7.1 for an experiment.
Now, in each round , we use (noisy) SGD to minimize the following stochastic objective for some fixed :
2 Main Theorems
For notation simplicity, with high probability (or w.h.p.) means with probability and hides factors of .
Consider Algorithm 2. For every constant , every , every , there exists
such that for every , and properly set in Table 1, as long as
there is a choice and such that with probability ,
For general , ignoring , the complexity of three-layer networks is essentially . This is necessary in some sense: consider the case when for a very large parameter , then is just a function , and we have .
3 Our Contributions
Our sample complexity scales polynomially with the complexity of the target network, and is (almost) independent of , the amount of overparameterization. This itself can be quite surprising, because recent results on neural network generalization require to be polynomial in . Furthermore, Theorem 2 shows three-layer networks can efficiently learn a bigger concept class (4.1) comparing to what we know about two-layer networks (3.1).
From a practical standpoint, one can construct target functions of the form (4.1) that cannot be (efficiently) approximated by any two-layer target function in (3.1). If data is generated according to such functions, then it may be necessary to use three-layer networks as learners (see Figure 1).
From a theoretical standpoint, even in the special case of , our target function can capture correlations between non-linear measurements of the data (recall Remark 4.1). This means , so learning it is essentially in the same complexity as learning each . For example, a three-layer network can learn up to accuracy in complexity , while it is unclear how to do so using two-layer networks.
Technical Contributions. We highlight some technical contributions in the proof of Theorem 2.
In recent results on the training convergence of neural networks for more than two layers , the optimization process stays in a close neighborhood of the initialization so that, with heavy overparameterization, the network becomes “linearized” and the interactions across layers are negligible. In our three-layer case, this means that the matrix never interacts with . They then argue that SGD simulates a neural tangent kernel (NTK) so the learning process is almost convex .
In our analysis, we directly tackle non-convex interactions between and , by studying a “quadratic approximation” of the network. See Remark 6.1 for a mathematical comparison. In other words, we introduced a second-order version of NTK, and our new proof techniques could be useful for future theoretical applications.
Comparison to Daniely . Daniely studies the learnability of multi-layer networks when (essentially) only the output layer is trained, which reduces to a convex task. He shows that multi-layer networks can learn a compositional kernel space, which implies two/three-layer networks can efficiently learn low-degree polynomials. He did not derive the general sample/time complexity bounds for more complex functions such as those in our concept classes (3.1) and (4.1), but showed that they are finite.
In contrast, our learnability result of concept class (4.1) is due to the non-convex interaction between hidden layers. Since Daniely studies the regime when the changes in hidden layers are negligible, if three layer networks are used, to the best of our knowledge, their theorem cannot lead to similar sample complexity bounds comparing to Theorem 2 by only training the last layer of a three-layer network. Empirically, one can also observe that training hidden layers is better than training the last layer (see Figure 1).
Conclusion and Discussion
We show by training the hidden layers of two-layer (resp. three-layer) overparameterized neural networks, one can efficiently learn some important concept classes including two-layer (resp. three-layer) networks equipped with smooth activation functions. Our result is in the agnostic PAC-learning language thus is distribution-free. We believe our work opens up a new direction in both algorithmic and generalization perspectives of overparameterized neural networks, and pushing forward can possibly lead to more understanding about deep learning.
One can also combine this paper with properties of recurrent neural networks (RNNs) to derive PAC-learning results for RNNs , or use the existential tools of this paper to derive PAC-learning results for three-layer residual networks (ResNet) . The latter gives a provable separation between neural networks and kernels in the efficient PAC-learning regime.
There are plenty of open directions following our work, especially how to extend our result to larger number of layers. Even for three layers, our algorithm currently uses an explicit regularizer on the weights to control the generalization. In contrast, in practice, it is observed that neural networks actually implicitly regularizes: even without any restriction to weights, the network learned by an unconstraint overparameterized neural network still generalizes. It is an interesting direction to explain this inductive bias for three layers and beyond. (This present paper only explains inductive bias for two-layer networks.) As for a third direction, currently our result does not directly apply to target networks with ReLU activations. While there are functions with that approximate ReLU function in $\varepsilon$ error, obtaining an polynomial or sub-exponential bound on the sampling complexity would be of great interest. On the other hand, the result by indicates that learning ReLU could also be hard for algorithms such as SGD.
We present key technical lemmas we used for proving the three-layer network theorems in Section 6 so that interested readers do not need to go through the appendix. Many of them can be of independent interests and have found further applications beyond this paper (such as for residual networks and for recurrent networks ). The full proof is in Appendix C.
The two-layer result is based on similar ideas but simpler, and the full proof is in Appendix B.
We give more experiments in Section 7 on Page 7. Our appendix starts on page A.
Main Lemmas for Three Layer Networks
In Section 6.1, we state the main theorem for the first variant of the SGD, which we excluded from the main body due to space limitation. In Section 6.2, we show the existence of some good “pseudo network” that can approximate the target. In Section 6.3, we present our coupling technique between a real network and a pseudo network. In Section 6.4, we present the key lemma about the optimization procedure. In Section 6.5, we state a simple generalization bound that is compatible with our algorithm. These techniques together give rise to the proof of Theorem 3. In Section 6.6, we present additional techniques needed to show Theorem 2.
In the first variant of SGD, in each round , we use (noisy) SGD to minimize the following stochastic objective for some fixed :
Below is the main theorem for using the first variant of SGD to train three-layer networks.
Consider Algorithm 3. In the same setting as Theorem 2, for every , as long as
there is choice , such that with probability at least ,
As goes large, this sample complexity polynomially scales with so may not be very efficient (we did not try hard to improve the exponent ). Perhaps interesting enough, this is already non-trivial, because can be much smaller than , the number of parameters of the network or equivalently the naive VC dimension bound. Recall in our second variant of SGD, the sample complexity only grows polylogarithmically in .
2 Existence
denote the diagonal sign matrix of the second layer at random initialization.
Consider the output of a three-layer network at randomly initialized sign without bias as
The above pseudo network can be reminiscent of the simpler linearized NTK approximation of a network used in prior work , which in our language means
In such linearization it is clear that the weight matrices and do not interact with each other. In contrast, in our quadratic formula , the matrices and are multiplied together, resulting in a non-convex interaction after putting into the loss function. This can be viewed as a second-order version of NTK (but is itself not NTK). We shall see in Section 6.3 that the pseudo network can be made close to the real network in some sense.
For every \varepsilon\in\big{(}0,\frac{1}{kp_{1}p_{2}^{2}\mathfrak{C}_{\mathfrak{s}}(\Phi,p_{2}\mathfrak{C}_{\mathfrak{s}}(\phi,1))\mathfrak{C}_{\mathfrak{s}}(\phi,1)^{2}}\big{)}, there exists
such that if , then with high probability, there exists weights with
In other words, at randomly initialized signs, there exist choices of and with small norms so that approximates the target. Later, we will combine this with the coupling lemma Section 6.3 to show a main structural property of overparameterized networks: solutions with good population risks are dense in the parameter space, in the sense that with high probability over the random initialization, there exists a good solution in the “close ” neighborhood of the initialized weights.
where are independent random variables.
The reason Lemma lem:fit_fun_mainb is equivalent to Lemma lem:fit_fun_maina consists of a few thinking steps. Without loss of generality, one can assume and write and write so it only depends on the first coordinate of and . Under such simplifications, the second through last coordinates do not make any difference, so we can assume without loss of generality that are only in 2 dimensions, and write and . In sum, proving Lemma lem:fit_fun_maina suffices in establishing Lemma lem:fit_fun_mainb.
Given Lemma 6.3, we can directly apply it to the two-layer case (see Appendix B.1) to show the existence of good pseudo networks. As for the three-layer case, we need to apply Lemma 6.3 twice: once for (each neuron of) the second hidden layer and once for the output.
Consider the the input (without bias) to a single neuron of the second hidden layer at random initialization. Without loss of generality, say the first neuron, given as:
Even though is completely random, using Lemma 6.3, we can derive the following lemma which rewrites in the direction of an arbitrary function .
Moreover, letting be the complexity of , and if and are at random initialization, then we have
For every fixed , is independent of .
.
For every with , .
For every fixed with , with high probability and .
Furthermore, there exists real-valued function satisfying with high probability:
Lemma 6.4 shows that, up to some small noise and , we can “view” the input to any neuron of the second layer essentially as “a Gaussian variable ” times “the target function ” in the first layer of the target network. This allows us to apply Lemma 6.3 again for the output layer, so as to construct for instance a composite function with as its inputs.One technical issue is the following. When considering multiple neurons of the second layer, those Gaussian variables are not independent because they all depend on . The notion of in Lemma 6.4 removes such dependency across multiple neurons, at the expense of small Wasserstein distance.
Lemma 6.4 may sound weird at first look because random initialization cannot carry any information about the target. There is no contradiction here, because we will show, is essentially another Gaussian (with the same distribution as ) times , thus can still be independent of the value of . Nevertheless, the decomposition in Lemma 6.4 shall enable us to show that, when we start to modify the hidden weights , the learning process will start to discover this structure and make the weight of the term relating to stand out from other terms.
Using Lemma 6.4 and applying Lemma 6.3 once more, we can prove Lemma 6.2.
3 Coupling Between Real and Pseudo Networks
Suppose we are currently at weights , , where matrices are random Gaussian matrices such that:
for some to be specified later, and are matrices with bounded norms that can depend on the randomness of . Intuitively, and capture how much the algorithm has moved away from the initialization, while are introduced for adding smoothness in the optimization, see Section 6.4.
Let us introduce the notion of pseudo networks at the current weights. Let
denote the diagonal sign matrix of the first layer at random initialization ,
denote the diagonal sign matrix of the second layer at random initialization ,
denote the diagonal sign matrix of the second layer at these weights.
For a fixed , let us denote row vector . Define the pseudo network (and its semi-bias, bias-free versions) as
As a sanity check, at , the pseudo network equals the true one:
Suppose \tau_{v}\in\big{[}0,1\big{]}, \tau_{w}\in\big{(}\frac{1}{m_{1}^{3/2}},\frac{1}{m_{1}^{1/2}}\big{]}, \sigma_{w}\in\big{(}\frac{1}{m_{1}^{3/2}},\frac{\tau_{w}}{m_{1}^{1/4}}\big{]}, \sigma_{v}\in\big{(}0,\frac{1}{m_{2}^{1/2}}\big{]} and . Given fixed unit vector , and perturbation matrices (that may depend on the randomness of and ) satisfying
(Sparse sign change). , .
The first statement “sparse sign change” of Lemma 6.5 says that, if we move from random initialization to , then how many signs of the ReLUs (in each layer) will change, as a function of the norms of and . This calculation is similar to but slightly more involved due to the norm that we use here.
We quickly point out a corollary by applying the coupling and existential lemmas together.
Recall in the existential Lemma 6.2, we have studied a pseudo network where the signs are determined at the random initialization . Now, the coupling Lemma 6.5 says that the amount of sign change from to can be controlled. Therefore, if parameters are chosen appropriately, the existential Lemma 6.2 should also apply to . Formally,
In the same setting as Lemma 6.2, given perturbation matrices (that may depend on the randomness of the initialization and the data distribution ) with
Using parameter choices from Table 1, w.h.p. there exist and (independent of the randomness of ) satisfying
As we shall see later, Corollary 6.6 gives rise to and that shall be used as a descent direction for the objective. (Corollary 6.6 did not use all the parameters inside Table 1, and some of those parameters shall be used in later subsections.)
4 Optimization
use the property that solutions with good risks are dense in the parameter space (i.e., Corollary 6.6) to show that the optimization landscape of the overparameterized three-layer neural network is benign: it has no spurious local minimal or (more or less) even any second-order critical points; and
use existing theorems on escaping saddle points (such as ) to show that SGD will not be stuck in saddle points and thus converges.
Key issue. Unfortunately, before digging into the details, there is already a big hole in this approach. ReLU networks are not second-order-differentiable: a ReLU activation does not have a well-defined Hessian/sub-Hessian at zero. One may na ïvelythink that since a ReLU network is infinite-order differentiable everywhere except a measure zero set, so we can safely ignore the Hessian issue and proceed by pretending that the Hessian of ReLU is always zero. This intuition is very wrong. Following it, we could have run into the absurd conclusion that any piece-wise linear function is convex, since the Hessian of it is zero almost everywhere. In other words, the only non-smooth point of ReLU has a Hessian value equal to the Dirac -function, but such non-smooth points, albeit being measure zero, are actually turning points in the landscape. If we want a meaningful second-order statement of the ReLU network, we must not na ïvelyignore the “Hessian” of ReLU at zeros.
In practice, since the solution are found by stochastic gradient descent starting from random initialization, they will have a non-negligible amount of intrinsic noise. Thus, the additional smoothing in the algorithm might not be needed by an observation in . Smooth analysis might also be used for analyzing the effect of such noise, but this is beyond the scope of this paper.
Actual algorithm. Let us consider the following smoothed, and regularized objective:
where are Gaussian random matrices with each entry i.i.d. from and , respectively. and are set such that and for every and coming from Lemma 6.2. See Algorithm 3 (first SGD variant) for the details. We prove the following lemma.
For every and , for every constant , consider the parameter choices in Table 1, and consider any (that may depend on the randomness of and ) with
With high probability over the random initialization, there exists with such that for every :
More interestingly, since (noisy) stochastic gradient descent is capable of finding approximate second-order critical points with a global convergence rate, one can show the following final convergence rate for minimizing for Algorithm 3.
In the setting of Theorem 3, with probability at least , Algorithm 3 (the first SGD variant) converges in iterations to a point
denote the diagonal matrix with diagonals being 0-1 signs of the first layer at ;
denote that of the second layer at weights and ; and
For a fixed , consider the real network and the pseudo network :
There exists such that, for every , for every fixed with , for every that may depend on the randomness of the initialization and
where hides polynomial factor of .
In other words, when working with a Gaussian smoothed network (with output ), it suffices to study a pseudo network (with output ). In the proof of Lemma 6.7, this allows us to go from the real (smoothed) network to the pseudo (smoothed) network, and then apply Lemma 6.5.
5 Generalization
In our first variant of SGD Algorithm 3, we show a very crude Rademacher complexity bound that can be derived from the contraction lemma (a.k.a. Talagrand’s concentration inequality).
For every , every , w.h.p. for every and every , the empirical Rademacher complexity is bounded by
Since the population risk is bounded by the Rademacher complexity, combining this with Lemma 6.8, one can easily prove Theorem 3.
6 Second Variant of SGD
To show that this gives a better sampling complexity bound, we need the following stronger coupling lemma. It gives a somewhat better bound on the “cross term vanish” part comparing to the old coupling Lemma 6.5.
Under parameter choices Table 1, the last error term is at most .
For this SGD variant, we also have the following the stronger Rademacher complexity bound. It relies on Lemma 6.11 to reduce the function class to pseudo networks, which are only linear functions in and , and then computes its Rademacher complexity.
For every , \tau^{\prime}_{w}\in\big{[}\frac{1}{m_{1}^{3/4}},\frac{1}{m_{1}^{9/16}}\big{]}, every and , w.h.p. for every and every , we have by our choice of parameters in Lemma 6.7, the empirical Rademacher complexity is bounded by
Under parameter choices in Table 1, this is at most \widetilde{O}\big{(}\frac{\tau^{\prime}_{w}\tau^{\prime}_{v}m_{1}^{1/4}\sqrt{m_{2}}}{\sqrt{N}}\big{)}+\varepsilon/k.
After plugging Lemma 6.11 and Lemma 6.12 into the final proof, we can show Theorem 2.
Empirical Evaluations
To be consistent with our theorems, we choose random initialization as follows. Entries of are i.i.d. from , and entries of are i.i.d. from . This ensures that the output at random initialization is .
In Figure 2, we provide an additional experiment for target function .
Recall our three-layer theorem requires a slightly unconventional regularizer, namely, the norm of the first layer to encourage weights to be more evenly distributed across neurons. Is this really necessary? To get some preliminary idea we run our aforementioned three-layer experiment on the first data set,
once with the traditional weight decay on (which corresponds to minimizing ), and
once with the norm without weight decay.
In both cases we best tune the learning rates as well as the weight decay parameter (or the weight of the regularizer). We present our findings in Figure 3.
In Figure 3(a), we observe that there is no real difference between the two regularizers in terms of test error. In one case () using even gives slightly better test accuracy (but we do not want to claim this as a general phenomenon).
More importantly, since by Cauchy-Schwarz we have . Let us consider the following norm ratio:
In Figure 3(b), we see that is roughly the same between two types of regularizers. This means, even if we regularize only the Frobenius norm, weights are still sufficiently distributed across neurons comparing to what we can do by regularizing . We leave it a future work to study why SGD encourages such implicit regularization.
We provide technical preliminaries in Appendix A, give our two-layer proofs in Appendix B, and three-layer proofs in Appendix C.
Appendix A Technical Preliminaries
where the infimum is taken over all possible joint distributions over where the marginal on (resp. ) is distributed in the same way as (resp. ).
Slightly abusing notation, in this paper, we say a random variable satisfies with high probability if (1) w.h.p. and (2) . For instance, if , then with high probability.
Let be i.i.d. samples from some distribution, where within a 4-tuples:
the marginal distribution of and is standard Gaussian ;
and are not necessarily independent;
and are independent; and
and are independent of and .
Since this holds for every choice of we can complete the proof. The second inequality follows from sub-exponential concentration bounds. ∎
If are independent, and are independent conditional on , then and are independent.
Multiplying on both side leads to:
Marginalizing away gives , so and are independent. ∎
A.2 Central Limit Theorem
The following Wasserstein distance bound of central limit theorem is easy to derive from known results:
In other words—by choosing — we have for every , letting , be independent gaussian (also independent of ), it satisfies
Repeatedly applying the above inequality and starting with and choosing , we have and . Using , we know that for . This implies that
Finally, since we have and . By triangle inequality we have
There exists such that . All of these together imply
A.3 Interval Partition
(Indicator). if , and otherwise.
(Balanced). for every .
(Symmetric). .
(Bounded). .
We refer to as an “interval” although it may actually consist of two disjoint closed intervals.
Let us just prove the case when and the other case is by symmetry. It is clear that, since there are only two degrees of freedom, there is a unique interval with such that
(Half probability). .
and intersect. In this case, consider the unique interval
It must satisfy , because otherwise we must have and the two intervals should not have intersected.
Define . Let be the unique positive real such that
Let be the unique real such that
Finally, we define and
In both cases, one can carefully verify that properties 1, 2, 3, 4 hold. Property 5 follows from the standard property of Gaussian random variable under condition and .
To check the final Lipschitz continuity property, recall for a standard Gaussian distribution, inside interval it behaves, up to multiplicative constant factor, similar to a uniform distribution. Therefore, the above defined functions and are -Lipschitz continuous in . Let be the unique constant such that (it is unique because monotonically decreases as . It is clear that for it satisfies
As for the turning point of , it is clear that
so the function is continuous at point . Finally, consider . One can verify that is -Lipschitz continuous in , and therefore the above defined , and are also -Lipschitz in . This means, for , it also satisfies
This proves the Lipschitz continuity of . ∎
A.4 Hermite polynomials
Let denote the degree- (probabilists’) Hermite polynomial
where if and otherwise. They have the following summation and multiplication formulas.
For even , for any and ,
For odd , for any and ,
(Throughout this paper, the binomial is defined as , and this allows us to write for instance without notation change.)
Using the summation formula of Hermite polynomial, we have:
Using the multiplication formula of Hermite polynomial, we have:
Consider even . By Lemma A.7, we have for even :
Consider odd . By Lemma A.7, we have for odd :
by a similar calculation as in the even case.
Then ’s are given by the recursive formula:
As a result (with the convention that and )
The base cases and are easy to verify. Then the lemma comes from induction. ∎
A.5 Optimization
Then, , where is the minimal eigenvalue.
We also recall the following convergence theorem of SGD for escaping saddle point.The original proof of was for constant probability but it is easy to change it to at the expense of paying a polynomial factor in . The original proof did not state the objective “non-increasing” guarantee but it is easy to show it for mini-batch SGD. Recall in so in each iteration, the original SGD may increase the objective by no more than if a batch size is used. If is polynomially large in , this goal is easily achievable. In practice, however, using a very small batch size suffices.
A.6 Rademacher Complexity
Suppose where each is generated i.i.d. from a distribution . If every satisfies , for every with probability at least over the randomness of , it satisfies
Let be the class of functions by composing with , that is, . By the (vector version) of the contraction lemma of Rademacher complexity There are slightly different versions of the contraction lemma in the literature. For the scalar case without absolute value, see [43, Section 3.8]; for the scalar case with absolute value, see [14, Theorem 12]; and for the vector case without absolute value, see . it satisfies . ∎
(addition) .
(contraction) .
satisfies .
satisfies \widehat{R}(\mathcal{X};\mathcal{F}^{\prime})\leq 2D\sum_{j\in[m]}\widehat{R}(\mathcal{X};\mathcal{F}_{j})+O\big{(}\frac{BR\log m}{\sqrt{N}}\big{)}.
The first three are trivial, and the contraction lemma is classical (see for instance ). The derivations of Lemma prop:rade and Lemma prop:radf are less standard.
For Lemma prop:rade, let us choose an arbitrary from each . We write to denote .
Above, ① is because is independent of and thus zero in expectation; ② uses the non-negativity of \sup_{f_{j}\in\mathcal{F}_{j}}\sum_{i\in[N]}\xi_{i}\big{(}\sigma(f_{j}(x_{i}))-\sigma(f_{j}^{(0)}(x_{i}))\big{)}; ③ is for the same reason as ①; and ④ is by Proposition prop:radd.
Above, ① is from the same derivation as Proposition prop:rade; and ② uses Proposition prop:radb by viewing function class \big{\{}x\mapsto\sum_{j=1}^{m}v_{j}\cdot\sigma(f_{j}^{(0)}(x))\big{\}} as linear in . ∎
Appendix B Proofs for Two-Layer Networks
Recall from (3.1) the target for our two-layer case is
We consider another function defined as for the weight matrix , where
where is the -th row of and is the -th row of (our random initialization). We call this a pseudo network. For convenience, we also define a pseudo network without bias
Roadmap. Our analysis begins with showing that w.h.p. over the random initialization, there exists a pseudo network in the neighborhood of the initialization that can approximate the target function (see Section B.1). We then show that, near the initialization, the pseudo network approximates the actual ReLU network (see Section B.2). Therefore, there exists a ReLU network near the initialization approximating the target. Furthermore, it means that the loss surface of the ReLU network is close to that of the pseudo network, which is convex. This then allows us to show the training converges (see Section B.3). Combined with a generalization bound localized to the initialization, we can prove the final theorem that SGD learns a network with small risk.
The proof is much simpler than the three-layer case. First, the optimization landscape is almost convex, so a standard argument for convex optimization applies. While for three-layer case, the optimization landscape is no longer this nice and needs an escaping-from-saddle-point argument, which in turn requires several technicalities (smoothing, explicit regularization, weight decay, and Dropout-like noise). Second, the main technical part of the analysis, the proof of the existential result, only needs to deal with approximating one layer of neurons in the target, while in the three-layer case, a composition of the neurons needs to be approximating, requiring additional delicate arguments. It is also similar with the generalization bounds. However, we believe that the analysis in the two-layer case already shows some of the key ideas, and suggest the readers to read it before reading that for the three-layer case.
The main focus of this subsection is to show that there exists a good pseudo network near the initialization. (Combining with the coupling result of the next subsection, this translates to the real network near the initialization.)
For every , letting , there exists
such that if , then with high probability there exists with and and
In the same setting as Lemma B.1, we have that w.h.p.
Recall the pseudo network without bias is given by
where are independent random Gaussians.
where has the same distribution with in Lemma 6.3. By Lemma 6.3, we have that
Fit a combination . We can re-define (the norm grows by a maximum factor of )
Fit multiple outputs. If there are outputs let us re-define (the norm grows by a maximum factor of )
Now, re-scaling each by a factor of and re-scaling by , we can write
Now, we apply the concentration from Lemma A.1, which implies for our parameter choice of , with high probability
The above concentration holds for every fixed with high probability, and thus also holds in expectation with respect to . This proves the first statement. As for the second statement on , it follows from the Lipschitz continuity of .
Norm on . According to its definition in (B.2), we have for each , with high probability \|w^{\divideontimes}_{j}\|_{2}\leq\widetilde{O}\big{(}\frac{kpC_{0}}{\varepsilon_{a}m}\big{)} (here the additional is because we have re-scaled by ). This means \|W^{\divideontimes}\|_{2,\infty}\leq\widetilde{O}\big{(}\frac{kpC_{0}}{\varepsilon_{a}m}\big{)}. As for the Frobenius norm,
Now, for each , we know that is a summation of i.i.d. random variables, each with expectation at most by Lemma 6.3. Applying concentration, we have with high probability
Putting this back to (B.3) we have . ∎
Let be the weights constructed in Lemma B.1 to approximate up to error . Then
By standard concentration (which uses the randomness of together with the randomness of ), the above quantity is with high probability bounded by . This is the only place we need parameter choice . ∎
B.2 Coupling
Here we show that the weights after a properly bounded amount of updates stay close to the initialization, and thus the pseudo network is close to the real network using the same weights.
For every unit vector , w.h.p. over the random initialization, for every time step , we have the following. Denote .
For at most fraction of :
W.h.p. over the random initialization, there is so that every . Thus, by the 1-Lipschitz continuity of , for every and every ,
which implies that . Accordingly, define
so it satisfies for every ,
Now, we need to bound the size of . Since , and , by standard property of Gaussian one can derive |\mathcal{H}|\geq m\big{(}1-\widetilde{O}(\sqrt{k}B\tau\sqrt{m})\big{)}=m\big{(}1-\widetilde{O}(\tau\sqrt{km})\big{)} with high probability.
It is clear from (B.4) that and only differ on the indices . For such an index , the sign of is different from that of and their difference is at most . This contributes at most difference between and . Then the bound follows from that there are only \widetilde{O}\big{(}\tau m\sqrt{km}\big{)} many .
By the Lipschitz smoothness assumption on and Lemma lem:couplingb, we have
For , it contributes at most because of (B.5), and there are many such ’s, totaling .
B.3 Optimization
For the set of samples , define
For every , letting and \eta=\widetilde{\Theta}\big{(}\frac{1}{\varepsilon km}\big{)}, there exists
Let be constructed in Corollary B.2. Recall is convex and is linear in so is convex in . By such convexity, we have
Recall from (B.5) that with high probability over the random initialization,
where is as in Lemma B.1. By Lemma lem:couplingc, w.h.p. we know
Therefore, averaging up (B.7) from to we have that
Note that \|W_{0}-W^{\divideontimes}\|_{F}^{2}=\|W^{\divideontimes}\|_{F}^{2}\leq\widetilde{O}\big{(}\frac{k^{2}p^{2}\mathfrak{C}_{\mathfrak{s}}(\phi,1)^{2}}{\varepsilon_{a}^{2}m}\big{)} from Lemma B.1. Also recall . By choosing \eta=\widetilde{\Theta}\big{(}\frac{\varepsilon}{km\varepsilon_{a}^{2}}\big{)} and we have . Thus when is large enough we have:
By the coupling in Lemma lem:couplingb, we know that is -close to ; by applying Corollary B.2, we know that is -close to . This finishes the proof. ∎
B.4 Generalization
The generalization can be bounded via known Rademacher complexity results. Recall
We have the following simple lemma (see also [43, Theorem 43])We note that [43, Theorem 43] did not have but the same result holds with the introduction of .
For every , w.h.p. for every and every , we have the empirical Rademacher complexity bounded by
The proof consists of the following simple steps.
has Rademacher complexity by Proposition prop:rada.
has Rademacher complexity because singleton class has zero complexity and adding it does not affect complexity by Proposition prop:radc.
has Rademacher complexity because w.h.p. and Proposition prop:rade. ∎
B.5 Theorem 1: Two-Layer
First, we can apply Lemma B.4 to bound the training loss. That is
Also recall from (B.8) and our parameter choices for that
so we can choose . For each , it is a simple exercise to verify that with high probability.Indeed, with high probability and since we have . Together we have . By the coupling Lemma lem:couplingb, this implies as well. Using and the -Lipschitz continuity finishes the proof. Thus, we can plug the Rademacher complexity Lemma B.5 together with into standard generalization statement Corollary A.11. It gives
This completes the proof with large enough . ∎
In the above proof, it appears that scales with which may seemingly be larger than which only scales with . We are aware of a proof that tightens to be on the order of . It uses standard (but complicated) martingale analysis and creates extra difficulty that is irrelevant to neural networks in general. We choose not to present it for simplicity.
Appendix C Proofs for Three-Layer Networks
Our three-layer proofs follow the same structure as our proof overview in Section 6.
Recall without loss of generality it suffices to prove Lemma lem:fit_fun_maina.
where and are independent random variables. Furthermore:
is -Lipschitz on the first coordinate.
For notation simplicity, let us denote and where are two independent random standard Gaussians.
Throughout the proof, we also take an alternative view of the randomness. We write and for two independent .This is possible for the following reason. Let be unit vector orthogonal to . We can write where are two independent Gaussians.
We first make a technical claim involving in fitting monomials in . Its proof is in Section C.1.2.
Recall is the degree- Hermite polynomial (see Definition A.5). For every integer there exists constant with such that
We next use Claim C.1 to fit arbitrary functions . By Taylor expansion, we have
The next technical claim carefully bounds the absolute values of the Hermite polynomials. Its proof is in Section C.1.2.
where uses Claim claim:fit_fun:UP-LOa and Claim claim:fit_fun:UP-LOb. In other words, if we define
As for the range of , we use Claim claim:fit_fun:UP-LOb and Claim claim:fit_fun:UP-LOc to derive that
As for the Lipschitz continuity of on its first coordinate , we observe that for each , has zero sub-gradient for all . Therefore, it suffices to bound \big{|}\frac{d}{dz}h_{i}(z)\big{|} for . Replacing the use of Claim claim:fit_fun:UP-LOc by Claim claim:fit_fun:UP-LOd immediately give us the same bound on the Lipschitz continuity of with respect to .
Above, ① uses inequality for all .
This finishes the proof of Lemma lem:fit_fun_maina.
C.1.2 Proofs of Claim C.1 and Claim C.2
Then, for , we know that for all , odd:
is independent of the randomness of . Therefore, using the formula of in (C.4):
Odd . Similarly, by Lemma A.6, we have
Then, for , we know that for all even in it satisfies
is independent of the randomness of . Therefore, using the formula of in (C.5):
By the definition of Hermite polynomial (see Definition A.5), we have that
Using our bound on (see (C.3)), we have
Denote by for notational simplicity (for some parameter that we shall choose later). We have
Above, inequality ① uses ; inequality ② uses our definition of ; inequality ③ uses for ; and inequality ④ uses . Putting this back to (C.8), we have
Above, in the last inequality we have used for .
Similar to the previous case, we calculate that
Above, inequality ① uses ; and inequality ② uses again . Using this and continue from (C.9) of the previous case, we finish the proof.
Again denote by for notational simplicity. By Eq. (C.7), it holds that
Here, in ① we use the fact that ; in ② we use the fact that \big{(}\frac{a}{b}\big{)}^{b}\leq e^{a} for all .
By the definition of Hermite polynomial (see Definition A.5), we can also bound
which is the same upper bound comparing to (C.6). Therefore, the same proof of Claim claim:fit_fun:UP-LOc also applies to \big{|}\frac{d}{dx}h_{i}(x)\big{|}. ∎
C.1.3 Lemma 6.4: Information out of Randomness
Let us consider a single neural of the second layer at random initialization, given as:
Moreover, letting be the complexity of , and if and are at random initialization, then we have
For every fixed , is independent of .
.
For every with , .
For every fixed with , with high probability and .
Furthermore, there exists real-valued function satisfying with high probability:
Before going to proofs, we recall from Section A that we have overridden the notion of “with high probability” so the above statement implies and .
Without loss of generality we assume . Recall that
By Lemma 6.3, for every , there exists a function such that for every unit with and every : If one wants to work with the more general target function in Remark 4.2, we can assume without loss of generality that (because we have in Remark 4.2).
and . (Here to apply Lemma 6.3, we have re-scaled in Lemma 6.3 by and re-scaled in Lemma 6.3 by .)
We define what we call “effective sign of ” to be
Since each with probability , we also know with high probability:
A simple observation here is that, although , if we fix (or ) then the distribution of is not Gaussian. Fortunately, fixing and , we still have that the coordinates of are i.i.d. (each is zero with probability , and is each with probability ).
Let denote the conditional distribution of . With high probability over , . Fixing the support of to be , we know that for every , is i.i.d. . This implies that fixing , the quantity
is a sum of many independent, mean zero random variables with each |u_{i}[W^{(0)}e_{d}]_{i}|\leq\widetilde{O}\big{(}\frac{1}{\sqrt{m_{1}|\mathcal{S}|}}\big{)} and \sum_{i\in\mathcal{S}}u_{i}[W^{(0)}e_{d}]_{i}^{2}=\frac{1}{m_{1}}\pm\widetilde{O}\big{(}\frac{1}{\sqrt{\tau}m_{1}^{3/2}}\big{)} w.h.p. Applying any Wasserstein distance bound of central limit theorem (see Lemma A.3), we know that there exists some random Gaussian that is independent of or such that w.h.p.
By definition of , conditioning on the randomness of , we know that is independent of — because for . Since and are independent, we know that and are independent by Proposition A.2. We continue to write
First consider . For each we have
Above, the first row is because and the Bounded-ness property of the interval (see Lemma A.4); and the second row by the Unbiased property of the interval (see Lemma A.4). By concentration, for fixed vector , with high probability over the randomness of :
where satisfies . We write
By (C.11) (i.e., the property of ), we know that for every fixed , using concentration bound, with high probability over and :
Note that is independent of so is also independent of . We can also define
and using (C.14) we can derive the desired bound on in the statement of Lemma 6.4.
For fixed unit vector , with high probability, we have that
Thus, for fixed , since is independent of , with high probability over the randomness of , there are at most \widetilde{O}\big{(}\sqrt{|\mathcal{S}|}\big{)} many indices satisfying (C.15). In other words, using with high probability, we have
with satisfying with high probability.
Therefore, we have and can write
Again, conditioning on the randomness of , we know that is independent of . Since and are independent, we know that and are also independent (by Proposition A.2). In other words, setting , and (and therefore ) are independent.
Let be the residual term, setting , we have with high probability.
and by our random initialization, n_{1}(x)\sim\mathcal{N}\big{(}0,\frac{1}{m_{2}}\big{\|}\sigma\big{(}W^{(0)}x+b_{1}^{(0)}\big{)}\big{\|}_{2}^{2}\big{)}. At the same time, with high probability \big{\|}\sigma\big{(}W^{(0)}x+b_{1}^{(0)}\big{)}\big{\|}_{2}^{2}=O(1). Therefore, we know , and this implies with high probability. ∎
C.1.4 Lemma 6.2: Existence
For every \varepsilon\in\big{(}0,\frac{1}{kp_{1}p_{2}^{2}\mathfrak{C}_{\mathfrak{s}}(\Phi,p_{2}\mathfrak{C}_{\mathfrak{s}}(\phi,1))\mathfrak{C}_{\mathfrak{s}}(\phi,1)^{2}}\big{)}, there exists
such that if , then with high probability, there exists weights with
Let us mostly focus on proving Lemma 6.2 for a single term
Extending it to multiple terms and multiple outputs, that is
is rather straightforward (and indeed a repetition of the proof of Lemma B.1 in the two-layer case).
Step 1: Existence in expectation
Recall that the input (without bias) to each neuron at random initialization in the second hidden layer is
We first use Lemma 6.4 to derive the following claim:
For every , there exists real-value functions satisfying
For every , there exist independent Gaussians More specifically, and depend on the randomness of , and .
Let us define many chunks of the first layer, each chunk corresponds to a set of cardinality for , such that
Let us then denote to be and to be . Recall that the input (without bias) to each neuron at random initialization in the second hidden layer is
For each and , let us apply Lemma 6.4 to the summation in the above formula, to approximate . (We need to replace with and scale up and by before applying Lemma 6.4)). It tells us we can write as:
Moreover, for each .
Lemma 6.4 tells us that random variables are independent of , and with high probability
Define , we know that is a Gaussian random variable independent of all the with
Let us slightly override notation and denote
Since by our random initialization, , and since for every every unit vector , with high probability , we can write
Since we can write for
being an independent from , we conclude that (by choosing )
Let us slightly override notation and denote
Next, we wish to use the Wasserstein bound from Claim C.3 to replace with . We derive that
Above, ① uses the fact that with w.h.p. and is bounded. ② uses Claim C.3 and (C.18). ③ uses , , and denote by the Lipschitz continuity parameter of (namely, for all x,y\in\big{[}-p_{2}\mathfrak{C}_{\mathfrak{s}}(\phi,1),p_{2}\mathfrak{C}_{\mathfrak{s}}(\phi,1)\big{]})). ④ uses and our assumption . This proves Claim C.4. ∎
Step 2: From expectation to finite neurons
Intuitively, we wish to apply concentration bound on Claim C.4 with respect to all neurons on the second layer. Recall is the weight of the -th neuron at the output layer. Our main result of Step 2 is the following claim.
Across different choices of , the values of and can be correlated. This makes it not a trivial thing to apply concentration. In the remainder of this proof, let us try to modify the two quantities to make them independent across .
First modify . Recall where each is a function on and . Now, using the notion from Lemma 6.4, let us also define which is in the same distribution as except that it does not depend on or . We can similarly let . From Lemma 6.4, we know that with high probability over :Recall from the proof of Claim C.3 that, we need to replace with and scale up and by before applying Lemma 6.4.
According, we define .
Next modifty . Recall and accordingly we define
is a Gaussian variable and is independent of . As a consequence, the quantities are independent among different choices of . Using standard concentration on (see the line above (C.16)), we have for every with ,
Concentration. Using Claim C.4 of Step 1 we have
Using the notions of and and the Wasserstein distance bounds (C.20) and (C.21), it implies We have skipped the details since it is analogous to (C.19).
Using again the Wasserstein distance bounds bounds (C.20) and (C.21), we can combine the above two equations to derive that w.h.p.
Step 3: From finite neurons to the network
We now construct the network and prove Lemma 6.2. Recall we focus on constructing
We shall explain towards the end how to extend it to multiple terms and multiple outputs.
(If one wants the more general target in Remark 4.2, we can replace the use of with following the similar treatment as (B.1) in the two-layer existential proof.) We have
Given these weights, suppose the signs of ReLU’s are determined by the random initialization (i.e., by and ). We can consider the network output
Above, we have used . Since , we can apply concentration on (C.22) and get (recalling is sufficiently large) w.h.p
Putting this into (C.23), and using and , we know that with high probability
Finally, scaling down the value of by factor we complete the proof of Lemma 6.2 for a single output and for a single .
The proof generalizes to fitting a combination of multiple functions
in the same way as the proof of Lemma B.1, if we choose the vector uniformly at random and apply concentration. Note that we have to further scale down by for the same reason as Lemma B.1, and the norm of shall grow by a factor of .
The proof generalizes to multiple outputs in the same way as Lemma B.1, using the fact that weights are independent across different outputs . Note that we have to further scale down by for the same reason as Lemma B.1, and the norm of shall grow by a factor of .
Finally, applying the two remarks above, we have
We thus finish the proof of Lemma 6.2 with our choice of .
C.2 Coupling
Suppose \tau_{v}\in\big{[}0,1\big{]}, \tau_{w}\in\big{(}\frac{1}{m_{1}^{3/2}},\frac{1}{m_{1}^{1/2}}\big{]}, \sigma_{w}\in\big{(}\frac{1}{m_{1}^{3/2}},\frac{\tau_{w}}{m_{1}^{1/4}}\big{]}, \sigma_{v}\in\big{(}0,\frac{1}{m_{2}^{1/2}}\big{]} and . Given fixed unit vector , and perturbation matrices (that may depend on the randomness of and ) satisfying
(Sparse sign change). , .
Part I, Sparsity
For notation simplicity, we only do the proof when there is no bias term. The proof with bias term is analogous (but more notationally involved). Let us denote
diagonal matrix denotes the sign of ReLU’s at weights ,
diagonal matrix denotes the sign of ReLU’s at weights , and
diagonal matrix denotes the sign of ReLU’s at weights .
Sign change in . Each coordinate of and each coordinate of . Thus, by standard property of Gaussian, for each , we have . By concentration bound, with high probability, the number of sign changes of the ReLU activations in the first hidden layer caused by adding is no more than
Moreover, for each coordinate with , we must have with high probability, and thus
By our assumption , we have
Next, for each coordinate where , we must have , and since must sum up to at most for those coordinates, we have
Sum up: First Layer. Combining (C.24) and (C.25) and using from assumption, we have
By the 1-Lipschitz continuity of ReLU, we know that w.h.p.
where we have used our assumption .
Second Layer Sign Change. The sign change in the second layer is caused by input vector
Here, using w.h.p. , we have
In comparison (at random initialization) we have with . Using a careful two-step argument (see Claim C.8), we can bound
Part II, Diagonal Cross Term
Second error term. We write down the second error term
For the second term, since and w.h.p.We note that the derivation of may be non-trivial for some readers, because is dependent of the randomness of . In fact, for every fixed basis vector , we have w.h.p. , and thus by the randomness of it satisfies . Taking a union bound over gives the bound. Such proof idea was repeatedly used in .
For the third term, again by and Fact C.9, we have: w.h.p.
Tool
The following are some tools used in the above proofs.
A variant of the following claim has appeared in .
We also observe that is non-zero for some diagonal only if
Let be a parameter to be chosen later. We shall make sure that .
We denote by the index sets where satisfies . Since we know , we have for each . Using Chernoff bound for all , we have with high probability
We denote by the index set of all where . Using (C.28), we have for each :
This means Now, for each where , we know that the signs of and are opposite. Therefore, we must have
From above, we have \|x\|_{0}\leq|S_{1}|+|S_{2}|\leq O\big{(}\xi m_{2}^{3/2}+\frac{\|g^{\prime}_{1}\|^{2}}{\xi^{2}}\big{)}. Choosing \xi=\max\big{\{}2\|g^{\prime}_{2}\|_{\infty},\Theta(\frac{\|g^{\prime}_{1}\|^{2/3}}{m_{2}^{1/2}})\big{\}} we have the desired result on sparsity.
Choosing \xi=\max\big{\{}2\|g^{\prime}_{2}\|_{\infty},\Theta(\frac{\|g^{\prime}_{1}\|^{2/3}}{m_{2}^{1/2}})\big{\}}, we have the desired bound on Euclidean norm. ∎
C.2.2 Corollary 6.6: Existence After Coupling
Corollary 6.6 is a corollary to Lemma 6.2 with replaced with . Recall that is different from only by the diagonal signs, namely,
where and are the diagonal sign matrices determined at , .
In the same setting as Lemma 6.2, perturbation matrices (that may depend on the randomness of the initialization and ) with
Using parameter choices from Table 1, w.h.p. there exist and (independent of the randomness of ) satisfying
The idea to prove Corollary 6.6 is simple. First construct and from Lemma 6.2, and then show that and are close using Lemma 6.5. By Lemma 6.5 and our parameter choices Table 1, we know
Now, recall that Lemma 6.2 says and for . Therefore,
C.2.3 Lemma 6.9: Smoothed Real vs Pseudo Networks
There exists such that, for every , for every fixed with , for every that may depend on the randomness of the initialization and , with
where hides polynomial factor of .
Since and only differ in the sign pattern, we try to bound the (expected) output difference by analyzing these sign changes. We use the same proof structure as Lemma 6.5, that is to first bound the sign changes in the first layer, and then the second layer. One can carefully verify
We call the output difference caused by sign change of the first layer; and that caused by the sign change of the second layer.
One consequence of (C.29) is . When , the contribution to is . Multiplying them together, the total contribution to in expectation is at most .
Thus, we only need to consider the case . Let be this coordinate so that . This happens with probability at most for each . The contribution of to is
and let us deal with the three terms separately:
For the term , it is of absolute value at most . Since happens with probability , the total contribution to the expected value of is only .
For the term , we first observe that with high probability (for a proof see Footnote 29). Therefore, given and , we have that . Since this happens with probability at most —recall there are many possible — the total contribution to the expected value of is .
Sign Change of Second Layer. Recall that the sign of the ReLU of the second layer is changed from to . Let us compare the vector inputs of these two matrices before ReLU is applied, that is
This difference has the following four terms:
With and , by Fact C.9 we know that w.h.p.
This is non-zero with probability , and when it is non-zero, its Euclidean norm is .
Since owing to (C.27), by Fact C.9, we know that w.h.p.
Since originally each coordinate of follows from with , using a similar argument as (C.29)Namely, to first show that each coordinate satisfies with probability \widetilde{O}\big{(}\eta\frac{(\frac{1}{\sqrt{m_{1}}}\tau_{v,\infty}+\tau_{w,\infty})}{\sigma_{v}}\big{)}. Then, since we can ignoring terms of magnitude , it suffices to consider the case of , which occurs with probability at most m_{2}\times\widetilde{O}\big{(}\eta\frac{(\frac{1}{\sqrt{m_{1}}}\tau_{v,\infty}+\tau_{w,\infty})}{\sigma_{v}}\big{)} by union bound. Finally, each coordinate changes by at most \widetilde{O}\big{(}\eta\big{(}\frac{1}{\sqrt{m_{1}}}\tau_{v,\infty}+\tau_{w,\infty}\big{)}\big{)} by the argument above. we can bound the contribution to the expected value of by:
C.2.4 Lemma 6.11: Stronger Coupling
Under parameter choices Table 1, the last error term is at most .
For notation simplicity, let us do the proof without the bias term and . The proof with them are analogous.
On the other hand, applying Lemma 6.5 with and , we have . Therefore, using the same derivation as (C.26), we can bound its Euclidean norm
Using the same derivation as (C.30), we also have w.h.p
Now, recall using Cauchy-Shwartz and the 1-Lipschitz continuity of the ReLU function, we have for every , with high probability (over ):
To bound ①, we consider the difference between
where is the diagonal sign change matrix due to moving input from to . This difference has the following three terms.
. Using the sparsity of we know w.h.p.
.
Together, using and invoking Claim C.8, we can bound it by:
(When invoking Claim C.8, we need and .)
Since w.h.p. and is sparse, we know that w.h.p.
Since and w.h.p. (see Footnote 29), by Fact C.9,
Putting together (C.31), (C.32), (C.33), one can carefully verify that
Above, we have used our parameter choices and . ∎
C.3 Optimization
For every and , for every constant , consider the parameter choices in Table 1, and consider any (that may depend on the randomness of and ) with
With high probability over the random initialization, there exists with such that for every :
Define the “pseudo function” for every , as
where and are the diagonal sign matrices at weights .
where and are the diagonal sign matrices at weights .
and .
As a sanity check, we have . (Here we slightly override the notation and use to denote .)
By our regularizer parameters in Table 1, as long as , we know
Applying Corollary 6.6 (but scaling up the target by ), we know that there exists with (here we have scaled up and scaled down both by )
By our parameter choices in Table 1, this implies
Change in Regularizer. We first consider the change of the regularizer. We know that
For each term , we can bound
(Recall we use to hide polynomial factors in and .) By Cauchy-Schwarz,
By , , and , we know that
Change in Objective. We now consider the change in the objective value. Recall from (C.35) the construction of good network satisfies and . For polynomially small , by Lemma 6.9 (replacing its with ), we have:
First we focus on . Since and from (C.34), we can apply Lemma 6.5 to get
Combining (C.38) and (C.39), we know that for every fixed in the support of distribution :
Above, ① uses the 1-Lipschitz smoothness of which implies
Next, by convexity of the loss function, we have
For sufficiently small , we know that
The objective growth inequalities (C.40) and (C.42) together imply
The regularizer growth inequality (C.37) implies
Putting (C.43) and (C.44) together we have
Multiplying on both sides, we have:
Therefore, as long as and , we have:
C.3.2 Lemma 6.8: Convergence
In the setting of Theorem 3, with probability at least , Algorithm 3 (the first SGD variant) converges in iterations to a point
For the first variant of SGD, note that there are rounds of weight decay, which implies that is always satisfied (because is a constant). By Lemma 6.7, we know that as long as , then there exists such that either
In the first case, recall is second-order smooth,When convoluted with Gaussian noise , every bounded function becomes infinite-order differentiable with parameter inversely-polynomially dependent on the noise level . by Fact A.8, it satisfies ( is fixed and the Hessian is with respect to and ):
On the other hand, for every , since is the output of noisy SGD, by the escape saddle point theorem of (stated in Lemma A.9), we know with probability at least it satisfies Choosing , we know with probability at least , this holds for all rounds . In other words, for all rounds , the first case cannot happen and therefore as long as ,
On the other hand, for each round , as long as , by Lemma A.9, it holds that
Since initially, w.h.p., we have w.h.p. throughout the process. Since is a constant, after rounds of weight decay, we have . Since is a constant, re-scaling down by a constant factor finishes the proof. ∎
For the second variant of the SGD, note that
C.4 Generalization
We derive a very crude Rademacher complexity bound for our three-layer neural network. We have not tried to tighten the polynomial dependency in and .
For every , every , w.h.p. for every and every , the empirical Rademacher complexity is bounded by
Let and for notation simplicity. Recall the input to the -th neuron on the second layer is
We now bound the Rademacher complexity of in the following simple steps.
has Rademacher complexity by Proposition prop:rada.
has Rademacher complexity because singleton class has zero complexity and adding it does not affect complexity by Proposition prop:radc.
has Rademacher complexity . This is because w.h.p. so we can apply Proposition prop:rade, and because and so we can apply Proposition prop:radf by choosing which satisfies w.h.p.
has Rademacher complexity \Big{(}O(\frac{\tau^{\prime}_{w}}{\sqrt{N}})\cdot\widetilde{O}(\frac{m_{1}}{\sqrt{m_{2}}}+\delta m_{1})+\widetilde{O}(\frac{\tau^{\prime}_{v}}{\sqrt{N}})\Big{)}\cdot\widetilde{O}(m_{2}) because w.h.p. and Proposition prop:rade.
Finally, noticing that implies and implies , we finish the proof that the Rademacher complexity of is at most
Combining this with (C.45), and tuning the best choice of gives the desired result. ∎
For every , \tau^{\prime}_{w}\in\big{[}\frac{1}{m_{1}^{3/4}},\frac{1}{m_{1}^{9/16}}\big{]}, every and , w.h.p. for every and every , we have by our choice of parameters in Lemma 6.7, the empirical Rademacher complexity is bounded by
Under parameter choices in Table 1, this is at most \widetilde{O}\big{(}\frac{\tau^{\prime}_{w}\tau^{\prime}_{v}m_{1}^{1/4}\sqrt{m_{2}}}{\sqrt{N}}\big{)}+\varepsilon/k.
Let and for notation simplicity. Applying Lemma 6.11 (with chosen as ), we know that by our choice of parameters,
for B=\widetilde{O}\big{(}(\tau^{\prime}_{w})^{8/5}m_{1}^{9/10}+(\tau^{\prime}_{w})^{16/5}m_{1}^{9/5}\sqrt{m_{2}}+\frac{\sqrt{m_{2}}}{\sqrt{m_{1}}}\tau^{\prime}_{v}\big{)}.
We bound the Rademacher complexity of the right hand side. It consists of three terms and the Rademacher complexity is the summation of the three (recall Proposition prop:radc).
The first term does not depend on or so has Rademacher complexity zero.
The third term has Rademacher complexity at most .
The second term corresponds to the function class
We calculate its Rademacher complexity as follows.
Let us bound the last term entry by entry. Let denote the -th column of , the -th column of .
For random , we know that w.h.p. over the randomness of (notice that we can do so because only depends on but not on , so we can take randomness argument on ),
This implies \widehat{\mathfrak{R}}(\mathcal{X};\mathcal{F})\leq\widetilde{O}\big{(}\frac{\tau^{\prime}_{w}\tau^{\prime}_{v}m_{1}^{1/4}\sqrt{m_{2}}}{\sqrt{N}}\big{)} and finishes the proof. ∎
C.5 Final Theorems
Consider Algorithm 3. For every constant , every , every , there exists
such that for every , and properly set in Table 1, as long as
there is a choice and such that with probability ,
Since w.h.p., by randomly sampling many , we know w.h.p. there exists one with
due to our regularizer (see (C.34)). By simple spectral norm bound, we also know w.h.p. for every and ,Indeed, with our parameter choices in Table 1, the spectral norms and . Therefore, the network output must be bounded by in Euclidean norm. By the assumption that and is 1-Lipschitz continuous in the first variable, we have that is bounded as stated.
Therefore, we can plug in the Rademacher complexity from Lemma 6.10 and into standard generalization statement Corollary A.11. Using our choices of and from Table 1 as well as , this bound implies as long as , w.h.p. for every pair , it holds
C.5.2 Theorem 2: Second SGD Variant
Consider Algorithm 2. For every constant , every , every , there exists
such that for every , and properly set in Table 1, as long as
there is a choice and such that with probability ,
For the same reason as the proof of Theorem 3, we know w.h.p. among choices of ,
Without loss of generality, in the remainder of the proof we assume . This can be done because is is too small we can increase it to . By our regularizer parameters in Table 1, we know
Using the 1-Lipschitz continuity of together with (C.47) and (C.48), it is not hard to derive that for every , with high probability over , Indeed, with high probability, and by spectral norm bounds.
Therefore, we can plug in the Rademacher complexity from Lemma 6.12 with into standard generalization statement Corollary A.11.Strictly speaking, Corollary A.11 requires an absolute value bound as opposed to a high probability bound. It is a simple exercise to deal with this issue, see for instance Remark B.6 in our two-layer proof. Using our choices of and from Table 1 as well as , the Rademacher complexity is dominated by
In other words, as long as , the Rademacher complexity of a single output is at most , so the generalization error is at most by Corollary A.11. Or, in symbols, for every , w.h.p. over ,
For similar reason, replacing with , we have
Putting (C.52) and (C.51) into (C.49), we have
Combining (C.53) and (C.54), we immediately have
as desired. Scaling down by constant finishes the proof. ∎