Title: WHY DEEP NEURAL NETWORKS FOR FUNCTION AP-PROXIMATION?

Abstract: Recently there has been much interest in understanding why deep neural networks are preferred to shallow networks. We show that, for a large class of piecewise smooth functions, the number of neurons needed by a shallow network to approximate a function is exponentially larger than the corresponding number of neurons needed by a deep network for a given degree of function approximation. First, we consider univariate functions on a bounded interval and require a neural network to achieve an approximation error of ε uniformly over the interval. We show that shallow networks (i.e., networks whose depth does not depend on ε) require Ω(poly(1/ε)) neurons while deep networks (i.e., networks whose depth grows with 1/ε) require O(polylog(1/ε)) neurons. We then extend these results to certain classes of important multivariate functions. Our results are derived for neural networks which use a combination of rectifier linear units (ReLUs) and binary step units, two of the most popular type of activation functions. Our analysis builds on a simple observation: the multiplication of two bits can be represented by a ReLU.

1. INTRODUCTION:

Neural networks have drawn significant interest from the machine learning community, especially due to their recent empirical successes (see the surveys (Bengio, 2009) ). Neural networks are used to build state-of-art systems in various applications such as image recognition, speech recognition, natural language process and others (see, Krizhevsky et al. 2012; Goodfellow et al. 2013; Wan et al. 2013, for example) . The result that neural networks are universal approximators is one of the theoretical results most frequently cited to justify the use of neural networks in these applications. Numerous results have shown the universal approximation property of neural networks in approximations of different function classes, (see, e.g., Cybenko 1989; Hornik et al. 1989; Funahashi 1989; Hornik 1991; Chui & Li 1992; Barron 1993; Poggio et al. 2015) .

All these results and many others provide upper bounds on the network size and assert that small approximation error can be achieved if the network size is sufficiently large. More recently, there has been much interest in understanding the approximation capabilities of deep versus shallow networks. Delalleau & Bengio (2011) have shown that there exist deep sum-product networks which cannot be approximated by shallow sum-product networks unless they use an exponentially larger amount of units or neurons. Montufar et al. (2014) have shown that the number of linear region increases exponentially with the number of layers in the neural network. Telgarsky (2016) has established such a result for neural networks, which is the subject of this paper. Eldan & Shamir (2015) have shown that, to approximate a specific function, a two-layer network requires an exponential number of neurons in the input dimension, while a three-layer network requires a polynomial number of neurons. These recent papers demonstrate the power of deep networks by showing that depth can lead to an exponential reduction in the number of neurons required, for specific functions or specific neural networks. Our goal here is different: we are interested in function approximation specifically and would like to show that for a given upper bound on the approximation error, shallow networks require exponentially more neurons than deep networks for a large class of functions.

The multilayer neural networks considered in this paper are allowed to use either rectifier linear units (ReLU) or binary step units (BSU), or any combination of the two. The main contributions of this paper are

• We have shown that, for ε-approximation of functions with enough piecewise smoothness, a multilayer neural network which uses Θ(log(1/ε)) layers only needs O(poly log(1/ε)) neurons, while Ω(poly(1/ε)) neurons are required by neural networks with o(log(1/ε)) layers. In other words, shallow networks require exponentially more neurons than a deep network to achieve the level of accuracy for function approximation. • We have shown that for all differentiable and strongly convex functions, multilayer neural networks need Ω(log(1/ε)) neurons to achieve an ε-approximation. Thus, our results for deep networks are tight.

The outline of this paper is as follows. In Section 2, we present necessary definitions and the problem statement. In Section 3, we present upper bounds on network size, while the lower bound is provided in Section 4. Conclusions are presented in Section 5. Around the same time that our paper was uploaded in arxiv, a similar paper was also uploaded in arXiv by Yarotsky (2016) . The results in the two papers are similar in spirit, but the details and the general approach are substantially different.

2. PRELIMINARIES AND PROBLEM STATEMENT:

In this section, we present definitions on feedforward neural networks and formally present the problem statement.

2.1. FEEDFORWARD NEURAL NETWORKS:

A feedforward neural network is composed of layers of computational units and defines a unique function f : R d → R. Let L denote the number of hidden layers, N l denote the number of units of layer l, N = ∑ L l=1 N l denote the size of the neural network, vector x = (x (1) , ..., x (d) ) denote the input of neural network, z l j denote the output of the jth unit in layer l, w l i,j denote the weight of the edge connecting unit i in layer l and unit j in layer l + 1, b l j denote the bias of the unit j in layer l. Then outputs between layers of the feedforward neural network can be characterized by following iterations:

z l+1 j = σ ( N l ∑ i=1 w l i,j z l i + b l+1 j ) , l ∈ [L -1], j ∈ [N l+1 ],

with input layer:

z 1 j = σ ( d ∑ i=1 w 0 i,j x (i) + b 1 j ) , j ∈ [N 1 ], output layer: f (x) = σ ( N L ∑ i=1 w L i,j z L i + b L+1 j ) .

Here, σ(•) denotes the activation function and [n] denotes the index set [n] = {1, ..., n}. In this paper, we only consider two important types of activation functions:

• Rectifier linear unit: σ(x) = max{0, x}, x ∈ R. • Binary step unit: σ(x) = I{x ≥ 0}, x ∈ R.

