Neural network pruning is a popular method to reduce the size of a trained model, allowing efficient computation during inference time, with minimal loss in accuracy. However, such a method still requires the process of training an over-parameterized network, as training a pruned network from scratch seems to fail (see [10]). Recently, a work by Frankle and Carbin [10] has presented a surprising phenomenon: pruned neural networks can be trained to achieve good performance, when resetting their weights to their initial values. Hence, the authors state the lottery ticket hypothesis: a randomly-initialized neural network contains a subnetwork such that, when trained in isolation, can match the performance of the original network.
This observation has attracted great interest, with various follow-up works trying to understand this intriguing phenomenon. Specifically, very recent works by Zhou et al. [37], Ramanujan et al. [27] presented algorithms to find subnetworks that already achieve good performance, without any training. [27] stated the following conjecture: a sufficiently over-parameterized neural network with random initialization contains a subnetwork that achieves competitive accuracy (with respect to the large trained network), without any training. This conjecture can be viewed as a stronger version of the lottery ticket hypothesis.
In this work, we prove this stronger conjecture, in the case of over-parameterized neural networks. Moreover, we differentiate between two types of subnetworks: subnetworks where specific weights are removed (weight-subnetworks) and subnetworks where entire neurons are removed (neuron-subnetworks). First, we show that a ReLU network of arbitrary depth l can be approximated by finding a weight-subnetwork of a random network of depth 2l and sufficient width. Second, we show that depth-two (one hidden-layer) networks have neuron-subnetworks that are competitive with the best random-features classifier (i.e. the best classifier achieved when training only the second layer of the network). Hence, we imply that for shallow networks, training the second layer of the network is equivalent to pruning entire neurons of a sufficiently large random network. In all our results, the size of initial network is polynomial in the problem parameters. In the case of the weight-subnetwork, we show that the number of parameters in the pruned network is similar, up to a constant factor, to the number of parameters in the target network.
As far as we are aware, this is the first work that gives theoretical evidence to the existence of good subnetworks within a randomly initialized neural network (i.e., proving the strong lottery ticket hypothesis). Our results imply that fundamentally, pruning a randomly initialized network is as strong as optimizing the value of the weights. Hence, while the common method for finding a good network is to train its parameters, our work demonstrates that in fact, all you need is a good pruning mechanism. This gives a strong motivation to develop algorithms that focus on pruning the weights rather than optimizing their values.
1.1 Related Work
Neural Network Pruning Pruning neural networks is a popular method to compress large models, allowing them to run on devices with limited resources. Over the years, a variety of pruning methods were suggested, showing that neural network models can be reduced by up to 90%, with minimal performance loss. These methods differ in two aspects: how to prune (the pruning criterion), and what to prune (spe-cific weights vs. entire neurons or convolutional channels). Works by LeCun et al. [16], Hassibi and Stork [14], Dong et al. [7] explored the efficiency of network pruning based on second derivative conditions. Another popular method is pruning based on the magnitude of the weights [13]. Other pruning techniques remove neurons with zero activation [15], or other measures of redundancy [22, 32]. While weight-based pruning achieves the best results in terms of network compression, the gain in terms of inference time is not optimal, as it cannot be efficiently utilized by modern hardware. To get an effective gain in performance, recent works suggested methods to prune entire neurons or convolutional channels [35, 18, 23, 20].
In our work, we show that surprisingly, pruning a random network achieves results that are competitive with optimizing the weights. Furthermore, we compare neuron-based pruning to weight-based pruning, and show that the latter can achieve strictly stronger performance. We are unaware of any theoretical work studying the power and limitation of such pruning methods.
Lottery Ticket Hypothesis In [10], Frankle and Carbin stated the original lottery ticket hypothesis: A randomly-initialized, dense neural network contains a subnetwork that is initialized such that when trained in isolation it can match the test accuracy of the original network after training for at most the same number of iterations. This conjecture, if it is true, has rather promising practical implications - it suggests that the inefficient process of training a large network is in fact unnecessary, as one only needs to find a good small subnetwork, and then train it separately. While finding a good subnetwork is not trivial, it might still be simpler than training a neural network with millions of parameters.
A follow up work by Zhou et al. [37] claims that the “winning-tickets”, i.e., the good initial subnetwork, already has better-than-random performance on the data, without any training. With this in mind, they suggest an algorithm to find a good subnetwork within a randomly initialized network that achieves good accuracy. Building upon this work, another work by Ramanujan et al. [27] suggests an improved algorithm which finds an untrained subnetwork that approaches state-of-the-art performance, for various architectures and datasets. Following these observations, [27] suggested a complementary conjceture to the original lottery ticket hypothesis: within a sufficiently overparameterized neural network with random weights (e.g. at initialization), there exists a subnetwork that achieves competitive accuracy.
While these results raise very intriguing claims, they are all based on empirical observations alone. Our work aims to give theoretical evidence to these empirical results. We prove the latter conjecture, stated in [27], in the case of deep and shallow neural networks. To the best of our knowledge, this is the first theoretical work aiming to explain the strong lottery ticket conjecture, as stated in [27].
Over-parameterization and random features A popular recent line of works showed how gradient methods over highly over-parameterized neural networks can learn various target functions in polynomial time (e.g. [2],[6],[3],[5]). However, recent works (e.g. [36], [12], [11]) show the limitations of the analysis in the above approach, and compare the power of the analysis to that of random features. In particular, [36] show that this approach cannot efficiently approximate a single ReLU neuron, even if the distribution is standard Gaussian. In this work we show that finding a shallow neuron-subnetwork is equivalent to learning with random features, and that weight-subnetworks is a strictly stronger model in the sense that it can efficiently approximate ReLU neurons, under mild assumptions on the distribution (namely, that it is bounded).
1.2 Notations
We introduce some notations that will be used in the sequel. We denote by our instance space. For a distribution
, we denote the squared-loss of a hypothesis
by:
For two matrices , we denote by
the Hadamard (element-wise) product between
to denote the uniform distribution on some cube around zero, and by
a normal distribution with mean zero and covariance matrix
. For a matrix H we denote by
its minimal eigenvalue. For a matrix A, we denote by
operator norm of A, namely
is the largest singular value of A. We denote by
the max norm of
In this section we provide our main result, showing that a network of depth l can be approximated by pruning a random network of depth 2l. We show this for a setting where we are allowed to prune specific weights, and are not limited to removing entire neurons (i.e. finding weight-subnetworks). Neuron-subnetworks are discussed in the next section. We further focus on networks with the ReLU activation, We define a network
in the following way:
Where we have:
• G
• G, for every 1 < i < l.
• G
A weight-subnetwork is a network of width n and depth l, with weights
for some mask
. Our main theorem in this section shows that for every target network of depth l with bounded weights, a random network of depth 2l and polynomial width contains with high probability a subnetwork that approximates the target network:
Theorem 2.1. Fix some be some target network of depth l such that for every
have
network of width
, where we initialize
. Then, w.p at least
there exists a weight-subnetwork
such that:
Furthermore, the number of active (non-zero) weights in
Remark 2.2. We note that the initialization scheme of the network considered in Thm. 2.1 is not standard Xavier initialization. The reason is that in standard Xavier initialization the weights are normalized such that the gradient’s variance at initialization will not depend on the network’s size. Here we don’t calculate the gradient but only prune some of the neurons. Thus, the magnitude of the weights does not depend on the width of the network. That said, the theorem can be easily extended to any initialization which is a uniform distribution on some interval around zero, by correctly scaling the network’s output.
Since the number of parameters in the function , the above shows that the number of active weights in the pruned network is similar, up to a constant factor, to the number of parameters in F. Note that the width of the random network has polynomial dependence on the input dimension d, the width of the target network n and its depth l. While the dependence on the width and depth of the target network is unavoidable, the dependence on the input dimension may seem to somewhat weaken the result. Since neural networks are often used on high-dimensional inputs, such dependence on the input dimension might make our result problematic for practical settings in the high-dimension regimes. However, we note that such dependence could be avoided, when making some additional assumptions on the target network. Specifically, if we assume that the target network has sparse weights in the first layer, i.e. - each neuron in the first layer has at most s non-zero weights, then we get dependence on the sparsity s, rather than on the input dimension d. This is shown formally in the appendix.
The full proof of Thm. 2.1 can be found in Appendix A, and here we give a sketch of the main arguments. The basic building block of the proof is showing how to approximate a single ReLU neuron of the form by a two layer network. Using the equality
, we can write the neuron as:
Now, consider a two layer network of width k and a single output neuron, with a pruning matrix B for the first layer. It can be written as Suppose we pick, for every i, two indexes
, and set the matrix
and all the rest of the elements of B are
zero. It follows that the pruned network can be rewritten as
Comparing the right-hand sides of Equations 1 and 2, we observe that they will be at most each other provided that for every
and
. Finally, fixing i and picking
at random, the requirements would be fulfilled with probability of
. Hence, if
, for every i we would be able to find an appropriate
with high probability. Note that the number of weights we are actually using is 2d, which is only factor of 2 larger than the number of original weights required to express a single neuron.
The construction above can be easily extended to show how a depth two ReLU network can approximate a single ReLU layer (simply apply the construction for every neuron). By stacking the approximations, we obtain an approximation of a full network. Since every layer in the original network requires two layers in the newly constructed pruned network, we require a twice deeper network than the original one.
We can derive a slightly stronger result in the case where the target network is a depth-two network. Specifically, we can show that a depth-two network can be approximated by pruning a depth-three random network (rather than pruning a depth-four network, as implied from Thm. 2.1):
Theorem 2.3. Fix some target two-layer neural network dom three-layer neural network of width
, with weights initialized from
Then, with probability at least
, there exists a weight-subnetwork
, such that:
Furthermore, the number of active (non-zero) weights in
2.1 Universality and Computational Efficiency of Pruning
We showed that in terms of expressive power, pruning weights in a randomly initialized over-parameterized network can approximate a target ReLU network of any depth. Using well-known results in the literature of neural networks, this result implies two interesting corollaries:
Universal Approximation Using Weight Pruning It has been long known that neural networks are universal approximators: they are able to approximate an arbitrary function up to arbitrary accuracy (for example, see [33, 28]). Since we show that pruning a network with random weights can approximate any target network, this implies that pruning a random network is also a universal approximation scheme.
Pruning Weights is Computationally Hard It is well known in the literature of neural networks that learning even a depth-two ReLU network is computationally hard in the general case (see [19, 21, 4]). From these results, it is immediate that weight-pruning of random ReLU networks, deep or shallow, is computationally hard as well. Indeed, if we had an efficient algorithm that finds an optimal weight-subnetwork of a three-layer network, from Thm. 2.3 this algorithm approximates the best depth-two network (for some fixed width). But in general, approximating the best depth-two network on an arbitrary distribution is computationally hard (under certain hardness assumptions), which leads to a contradiction. So, there is no efficient algorithm that is guaranteed to return an optimal weight-subnetwork for any input distribution.
In this section we analyze the power of pruning entire neurons in a depth-two network. The main question we are interested in is the following: suppose that a function f can be well approximated by a depth-two network g of polynomial width (in the relevant parameters). Is the function f also well approximated by pruning entire neurons of a randomly initialized depth-two network of a polynomial width? Here we show that the answer is negative, and in fact pruning entire neurons is equivalent to the well known random features model (e.g. [25], [26]). Intuitively, we show that whenever training only the last layer of the network suffices, it is also possible to construct a good sub-network by pruning entire neurons.
Formally, consider a width k two-layer neural network defined by as follows:
where -th coordinate of
. A network
neuron-subnetwork of g if there exists a vector
So, -layer neural network, which contains a subset of the neuron of g. Next, we define the random features model:
Definition 3.1. Suppose we sample from some distribution D, a random features model over
and activation
is any function of the form:
Training a 2-layer random features model is done by training only the second layer, i.e. training only the weights . This is equivalent to training a linear model over the features
, which are chosen randomly. We show that neuron-subnetworks are competitive with random features:
Theorem 3.2. Let D be any distribution over -Lipschitz with
a distribution over
such that for
w.p
there exist
and the function
satisfies that
, and suppose we initialize a 2-layer neural network g with width
. Then there exists a neuron-subnetwork
constant
The full proof can be found in Appendix B. Thm. 3.2 shows that for any distribution over the data, if a random features model can achieve small loss, then it is also possible to find a neuron-subnetwork of a randomly initialized network (with enough width) that achieves the same loss. This means that pruning neurons is competitive with the random features model. On the other hand, if for some distribution over the data it is possible to find a neuron-subnetwork of a randomly initialized network that achieves small loss, then clearly it is possible to find a random features model that achieves the same loss. Indeed, we can set the weights of the random features model to be the same as in the neuron-subnetwork, where pruned weights are equal to zero.
To summarize, Thm. 3.2 and the argument above shows an equivalence between random features and neuron-subnetworks: For a distribution D, there is a random features model f with k features such that if-and-only-if for a randomly initialized network with width polynomial in
there exists a neuron-subnetwork
A few recent works (e.g. [36], [12], [11]) studied the limitations of random features. In particular, [36] show that a random features model cannot approximate a single ReLU neuron even under standard Gaussian distribution, unless the amount of features or the magnitude of the weights (or both) are exponential in the input dimension. Thus, the above equivalence also shows a limitation of neuron-subnetworks - they cannot efficiently approximate a single ReLU neuron, just as random features can’t. This means that the weight-subnetwork model shown in Sec. 2 is significantly stronger than the neuron-subnetwork model.
The intuition behind the proof of Thm. 3.2 is the following: Assume we initialize a 2-layer neural network of width is as in the theorem, and m is some large number (that depends on
). We think of it as initializing m different networks of width k, and from the assumption, for most of these networks there exists a random features model that achieves small loss. For each of these networks we prune a neuron if its randomly initialized weight in the second layer is far from its corresponding random features model’s weight. Note that since we initialize the weights i.i.d., then we prune each neuron with the same probability and independently of the other neurons. To finish the proof, we use a concentration of measure argument to show that averaging many such pruned networks competes with the random features model, and thus also achieves small loss on the input distribution.
3.1 Learning Finite Datasets and RKHS Functions via Neuron-Subnetworks
In this subsection we show that pruning entire neurons may prove beneficial, despite the inherent limitations discussed previously. We focus on two popular families of problems, which are known to be solvable by training depth-two networks:
1. Overfitting a finite sample: . This is equivalent to find-ing a neuron-subnetwork which minimizes the empirical risk on the sample S. This setting is considered in various recent works (for example in [9], [8], [1]).
2. Learning RKHS: given an activation function we consider a target function from the following set of functions:
The main theorem of this section is the following:
Theorem 3.3. Let -Lipschitz with
be a randomly initialized 2-layer neural network of width
2. (RKHS function) Let there exists a neuron-subnetwork
and a constant c > 0 such that:
Remark 3.4. For the finite dataset case, the assumption on the minimal eigenvalue of the matrix H is standard and assumed in similar forms in other works which approximate a finite dataset using random features approach (see [9], [8], [24]).
In both versions of the theorem, the network’s width does not depend on the dimension of the input data. It does depend on the “complexity” of the target distribution. In the finite dataset case the network’s width depends on the number of examples m and on the value of . In the RKHS function case, it depends on the constant C which defines the size of the function class
from which the target function is taken.
Note that in a binary classification task (where that labels are ) over a finite dataset, Thm. 3.3 shows that we can achieve zero loss (with respect to the
loss), even if we don’t scale
by a constant c. To show this, we use Thm. 3.3 with
to get that for every pair (x, y) in the finite dataset we have
we get that sign
We give a short proof intuition for Thm. 3.3, the full proof is in appendix C. We initialize a 2-layer neural network of width , this can be thought as initializing
different networks, each of width
. The idea is to choose
large enough so that w.h.p. a random features model with
features would be able to approximate the target (either finite dataset or RKHS function). Next, for each network of size
prune a neuron if it is far from its corresponding random features model. We finish by using a concentration of measure argument to conclude that averaging over
such networks (for a large enough
) yields a good approximation of the target.
Remark 3.5. The proof of Thm. 3.3 actually provides an algorithm for pruning 2-layer neural networks:
• Randomly initialize a 2-layer neural network of width
• For each subnetwork of width - optimize a linear predictor over the random weights from the first layer.
• Let be a confidence parameter, prune each neuron if its distance from the corresponding weight of the trained linear predictor is more than
This algorithm runs in polynomial time, but it is obviously very naive. However, it does demonstrate that there exists a polynomial time algorithm for pruning neurons in shallow networks. We leave a study of more efficient algorithms for future work.
We have shown strong positive results on the expressive power of pruned random networks. However, as we mentioned previously, our results imply that there is no efficient algorithm for weight-pruning of a random network, by reduction from hardness results on learning neural networks. Hence, weight-pruning is similar to weight-optimization in the following sense: in both methods there exists a good solution, but finding it is computationally hard in the worst case. That said, similarly to weight optimization, heuristic algorithms for pruning might work well in practice, as shown in [37, 27]. Furthermore, pruning algorithms may enjoy some advantages over standard weight-optimization algorithms. First, while weight-optimization requires training very large networks and results in large models and inefficient inference, weight-pruning by design achieves networks with preferable inference-time performance. Second, weight-optimization is largely done with gradient-based algorithms, which have been shown to be suboptimal in various cases (see [30, 31]). Pruning algorithms, on the other hand, can possibly rely on very different algorithmic techniques, that might avoid the pitfalls of gradient-descent.
To conclude, in this work we showed some initial motivations for studying algorithms for pruning random networks, which we believe set the ground for numerous future directions. An immediate future research direction is to come up with a heuristic pruning algorithm that works well in practice, and provide provable guarantees under mild distributional assumptions. Other interesting questions for future research include understanding to what extent the polynomial dependencies of the size of the neural network before pruning can be improved, and generalizing the results to other architectures such as convolutional layers and ResNets.
Acknowledgements: This research is supported by the European Research Council (TheoryDL project), and by European Research Council (ERC) grant 754705.
[1] Z. Allen-Zhu, Y. Li, and Z. Song. A convergence theory for deep learning via over-parameterization. arXiv preprint arXiv:1811.03962, 2018.
[2] Z. Allen-Zhu, Y. Li, and Y. Liang. Learning and generalization in overparameterized neural networks, going beyond two layers. In Advances in Neural Information Processing Systems, 2019.
[3] S. Arora, S. S. Du, W. Hu, Z. Li, and R. Wang. Fine-grained analysis of optimization and generalization for overparameterized two-layer neural networks. arXiv preprint arXiv:1901.08584, 2019.
[4] D. Boob, S. S. Dey, and G. Lan. Complexity of training relu neural network. arXiv preprint arXiv:1809.10787, 2018.
[5] Y. Cao and Q. Gu. A generalization theory of gradient descent for learning over-parameterized deep ReLU networks. arXiv preprint arXiv:1902.01384, 2019.
[6] A. Daniely. SGD learns the conjugate kernel class of the network. In Advances in Neural Information Processing Systems, pages 2422–2430, 2017.
[7] X. Dong, S. Chen, and S. Pan. Learning to prune deep neural networks via layer-wise optimal brain surgeon. In Advances in Neural Information Processing Systems, pages 4857–4867, 2017.
[8] S. S. Du, J. D. Lee, H. Li, L. Wang, and X. Zhai. Gradient descent finds global minima of deep neural networks. arXiv preprint arXiv:1811.03804, 2018.
[9] S. S. Du, X. Zhai, B. Poczos, and A. Singh. Gradient descent provably optimizes over-parameterized neural networks. arXiv preprint arXiv:1810.02054, 2018.
[10] J. Frankle and M. Carbin. The lottery ticket hypothesis: Finding sparse, trainable neural networks. arXiv preprint arXiv:1803.03635, 2018.
[11] B. Ghorbani, S. Mei, T. Misiakiewicz, and A. Montanari. Limitations of lazy training of two-layers neural networks. arXiv preprint arXiv:1906.08899, 2019.
[12] B. Ghorbani, S. Mei, T. Misiakiewicz, and A. Montanari. Linearized two-layers neural networks in high dimension. arXiv preprint arXiv:1904.12191, 2019.
[13] S. Han, J. Pool, J. Tran, and W. Dally. Learning both weights and connections for efficient neural network. In Advances in neural information processing systems, pages 1135–1143, 2015.
[14] B. Hassibi and D. G. Stork. Second order derivatives for network pruning: Optimal brain surgeon. In Advances in neural information processing systems, pages 164–171, 1993.
[15] H. Hu, R. Peng, Y.-W. Tai, and C.-K. Tang. Network trimming: A data-driven neuron pruning approach towards efficient deep architectures. arXiv preprint arXiv:1607.03250, 2016.
[16] Y. LeCun, J. S. Denker, and S. A. Solla. Optimal brain damage. In Advances in neural information processing systems, pages 598–605, 1990.
[17] M. Leshno, V. Y. Lin, A. Pinkus, and S. Schocken. Multilayer feedforward networks with a nonpoly- nomial activation function can approximate any function. Neural networks, 6(6):861–867, 1993.
[18] H. Li, A. Kadav, I. Durdanovic, H. Samet, and H. P. Graf. Pruning filters for efficient convnets. arXiv preprint arXiv:1608.08710, 2016.
[19] R. Livni, S. Shalev-Shwartz, and O. Shamir. On the computational efficiency of training neural net- works. In Advances in Neural Information Processing Systems, pages 855–863, 2014.
[20] J.-H. Luo, J. Wu, and W. Lin. Thinet: A filter level pruning method for deep neural network com- pression. In Proceedings of the IEEE international conference on computer vision, pages 5058–5066, 2017.
[21] P. Manurangsi and D. Reichman. The computational complexity of training relu (s). arXiv preprint arXiv:1810.04207, 2018.
[22] Z. Mariet and S. Sra. Diversity networks: Neural network compression using determinantal point processes. arXiv preprint arXiv:1511.05077, 2015.
[23] D. Molchanov, A. Ashukha, and D. Vetrov. Variational dropout sparsifies deep neural networks. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pages 2498–2507. JMLR. org, 2017.
[24] A. Panigrahi, A. Shetty, and N. Goyal. Effect of activation functions on the training of overparametrized neural nets. arXiv preprint arXiv:1908.05660, 2019.
[25] A. Rahimi and B. Recht. Random features for large-scale kernel machines. In Advances in neural information processing systems, pages 1177–1184, 2008.
[26] A. Rahimi and B. Recht. Uniform approximation of functions with random bases. In 2008 46th Annual Allerton Conference on Communication, Control, and Computing, pages 555–561. IEEE, 2008.
[27] V. Ramanujan, M. Wortsman, A. Kembhavi, A. Farhadi, and M. Rastegari. What’s hidden in a ran- domly weighted neural network? arXiv preprint arXiv:1911.13299, 2019.
[28] F. Scarselli and A. C. Tsoi. Universal approximation using feedforward neural networks: A survey of some existing methods, and some new results. Neural networks, 11(1):15–37, 1998.
[29] S. Shalev-Shwartz and S. Ben-David. Understanding machine learning: From theory to algorithms. Cambridge university press, 2014.
[30] S. Shalev-Shwartz, O. Shamir, and S. Shammah. Failures of gradient-based deep learning. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pages 3067–3075. JMLR. org, 2017.
[31] O. Shamir. Distribution-specific hardness of learning neural networks. The Journal of Machine Learning Research, 19(1):1135–1163, 2018.
[32] S. Srinivas and R. V. Babu. Data-free parameter pruning for deep neural networks. arXiv preprint arXiv:1507.06149, 2015.
[33] M. Stinchcombe and H. White. Universal approximation using feedforward networks with nonsigmoid hidden layer activation functions. In IJCNN International Joint Conference on Neural Networks, 1989.
[34] Y. Sun, A. Gilbert, and A. Tewari. Random ReLU features: Universality, approximation, and compo- sition. arXiv preprint arXiv:1810.04374, 2018.
[35] T.-J. Yang, Y.-H. Chen, and V. Sze. Designing energy-efficient convolutional neural networks us- ing energy-aware pruning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5687–5695, 2017.
[36] G. Yehudai and O. Shamir. On the power and limitations of random features for understanding neural networks. In Advances in Neural Information Processing Systems, 2019.
[37] H. Zhou, J. Lan, R. Liu, and J. Yosinski. Deconstructing lottery tickets: Zeros, signs, and the super- mask. arXiv preprint arXiv:1905.01067, 2019.
We prove the theorem in a general manner, where we assume that each vector -sparse, that is, it only has s non-zero coordinates. To prove Thm. 2.3 we assign s = d. We start by showing that the function
can be approximated by prunning a two-layer network:
Lemma A.1. Let , and fix some scalar
chosen randomly from
chosen randomly from
. Then, for
, w.p at least
there exists a binary mask
such that
. Furthermore, we have
Proof. If then choosing
gives the required. Assume
assume w.l.o.g that
. Note that:
where we used the assumption that , and similarly:
Therefore, using the union bound, w.p at least there exist
and
. Now, setting
the rest to zero, we get that:
We will use the fact that , we get that
therefore:
In a similar fashion, we get that for , which gives the required. Since we have
achieves the required.
Using the previous result, we can show that a linear function can be implemented by pruning a two layer network:
that . Furthermore, we have
Proof. We assume (otherwise, mask excessive neurons), and let
. With slight
abuse of notation, we denote . By the assumption on
, and we assume w.l.o.g. that
, and denote
, then from Lemma A.1, with probability at least
there exists a binary mask
such that
. Now, using the union bound we get that with probability at least
, the above holds for all
Now, we can show that a network with a single neuron can be approximated by prunning a three-layer network:
Lemma A.3. Let , and fix some
some
chosen randomly from
chosen randomly from
chosen randomly from
. Then, for
, w.p at least
there exists a binary mask
, such that
. Furthermore, we have
Proof. Let , and note that for every
. Therefore, the probability that for some
it holds that
is at least
use the fact that
. Now, assume this holds for
Then, from Lemma A.2, with probability at least there exists
s.t. for every
And therefore, for every
Finally, we show that pruning a three-layer network can approximate a network with n neurons, since it is only a sum of networks with 1 neuron, as analyzed in the previous lemma:
Lemma A.4. Let , and fix some
let
chosen randomly from
chosen randomly from
randomly from
. Then, for
, w.p at least
exists a binary mask , such that g(x) =
. Furthermore, we have
Proof. Denote (otherwise mask exceeding neurons). With slight abuse of notation, we denote
Now, by setting we get that
. Now, from Lemma A.3 we get that with probability at least
Using the union bound, we get that with probability at least
In a similar fashion, we can prove a result for deep networks. We start by showing that a single layer can be approximated by pruning:
Lemma A.5. Let , and fix some
chosen randomly from
chosen randomly from
. Then, for
, w.p at least
there exists a binary mask
, such that for
have
. Furthermore, we have
Proof. Denote (otherwise mask exceeding neurons). With slight abuse of notation, we denote
and we denote
for every
Now, by setting we get that
. Now, from Lemma A.2 with
we get that with probability at least
. Using the union bound, we get that with probability at least
Notice that Lemma A.2 also gives . Since we can set
, we get the same bound on
Using the above, we can show that a deep network can be approximated by pruning. We show this result with the assumption that each neuron in the network has only s non-zero weights. To get a similar result without this assumption, as is stated in Thm. 2.1, we can simply choose s to be its maximal value - either d for the first layer of n for intermediate layers.
Theorem A.6. (formal statement of Thm. 2.1, when , and fix some
. Assume that for every
is chosen randomly from
is chosen randomly from
chosen from
chosen from
. Then, for
, w.p. at least
there exist
binary mask for
with matching dimensions, and
a binary mask for
with matching dimensions, s.t.:
Where we denote . Furthermore, we have
Proof. Fix some i < l. From A.5, with probability at least there exists a choice for
that for every
. Note that we want to show that every layer is well approximated given the output of the previous layer, which can slightly deviate from the output of the original network. So, we need to relax the condition of Lemma A.5 to
in order to allow these small deviations from the target network.
Notice that if , from homogeneity of
to positive scalars we get that:
Similarly, from Lemma A.2, with probability at least it holds that
with
. Assume that all the above holds, and using the union bound this happens with probability at least
. Notice that for every
and denote
. Now, we will show that
every
, by induction on i. The case i = 0 is trivial, and assume the above holds for
. Notice that
in this case we have . Therefore:
From the above, we get that
First we will need the following lemma, which intuitively shows a generalization bound over linear predictors, where each coordinate of each sample is pruned with equal probability and independently.
Lemma B.1. Let be Bernoulli random variables such that for each j, with probability
, and with probability
. Then we have w.p
Proof. Note that for each we have that
, thus for every vector
. Hence, using a standard argument about Rademacher complexity (see [29] Lemma 26.2) we have that:
where are standard Rademacher random variables. Set
,using Cauchy-Schwartz we can bound Eq. (3) by:
Next, we can use Jensen’s inequality on Eq. (4) to bound it
Finally, using the fact that we have that:
In order to prove the lemma we will use McDiarmid’s inequality to get guarantees with high probability. Note that for every , by taking
we have for every
By using Mcdiarmid’s theorem we get
setting the r.h.s to
Next, we show the main argument, which states that by pruning a neuronds from a large enough 2-layer neural network, it can approximate any other 2-layer neural network for which the weights in the first layer are the same, and the weights in the second layer are bounded.
Lemma B.2. Let and assume that
-Lipschitz with
and define
. Then there exist
such that for the functions
where
Set the following vectors:
. Now, the functions
can be written as
, we denote
Our goal is to bound the following, when the supremum is taken over
where . We will now bound each expression in Eq. (5) with high probability. For the first expression, we first bound:
Fix and note that for every
have that
. For the random variables
We now use Hoeffding’s inequality to get that:
For the second expression in Eq. (5) we first note that for all . Hence we can bound the second expression
Using Lemma B.1 on the above term, w.p we have that:
Combining Eq. (6) with Eq. (7), applying union bound and taking , we can now use the bound in Eq. (5) to get w.p
We are now ready to prove the main theorem:
Proof of Thm. 3.2. Set and initialize a 2-layer neural network with width
and initialization as described in the theorem, denote
this network. By the assumption of the theorem, for each
there exists a vector
with
such that the function
satisfy that
Let
be the random variable such that
if there exists a vector
that satisfies the above, and
otherwise. the random variables
are i.i.d since we initialize each
. We use Hoeffding’s inequality on Z to get that:
Replacing the r.h.s with and setting
we get that if
we have that
In particular, there are at least
indices (denote them w.l.o.g
that for every
there exists a vector
such that the function
satisfy that
We now use Lemma B.2 with to get that w.p
that there exists a neuron- subnetwork
and constant
such that:
Set , the loss of
can be bounded by:
We will bound each term of the above expression. Using Eq. (8) we have:
For the second term in Eq. (9) we have that:
re-scaling finishes the proof.
We first show that a finite dataset, under mild assumptions on the data, can be approximated using a random features model. The proof of the following lemma is exactly the same as the proof of Lemma 3.1 in [9].
Lemma C.1. Let matrix with:
Assume that over sampling of
have that
Using the lemma above, and under the assumptions made on the data, w.h.p a two-layer network of size can overfit the data:
Proposition C.2. Let . Assume that
and
-Lipschitz then for
over sampling of
such that for every
Proof. Set matrix defined by
. By our assumption and the choice of
we have that
is invertible, and has a minimal eigenvalue of at least
, it is easy to see that uX = y, furthermore:
For the second variation of Thm. 3.3 we consider functions from the class of functions . Here we use Theorem 3.3 from [36]:
with a normalization term. Assume that
for a constant
C. Then for every are drawn i.i.d from the uniform distribution on
there is a function of the form
To prove the main theorem, we use the same argument as in the proof of Thm. 3.2, that pruning neurons can approximate random features models. Here the size of the target random features model depends on the complexity of the target (either a finite dataset or RKHS function).
Proof of Thm. 3.3. Although the proof for the two variations of the theorem are similar, for clarity and ease of notations we will prove them separately.
Proposition C.2 w.p
we get the following: There exists some
such that for the function
, and for every l = 1, . . . , m, we have
. Using union bound over all choices of j, we get that w.p
the above hold for every
. Using Lemma B.2 with
we have that there exist
such that for the functions
where . Using Eq. (12) we have that for every l = 1, . . . , m:
, from Thm. C.3 w.p
we get the following: There exists some
such that for the function
. Using union