Title: UNDERSTANDING DEEP NEURAL NETWORKS WITH RECTIFIED LINEAR UNITS

Abstract: In this paper we investigate the family of functions representable by deep neural networks (DNN) with rectified linear units (ReLU). We give an algorithm to train a ReLU DNN with one hidden layer to global optimality with runtime polynomial in the data size albeit exponential in the input dimension. Further, we improve on the known lower bounds on size (from exponential to super exponential) for approximating a ReLU deep net function by a shallower ReLU net. Our gap theorems hold for smoothly parametrized families of "hard" functions, contrary to countable, discrete families known in the literature. An example consequence of our gap theorems is the following: for every natural number k there exists a function representable by a ReLU DNN with k 2 hidden layers and total size k 3 , such that any ReLU DNN with at most k hidden layers will require at least 1 2 k k+1 -1 total nodes. Finally, for the family of R n → R DNNs with ReLU activations, we show a new lowerbound on the number of affine pieces, which is larger than previous constructions in certain regimes of the network architecture and most distinctively our lowerbound is demonstrated by an explicit construction of a smoothly parameterized family of functions attaining this scaling. Our construction utilizes the theory of zonotopes from polyhedral theory.

1. INTRODUCTION:

Deep neural networks (DNNs) provide an excellent family of hypotheses for machine learning tasks such as classification. Neural networks with a single hidden layer of finite size can represent any continuous function on a compact subset of R n arbitrary well. The universal approximation result was first given by Cybenko in 1989 for sigmoidal activation function (Cybenko, 1989) , and later generalized by Hornik to an arbitrary bounded and nonconstant activation function Hornik (1991) . Furthermore, neural networks have finite VC dimension (depending polynomially on the number of edges in the network), and therefore, are PAC (probably approximately correct) learnable using a sample of size that is polynomial in the size of the networks Anthony & Bartlett (1999) . However, neural networks based methods were shown to be computationally hard to learn (Anthony & Bartlett, 1999) and had mixed empirical success. Consequently, DNNs fell out of favor by late 90s.

Recently, there has been a resurgence of DNNs with the advent of deep learning LeCun et al. (2015) . Deep learning, loosely speaking, refers to a suite of computational techniques that have been developed recently for training DNNs. It started with the work of Hinton et al. (2006) , which gave empirical evidence that if DNNs are initialized properly (for instance, using unsupervised pre-training), then we can find good solutions in a reasonable amount of runtime. This work was soon followed by a series of early successes of deep learning at significantly improving the state-of-the-art in speech recognition Hinton et al. (2012) . Since then, deep learning has received immense attention from the machine learning community with several state-of-the-art AI systems in speech recognition, image classification, and natural language processing based on deep neural nets Hinton et al. (2012) ; Dahl et al. (2013) ; Krizhevsky et al. (2012) ; Le (2013) ; Sutskever et al. (2014) . While there is less of evidence now that pre-training actually helps, several other solutions have since been put forth to address the issue of efficiently training DNNs. These include heuristics such as dropouts Srivastava et al. (2014) , but also considering alternate deep architectures such as convolutional neural networks Sermanet et al. (2014) , deep belief networks Hinton et al. (2006) , and deep Boltzmann machines Salakhutdinov & Hinton (2009) . In addition, deep architectures based on new non-saturating activation functions have been suggested to be more effectively trainable -the most successful and widely popular of these is the rectified linear unit (ReLU) activation, i.e., σ(x) = max{0, x}, which is the focus of study in this paper.

In this paper, we formally study deep neural networks with rectified linear units; we refer to these deep architectures as ReLU DNNs. Our work is inspired by these recent attempts to understand the reason behind the successes of deep learning, both in terms of the structure of the functions represented by DNNs, Telgarsky (2015; 2016) ; Kane & Williams (2015) ; Shamir (2016) , as well as efforts which have tried to understand the non-convex nature of the training problem of DNNs better Kawaguchi (2016) ; Haeffele & Vidal (2015) . Our investigation of the function space represented by ReLU DNNs also takes inspiration from the classical theory of circuit complexity; we refer the reader to Arora & Barak (2009) ; Shpilka & Yehudayoff (2010) ; Jukna (2012) ; Saptharishi (2014) ; Allender (1998) for various surveys of this deep and fascinating field. In particular, our gap results are inspired by results like the ones by Hastad Hastad (1986) , Razborov Razborov (1987) and Smolensky Smolensky (1987) which show a strict separation of complexity classes. We make progress towards similar statements with deep neural nets with ReLU activation.

1.1. NOTATION AND DEFINITIONS:

We extend the ReLU activation function to vectors x ∈ R n through entry-wise operation: σ(x) = (max{0, x 1 }, max{0, x 2 }, . . . , max{0, x n }). For any (m, n) ∈ N, let A n m and L n m denote the class of affine and linear transformations from R m → R n , respectively. Definition 1. [ReLU DNNs, depth, width, size] For any number of hidden layers k ∈ N, input and output dimensions w 0 , w k+1 ∈ N, a R w0 → R w k+1 ReLU DNN is given by specifying a sequence of k natural numbers w 1 , w 2 , . . . , w k representing widths of the hidden layers, a set of k affine transformations T i : R wi-1 → R wi for i = 1, . . . , k and a linear transformation T k+1 : R w k → R w k+1 corresponding to weights of the hidden layers. Such a ReLU DNN is called a (k + 1)-layer ReLU DNN, and is said to have k hidden layers. The function f : R n1 → R n2 computed or represented by this ReLU DNN is 

f = T k+1 • σ • T k • • • • • T 2 • σ • T 1 , (1.1)

:= {T k+1 • σ • T k • • • • • σ • T 1 : T i ∈ A wi wi-1 ∀i ∈ {1, . . . , k}, T k+1 ∈ L w k+1 w k } (1.

2) Definition 3. [Piecewise linear functions] We say a function f : R n → R is continuous piecewise linear (PWL) if there exists a finite set of polyhedra whose union is R n , and f is affine linear over each polyhedron (note that the definition automatically implies continuity of the function because the affine regions are closed and cover R n , and affine functions are continuous). The number of pieces of f is the number of maximal connected subsets of R n over which f is affine linear (which is finite). Many of our important statements will be phrased in terms of the following simplex. Definition 4. Let M > 0 be any positive real number and p ≥ 1 be any natural number. Define the following set:

∆ p M := {x ∈ R p : 0 < x 1 < x 2 < . . . < x p < M }.

2. EXACT CHARACTERIZATION OF FUNCTION CLASS REPRESENTED BY RELU DNNS:

One of the main advantages of DNNs is that they can represent a large family of functions with a relatively small number of parameters. In this section, we give an exact characterization of the is implementable by a two layer ReLU network and use this construction in an inductive manner to show that maximum of n + 1 numbers can be computed using a ReLU DNN with depth at most log 2 (n + 1) . While Theorem 2.1 gives an upper bound on the depth of the networks needed to represent all continuous piecewise linear functions on R n , it does not give any tight bounds on the size of the networks that are needed to represent a given piecewise linear function. For n = 1, we give tight bounds on size as follows:

Theorem 2.2. Given any piecewise linear function R → R with p pieces there exists a 2-layer DNN with at most p nodes that can represent f . Moreover, any 2-layer DNN that represents f has size at least p -1.

Finally, the main result of this section follows from Theorem 2.1, and well-known facts that the piecewise linear functions are dense in the family of compactly supported continuous functions and the family of compactly supported continuous functions are dense in L q (R n ) (Royden & Fitzpatrick, 2010) ). Recall that L q (R n ) is the space of Lebesgue integrable functions f such that |f | q dµ < ∞, where µ is the Lebesgue measure on R n (see Royden Royden & Fitzpatrick (2010) ).

Theorem 2.3. Every function in L q (R n ), (1 ≤ q ≤ ∞) can be arbitrarily well-approximated in the L q norm (which for a function f is given by ||f || q = ( |f | q ) 1/q ) by a ReLU DNN function with at most log 2 (n + 1) hidden layers. Moreover, for n = 1, any such L q function can be arbitrarily well-approximated by a 2-layer DNN, with tight bounds on the size of such a DNN in terms of the approximation.

Proofs of Theorems 2.2 and 2.3 are provided in Appendix A. We would like to remark that a weaker version of Theorem 2.1 was observed in (Goodfellow et al., 2013, Proposition 4 .1) (with no bound on the depth), along with a universal approximation theorem (Goodfellow et al., 2013, Theorem 4. 3) similar to Theorem 2.3. The authors of Goodfellow et al. (2013) also used a previous result of Wang (Wang, 2004) for obtaining their result. In a subsequent work Boris Hanin (Hanin, 2017) has, among other things, found a width and depth upper bound for ReLU net representation of positive PWL functions on [0, 1] n . The width upperbound is n+3 for general positive PWL functions and n + 1 for convex positive PWL functions. For convex positive PWL functions his depth upper bound is sharp if we disallow dead ReLUs.

3. BENEFITS OF DEPTH:

Success of deep learning has been largely attributed to the depth of the networks, i.e. number of successive affine transformations followed by nonlinearities, which is shown to be extracting hierarchical features from the data. In contrast, traditional machine learning frameworks including support vector machines, generalized linear models, and kernel machines can be seen as instances of shallow networks, where a linear transformation acts on a single layer of nonlinear feature extraction. In this section, we explore the importance of depth in ReLU DNNs. In particular, in Section 3.1, we provide a smoothly parametrized family of R → R "hard" functions representable by ReLU DNNs, which requires exponentially larger size for a shallower network. Furthermore, in Section 3.2, we construct a continuum of R n → R "hard" functions representable by ReLU DNNs, which to the best of our knowledge is the first explicit construction of ReLU DNN functions whose number of affine pieces grows exponentially with input dimension. The proofs of the theorems in this section are provided in Appendix B.

3.1. CIRCUIT LOWER BOUNDS FOR R → R RELU DNNS:

In this section, we are only concerned about R → R ReLU DNNs, i.e. both input and output dimensions are equal to one. The following theorem shows the depth-size trade-off in this setting. Theorem 3.1. For every pair of natural numbers k ≥ 1, w ≥ 2, there exists a family of hard functions representable by a R → R (k + 1)-layer ReLU DNN of width w such that if it is also representable by a (k + 1)-layer ReLU DNN for any k ≤ k, then this

(k + 1)-layer ReLU DNN has size at least 1 2 k w k k -1.

In fact our family of hard functions described above has a very intricate structure as stated below. Theorem 3.2. For every k ≥ 1, w ≥ 2, every member of the family of hard functions in Theorem 3.1 has w k pieces and this family can be parametrized by

EQUATION

i.e., for every point in the set above, there exists a distinct function with the stated properties.

The following is an immediate corollary of Theorem 3.1 by choosing the parameters carefully. Corollary 3.3. For every k ∈ N and > 0, there is a family of functions defined on the real line such that every function f from this family can be represented by a (k 1+ ) + 1-layer DNN with size k 2+ and if f is represented by a k +1-layer DNN, then this DNN must have size at least 1 2 k •k k -1. Moreover, this family can be parametrized as,

∪ M >0 ∆ k 2+ -1 M .

A particularly illuminative special case is obtained by setting = 1 in Corollary 3.3: Corollary 3.4. For every natural number k ∈ N, there is a family of functions parameterized by the set ∪ M >0 ∆ k 3 -1 M such that any f from this family can be represented by a k 2 + 1-layer DNN with k 3 nodes, and every k + 1-layer DNN that represents f needs at least 1 2 k k+1 -1 nodes.

We can also get hardness of approximation versions of Theorem 3.1 and Corollaries 3.3 and 3.4, with the same gaps (upto constant terms), using the following theorem. Theorem 3.5. For every k ≥ 1, w ≥ 2, there exists a function f k,w that can be represented by a (k + 1)-layer ReLU DNN with w nodes in each layer, such that for all δ > 0 and k ≤ k the following holds:

inf g∈G k ,δ 1 x=0 |f k,w (x) -g(x)|dx > δ,

where G k ,δ is the family of functions representable by ReLU DNNs with depth at most k + 1, and

size at most k w k/k (1-4δ) 1/k 2 1+1/k .

The depth-size trade-off results in Theorems 3.1, and 3.5 extend and improve Telgarsky's theorems from (Telgarsky, 2015; 2016) in the following three ways:

(i) If we use our Theorem 3.5 to the pair of neural nets considered by Telgarsky in Theorem 1.1 in Telgarsky ( 2016) which are at depths k 3 (of size also scaling as k 3 ) and k then for this purpose of approximation in the 1 -norm we would get a size lower bound for the shallower net which scales as Ω(2 k 2 ) which is exponentially (in depth) larger than the lower bound of Ω(2 k ) that Telgarsky can get for this scenario.