We call the number of layers and the number of neurons in the network as the depth and the size of the feedforward neural network, respectively. We use the set F(N, L) to denote the function set containing all feedforward neural networks of depth L, size N and composed of a combination of rectifier linear units (ReLUs) and binary step units. We say one feedforward neural network is deeper than the other network if and only if it has a larger depth. Through this paper, the terms feedforward neural network and multilayer neural network are used interchangeably.

x x ≥ 1 ≥ 1 + + 1 1 -1 -1 x 0 x 0 x -x 0 x -x 0 ≥ 1 2 ≥ 1 2 + + 1 1 -1 2 -1 2 x 1 x 1 ≥ 1 2 n ≥ 1 2 n + + 1 1 x n x n x - n i=0 xi 2 i x - n i=0 xi 2 i -1 2 n -1 2 n x -x 0 -x1 2 x -x 0 -x1 2 . . . . . . x - n-1 i=1 xi 2 i x - n-

2.2. PROBLEM STATEMENT:

In this paper, we focus on bounds on the size of the feedforward neural network function approximation. Given a function f , our goal is to understand whether a multilayer neural network f of depth L and size N exists such that it solves

min f ∈F (N,L) ∥f -f ∥ ≤ ε.

(1) Specifically, we aim to answer the following questions:

1 Does there exists L(ε) and N (ε) such that (1) is satisfied? We will refer to such L(ε) and N (ε) as upper bounds on the depth and size of the required neural network. 2 Given a fixed depth L, what is the minimum value of N such that (1) is satisfied? We will refer to such an N as a lower bound on the size of a neural network of a given depth L.

The first question asks what depth and size are sufficient to guarantee an ε-approximation. The second question asks, for a fixed depth, what is the minimum size of a neural network required to guarantee an ε-approximation. Obviously, tight bounds in the answers to these two questions provide tight bounds on the network size and depth required for function approximation. Besides, solutions to these two questions together can be further used to answer the following question. If a deeper neural network of size N d and a shallower neural network of size N s are used to approximate the same function with the same error, then how fast does the ratio N d /N s decay to zero as the error decays to zero?

3. UPPER BOUNDS ON FUNCTION APPROXIMATIONS:

In this section, we present upper bounds on the size of the multilayer neural network which are sufficient for function approximation. Before stating the results, some notations and terminology deserve further explanation. First, the upper bound on the network size represents the number of neurons required at most for approximating a given function with a certain error. Secondly, the notion of the approximation is the L ∞ distance: for two functions f and g, the L ∞ distance between these two function is the maximum point-wise disagreement over the cube [0, 1] d .

3.1. APPROXIMATION OF UNIVARIATE FUNCTIONS:

In this subsection, we present all results on approximating univariate functions. We first present a theorem on the size of the network for approximating a simple quadratic function. As part of the proof, we present the structure of the multilayer feedforward neural network used and show how the neural network parameters are chosen. Results on approximating general functions can be found in Theorem 2 and 4. 

(x) -f (x)| ≤ ε, ∀x ∈ [0, 1].

Proof. The proof is composed of three parts. For any x ∈ [0, 1], we first use the multilayer neural network to approximate x by its finite binary expansion

∑ n i=0 xi 2 i .

We then construct a 2-layer neural network to implement function f

(∑ n i=0 xi 2 i

) .

For each x ∈ [0, 1], x can be denoted by its binary expansion x = ∑ ∞ i=0 xi 2 i , where x i ∈ {0, 1} for all i ≥ 0. It is straightforward to see that the n-layer neural network shown in Figure 1 can be used to find x 0 , ..., x n .

Next, we implement the function f

(x) = f (∑ n i=0 xi 2 i

) by a two-layer neural network. Since f (x) = x 2 , we then rewrite f (x) as follows:

f (x) = ( n ∑ i=0 x i 2 i ) 2 = n ∑ i=0   x i •   1 2 i n ∑ j=0 x j 2 j     = n ∑ i=0 max   0, 2(x i -1) + 1 2 i n ∑ j=0 x j 2 j   .

The third equality follows from the fact that x i ∈ {0, 1} for all i. Therefore, the function f (x) can be implemented by a multilayer network containing a deep structure shown in Figure 1 and another hidden layer with n rectifier linear units. This multilayer neural network has O(n) layers, O(n) binary step units and O(n) rectifier linear units.

Finally, we consider the approximation error of this multilayer neural network,

|f (x) -f (x)| = x 2 - ( n ∑ i=0 x i 2 i ) 2 ≤ 2 x - n ∑ i=0 x i 2 i = 2 ∞ ∑ i=n+1 x i 2 i ≤ 1 2 n-1 .

Therefore, in order to achieve ε-approximation error, one should choose n = ⌈ log 2

1 ε ⌉ + 1. In summary, the deep neural network has O ( log 1 ε ) layers, O ( log 1 ε ) binary step units and O ( log ( 1 ε ))

rectifier linear units.

Next, a theorem on the size of the network for approximating general polynomials is given as follows.

Theorem 2. For polynomials

f (x) = ∑ p i=0 a i x i , x ∈ [0, 1] and ∑ p i=1 |a i | ≤ 1, there exists a mul- tilayer neural network f (x) with O ( p + log p ε ) layers, O ( log p ε ) binary step units and O ( p log p ε ) rectifier linear units such that |f (x) -f (x)| ≤ ε, ∀x ∈ [0, 1].

