The Power of Depth for Feedforward Neural Networks
Ronen Eldan, Ohad Shamir
Introduction and Main Result
Learning via multi-layered artificial neural networks, a.k.a. deep learning, has seen a dramatic resurgence of popularity over the past few years, leading to impressive performance gains on difficult learning problems, in fields such as computer vision and speech recognition. Despite their practical success, our theoretical understanding of their properties is still partial at best.
In this paper, we consider the question of the expressive power of neural networks of bounded size. The boundedness assumption is important here: It is well-known that sufficiently large depth- neural networks, using reasonable activation functions, can approximate any continuous function on a bounded domain (Cybenko (1989); Hornik et al. (1989); Funahashi (1989); Barron (1994)). However, the required size of such networks can be exponential in the dimension, which renders them impractical as well as highly prone to overfitting. From a learning perspective, both theoretically and in practice, our main interest is in neural networks whose size is bounded.
For a network of bounded size, a basic architectural question is how to trade off between its width and depth: Should we use networks that are narrow and deep (many layers, with a small number of neurons per layer), or shallow and wide? Is the “deep” in “deep learning” really important? Or perhaps we can always content ourselves with shallow (e.g. depth-) neural networks?
Overwhelming empirical evidence as well as intuition indicates that having depth in the neural network is indeed important: Such networks tend to result in complex predictors which seem hard to capture using shallow architectures, and often lead to better practical performance. However, for the types of networks used in practice, there are surprisingly few formal results (see related work below for more details).
Clearly, to prove something on the separation between -layer and -layer networks, we need to make some assumption on the activation function (for example, if is the identity, then both -layer and -layer networks compute linear functions, hence there is no difference in their expressive power). All we will essentially require is that is universal, in the sense that a sufficiently large -layer network can approximate any univariate Lipschitz function which is non-constant on a bounded domain. More formally, we use the following assumption:
In addition, for technical reasons, we will require the following mild growth and measurability conditions, which are satisfied by virtually all activation functions in the literature, including the examples discussed earlier:
The activation function is (Lebesgue) measurable and satisfies
Our main result is the following theorem, which implies that there are -layer networks of width polynomial in the dimension , which cannot be arbitrarily well approximated by -layer networks, unless their width is exponential in :
is bounded in , supported on , and expressible by a -layer network of width .
Every function , expressed by a -layer network of width at most , satisfies
We make the following additional remarks about the theorem:
At least for specific activation functions such as the ReLU, sigmoid, and threshold, the proof construction implies that is -Lipschitz, and the -layer network expressing it has parameters bounded by .
On a qualitative level, the question we are considering is similar to the question of Boolean circuit lower bounds in computational complexity: In both cases, we consider functions which can be represented as a combination of simple computational units (Boolean gates in computational complexity; neurons in neural networks), and ask how large or how deep this representation needs to be, in order to compute or approximate some given function. For Boolean circuits, there is a relatively rich literature and some strong lower bounds. A recent example is the paper Rossman et al. (2015), which shows for any an explicit depth , linear-sized circuit on , which cannot be non-trivially approximated by depth circuits of size polynomial in . That being said, it is well-known that the type of computation performed by each unit in the circuit can crucially affect the hardness results, and lower bounds for Boolean circuits do not readily translate to neural networks of the type used in practice, which are real-valued and express continuous functions. For example, a classical result on Boolean circuits states that the parity function over cannot be computed by constant-depth Boolean circuits whose size is polynomial in (see for instance Håstad (1986)). Nevertheless, the parity function can in fact be easily computed by a simple -layer, -width real-valued neural network with most reasonable activation functionsSee Rumelhart et al. (1986), Figure 6, where reportedly the structure was even found automatically by back-propagation. For a threshold activation function and input , the network is given by . In fact, we only need to satisfy for and for , so the construction easily generalizes to other activation functions (such as a ReLU or a sigmoid), possibly by using a small linear combination of them to represent such a ..
Moving to networks with real-valued outputs, one related field is arithmetic circuit complexity (see Shpilka and Yehudayoff (2010) for a survey), but the focus there is on computing polynomials, which can be thought of as neural networks where each neuron computes a linear combination or a product of its inputs. Again, this is different than most standard neural networks used in practice, and the results and techniques do not readily translate.
Recently, several works in the machine learning community attempted to address questions similar to the one we consider here. Pascanu et al. (2013); Montufar et al. (2014) consider the number of linear regions which can be expressed by ReLU networks of a given width and size, and Bianchini and Scarselli (2014) consider the topological complexity (via Betti numbers) of networks with certain activation functions, as a function of the depth. Although these can be seen as measures of the function’s complexity, such results do not translate directly to a lower bound on the approximation error, as in Thm. 1. Delalleau and Bengio (2011); Martens and Medabalimi (2014) and Cohen et al. (2015) show strong approximation hardness results for certain neural network architectures (such as polynomials or representing a certain tensor structure), which are however fundamentally different than the standard neural networks considered here.
Proof Sketch
In a nutshell, the -layer network we construct approximates a radial function with bounded support (i.e. one which depends on the input only via its Euclidean norm , and is for any whose norm is larger than some threshold). With layers, approximating radial functions is rather straightforward: First, using assumption 1, we can construct a linear combination of neurons expressing the univariate mapping arbitrarily well in any bounded domain. Therefore, by adding these combinations together, one for each coordinate, we can have our network first compute (approximately) the mapping inside any bounded domain, and then use the next layer to compute some univariate function of , resulting in an approximately radial function. With only layers, it is less clear how to approximate such radial functions. Indeed, our proof essentially indicates that approximating radial functions with layers can require exponentially large width.
In particular, we will consider a density function which equals , where is the inverse Fourier transform of the indicator , being the origin-centered unit-volume Euclidean ball (the reason for this choice will become evident later). Before continuing, we note that a formula for can be given explicitly (see Lemma 2), and an illustration of it in dimensions is provided in Figure 1. Also, it is easily verified that is indeed a density function: It is clearly non-negative, and by isometry of the Fourier transform, , which equals since is a unit-volume ball.
Our goal now is to lower bound the right hand side of Eq. (3). To continue, we find it convenient to consider the Fourier transforms of the functions , rather than the functions themselves. Since the Fourier transform is isometric, the above equals
Luckily, the Fourier transform of functions expressible by a -layer network has a very particular form. Specifically, consider any function of the form
In words, the support of is contained in a union of tubes of bounded radius passing through the origin. This is the key property of -layer networks we will use to derive our main theorem. Note that it holds regardless of the exact shape of the functions, and hence our proof will also hold if the activations in the network are different across the first layer neurons, or even if they are chosen in some adaptive manner.
To establish our theorem, we will find a function expressible by a -layer network, such that has a constant distance (in space) from any function supported on (a union of tubes as above). Here is where high dimensionality plays a crucial role: Unless is exponentially large in the dimension, the domain is very sparse when one considers large distances from the origin, in the sense that
The construction and analysis of this function constitutes the technical bulk of the proof. The main difficulty in this step is that even if the Fourier transform of has some of its mass on high frequencies, it is not clear that this will also be true for (note that while convolving with a Euclidean ball increases the average distance from the origin in the sense, it doesn’t necessarily do the same in the sense).
We overcome this difficulty by considering a random superposition of indicators of thin shells: Specifically, we consider the function
Preliminaries
, which is always between and .
Proof of Thm. 1
In this section, we provide the proof of Thm. 1. Note that some technical proofs, as well as some important technical lemmas on the structure of Bessel functions, are deferred to the appendix.
As discussed in Sec. 2, our theorem rests on constructing a distribution and an appropriate function , which is easy to approximate (w.r.t. ) by small -layer networks, but difficult to approximate using -layer networks. Thus, we begin by formally defining that we will use.
Let be the Fourier transform of . Then
To define our hard-to-approximate function, we introduce some notation. Let and be some large numerical constants to be determined later, and set , assumed to be an integer (essentially, we need to be sufficiently large so that all the lemmas we construct below would hold). Consider the intervals
We split the intervals to “good” and “bad” intervals using the following definition:
is a good interval (or equivalently, is good) if for any
Otherwise, we say that is a bad interval.
By definition of a “good” interval and Lemma 2, we see that is defined to be non-zero, when the value of on the corresponding interval is sufficiently bounded away from , a fact which will be convenient for us later on.
Our proof will revolve around the function
which as explained in Sec. 2, will be shown to be easy to approximate arbitrarily well with a -layer network, but hard to approximate with a -layer network.
2 Key Lemmas
In this subsection, we collect several key technical lemmas on and , which are crucial for the main proof. The proofs of all the lemmas can be found in Appendix B.
The following lemma ensures that is sufficiently close to being a constant on any good interval:
If , and (for some sufficiently large universal constant ), then inside any good interval , has the same sign, and
The following lemma ensures that the Fourier transform of has a sufficiently large part of its mass far away from the origin:
Suppose . Then for any ,
where is the Fourier transform of .
The following lemma ensures that also has sufficiently large mass far away from the origin:
Suppose that , and , where is a universal constant. Then for any ,
The following lemma ensures that a linear combination of the ’s has at least a constant probability mass.
Suppose that and for some sufficiently large universal constant , then for every choice of , , one has
Finally, the following lemma guarantees that the non-Lipschitz function can be approximated by a Lipschitz function (w.r.t. the density ). This will be used to show that can indeed be approximated by a -layer network.
Suppose that . For any choice of , , there exists an -Lipschitz function , supported on and with range in , which satisfies
The goal of this section is to prove the following proposition.
Fix a dimension , suppose that , and and let be an integer satisfying
for constants . Then one has
where is a universal constant.
The proof of this proposition requires a few intermediate steps. In the remainder of the section, we will assume that are chosen to be large enough to satisfy the assumptions of Lemma 6 and Lemma 5. In other words we assume that and for a suitable universal constant . We begin with the following:
Suppose that are as above. There exists a choice of , such that
Suppose that each is chosen independently and uniformly at random from . It suffices to show that
for some universal constant , since that would ensure there exist some choice of satisfying the lemma statement. Define and consider the operator
This is equivalent to removing low-frequency components from (in the Fourier domain), and therefore is an orthogonal projection. According to Lemma 5 and isometry of the Fourier transform, we have
for every good . Moreover, an application of Lemma 6, and the fact that for any (as have disjoint supports) tells us that
for a universal constant . We finally get,
Let be a function such that , and is of the form in Eq. (8). Suppose that the functions are measurable functions satisfying
where . Note that the growth condition ensures that the integral above is well-defined. The Fourier transform of a tempered distribution is also a tempered distribution, and defined as
which is indeed an element of by the linearity of the Fourier transform, by the continuity of with respect to the topology of and by the dominated convergence theorem. Finally, define
Using the fact thatThis is because , where is the Dirac delta function, which is the Fourier transform of the constant function. See also (Hunter and Nachtergaele, 2001, Chapter 11, Example 11.31).
for any , recalling that has unit norm, and letting denote the subspace of vectors orthogonal to , we have the following for any :
where the use of Fubini’s theorem is justified by the fact that .
We now use the convolution-multiplication theorem (see e.g., (Hunter and Nachtergaele, 2001, Theorem 11.35)) according to which if then
Using this, we have the following for every :
Let be two functions of unit norm in . Suppose that satisfies
so that contains the support of . For each , define
Using a union bound and the definition of , equation Eq. (17) follows.
to be the averaging of with respect to rotations (in the above formula denotes the dimensional Hausdorff measure, i.e. the standard measure in dimensions). We have the following: Since is radial and has unit norm, and we assume is supported on , we have
As a result of these calculations, we have
where we used the assumption that is unit norm and that . Since for any , the result follows. ∎
where are the signs provided by Lemma 8. According to Lemma 6, we have
for a universal constant . Next, we claim that since , we have for every scalars that
Indeed, we may clearly multiply both and by the same constant affecting the correctness of the formula, thus we may assume that . It thus amounts to show that for two unit vectors in a Hilbert space, one has that . We have
which in particular implies formula Eq. (20).
Combining the above, and using the fact that have unit norm, we finally get
where in the last inequality, we use the assumption in Eq. (7), choosing . The proof is complete. ∎
There is a universal constant such that the following holds. Let . Suppose that and that the functions are constructed as in Eq. (6). For any choice of , , there exists a function expressible by a -layer network of width at most , and with range in , such that
The proof of this proposition relies on assumption 1, which ensures that we can approximate univariate functions using our activation function. As discussed before Thm. 1, one can also plug in weaker versions of the assumption (i.e. worse polynomial dependence of the width on ), and get versions of proposition 2 where the width guarantee has worse polynomial dependence on the parameters . This would lead to versions of the Thm. 1 with somewhat worse constants and polynomial dependence on the dimension .
Suppose the activation function satisfies assumption 1. Let be an -Lipschitz function supported on , where . Then for any , there exists a function expressible by a -layer network of width at most , such that
which is constant outside , as well as the function
and where the width parameter is at most . Consequently, the function
can be expressed in the form where , and it holds that
where .
for appropriate scalars and vectors , and where is at most
Eq. (23) is exactly a -layer network (compare to Eq. (2)), except that there is an additional constant term . However, by increasing by , we can simulate by an additional neuron , where is some scalar such that (note that if there is no such , then is the zero function, and therefore cannot satisfy assumption 1). So, we can write the function as a -layer network (as defined in Eq. (2)), of width at most
Let us consider each of the three absolute values:
The first absolute value term is at most by Eq. (22).
Summing the above, we get that as required. ∎
We are now ready to prove Proposition 2, which is essentially a combination of Lemmas 7 and 10.
First, invoke Lemma 7 to obtain an -Lipschitz function with range in which satisfies
5 Finishing the Proof
We are finally ready to prove our main theorem.
The proof is a straightforward combination of propositions 1 and 2 (whose conditions can be verified to follow immediately from the assumptions used in the theorem). We first choose and with the constant taken from the statement of Proposition 1. By invoking this proposition we obtain signs and a universal constant for which any function expressed by a bounded-size -layer network satisfies
(where is a universal constant depending on the universal constants ), so that
Combining Eq. (25) and Eq. (26) with the triangle inequality, we have that for any -layer function . The proof is complete. ∎
OS is supported in part by an FP7 Marie Curie CIG grant, the Intel ICRI-CI Institute, and Israel Science Foundation grant 425/13. We thank James Martens and the anonymous COLT 2016 reviewers for several helpful comments.
References
Appendix A Approximation Properties of the ReLU Activation Function
In this appendix, we prove that the ReLU activation function satisfies assumption 1, and also prove bounds on the Lipschitz parameter of the approximation and the size of the required parameters. Specifically, we have the following lemma:
Moreover, one has and .
If one has , then the results holds trivially because we may take the function to be the function (with width parameter ). Otherwise, we must have , so by increasing the value of by a factor of at most , we may assume without loss of generality that there exists an integer such that .
Then clearly equation Eq. (27) holds true. Moreover, we have , which completes the proof.
Appendix B Technical Proofs
Since is radial (hence rotationally invariant), let us assume without loss of generality that it equals , where and is the first standard basis vector. This means that the integral becomes
Performing the variable change (which implies that as goes from to , goes from to , and also and ), we can rewrite the integral above as
Since we know that this integral must be real-valued (since we’re computing the Fourier transform , which is real-valued and even), we can ignore the imaginary components, so the above reduces to
By a standard formula for Bessel functions (see Equation 10.9.4. in DLMF ), we have
which by substituting and changing sides, implies that
Plugging this back into Eq. (29), we get the expression
Plugging in the explicit formula , this simplifies to
Recalling that this equals where , the result follows.
B.2 Proof of Lemma 3
Moreover, using the definition of a good interval, and the fact that the maximal value in any interval is at most , we have
Since (in any interval) is at least , then is -Lipschitz in by Lemma 12. Since the width of each interval only , Eq. (30) implies that (and hence ) does not change signs in the interval, provided that . Recalling that , this is indeed satisfied by the lemma’s conditions.
Turning to the second part of the lemma, assuming is positive without loss of generality, and using the Lipschitz property of and Eq. (30), we have
which is less than provided that for some universal constant .
B.3 Proof of Lemma 4
The result is trivially true for a bad interval (where is the function, hence both sides of the inequality in the lemma statement are ), so we will focus on the case that is a good interval.
Since, is a radial function, its Fourier transform is also radial, and is given by
By Lemma 12, , hence Eq. (31) can be upper bounded by
Combining this with Eq. (32), we get that
B.4 Proof of Lemma 5
The result is trivially true for a bad interval (where is the function, hence both sides of the inequality in the lemma statement are ), so we will focus on the case that is a good interval.
Define . Using Lemma 3, we have that does not change signs in the interval . Suppose without loss of generality that it is positive. Moreover, by the same lemma we have that
Next, by choosing the constant to be large enough, we may apply Lemma 4, which yields that
By the triangle inequality, we have that for two vectors in a normed space, one has . This teaches us that
B.5 Proof of Lemma 6
Since the for different have disjoint supports (up to measure-zero sets), the integral in the lemma equals
Recalling that and that by Lemma 1, this equals
We now claim that for any (that is, in any interval),
which would imply that we can lower bound Eq. (35) by
To see why Eq. (36) holds, consider an which satisfies the left hand side. The width of its interval is at most , and by Lemma 12, is at most -Lipschitz in . Therefore, for any other in the same interval as , it holds that
which can be verified to be at least by the condition on in the lemma statement, and the facts that . As a result, for any in the same interval as , which implies that is in a good interval.
We now continue by taking Eq. (37), and performing the variable change , leading to
Applying Lemma 15 with (which by Lemma 1, is between and , hence satisfies the conditions of Lemma 15 if is large enough), this is at least
B.6 Proof of Lemma 7
where is the distance of from the boundaries of . Note that for bad , this is the same as , whereas for good , it is an -Lipschitz approximation of .
Let , and note that since the support of are disjoint, is also Lipschitz. With this definition, the integral in the lemma becomes
Since the support of is disjoint for different , this equals
Using the definition of from Lemma 1, and the fact that , this equals
Now, note that by definition of , their difference can be non-zero (and at most ) only for belonging to two sub-intervals of width within the interval (which itself lies in ). Moreover, for such (which is certainly at least ), we can use Lemma 14 to upper bound by . Overall, we can upper bound the sum of integrals above by
Appendix C Technical Results On Bessel functions
For any and , . Moreover, for any and , is -Lipschitz in .
The bound on the magnitude follows from equation 10.14.1 in DLMF .
The derivative of w.r.t. is given by (see equation 10.6.1 in DLMF ). Since and , for , are at most (see equation 10.14.1 in DLMF ), we have that the magnitude of the derivative is at most . ∎
To prove the lemmas below, we will need the following explicit approximation result for the Bessel function , which is an immediate corollary of Theorem 5 in Krasikov , plus some straightforward approximations (using the facts that for any , we have and ):
Using Lemma 13 (which is justified since and by Lemma 1), the fact that is at most , and the assumption ,
For any such that , it holds that
For any , we have . Therefore,
We now wish to use Lemma 13 and plug in the approximation for . To do so, let , let be its approximation from Lemma 13, and let the bound on the approximation from the lemma. Therefore, we have . This implies
Eq. (38) can be further simplified, since by definition of and Lemma 13,
Plugging this back into Eq. (38), plugging in the definition of , and recalling that and , we get that
To compute the integral above, we will perform a variable change, but first lower bound the integral in a more convenient form. A straightforward calculation (manually or using a symbolic computation toolbox) reveals that
which according to Lemma 13, equals , which is at most . Using this and the fact that by the same lemma ,
Using the variable change , and the fact that , the above equals
We now perform integration by parts. Note that , and is always bounded by , hence
Concatenating all the lower bounds we attained so far, we showed that
If , this is at least , from which the lemma follows. ∎