(ii) Telgarsky's family of hard functions is parameterized by a single natural number k. In contrast, we show that for every pair of natural numbers w and k, and a point from the set in equation 3.1, there exists a "hard" function which to be represented by a depth k network would need a size of at least w (iii) A characteristic feature of the "hard" functions in Boolean circuit complexity is that they are usually a countable family of functions and not a "smooth" family of hard functions.

In fact, in the last section of Telgarsky ( 2015), Telgarsky states this as a "weakness" of the state-of-the-art results on "hard" functions for both Boolean circuit complexity and neural nets research. In contrast, we provide a smoothly parameterized family of "hard" functions in Section 3.1 (parametrized by the set in equation 3.1). Such a continuum of hard functions wasn't demonstrated before this work.

We point out that Telgarsky's results in (Telgarsky, 2016) apply to deep neural nets with a host of different activation functions, whereas, our results are specifically for neural nets with rectified linear units. In this sense, Telgarsky's results from (Telgarsky, 2016) are more general than our results in this paper, but with weaker gap guarantees. Eldan-Shamir (Shamir, 2016; Eldan & Shamir, 2016) show that there exists an R n → R function that can be represented by a 3-layer DNN, that takes exponential in n number of nodes to be approximated to within some constant by a 2-layer DNN.

While their results are not immediately comparable with Telgarsky's or our results, it is an interesting open question to extend their results to a constant depth hierarchy statement analogous to the recent result of Rossman et al (Rossman et al., 2015) . We also note that in last few years, there has been much effort in the community to show size lowerbounds )and comp H (n, k, s) = O(w k ), respectively. At the end of this section we would explain the precise sense in which we improve on these numbers. An analysis of this complexity measure is done using integer programming techniques in (Serra et al., 2017) .

Definition 6. Let b 1 , . . . , b m ∈ R n . The zonotope formed by b 1 , . . . , b m ∈ R n is defined as Z(b 1 , . . . , b m ) := {λ 1 b 1 + . . . + λ m b m : -1 ≤ λ i ≤ 1, i = 1, . . . , m}. (a) H 1 2 , 1 2 • N 1 (b) H 1 2 , 1 2 • γ Z(b 1 ,b 2 ,b 3 ,b 4 ) (c) H 1 2 , 1 2 , 1 2 • γ Z(b 1 ,b 2 ,b 3 ,b 4 )

Figure 1 : We fix the a vectors for a two hidden layer R → R hard function as

a 1 = a 2 = ( 1 2 ) ∈ ∆ 1 1 Left: A specific hard function induced by 1 norm: ZONOTOPE 2 2,2,2 [a 1 , a 2 , b 1 , b 2

] where b 1 = (0, 1) and b 2 = (1, 0). Note that in this case the function can be seen as a composition of H a 1 ,a 2 with 1 -norm N 1 (x) := x 1 = γ Z((0,1),(1,0)) . Middle: A typical hard function

ZONOTOPE 2 2,2,4 [a 1 , a 2 , c 1 , c 2 , c 3 , c 4 ] with generators c 1 = ( 1 4 , 1 2 ), c 2 = (-1 2 , 0), c 3 = (0, -1 4 ) and c 4 = (-1 4 , -1 4

). Note how increasing the number of zonotope generators makes the function more complex. Right: A harder function from ZONOTOPE 2 3,2,4 family with the same set of generators c 1 , c 2 , c 3 , c 4 but one more hidden layer (k = 3). Note how increasing the depth make the function more complex. (For illustrative purposes we plot only the part of the function which lies above zero.)

The set of vertices of Z(b 1 , . . . , b m ) will be denoted by vert

(Z(b 1 , . . . , b m )). The support func- tion γ Z(b 1 ,...,b m ) : R n → R associated with the zonotope Z(b 1 , . . . , b m ) is defined as γ Z(b 1 ,...,b m ) (r) = max x∈Z(b 1 ,...,b m ) r, x .

The following results are well-known in the theory of zonotopes (Ziegler, 1995) . Theorem 3.6. The following are all true.

1. | vert(Z(b 1 , . . . , b m ))| ≤ n-1 i=0 m-1 i

. The set of (b 1 , . . . , b m ) ∈ R n × . . . × R n such that this does not hold at equality is a 0 measure set. 

, . . . , b m ) ∈ R n × . . . × R n such that | vert(Z(b 1 , . . . , b m ))| = n-1 i=0 m-1 i

. S(n, m) is the so-called "extremal zonotope set", which is a subset of R nm , whose complement has zero Lebesgue measure in R nm . Lemma 3.7. Given any b 1 , . . . , b m ∈ R n , there exists a 2-layer ReLU DNN with size 2m which represents the function γ Z(b 1 ,...,b m ) (r).

Definition 8. For p ∈ N and a ∈ ∆ p M , we define a function h a : R → R which is piecewise linear over the segments (-∞, 0], [0, a 1 ], [a 1 , a 2 ], . . . , [a p , M ], [M, +∞) defined as follows: h a (x) = 0 for all x ≤ 0, h a (a i ) = M (i mod 2), and h a (M ) = Mh a (a p ) and for x ≥ M , h a (x) is a linear continuation of the piece over the interval [a p , M ]. Note that the function has p + 2 pieces, with the leftmost piece having slope 0. Furthermore, for a 1 , . . . , a k ∈ ∆ p M , we denote the composition of the functions h a 1 , h a 2 , . . . , h a k by

H a 1 ,...,a k := h a k • h a k-1 • . . . • h a 1 .

Proposition 3.8. Given any tuple (b 1 , . . . , b m ) ∈ S(n, m) and any point

(a 1 , . . . , a k ) ∈ M >0 (∆ w-1 M × ∆ w-1 M × . . . × ∆ w-1 M ) k times , the function ZONOTOPE n k,w,m [a 1 , . . . , a k , b 1 , . . . , b m ] := H a 1 ,...,a k • γ Z(b 1 ,...,b m

) has (m -1) n-1 w k pieces and it can be represented by a k + 2 layer ReLU DNN with size 2m + wk.

Finally, we are ready to state the main result of this section. Theorem 3.9. For every tuple of natural numbers n, k, m ≥ 1 and w ≥ 2, there exists a family of R n → R functions, which we call ZONOTOPE n k,w,m with the following properties:

(i) Every f ∈ ZONOTOPE n k,w,m is representable by a ReLU DNN of depth k + 2 and size 2m + wk, and has

n-1 i=0 m-1 i w k pieces. (ii) Consider any f ∈ ZONOTOPE n k,w,m .

If f is represented by a (k + 1)layer DNN for any k ≤ k, then this (k + 1)-layer DNN has size at least

max 1 2 (k w k k n ) • (m -1) (1-1 n ) 1 k -1 , w k k n 1/k k . (iii) The family ZONOTOPE n k,w,m is in one-to-one correspondence with S(n, m) × M >0 (∆ w-1 M × ∆ w-1 M × . . . × ∆ w-1 M ) k times

.

Comparison to the results in (Montufar et al., 2014) Firstly we note that the construction in (Montufar et al., 2014) requires all the hidden layers to have width at least as big as the input dimensionality n. In contrast, we do not impose such restrictions and the network size in our construction is independent of the input dimensionality. Thus our result probes networks with bottleneck architectures whose complexity cant be seen from their result.

Secondly, in terms of our complexity measure, there seem to be regimes where our bound does better. One such regime, for example, is when n ≤ w < 2n and k ∈ Ω( n log(n) ), by setting in our construction m < n.

Thirdly, it is not clear to us whether the construction in (Montufar et al., 2014) gives a smoothly parameterized family of functions other than by introducing small perturbations of the construction in their paper. In contrast, we have a smoothly parameterized family which is in one-to-one correspondence with a well-understood manifold like the higher-dimensional torus.

4 TRAINING 2-LAYER R n → R RELU DNNS TO GLOBAL OPTIMALITY In this section we consider the following empirical risk minimization problem. Given D data points (x i , y i ) ∈ R n × R, i = 1, . . . , D, find the function f represented by 2-layer R n → R ReLU DNNs of width w, that minimizes the following optimization problem

min f ∈F {n,w,1} 1 D D i=1 (f (x i ), y i ) ≡ min T1∈A w n , T2∈L 1 w 1 D D i=1 T 2 (σ(T 1 (x i ))), y i (4.1)

where : R × R → R is a convex loss function (common loss functions are the squared loss, (y, y ) = (yy ) 2 , and the hinge loss function given by (y, y ) = max{0, 1yy }). Our main result of this section gives an algorithm to solve the above empirical risk minimization problem to global optimality. Proof Sketch: A full proof of Theorem 4.1 is included in Appendix C. Here we provide a sketch of the proof. When the empirical risk minimization problem is viewed as an optimization problem in the space of weights of the ReLU DNN, it is a nonconvex, quadratic problem. However, one can instead search over the space of functions representable by 2-layer DNNs by writing them in the form similar to (2.1). This breaks the problem into two parts: a combinatorial search and then a convex problem that is essentially linear regression with linear inequality constraints. This enables us to guarantee global optimality.

Algorithm 1 Empirical Risk Minimization:



1: function ERM(D):

Where

D = {(xi, yi)} D i=1 ⊂ R n × R 2: S = {+1, -1} w

All possible instantiations of top layer weights 3:

P i = {(P i + , P i -)}, i = 1, . . . , w

All possible partitions of data into two parts 4:

P = P 1 × P 2 × • • • × P w 5: count = 1 Counter 6:

for s ∈ S do 7:

for {(P i + , P i -)} w i=1 ∈ P do

8: loss(count) =              minimize: ã, b D j=1 i:j∈P i + (si(ã i • xj + bi), yj) subject to: ãi • xj + bi ≤ 0 ∀j ∈ P i - ãi • xj + bi ≥ 0 ∀j ∈ P i + 9: count + + 10:

end for 11:

OPT = argmin loss(count) 12:

end for 13: return {ã}, { b}, s corresponding to OPT's iterate 14: end function Let T 1 (x) = Ax + b and T 2 (y) = a • y for A ∈ R w×n and b, a ∈ R w . If we denote the i-th row of the matrix A by a i , and write b i , a i to denote the i-th coordinates of the vectors b, a respectively, due to homogeneity of ReLU gates, the network output can be represented as

f (x) = w i=1 a i max{0, a i • x + b i } = w i=1 s i max{0, ãi • x + bi }.

where ãi ∈ R n , bi ∈ R and s i ∈ {-1, +1} for all i = 1, . . . , w. For any hidden node i ∈ {1 . . . , w}, the pair (ã i , bi ) induces a partition P i := (P i + , P i -) on the dataset, given by P i -= {j : ãi • x j + bi ≤ 0} and P i + = {1, . . . , D}\P i -. Algorithm 1 proceeds by generating all combinations of the partitions P i as well as the top layer weights s ∈ {+1, -1} w , and minimizing the loss D j=1 i:j∈P i + (s i (ã i • x j + bi ), y j ) subject to the constraints ãi • x j + bi ≤ 0 ∀j ∈ P i -and ãi • x j + bi ≥ 0 ∀j ∈ P i + which are imposed for all i = 1, . . . , w, which is a convex program. Algorithm 1 implements the empirical risk minimization (ERM) rule for training ReLU DNN with one hidden layer. To the best of our knowledge there is no other known algorithm that solves the ERM problem to global optimality. We note that due to known hardness results exponential dependence on the input dimension is unavoidable Blum & Rivest (1992); Shalev-Shwartz & Ben-David (2014); Algorithm 1 runs in time polynomial in the number of data points. To the best of our knowledge there is no hardness result known which rules out empirical risk minimization of deep nets in time polynomial in circuit size or data size. Thus our training result is a step towards resolving this gap in the complexity literature.

A related result for improperly learning ReLUs has been recently obtained by Goel et al (Goel et al., 2016) . In contrast, our algorithm returns a ReLU DNN from the class being learned. Another difference is that their result considers the notion of reliable learning as opposed to the empirical risk minimization objective considered in (4.1).

5. DISCUSSION:

The running time of the algorithm that we give in this work to find the exact global minima of a two layer ReLU-DNN is exponential in the input dimension n and the number of hidden nodes w. The exponential dependence on n can not be removed unless P = N P ; see Shalev-Shwartz & Ben-David (2014); Blum & Rivest (1992) ; DasGupta et al. (1995) . However, we are not aware of any complexity results which would rule out the possibility of an algorithm which trains to global optimality in time that is polynomial in the data size and/or the number of hidden nodes, assuming that the input dimension is a fixed constant. Resolving this dependence on network size would be another step towards clarifying the theoretical complexity of training ReLU DNNs and is a good open question for future research, in our opinion. Perhaps an even better breakthrough would be to get optimal training algorithms for DNNs with two or more hidden layers and this seems like a substantially harder nut to crack. It would also be a significant breakthrough to get gap results between consecutive constant depths or between logarithmic and constant depths.

Ilya Sutskever, Oriol Vinyals, and Quoc V. Le. Sequence to sequence learning with neural networks.

In 

A EXPRESSING PIECEWISE LINEAR FUNCTIONS USING RELU DNNS:

Proof of Theorem 2.2. Any continuous piecewise linear function R → R which has m pieces can be specified by three pieces of information, (1) s L the slope of the left most piece, (2) the coordinates of the non-differentiable points specified by a (m -1)-tuple {(a i , b i )} m-1 i=1 (indexed from left to right) and (3) s R the slope of the rightmost piece. A tuple (s L , s R , (a 1 , b 1 ), . . . , (a m-1 , b m-1 ) uniquely specifies a m piecewise linear function from R → R and vice versa. Given such a tuple, we construct a 2-layer DNN which computes the same piecewise linear function.

One notes that for any a, r ∈ R, the function

f (x) = 0 x ≤ a r(x -a) x > a (A.1)

is equal to sgn(r) max{|r|(xa), 0}, which can be implemented by a 2-layer ReLU DNN with size 1. Similarly, any function of the form,

g(x) = t(x -a) x ≤ a 0 x > a (A.2)

is equal tosgn(t) max{-|t|(xa), 0}, which can be implemented by a 2-layer ReLU DNN with size 1. The parameters r, t will be called the slopes of the function, and a will be called the breakpoint of the function.If we can write the given piecewise linear function as a sum of m functions of the form (A.1) and (A.2), then by Lemma D.2 we would be done. It turns out that such a decomposition of any p piece PWL function h : R → R as a sum of p flaps can always be arranged where the breakpoints of the p flaps all are all contained in the p -1 breakpoints of h. First, observe that adding a constant to a function does not change the complexity of the ReLU DNN expressing it, since this corresponds to a bias on the output node. Thus, we will assume that the value of h at the last break point a m-1 is b m-1 = 0. We now use a single function f of the form (A.1) with slope r and breakpoint a = a m-1 , and m -1 functions g 1 , . . . , g m-1 of the form (A.2) with slopes t 1 , . . . , t m-1 and breakpoints a 1 , . . . , a m-1 , respectively. Thus, we wish to express h = f + g 1 + . . . + g m-1 . Such a decomposition of h would be valid if we can find values for r, t 1 , . . . , t m-1 such that (1) the slope of the above sum is = s L for x < a 1 , (2) the slope of the above sum is = s R for x > a m-1 , and (3)

for each i ∈ {1, 2, 3, .., m -1} we have b i = f (a i ) + g 1 (a i ) + . . . + g m-1 (a i ).

The above corresponds to asking for the existence of a solution to the following set of simultaneous linear equations in r, t 1 , . . . , t m-1 :

s R = r, s L = t 1 + t 2 + . . . + t m-1 , b i = m-1 j=i+1 t j (a j-1 -a j ) for all i = 1, . . . , m -2

It is easy to verify that the above set of simultaneous linear equations has a unique solution. Indeed, r must equal s R , and then one can solve for t 1 , . . . , t m-1 starting from the last equation b m-2 = t m-1 (a m-2a m-1 ) and then back substitute to compute t m-2 , t m-3 , . . . , t 1 . The lower bound of p -1 on the size for any 2-layer ReLU DNN that expresses a p piece function follows from Lemma D.6.

One can do better in terms of size when the rightmost piece of the given function is flat, i.e., s R = 0.

In this case r = 0, which means that f = 0; thus, the decomposition of h above is of size p -1.

A similar construction can be done when s L = 0. This gives the following statement which will be useful for constructing our forthcoming hard functions.

Corollary A.1. If the rightmost or leftmost piece of a R → R piecewise linear function has 0 slope, then we can compute such a p piece function using a 2-layer DNN with size p -1.

Proof of theorem 2.3. Since any piecewise linear function R n → R is representable by a ReLU DNN by Corollary 2.1, the proof simply follows from the fact that the family of continuous piecewise linear functions is dense in any

L p (R n ) space, for 1 ≤ p ≤ ∞. B BENEFITS OF DEPTH B.1 CONSTRUCTING A CONTINUUM OF HARD FUNCTIONS FOR R → R RELU DNNS AT EVERY DEPTH AND EVERY WIDTH Lemma B.1. For any M > 0, p ∈ N, k ∈ N and a 1 , . . . , a k ∈ ∆ p M , if we compose the functions h a 1 , h a 2 , . . . , h a k the resulting function is a piecewise linear function with at most (p + 1) k + 2 pieces, i.e., H a 1 ,...,a k := h a k • h a k-1 • . . . • h a 1

is piecewise linear with at most (p + 1) k + 2 pieces, with (p + 1) k of these pieces in the range [0, M ] (see Figure 2 ). Moreover, in each piece in the range [0, M ], the function is affine with minimum value 0 and maximum value M .

Proof. Simple induction on k.

Proof of Theorem 3.2. Given k ≥ 1 and w ≥ 2, choose any point

(a 1 , . . . , a k ) ∈ M >0 (∆ w-1 M × ∆ w-1 M × . . . × ∆ w-1 M ) k times

.

By Definition 8, each h a i , i = 1, . . . , k is a piecewise linear function with w + 1 pieces and the leftmost piece having slope 0. Thus, by Corollary A.1, each h a i , i = 1, . . . , k can be represented by a 2-layer ReLU DNN with size w. Using Lemma D.1, H a 1 ,...,a k can be represented by a k + 1 layer DNN with size wk; in fact, each hidden layer has exactly w nodes.

Proof of Theorem 3.1. Follows from Theorem 3.2 and Lemma D.6.

Proof of Theorem 3.5. Given k ≥ 1 and w ≥ 2 define q := w k and s

q := h a • h a • . . . • h a k times where a = ( 1 w , 2 w , . . . , w-1 w ) ∈ ∆ q-1 1 .

Thus, s q is representable by a ReLU DNN of width w +1 and depth k + 1 by Lemma D.1. In what follows, we want to give a lower bound on the 1 distance of s q from any continuous p-piecewise linear comparator g p : R → R. The function s q contains q 2 triangles of width 2 q and unit height. A p-piecewise linear function has p -1 breakpoints in the interval [0, 1]. So that in at least 

h a 1 with a 1 ∈ ∆ 2 1 with 3 pieces in the range [0, 1]. Middle: h a 2 with a 2 ∈ ∆ 1 1 with 2 pieces in the range [0, 1]. Bottom: H a 1 ,a 2 = h a 2 • h a 1 with 2 • 3 = 6 pieces in the range [0, 1].

The dotted line in the bottom panel corresponds to the function in the top panel. It shows that for every piece of the dotted graph, there is a full copy of the graph in the middle panel. inside any triangle of s q , any affine function will incur an 1 error of at least 1 2w k .

2i+2 w k x= 2i w k |s q (x) -g p (x)|dx = 2 w k x=0 s q (x) -(y 1 + (x -0) • y 2 -y 1 2 w k -0 ) dx = 1 w k x=0 xw k -y 1 - w k x 2 (y 2 -y 1 ) dx + 2 w k x= 1 w k 2 -xw k -y 1 - w k x 2 (y 2 -y 1 ) dx = 1 w k 1 z=0 z -y 1 - z 2 (y 2 -y 1 ) dz + 1 w k 2 z=1 2 -z -y 1 - z 2 (y 2 -y 1 ) dz = 1 w k -3 + y 1 + 2y 2 1 2 + y 1 -y 2 + y 2 + 2(-2 + y 1 ) 2 2 -y 1 + y 2

The above integral attains its minimum of 1 2w k at y 1 = y 2 = 1 2 . Putting together,

s w k -g p 1 ≥ w k 2 -(p -1) • 1 2w k ≥ w k -1 -2(p -1) 4w k = 1 4 - 2p -1 4w k

Thus, for any δ > 0,

p ≤ w k -4w k δ + 1 2 =⇒ 2p -1 ≤ ( 1 4 -δ)4w k =⇒ 1 4 - 2p -1 4w k ≥ δ =⇒ s w k -g p 1 ≥ δ.

The result now follows from Lemma D.6. Proof of Theorem 3.9. Follows from Proposition 3.8.

C EXACT EMPIRICAL RISK MINIMIZATION:

Proof of Theorem 4.1. Let : R → R be any convex loss function, and let (x 1 , y 1 ), . . . , (x D , y D ) ∈ R n × R be the given D data points. As stated in (4.1), the problem requires us to find an affine transformation T 1 : R n → R w and a linear transformation T 2 : R w → R, so as to minimize the empirical loss as stated in (4.1). Note that T 1 is given by a matrix A ∈ R w×n and a vector b ∈ R w so that T (x) = Ax + b for all x ∈ R n . Similarly, T 2 can be represented by a vector a ∈ R w such that T 2 (y) = a • y for all y ∈ R w . If we denote the i-th row of the matrix A by a i , and write b i , a i to denote the i-th coordinates of the vectors b, a respectively, we can write the function represented by this network as

f (x) = w i=1 a i max{0, a i • x + b i } = w i=1 sgn(a i ) max{0, (|a i |a i ) • x + |a i |b i }.

In other words, the family of functions over which we are searching is of the form

f (x) = w i=1 s i max{0, ãi • x + bi } (C.1)

where ãi ∈ R n , b i ∈ R and s i ∈ {-1, +1} for all i = 1, . . . , w. We now make the following observation. For a given data point (x j , y j ) if ãi • x j + bi ≤ 0, then the i-th term of (C.1) does not contribute to the loss function for this data point (x j , y j ). Thus, for every data point (x j , y j ), there exists a set S j ⊆ {1, . . . , w} such that f (x j ) = i∈Sj s i (ã i • x j + bi ). In particular, if we are given the set S j for (x j , y j ), then the expression on the right hand side of (C.1) reduces to a linear function of ãi , bi . For any fixed i ∈ {1, . . . , w}, these sets S j induce a partition of the data set into two parts. In particular, we define P i + := {j : i ∈ S j } and P i -:= {1, . . . , D} \ P i + . Observe now that this partition is also induced by the hyperplane given by ãi , bi : P i + = {j : ãi • x j + bi > 0} and P i + = {j : ãi • x j + bi ≤ 0}. Our strategy will be to guess the partitions P i + , P i -for each i = 1, . . . , w, and then do linear regression with the constraint that regression's decision variables ãi , bi induce the guessed partition.

More formally, the algorithm does the following. For each i = 1, . . . , w, the algorithm guesses a partition of the data set (x j , y j ), j = 1, . . . , D by a hyperplane. Let us label the partitions as follows (P i + , P i -), i = 1, . . . , w. So, for each i = 1, . . . , w, P i + ∪ P i -= {1, . . . , D}, P i + and P i -are disjoint, and there exists a vector c ∈ R n and a real number δ such that P i -= {j : c • x j + δ ≤ 0} and P i + = {j : c • x j + δ > 0}. Further, for each i = 1, . . . , w the algorithm selects a vector s in {+1, -1} w .

For a fixed selection of partitions (P i + , P i -), i = 1, . . . , w and a vector s in {+1, -1} w , the algorithm solves the following convex optimization problem with decision variables ãi ∈ R n , bi ∈ R for i = 1, . . . , w (thus, we have a total of (n + 1) • w decision variables). The feasible region of the optimization is given by the constraints ãi

• x j + bi ≤ 0 ∀j ∈ P i - ãi • x j + bi ≥ 0 ∀j ∈ P i + (C.2)

which are imposed for all i = 1, . . . , w. Thus, we have a total of D • w constraints. Subject to these constraints we minimize the objective

D j=1 i:j∈P i + (s i (ã i • x j + bi ), y j ).

Assuming the loss function is a convex function in the first argument, the above objective is a convex function. Thus, we have to minize a convex objective subject to the linear inequality constraints from (C.2).

We finally have to count how many possible partitions (P i + , P i -) and vectors s the algorithm has to search through. It is well-known Matousek (2002) that the total number of possible hyperplane partitions of a set of size D in R n is at most 2 D n ≤ D n whenever n ≥ 2. Thus with a guess for each i = 1, . . . , w, we have a total of at most D nw partitions. There are 2 w vectors s in {-1, +1} w . This gives us a total of 2 w D nw guesses for the partitions (P i + , P i -) and vectors s. For each such guess, we have a convex optimization problem with (n + 1) • w decision variables and D • w constraints, which can be solved in time poly (D, n, w) . Putting everything together, we have the running time claimed in the statement.

The above argument holds only for n ≥ 2, since we used the inequality 2 D n ≤ D n which only holds for n ≥ 2. For n = 1, a similar algorithm can be designed, but one which uses the characterization achieved in Theorem 2.2. Let : R → R be any convex loss function, and let (x 1 , y 1 ), . . . , (x D , y D ) ∈ R 2 be the given D data points. Using Theorem 2.2, to solve problem (4.1) it suffices to find a R → R piecewise linear function f with w pieces that minimizes the total loss. In other words, the optimization problem (4.1) is equivalent to the problem min D i=1 (f (x i ), y i ) : f is piecewise linear with w pieces .

(C.3)

We now use the observation that fitting piecewise linear functions to minimize loss is just a step away from linear regression, which is a special case where the function is contrained to have exactly one affine linear piece. Our algorithm will first guess the optimal partition of the data points such that all points in the same class of the partition correspond to the same affine piece of f , and then do linear regression in each class of the partition. Altenatively, one can think of this as guessing the interval (x i , x i+1 ) of data points where the w -1 breakpoints of the piecewise linear function will lie, and then doing linear regression between the breakpoints.

More formally, we parametrize piecewise linear functions with w pieces by the w slope-intercept values (a 1 , b 1 ), . . . , (a 2 , b 2 ), . . . , (a w , b w ) of the w different pieces. This means that between breakpoints j and j + 1, 1 ≤ j ≤ w -2, the function is given by f (x) = a j+1 x + b j+1 , and the first and last pieces are a 1 x + b 1 and a w x + b w , respectively.

Define I to be the set of all (w -1)-tuples (i 1 , . . . , i w-1 ) of natural numbers such that 1 ≤ i 1 ≤ . . . ≤ i w-1 ≤ D. Given a fixed tuple I = (i 1 , . . . , i w-1 ) ∈ I, we wish to search through all piecewise linear functions whose breakpoints, in order, appear in the intervals (x i1 , x i1+1 ), (x i2 , x i2+1 ), . . . , (x iw-1 , x iw-1+1 ). Define also S = {-1, 1} w-1 . Any S ∈ S will have the following interpretation: if S j = 1 then a j ≤ a j+1 , and if S j = -1 then a j ≥ a j+1 . Now for every I ∈ I and S ∈ S, requiring a piecewise linear function that respects the conditions imposed by I and S is easily seen to be equivalent to imposing the following linear inequalities on the parameters 

D AUXILIARY LEMMAS:

Now we will collect some straightforward observations that will be used often. The following operations preserve the property of being representable by a ReLU DNN. Proof. We simply put the two ReLU DNNs in parallel and combine the appropriate coordinates of the outputs.

Lemma D.3. [Taking maximums/minimums] Let f 1 , . . . , f m : R n → R be functions that can each be represented by R n → R ReLU DNNs with depths k i + 1 and size s i , i = 1, . . . , m. Then the function f : R n → R defined as f (x) := max{f 1 (x), . . . , f m (x)} can be represented by a ReLU DNN of depth at most max{k 1 , . . . , k m } + log(m) + 1 and size at most s 1 + . . . s m + 4(2m -1). Similarly, the function g(x) := min{f 1 (x), . . . , f m (x)} can be represented by a ReLU DNN of depth at most max{k 1 , . . . , k m } + log(m) + 1 and size at most s 1 + . . . s m + 4(2m -1).

Proof. We prove this by induction on m. The base case m = 1 is trivial. For m ≥ 2, consider 2 -1) and s m 2 +1 + . . . + s m + 4(2 m 2 -1), respectively. Therefore, the function G : R n → R 2 given by G(x) = (g 1 (x), g 2 (x)) can be implemented by a ReLU DNN with depth at most max{k 1 , . . . , k m } + log( m 2 ) + 1 and size at most s 1 + . . . + s m + 4(2m -2).