Proof. The proof is composed of three parts. We first use the deep structure shown in Figure 1 to find the n-bit binary expansion ∑ n i=0 a i x i of x. Then we construct a multilayer network to approximate polynomials g i (x) = x i , i = 1, ..., p. Finally, we analyze the approximation error.

Using the same deep structure shown in Figure 1 , we could find the binary expansion sequence {x 0 , ..., x n }. In this step, we used n binary steps units in total. Now we rewrite g m+1 (

∑ n i=0 xi 2 n ), g m+1 ( n ∑ i=0 x i 2 i ) = n ∑ j=0 [ x j • 1 2 j g m ( n ∑ i=0 x i 2 i )] = n ∑ j=0 max [ 2(x j -1) + 1 2 j g m ( n ∑ i=0 x i 2 i ) , 0 ] .

(2) Clearly, the equation (2) defines iterations between the outputs of neighbor layers. Therefore, the deep neural network shown in Figure 2 can be used to implement the iteration given by (2). Further, to implement this network, one should use O(p) layers with O(pn) rectifier linear units in total. We now define the output of the multilayer neural network as f

(x) = ∑ p i=0 a i g i ( ∑ n j=0 xj 2 j

) . For this multilayer network, the approximation error is ) rectifier linear units.

|f (x) -f (x)| = p ∑ i=0 a i g i   n ∑ j=0 x j 2 j   - p ∑ i=0 a i x i ≤ p ∑ i=0   |a i | • g i   n ∑ j=0 x j 2 j   -x i   ≤ p 2 n-1 xn xn ReLU ReLU ReLU ReLU ReLU ReLU ReLU ReLU x0 x0 x1 x1 x2 x2 . . . . . . . . . . . . . . . . . . xn xn x0 x0 x1 x1 x2 x2 1 1 g1 n X i=0 xi 2 i ! g1 n X i=0 xi 2 i ! g2 n X i=0 xi 2 i ! g2 n X i=0 xi 2 i ! g3 n X i=0 xi 2 i ! g3 n X i=0 xi 2 i ! gp 1 n X i=0 xi 2 i ! gp 1 n X i=0 xi 2 i ! gp n X i=0 xi 2 i ! gp n X i=0 xi 2 i ! ReLU ReLU

In Theorem 2, we have shown an upper bound on the size of multilayer neural network for approximating polynomials. We can easily observe that the number of neurons in network grows as p log p with respect to p, the degree of the polynomial. We note that both Andoni et al. (2014) and Barron (1993) showed the sizes of the networks grow exponentially with respect to p if only 3-layer neural networks are allowed to be used in approximating polynomials.

Besides, every function f with p + 1 continuous derivatives on a bounded set can be approximated easily with a polynomial with degree p. This is shown by the following well known result of Lagrangian interpolation. By this result, we could further generalize Theorem 2. The proof can be found in the reference (Gil et al., 2007) . Lemma 3 (Lagrangian interpolation at Chebyshev points). If a function f is defined at points z 0 , ..., z n , z i = cos((i + 1/2)π/(n + 1)), i ∈ [n], there exists a polynomial of degree not more than n such that P n (z i ) = f (z i ), i = 0, ..., n. This polynomial is given by

P n (x) = ∑ n i=0 f (z i )L i (x) where L i (x) = πn+1(x) (x-zi)π ′ n+1 (zi) and π n+1 (x) = ∏ n j=0 (x -z j ). Additionally, if f is continuous on [-1, 1] and n + 1 times differentiable in (-1, 1), then ∥R n ∥ = ∥f -P n ∥ ≤ 1 2 n (n + 1)! f (n+1) ,

where

f (n) (x) is the derivative of f of the nth order and the norm ∥f ∥ is the l ∞ norm ∥f ∥ = max x∈[-1,1] f (x).

Then the upper bound on the network size for approximating more general functions follows directly from Theorem 2 and Lemma 3.

Theorem 4. Assume that function f is continuous on [0, 1] and ⌈ log 2 ε ⌉ + 1 times differentiable in (0, 1). Let f (n) denote the derivative of f of nth order and ∥f ∥ = max x∈[0,1] f (x). If f (n) ≤ n! holds for all n ∈ [⌈ log 2 ε ⌉ + 1 ] , then there exists a deep neural network f with O ( log 1 ε ) layers, O ( log 1 ε ) binary step units, O ( ( log 1 ε ) 2 ) rectifier linear units such that f -f ≤ ε. Proof. Let N = ⌈ log 2 ε ⌉ .

From Lemma 3, it follows that there exists polynomial P N of degree N such that for any x ∈ [0, 1],

|f (x) -P N (x)| ≤ f (N +1) 2 N (N + 1)! ≤ 1 2 N .

Let x 0 , ..., x N denote the first N + 1 bits of the binary expansion of x and define

f (x) = P N ( ∑ N i=0 xi 2 N

) . In the following, we first analyze the approximation error of f and next

show the implementation of this function. Let x = ∑ N i=0 xi 2 i . The error can now be upper bounded by

|f (x) -f (x)| = |f (x) -P N (x)| ≤ |f (x) -f (x)| + |f (x) -P N (x)| ≤ f (1) • x - N ∑ i=0 x i 2 i + 1 2 N ≤ 1 2 N + 1 2 N ≤ ε

In the following, we describe the implementation of f by a multilayer neural network. Since P N is a polynomial of degree N , function f can be rewritten as Remark: Note that, to implement the architecture in Figure 2 using the definition of a feedforward neural network in Section 2, we need the g i , i ∈ [p] at the output. This can be accomplished by using O(p 2 ) additional ReLUs. Since p = O(log(1/ε)), this doesn't change the order result in Theorem 4.

f (x) = P N ( N ∑ i=0 x i 2 i ) = N ∑ n=0 c n g n ( N ∑ i=0 x i 2 i

Theorem 4 shows that any function f with enough smoothness can be approximated by a multilayer neural network containing polylog

( 1 ε )

neurons with ε error. Further, Theorem 4 can be used to show that for functions h 1 ,...,h k with enough smoothness, then linear combinations, multiplications and compositions of these functions can as well be approximated by multilayer neural networks containing polylog

( 1 ε ) neurons with ε error. Specific results are given in the following corollaries. Corollary 5 (Function addition). Suppose that all functions h 1 , ..., h k satisfy the conditions in Theorem 4, and the vector β ∈ {ω ∈ R k : ∥ω∥ 1 = 1}, then for the linear combination

f = ∑ k i=1 β i h i , there exists a deep neural network f with O ( log 1 ε ) layers, O ( log 1 ε ) binary step units, O ( ( log 1 ε ) 2 ) rectifier linear units such that |f (x) -f | ≤ ε, ∀x ∈ [0, 1].

Remark: Clearly, Corollary 5 follows directly from the fact that the linear combination f satisfies the conditions in Theorem 4 if all the functions h 1 ,...,h k satisfy those conditions. We note here that the upper bound on the network size for approximating linear combinations is independent of k, the number of component functions.

Corollary 6 (Function multiplication). Suppose that all functions h 1 ,...,h k are continuous on [0, 1] and

⌈ 4k log 2 4k + 4k + 2 log 2 2 ε ⌉ + 1 times differentiable in (0, 1). If ∥h (n) i ∥ ≤ n! holds for all i ∈ [k] and n ∈ [⌈ 4k log 2 4k + 4k + 2 log 2 2 ε ⌉ + 1 ] then for the multiplication f = ∏ k i=1 h i , there exists a multilayer neural network f with O ( k log k + log 1 ε ) layers, O ( k log k + log 1 ε ) bi- nary step units and O ( (k log k) 2 + ( log 1 ε ) 2 ) rectifier linear units such that |f (x) -f (x)| ≤ ε, ∀x ∈ [0, 1]. Corollary 7 (Function composition). Suppose that all functions h 1 , ..., h k : [0, 1] → [0, 1] satisfy the conditions in Theorem 4, then for the composition f = h 1 • h 2 • ... • h k , there exists a multilayer neural network f with O ( k log k log 1 ε + log k ( log 1 ε ) 2 ) layers, O ( k log k log 1 ε + log k ( log 1 ε ) 2 ) binary step units and O ( k 2 ( log 1 ε ) 2 + ( log 1 ε ) 4 ) rectifier lin- ear units such that |f (x) -f (x)| ≤ ε, ∀x ∈ [0, 1].

Remark: Proofs of Corollary 6 and 7 can be found in the appendix. We observe that different from the case of linear combinations, the upper bound on the network size grows as k 2 log 2 k in the case of function multiplications and grows as k 2 ( log 1 ε ) 2 in the case of function compositions where k is the number of component functions.

In this subsection, we have shown a polylog

( 1 ε )

upper bound on the network size for εapproximation of both univariate polynomials and general univariate functions with enough smoothness. Besides, we have shown that linear combinations, multiplications and compositions of univariate functions with enough smoothness can as well be approximated with ε error by a multilayer neural network of size polylog ( 1 ε ) . In the next subsection, we will show the upper bound on the network size for approximating multivariate functions.

3.2. APPROXIMATION OF MULTIVARIATE FUNCTIONS:

In this subsection, we present all results on approximating multivariate functions. We first present a theorem on the upper bound on the neural network size for approximating a product of multivariate linear functions. We next present a theorem on the upper bound on the neural network size for approximating general multivariate polynomial functions. Finally, similar to the results in the univariate case, we present the upper bound on the neural network size for approximating the linear combination, the multiplication and the composition of multivariate functions with enough smoothness. 

Theorem 8. Let W = {w ∈ R d : ∥w∥ 1 = 1}. For f (x) = ∏ p i=1 ( w T i x ) , x ∈ [0, 1] d and w i ∈ W , i = 1, ...,

(x) -f (x)| ≤ ε, ∀x ∈ [0, 1] d .

Theorem 8 shows an upper bound on the network size for ε-approximation of a product of multivariate linear functions. Furthermore, since any general multivariate polynomial can be viewed as a linear combination of products, the result on general multivariate polynomials directly follows from Theorem 8. 

N (d, p, ε) = p 2 ( p + d -1 d -1 ) log pd ε .

Remark: The proof is given in the appendix. By further analyzing the results on the network size, we obtain the following results: (a) fixing degree p, N (d,

ε) = O ( d p+1 log d ε ) as d → ∞ and (b) fixing input dimension d, N (p, ε) = O ( p d log p ε )

as p → ∞. Similar results on approximating multivariate polynomials were obtained by Andoni et al. (2014) and Barron (1993) . Barron (1993) showed that on can use a 3-layer neural network to approximate any multivariate polynomial with degree p, dimension d and network size d p /ε 2 . Andoni et al. (2014) showed that one could use the gradient descent to train a 3-layer neural network of size d 2p /ε 2 to approximate any multivariate polynomial. However, Theorem 9 shows that the deep neural network could reduce the network size

from O (1/ε) to O ( log 1 ε )

for the same ε error. Besides, for a fixed input dimension d, the size of the 3-layer neural network used by Andoni et al. (2014) and Barron (1993) grows exponentially with respect to the degree p. However, the size of the deep neural network shown in Theorem 9 grows only polynomially with respect to the degree. Therefore, the deep neural network could reduce the network size from O(exp(p)) to O(poly(p)) when the degree p becomes large.

Theorem 9 shows an upper bound on the network size for approximating multivariate polynomials. Further, by combining Theorem 4 and Corollary 7, we could obtain an upper bound on the network size for approximating more general functions. The results are shown in the following corollary. Corollary 10. Assume that all univariate functions h 1 , ..., h k : [0, 1] → [0, 1], k ≥ 1, satisfy the conditions in Theorem 4. Assume that the multivariate polynomial l(x)

: [0, 1] d → [0, 1] is of degree p. For composition f = h 1 • h 2 • ... • h k • l(x), there exists a multilayer neural network f of depth O ( p + log d + k log k log 1 ε + log k ( log 1 ε ) 2 ) and of size N (k, p, d, ε) such that | f (x)-f (x)| ≤ ε for ∀x ∈ [0, 1] d , where N (k, p, d, ε) = O ( p 2 ( p + d -1 d -1 ) log pd ε + k 2 ( log 1 ε ) 2 + ( log 1 ε ) 4 )

.

Remark: Corollary 10 shows an upper bound on network size for approximating compositions of multivariate polynomials and general univariate functions. The upper bound can be loose due to the assumption that l(x) is a general multivariate polynomials of degree p. For some specific cases, the upper bound can be much smaller. We present two specific examples in the Appendix H and I.

In this subsection, we have shown that a similar polylog

( 1 ε )

upper bound on the network size for ε-approximation of general multivariate polynomials and functions which are compositions of univariate functions and multivariate polynomials.

The results in this section can be used to find a multilayer neural network of size polylog

( 1 ε

) which provides an approximation error of at most ε. In the next section, we will present lower bounds on the network size for approximating both univariate and multivariate functions. The lower bound together with the upper bound shows a tight bound on the network size required for function approximations.

While we have presented results in both the univariate and multivariate cases for smooth functions, the results automatically extend to functions that are piecewise smooth, with a finite number of pieces. In other words, if the domain of the function is partitioned into regions, and the function is sufficiently smooth (in the sense described in the Theorems and Corollaries earlier) in each of the regions, then the results essentially remain unchanged except for an additional factor which will depend on the number of regions in the domain.

4. LOWER BOUNDS ON FUNCTION APPROXIMATIONS:

In this section, we present lower bounds on the network size in function for certain classes of functions. Next, by combining the lower bounds and the upper bounds shown in the previous section, we could analytically show the advantages of deeper neural networks over shallower ones. The theorem below is inspired by a similar result (DasGupta & Schnitger, 1993) for univariate quadratic functions, where it is stated without a proof. Here we show that the result extends to general multivariate strongly convex functions. Theorem 11. Assume function f : [0, 1] d → R is differentiable and strongly convex with parameter µ. Assume the multilayer neural network f is composed of rectifier linear units and binary step units.

If |f (x) -f (x)| ≤ ε, ∀x ∈ [0, 1] d , then the network size N ≥ log 2 ( µ 16ε

) .

Remark: The proof is in the Appendix F. Theorem 11 shows that every strongly convex function cannot be approximated with error ε by any multilayer neural network with rectifier linear units and binary step units and of size smaller than log 2 (µ/ε) -4. Theorem 11 together with Theorem 1 directly shows that to approximate quadratic function f (x) = x 2 with error ε, the network size should be of order Θ ( log 1 ε ) . Further, by combining Theorem 11 and Theorem 4, we could analytically show the benefits of deeper neural networks. The result is given in the following corollary. Corollary 12. Assume that univariate function f satisfies conditions in both Theorem 4 and Theorem 11. If a neural network fs is of depth

L s = o ( log 1 ε ) , size N s and |f (x) -fs (x)| ≤ ε, for ∀x ∈ [0, 1], then there exists a deeper neural network fd (x) of depth Θ ( log 1 ε ) , size N d = O(L 2 s log 2 N s ) such that |f (x) -fd (x)| ≤ ε, ∀x ∈ [0, 1].

Remarks: (i) The strong convexity requirement can be relaxed: the result obviously holds if the function is strongly concave and it also holds if the function consists of pieces which are strongly convex or strongly concave. (ii) Corollary 12 shows that in the approximation of the same function, the size of the deep neural network N s is only of polynomially logarithmic order of the size of the shallow neural network N d , i.e., N d = O(polylog(N s )). Similar results can be obtained for multivariate functions on the type considered in Section 3.2.

5. CONCLUSIONS:

In this paper, we have shown that an exponentially large number of neurons are needed for function approximation using shallow networks, when compared to deep networks. The results are established for a large class of smooth univariate and multivariate functions. Our results are established for the case of feedforward neural networks with ReLUs and binary step units.

APPENDIX A PROOF OF COROLLARY 5:

Proof. By Theorem 4, for each h i , i = 1, ..., k, there exists a multilayer neural network hi such that

|h i (x) -h(x)| ≤ ε for any x ∈ [0, 1]. Let f (x) = k ∑ i=1 β i hi (x).

Then the approximation error is upper bounded by

|f (x) -f (x)| = k ∑ i=1 β i h i (x) ≤ k ∑ i=1 |β i | • |h i (x) -h(x)| = ε.

Now we compute the size of the multilayer neural network f . Let

N = ⌈ log 2 ε ⌉ and ∑ N i=0 xi 2 i be the binary expansion of x. Since hi (x) has a form of hi (x) = N ∑ j=0 c ij g j ( N ∑ i=0 x i 2 i ) , where g j (x) = x j , then f should has a form of f (x) = k ∑ i=1 β i   N ∑ j=0 c ij g j ( N ∑ i=0 x i 2 i )  

and can be further rewritten as

f (x) = N ∑ j=0 [( k ∑ i=1 c ij β i ) • g j ( N ∑ i=0 x i 2 i )] ≜ N ∑ j=0 c ′ j g j ( N ∑ i=0 x i 2 i ) , where c ′ j = ∑ i c ij β i .

Therefore, f can be implemented by a multilayer neural network shown in Figure 2 and this network has at most O ( log

1 ε ) layers, O ( log 1 ε ) binary step units, O ( ( log 1 ε ) 2 )

rectifier linear units.

APPENDIX B PROOF OF COROLLARY 6:

Proof. Since f (x) = h 1 (x)h 2 (x)...h k (x), then the derivative of f of order n is

f (n) = ∑ α 1 +...+α k =n α 1 ≥0,...,α k ≥0 n! α 1 !α 2 !...α k ! h (α1) 1 h (α2) 2 ...h (α k ) k

.

By the assumption that h

(αi) i ≤ α i ! holds for i = 1, ..., k, then we have f (n) ≤ ∑ α 1 +...+α k =n α 1 ≥0,...,α k ≥0 n! α 1 !α 2 !...α k ! h (α1) 1 h (α2) 2 ...h (α k ) k ≤ ( n + k -1 k -1 ) n!.

Then from Theorem 4, it follows that there exists a polynomial of P N degree N that

∥R N ∥ = ∥f -P N ∥ ≤ f (N +1) (N + 1)!2 N ≤ 1 2 N ( N + k k -1 ) . Since ( N + k k -1 ) ≤ (N + k) N +k (k -1) k-1 (N + 1) N +1 = ( N + k k -1 ) k-1 ( 1 + k -1 N + 1 ) N +1 ≤ ( e(N + k) k -1 ) k-1

then the error has an upper bound of

∥R N ∥ ≤ (eN ) k 2 N ≤ 2 2k+k log 2 N -N .

(3)

Since we need to bound

∥R N ∥ ≤ ε 2 ,

then we need to choose N such that

N ≥ k log 2 N + 2k + log 2 2 ε .

Thus, N can be chosen such that

N ≥ 2k log 2 N and N ≥ 4k + 2 log 2 2 ε .

Further, function l(x) = x/ log 2 x is monotonically increasing on [e, ∞) and

l(4k log 2 4k) = 4k log 2 4k log 2 4k + log 2 log 2 4k ≥ 4k log 2 4k log 2 4k + log 2 4k = 2k.

Therefore, to suffice the inequality (3), one should should choose

N ≥ 4k log 2 4k + 4k + 2 log 2 2 ε . Since N = ⌈ 4k log 2 4k + 4k + 2 log 2 2 ε

⌉ by assumptions, then there exists a polynomial P N of degree N such that ∥f -

P N ∥ ≤ ε 2 . Let ∑ N i=0 xi

2 i denote the binary expansion of x and let

f (x) = P N ( N ∑ i=0 x i 2 i

) .

The approximation error is

| f (x) -f (x)| ≤ f (x) -f ( N ∑ i=0 x i 2 i ) + f ( N ∑ i=0 x i 2 i ) -P N ( N ∑ i=0 x i 2 i ) ≤ ∥f (1)∥ x - N ∑ i=0 x i 2 i + ε 2 ≤ ε

Further, function f can be implemented by a multilayer neural network shown in Figure 2 and this network has at most O(N ) layers, O(N ) binary step units and O(N 2 ) rectifier linear units.

APPENDIX C PROOF OF COROLLARY 7:

Proof. We prove this theorem by induction. Define function

F m = h 1 • ... • h m , m = 1, ..., k. Let T 1 (m) log 3 3 m ε , T 2 (m) log 3 3 m ε and T 3 (m) ( log 3 3 m ε

) 2 denote the number of layers, the number of binary step units and the number of rectifier linear units required at most for ε-approximation of F m , respectively. By Theorem 4, for m = 1, there exists a multilayer neural network F1 with at most T 1 (1) log 3 3 ε layers, T 2 (1) log 3 3 ε binary step units and T 3 (1)

( log 3 3 ε ) 2 rectifier linear units such that |F 1 (x) -F1 (x)| ≤ ε, for x ∈ [0, 1

]. Now we consider the cases for 2 ≤ m ≤ k. We assume for F m-1 , there exists a multilayer neural network Fm-1 with not more than T 1 (m -1) log 3 3 m ε layers, T 2 (m -1) log 3 3 m ε binary step units and T 3 (m -1)

( log 3 3 m ε

) 2 rectifier linear units such that

|F m-1 (x) -Fm-1 (x)| ≤ ε 3 , for x ∈ [0, 1].

Further we assume the derivative of F m-1 has an upper bound F ′ m-1 ≤ 1. Then for F m , since F m (x) can be rewritten as F m (x) = F m-1 (h m (x)), and there exists a multilayer neural network hm with at most T 1 (1) log 3 3 ε layers, T 2 (1) log 3 3 ε binary step units and T 3 (1)

( log 3 3 ε

) 2 rectifier linear units such that

|h m (x) -hm (x)| ≤ ε 3 , for x ∈ [0, 1],

and hm ≤ (1 + ε/3). Then for cascaded multilayer neural network Fm = Fm-1

• ( 1 1+ε/3 hm ) , we have ∥ F m -Fm ∥ = F m-1 (h m ) -Fm-1 ( hm 1 + ε/3 ) ≤ F m-1 (h m ) -F m-1 ( hm 1 + ε/3 ) + F m-1 ( hm 1 + ε/3 ) -Fm-1 ( hm 1 + ε/3 ) ≤ F ′ m-1 • h m - hm 1 + ε/3 + ε 3 ≤ F ′ m-1 • h m -hm + F ′ m-1 • ε/3 1 + ε/3 hm + ε 3 ≤ ε + ε 3 + ε 3 = ε

In addition, the derivative of F m can be upper bounded by

∥F ′ m ∥ ≤ F ′ m-1 • ∥h ′ m ∥ = 1.

Since the multilayer neural network Fm is constructed by cascading multilayer neural networks Fm-1 and hm , then the iterations for T 1 , T 2 and T 3 are

EQUATION

)