We now show how to represent the function T : R 2 → R defined as T (x, y) = max{x, y} = 

:



Figures and Tables:

k k k . With the extra flexibility of choosing the parameter w, for the purpose of showing gaps in representation ability of deep nets we can shows size lower bounds which are super-exponential in depth as explained in Corollaries 3.3 and 3.4.

2. γ Z(b 1 ,...,b m ) (r) = max x∈Z(b 1 ,...,b m ) r, x = max x∈vert(Z(b 1 ,...,b m )) r, x , and γ Z(b 1 ,...,b m ) is therefore a piecewise linear function with | vert(Z(b 1 , . . . , b m ))| pieces. 3. γ Z(b 1 ,...,b m ) (r) = | r, b 1 | + . . . + | r, b m |. Definition 7 (extremal zonotope set). The set S(n, m) will denote the set of (b 1

Theorem 4.1. There exists an algorithm to find a global optimum of Problem 4.1 in time O(2 w (D) nw poly(D, n, w)). Note that the running time O(2 w (D) nw poly(D, n, w)) is polynomial in the data size D for fixed n, w.

CONTINUUM OF HARD FUNCTIONS FOR R n → R FOR n ≥ 2 Proof of Lemma 3.7. By Theorem 3.6 part 3., γ Z(b 1 ,...,b m ) (r) = | r, b 1 | + . . . + | r, b m |. It suffices to observe | r, b 1 | + . . . + | r, b m | = max{ r, b 1 ,r, b 1 } + . . . + max{ r, b m ,r, b m }.Proof of Proposition 3.8. The fact that ZONOTOPE n k,w,m [a 1 , . . . , a k , b 1 , . . . , b m ] can be represented by a k + 2 layer ReLU DNN with size 2m + wk follows from Lemmas 3.7 and D.1. The number of pieces follows from the fact that γ Z(b 1 ,...,b m ) has n-1 i=0 m-1 i distinct linear pieces by parts 1. and 2. of Theorem 3.6, and H a 1 ,...,a k has w k pieces by Lemma B.1.

(a 1 , b 1 ), . . . , (a 2 , b 2 ), . . . , (a w , b w ):S j (b j+1b j -(a ja j+1 )x ij ) ≥ 0 S j (b j+1b j -(a ja j+1 )x ij +1 ) ≤ 0 S j (a j+1a j ) ≥ 0 (C.4)Let the set of piecewise linear functions whose breakpoints satisfy the above be denoted by PWL 1I,Sfor I ∈ I, S ∈ S.Given a particular I ∈ I, we defineD 1 := {x i : i ≤ i 1 }, D j := {x i : i j-1 < i ≤ i 1 } j = 2, . . . , w -1, D w := {x i : i > i w-1 } . x i )-y i ) : f ∈ PWL 1 I,S } = min{w j=1 i∈Dj (a j •x i +b j -y i ) : (a j , b j ) satisfy (C.4)} (C.5) The right hand side of the above equation is the problem of minimizing a convex objective subject to linear constraints. Now, to solve (C.3), we need to simply solve the problem (C.5) for all I ∈ I, S ∈ S and pick the minimum. Since |I| = D w = O(D w ) and |S| = 2 w-1 we need to solve O(2 w • D w ) convex optimization problems, each taking time O(poly(D)). Therefore, the total running time is O((2D) w poly(D)).