EQUATION

EQUATION

)

From iterations (4) and ( 5), we could have for 2

≤ m ≤ k, T 1 (m) = T 1 (m -1) + T 1 (1) 1 + log 3 (1/ε) m + log 3 (1/ε) ≤ T 1 (m -1) + T 1 (1) 1 + log 3 (1/ε) m T 2 (m) = T 2 (m -1) + T 2 (1) 1 + log 3 (1/ε) m + log 3 (1/ε) ≤ T 2 (m -1) + T 2 (1) 1 + log 3 (1/ε) m and thus T 1 (k) = O ( log k log 1 ε ) , T 2 (k) = O ( log k log 1 ε

) .

From the iteration (6), we have for

2 ≤ m ≤ k, T 3 (m) = T 3 (m -1) + T 3 (1) ( 1 + log 3 (1/ε) m + log 3 (1/ε) ) 2 ≤ T 3 (m -1) + (1 + log 3 (1/ε)) 3 m 2 ,

and thus

T 3 (k) = O ( ( log 1 ε ) 2 ) . Therefore, to approximate f = F k , we need at most O ( k log k log 1 ε + log k ( log 1 ε ) 2 ) layers, O ( k log k log 1 ε + log k ( log 1 ε ) 2 ) binary step units and O ( k 2 ( log 1 ε ) 2 + ( log 1 ε ) 4

) rectifier linear units.

APPENDIX D PROOF OF THEOREM 8:

Proof. The proof is composed of two parts. As before, we first use the deep structure shown in Figure 1 to find the binary expansion of x and next use a multilayer neural network to approximate the polynomial.

Let x = (x (1) , ..., x (d) ) and w i = (w i1 , ..., w id ). We could now use the deep structure shown in Figure 1 to find the binary expansion for each x (k) 

, k ∈ [d]. Let x(k) = ∑ n r=0 x (k)

r 2 r denote the binary expansion of x (k) , where x (k) r is the rth bit in the binary expansion of x (k) . Obviously, to decode all the n-bit binary expansions of all x (k) , k ∈ [d], we need a multilayer neural network with n layers and dn binary units in total. Besides, we let x = (x (1) , ..., x(d) ). Now we define

f (x) = f ( x) = p ∏ i=1 ( d ∑ k=1 w ik x(k)

)

.

We further define

g l ( x) = l ∏ i=1 ( d ∑ k=1 w ik x(k)

)

.

Since for l = 1, ..., p -1,

EQUATION

Obviously, equation ( 7) defines a relationship between the outputs of neighbor layers and thus can be used to implement the multilayer neural network. In this implementation, we need dn rectifier linear units in each layer and thus dnp rectifier linear units. Therefore, to implement function f (x), we need p + n layers, dn binary step units and dnp rectifier linear units in total.