Lemma D.1. [Function Composition] If f 1 : R d → R m is represented by a d, m ReLU DNN with depth k 1 + 1 and size s 1 , and f 2 : R m → R n is represented by an m, n ReLU DNN with depth k 2 + 1 and size s 2 , then f 2 • f 1 can be represented by a d, n ReLU DNN with depth k 1 + k 2 + 1 and size s 1 + s 2 .Proof. Follows from (1.1) and the fact that a composition of affine transformations is another affine transformation.Lemma D.2. [Function Addition] If f 1 : R n → R m is represented by a n, m ReLU DNN with depth k + 1 and size s 1 , and f 2 : R n → R m is represented by a n, m ReLU DNN with depth k + 1 and size s 2 , then f 1 + f 2 can be represented by a n, m ReLU DNN with depth k + 1 and size s 1 + s 2 .

g 1 := max{f 1 , . . . , f m 2 } and g 2 := max{f m 2 +1 , . . . , f m }. By the induction hypothesis (since m 2 , m 2 < m when m ≥ 2), g 1 and g 2 can be represented by ReLU DNNs of depths at most max{k 1 , . . . , k m 2 } + log( m 2 ) + 1 and max{k m 2 +1 , . . . , k m } + log( m 2 ) + 1 respectively, and sizes at most s 1 + . . . s m 2 + 4(2 m

Figure 3: A 2-layer ReLU DNN computing max{x 1 , x 2 } = x1+x2 2 + |x1-x2| 2 Lemma D.4. Any affine transformation T : R n → R m is representable by a 2-layer ReLU DNN of size 2m.

functions representable by ReLU DNNs. Moreover, we show how structural properties of ReLU DNNs, specifically their depth and width, affects their expressive power. It is clear from definition that any function from R n → R represented by a ReLU DNN is a continuous piecewise linear (PWL) function. In what follows, we show that the converse is also true, that is any PWL function is representable by a ReLU DNN. In particular, the following theorem establishes a one-to-one correspondence between the class of ReLU DNNs and PWL functions.Theorem 2.1. Every R n → R ReLU DNN represents a piecewise linear function, and every piecewise linear function R n → R can be represented by a ReLU DNN with at most log 2 (n + 1) + 1 depth. It is clear that any function represented by a ReLU DNN is a PWL function. To see the converse, we first note that any PWL function can be represented as a linear combination of piecewise linear convex functions. More formally, by Theorem 1 in(Wang & Sun, 2005), for every piecewise linear function f : R n → R, there exists a finite set of affine linear functions 1 , . . . , k and subsets S 1 , . . . , S p ⊆ {1, . . . , k} (not necessarily disjoint) where each S i is of cardinality at most n + 1, such that

Table content: <table><tr><td>Proof Sketch: f =</td><td>p j=1</td><td>s j max i∈Sj</td><td>i ,</td><td>(2.1)</td></tr><tr><td colspan="5">where s by ReLU</td></tr><tr><td colspan="4">DNNs. In particular, in Lemma D.3 we note that max{x, y} = x+y 2 + |x-y| 2</td><td/></tr></table>

Advances in neural information processing systems, pp. 3104-3112, 2014. Matus Telgarsky. Representation benefits of deep feedforward networks. arXiv preprint arXiv:1509.08101, 2015. Matus Telgarsky. benefits of depth in neural networks. In 29th Annual Conference on Learning Theory, pp. 1517-1539, 2016. Shuning Wang. General constructive representations for continuous piecewise-linear functions. IEEE Transactions on Circuits and Systems I: Regular Papers, 51(9):1889-1896, 2004. Shuning Wang and Xusheng Sun. Generalization of hinging hyperplanes. IEEE Transactions on Information Theory, 51(12):4425-4431, 2005. Dmitry Yarotsky. Error bounds for approximations with deep relu networks. arXiv preprint arXiv:1610.01145, 2016. Günter M. Ziegler. Lectures on polytopes, volume 152. Springer Science & Business Media, 1995.

Table content: <table/>

Peer review (iclr2018):
 The paper presents an analysis and characterization of ReLU networks (with a linear final layer) via the set of functions these networks can model, especially focusing on the set of “hard” functions that are not easily representable by shallower networks. It makes several important contributions, including extending the previously published bounds by Telgarsky et al. to tighter bounds for the special case of ReLU DNNs, giving a construction for a family of hard functions whose affine pieces scale exponentially with the dimensionality of the inputs, and giving a procedure for searching for globally optimal solution of a 1-hidden layer ReLU DNN with linear output layer and convex loss. I think these contributions warrant publishing the paper at ICLR 2018. The paper is also well written, a bit dense in places, but overall well organized and easy to follow. A key limitation of the paper in my opinion is that typically DNNs do not contain a linear final layer. It will be valuable to note what, if any, of the representation analysis and global convergence results carry over to networks with non-linear (Softmax, e.g.) final layer. I also think that the global convergence algorithm is practically unfeasible for all but trivial use cases due to terms like D^nw, would like hearing authors’ comments in case I’m missing some simplification. One minor suggestion for improving readability is to explicitly state, whenever applicable, that functions under consideration are PWL. For example, adding PWL to Theorems and Corollaries in Section 3.1 will help. Similarly would be good to state, wherever applicable, the DNN being discussed is a ReLU DNN.