In the rest of proof, we consider the approximation error. Since for k = 1, ..., d and ∀x ∈

[0, 1] d , ∂f (x) ∂x (k) = p ∑ j=1   w jk • p ∏ i=1,i̸ =j ( w T i x )   ≤ p ∑ j=1 |w jk | ≤ p, then |f (x) -f (x)| = |f (x) -f ( x)| ≤ ∥∇f ∥ 2 • ∥x -x∥ 2 ≤ pd 2 n . By choosing n = ⌈ log 2 pd ε ⌉ , we have |f (x) -f ( x)| ≤ ε.

Since we use nd binary step units to convert the input to binary form and dnp neurons in function approximation, we thus use O Now we calculate the lower bound on M (ε). We first define 4 points x 0 , x 1 = x 0 + 2 √ ρε/µ, x 2 = x 1 + 2 √ ρε/µ and x 3 = x 2 + 2 √ ρε/µ, ∀ρ > 1. We assume 0 ≤ x 0 < x 1 < x 2 < x 3 ≤ 1.

We now prove that if multilayer neural network f has no break point in [x 1 , x 2 ], then f should have a break point in [x 0 , x 1 ] and a break point in [x 2 , x 3 ]. We prove this by contradiction. We assume the neural network f has no break points in the interval [x 0 , x 3 ]. Since f is constructed by rectifier linear units and binary step units and has no break points in the interval [x 0 , x 3 ], then f should be a linear function in the interval [x 0 , x 3 ], i.e., f (x) = ax + b, x ∈ [x 0 , x 3 ] for some a and b. By assumption, since f approximates f with error at most ε everywhere in [0, 1], then |f (x 1 ) -ax 1 -b| ≤ ε and |f (x 2 ) -ax 2 -b| ≤ ε.

Then we have f (x 2 ) -f (x 1 ) -2ε 

x 2 -x 1 ≤ a ≤ f (x 2 ) -f (x 1 ) + 2ε x 2 -x 1 .

EQUATION

)

Let the deep neural network f (x) = f ( g1 (x (1) ) + ... + gd (x (d) ) 2

) .

By inequalities ( 13) and ( 14), the the approximation error is upper bounded by 

:



Figures and Tables:

Figure 1: An n-layer neural network structure for finding the binary expansion of a number in [0, 1].

for some coefficients c 0 , ..., c N andg n = x n , n ∈ [N ].Hence, the multilayer neural network shown in the Figure2can be used to implement f (x). Notice that the network uses O(N ) layers with O(N ) binary step units in total to decode x 0 ,...,x N and O(N ) layers with O(N 2 ) rectifier linear units in total to construct the polynomial P N . Substituting N = ⌈ log 2 ε ⌉ , we have proved the theorem.

Let the multi-index vector α = (α 1 , ..., α d ), the norm |α| = α 1 +...+α d , the coefficient C α = C α1...α d , the input vector x = (x (1) , ..., x (d) ) and the multinomial x α = x (1) α1 ...x (d) α d . For positive integer p and polynomial f (x) = ∑ α:|α|≤p C α x α , x ∈ [0, 1] d and ∑ α:|α|≤p |C α | ≤ 1, there exists a deep neural network f (x) of depth O ( p + log dp ε ) and size N (d, p, ε) such that |f (x) -f ( x)| ≤ ε, where

binary step units and O ( pd log pd ε ) rectifier linear units in total. In addition, since we have used n layers to convert the input to binary form and p layers in the function approximation section of the network, the whole deep structure has O ( p + log pd ε ) layers.

such that | f (x) -f (x)| ≤ ε for ∀x ∈ [0, 1] d .Proof. It follows from the Theorem 4 that there exists d multilayer neural networks g1 (x (1) ), ..., gd (x(d) ) with O ( in total such thatx (1) 2 + ... + x (d) 2 2 -g1 (x (1) ) + ... + gd (x (d)Theorem 4, it follows that there exists a deep neural network f with O ( Let x = (g 1 (x (1) ) + ... + gd (x (d) ))/2d, then we have e -( ∑ d i=1 gi(x

OF COROLLARY 14Corollary 14 (Ridge function). If f (x) = g(a T x) for some direction a ∈ R d with ∥a∥ 1 = 1, a ⪰ 0, x ∈ [0, 1] d and some univariate function g satisfying conditions in Theorem 4, then there exists amultilayer neural network f with O ( such that |f (x) -f (x)| ≤ ε for ∀x ∈ [0, 1] d . Proof. Let t = a T x. Since ∥a∥ 1 = 1, a ⪰ 0 and x ∈ [0, 1] d , then 0 ≤ t ≤ 1.Then from Theorem 4, it follows that then there exists a multilayer neural network g with O ( such that|g(t) -g(t)| ≤ ε, ∀t ∈ [0, 1].If we define the deep network f as f (x) = g(t), then the approximation error of f is|f (x) -f (x)| = |g(t) -g(t)| ≤ ε.Now we have proved the corollary.

Peer review (iclr2017):
This paper shows: 1. Easy, constructive proofs to derive e-error upper-bounds on neural networks with O(log 1/e) layers and O(log 1/e) ReLU units. 2. Extensions of the previous results to more general function classes, such as smooth or vector-valued functions. 3. Lower bounds on the neural network size, as a function of its number of layers. The lower bound reveals the need of exponentially many more units to approximate functions using shallow architectures. The paper is well written and easy to follow. The technical content, including the proofs in the Appendix, look correct. Although the proof techniques are simple (and are sometimes modifications of arguments by Gil, Telgarsky, or Dasgupta), they are brought together in a coherent manner to produce sharp results. Therefore, I am leaning toward acceptance.