SGD Learns the Conjugate Kernel Class of the Network
Amit Daniely

Strongly Interacting Phases of Metallic Wires in Strong Magnetic Field
    Xiao-Liang Qi
    Accepted .  Received ; in original form 
======================================================================



empty
Strongly Interacting Phases of Metallic Wires in Strong Magnetic Field
    Xiao-Liang Qi
    Accepted .  Received ; in original form 
======================================================================




We show that the standard stochastic gradient decent (SGD) algorithm is guaranteed to learn, in polynomial time, a function that is competitive with the best function in the conjugate kernel space of the network, as defined in <cit.>. The result holds for log-depth networks from a rich family of architectures.
To the best of our knowledge, it is the first polynomial-time guarantee for the standard neural network learning algorithm for networks of depth more that two.

As corollaries, it follows that for neural networks of any depth between 2 and log(n), SGD is guaranteed to learn, in polynomial time, constant degree polynomials with polynomially bounded coefficients. Likewise, it follows  that SGD on large enough networks can learn any continuous function (not in polynomial time), complementing classical expressivity results.








§ INTRODUCTION



While stochastic gradient decent (SGD) from a random initialization is probably the most popular supervised learning algorithm today, we have very few results that depicts conditions that guarantee its success. Indeed, to the best of our knowledge, <cit.> provides the only known result of this form, and it is valid in a rather restricted setting. Namely, for depth-2 networks, where the underlying distribution is Gaussian, the algorithm is full gradient decent (rather than SGD), and the task is regression when the learnt function is a constant degree polynomial.

We build on the framework of <cit.> to establish guarantees on SGD in a rather general setting. 
<cit.> defined a framework that associates a reproducing kernel to a network architecture. They also connected the kernel to the network via the random initialization. Namely, they showed that right after the random initialization, any function in the kernel space can be approximated by changing the weights of the last layer. The quality of the approximation depends on the size of the network and the norm of the function in the kernel space.

As optimizing the last layer is a convex procedure, the result of <cit.> intuitively shows that the optimization process starts from a favourable point for learning a function in the conjugate kernel space.
In this paper we verify this intuition.
Namely, for a fairly general family of architectures (that contains fully connected networks and convolutional networks) and supervised learning tasks, we show that if the network is large enough, the learning rate is small enough, and the number of SGD steps is large enough as well, SGD is guaranteed to learn any function in the corresponding kernel space. 
We emphasize that the number of steps and the size of the network are only required to be polynomial (which is best possible) in the relevant parameters – the norm of the function, the required accuracy parameter (ϵ), and the dimension of the input and the output of the network. Likewise, the result holds for any input distribution.


To evaluate our result, one should understand which functions it guarantee that SGD will learn.
Namely, what functions reside in the conjugate kernel space, how rich it is, and how good those functions are as predictors.
From an empirical perspective, in <cit.>, it is shown that for standard  convolutional networks the conjugate class contains functions whose performance is close to the performance of the function that is actually learned by the network. This is based on experiments on the standard CIFAR-10 dataset. 
From a theoretical perspective, we list below a few implications that demonstrate the richness of the conjugate kernel space. These implications are valid for fully connected networks of any depth between 2 and log(n), where n is the input dimension. Likewise, they are also valid for convolutional networks of any depth between 2 and log(n), and with constantly many convolutional layers.


  * SGD is guaranteed to learn in polynomial time constant degree polynomials with polynomially bounded coefficients. As a corollary, SGD is guaranteed to learn in polynomial time conjunctions, DNF and CNF formulas with constantly many terms, and DNF and CNF formulas with constantly many literals in each term. These function classes comprise a considerable fraction of the function classes that are known to be poly-time (PAC) learnable by any method. Exceptions include constant degree polynomial thresholds with no restriction on the coefficients, decision lists and parities.

  * SGD is guaranteed to learn, not necessarily in polynomial time, any continuous function. This complements classical universal approximation results that show that neural networks can (approximately) express any continuous function (see <cit.> for a survey). Our results strengthen those results and show that networks are not only able to express those functions, but actually guaranteed to learn them.






 §.§ Related work



  
Guarantees on SGD. As noted above, there are very few results that provide polynomial time guarantees for SGD on NN. One notable exception is the work of <cit.>, that proves a result that is similar to ours, but in a substantially more restricted setting. Concretely, their result holds for depth-2 fully connected networks, as opposed to rather general architecture and constant or logarithmic depth in our case. Likewise, the marginal distribution on the instance space is assumed to be Gaussian or uniform, as opposed to arbitrary in our case. In addition, the algorithm they consider is full gradient decent, which corresponds to SGD with infinitely large mini-batch, as opposed to SGD with arbitrary mini-batch size in our case. Finally, the underlying task is regression in which the target function is a constant degree polynomial, whereas we consider rather general supervised learning setting. 




  
Other polynomial time guarantees on learning deep architectures. Various recent papers show that poly-time learning is possible in the case that the the learnt function can be realized by a neural network with certain (usually fairly strong) restrictions on the weights <cit.>, or under the assumption that the data is generated by a generative model that is derived from the network architecture <cit.>. We emphasize that the main difference of those results from our results and the results of <cit.> is that they do not provide guarantees on the standard SGD learning algorithm. Rather, they show that under those aforementioned conditions, there are some algorithms, usually very different from SGD on the network, that are able to learn in polynomial time.



  
Connection to kernels. As mentioned earlier, our paper builds on <cit.>, who developed the association of kernels to NN which we rely on. Several previous papers <cit.> investigated such associations, but in a more restricted settings (i.e., for less architectures). Some of those papers <cit.> also provide measure of concentration results, that show that w.h.p. the random initialization of the network's weights is reach enough to approximate the functions in the corresponding kernel space. As a result, these papers provide polynomial time guarantees on the variant of SGD, where only the last layer is trained. We remark that with the exception of <cit.>, those results apply just to depth-2 networks.



 §.§ Discussion and future directions

We next want to place this work in the appropriate learning theoretic context, and to elaborate further on this paper's approach for investigating neural networks. For the sake of concreteness, let us restrict the discussion to binary classification over the Boolean cube. Namely, given examples from a distribution  on {± 1}^n×{0,1}, the goal is to learn a function h:{± 1}^n→{0,1} whose 0-1 error, ^0-1_(h) = _(,y)∼(h() y), is as small as possible. We will use a bit of terminology. A model is a distribution  on {± 1}^n×{0,1} and a model class is a 
collection  of models. We note that any function class ⊂{0,1}^{± 1}^n defines a model class, (), consisting of all models  such that ^0-1_(h)=0 for some h∈.
We define the capacity of a model class as the minimal number m for which there is an algorithm such that for every ∈ the following holds. Given m samples from , the algorithm is guaranteed to return, w.p. ≥9/10 over the samples and its internal randomness, a function h:{± 1}^n→{0,1} with 0-1 error ≤1/10. We note that for function classes the capacity is the VC dimension, up to a constant factor.

Learning theory analyses learning algorithms via model classes. Concretely, one fixes some model class  and show that the algorithm is guaranteed to succeed whenever the underlying model is from . 
Often, the connection between the algorithm and the class at hand is very clear. For example, in the case that the model is derived from a function class , the algorithm might simply be one that finds a function in  that makes no mistake on the given sample. 
The natural choice for a model class for analyzing SGD on NN would be the class of all functions that can be realized by the network, possibly with some reasonable restrictions on the weights. Unfortunately, this approach it is probably doomed to fail, as implied by various computational hardness results <cit.>.

 
So, what model classes should we consider? With a few isolated exceptions (e.g. <cit.>) all known efficiently learnable model classes are either a linear model class, or contained in an efficiently learnable linear model class.
Namely, functions classes composed of compositions of some predefined embedding with linear threshold functions, or linear functions over some finite field.

Coming up we new tractable models would be a fascinating progress. Still, as linear function classes are the main tool that learning theory currently has for providing guarantees on learning, it seems natural to try to analyze SGD via linear model classes. Our work follows this line of thought, and we believe that there is much more to achieve via this approach. Concretely, while our bounds are polynomial, the degree of the polynomials is rather large, and possibly much better quantitative bounds can be achieved. To be more concrete, suppose that we consider simple fully connected architecture, with 2-layers, ReLU activation, and n hidden neurons. In this case, the capacity of the model class that our results guarantee that SGD will learn is Θ(n^1/3). For comparison, the capacity of the class of all functions that are realized by this network is Θ(n^2). As a challenge, we encourage the reader to prove that with this architecture (possibly with an activation that is different from the ReLU), SGD is guaranteed to learn some model class of capacity that is super-linear in n.





§ PRELIMINARIES



  
Notation. We denote

vectors by bold-face letters (e.g. ), 
matrices by upper case letters (e.g. W), and collection of matrices by bold-face upper case letters (e.g. ). The p-norm of ∈^d is denoted by _p = (∑_i=1^d|x_i|^p)^1/p. We will also use the convention that =_2. For functions σ:→
we let

    σ
    	:=√(_X∼(0,1)σ^2(X))  = √(1/√(2π)∫_-∞^∞σ^2(x)e^-x^2/2dx) .


Let G=(V,E) be a directed acyclic graph. The set of neighbors incoming to
a vertex v is denoted (v):={u∈ V| uv∈ E}. We also denote (v) = |(v)|.
Given weight function δ:V→ [0,∞) and U⊂ V we let δ(U) = ∑_u∈ Uδ(u).
The d-1 dimensional sphere is denoted ^d-1 =
{∈^d |=1}. 

We use [x]_+ to denote max(x,0). 



  
Input space. Throughout the paper we assume that each example is
a sequence of n elements, each of which is represented as a unit vector. 
Namely, we fix n and take the input space to be
	=_n,d=(^d-1)^n.
Each input example is denoted,

    =(^1,…,^n),  ^i∈^d-1 .


While this notation is slightly non-standard, it unifies 
input types seen in various domains (see <cit.>). 



  
Supervised learning. The goal in supervised learning is to
devise a mapping from the input space  to an output space  based on a sample
S={(_1,y_1),…,(_m,y_m)}, where (_i,y_i)∈× 
drawn i.i.d. from a distribution  over ×.

A supervised learning problem is further specified by an output length k and a loss function
ℓ : ^k ×→ [0,∞), and the goal is to find a
predictor h:→^k whose loss,
_(h) := _(,y)∼ℓ(h(),y), is small.

The empirical loss _S(h):= 1/m∑_i=1^m
ℓ(h(_i),y_i) is commonly used as a proxy for the loss
_. When h is defined by a vector  of parameters, we will use the notations _() = _(h), _S()=_S(h) and ℓ_(,y)()=ℓ(h(),y).

Regression problems correspond to k=1, = and, for
instance, the squared loss ℓ^square(ŷ,y)=(ŷ -y)^2.

Binary classification is captured by k=1, ={± 1} and, say, the
zero-one loss ℓ^0-1(ŷ,y)= [ŷ y ≤ 0] or the hinge
loss ℓ^(ŷ,y)=[1-ŷ y]_+.

Multiclass classification is captured by k being the number of classes, = [k], and, say, the
zero-one loss ℓ^0-1(ŷ,y)= [ŷ_y ≤_y'ŷ_y'] or the logistic
loss ℓ^log(,y) = -log(p_y()) where :^k→Δ^k-1 is given by p_i() = e^ŷ_i/∑_j=1^ke^ŷ_j.

A loss ℓ is L-Lipschitz if for all y∈, the function ℓ_y(ŷ) :=ℓ(ŷ,y) is L-Lipschitz. Likewise, it is
convex if ℓ_y is convex for every y∈.
















  
Neural network learning. 
We define a neural network 
to be a vertices weighted directed acyclic graph (DAG) whose nodes are denoted V() and edges
E(). The weight function will be denoted by δ:V()→ [0,∞), and its sole role would be to dictate the distribution of the initial weights. We will refer 's nodes by neurons.
Each of non-input neuron, i.e. neuron with incoming edges, is associated with an activation function
σ_v:→. In this paper, an activation can
be any function σ:→ that is right and left differentiable, square integrable with respect to the Gaussian
measure on , and is normalized in the sense that
σ=1. The set of neurons having only incoming edges are called the
output neurons.

To match the setup of supervised learning defined above, a network  has
nd input neurons and k output neurons, denoted o_1,…,o_k. A
network  together with a weight vector ={w_uv| uv∈ E}∪{b_v| v∈ V is an internal neuron} defines a
predictor h_,:→^k whose prediction
is given by “propagating”  forward through the network.
Concretely, we define h_v,(·) to be the output of the subgraph
of the neuron v as follows: for an input neuron v, h_v, outputs the corresponding coordinate in , and
internal neurons, we define h_v, recursively as

    h_v,() = σ_v(∑_u∈(v)  w_uv h_u,() + b_v) .

For output neurons, we define h_v, as

    h_v,() = ∑_u∈(v)  w_uv h_u,() .

Finally, we let h_,()=(h_o_1,(),…,h_o_k,()).

 
We next describe the learning algorithm that we analyze in this paper. While there is no standard training algorithm for neural networks, the algorithms used in practice are usually quite similar to the one we describe, both in the way the weights are initialized and the way they are updated. 
We will use the popular Xavier initialization <cit.> for the network weights. Fix 0≤β≤ 1.
We say that ^0={w^0_uv}_uv∈ E∪{b_v}_v∈ V is an internal neuron are β-biased random weights (or, β-biased random initialization) if 
each weight
w_uv is sampled independently from a normal distribution with mean 0
and variance (1-β)dδ(u)/δ((v)) if u is an input neuron and (1-β)δ(u)/δ((v)) otherwise. Finally, each bias term
b_v is sampled independently from a normal distribution with mean 0
and variance β.
We note that the rational behind this initialization scheme is that for every example  and every neuron v we have __0(h_v,_0())^2=1 (see <cit.>)







  
Kernel classes. A function κ:×→ is
a reproducing kernel, or simply a kernel, if for every
_1,…,_r∈, the r  r matrix Γ_i,j = {κ(_i,_j)}
is positive semi-definite. Each kernel induces a Hilbert space
_κ of functions from  to  with a corresponding norm
·_κ. For ∈_κ^k we denote _κ =√(∑_i=1^kh_i^2_κ). A kernel and its corresponding space are normalized if ∀∈, κ(,)=1. 

Kernels give rise to popular benchmarks for learning algorithms. Fix a normalized kernel  κ and M>0. 
It is well known that that for L-Lipschitz loss ℓ, the SGD algorithm is guaranteed to return a function  such that
_() ≤min_'∈^k_κ, '_κ≤ M_(')+ϵ
using (LM/ϵ)^2 examples. 
In the context of multiclass classification, for γ>0 we define ℓ^γ:^k× [k]→ by ℓ^γ(ŷ,y) =  [ŷ_y≤γ+max_y' yŷ_y'].
We say that a distribution  on × [k] is M-separable w.r.t. κ if there is ^*∈_κ^k such that ^*_κ≤ M and ^1_(^*)=0. In this case, the perceptron algorithm is guaranteed to return a function  such that ^0-1_() ≤ϵ using 2M^2/ϵ examples. We note that both for perceptron and SGD, the above mentioned results are best possible, in the sense that any algorithm with the same guarantees, will have to use at least the same number of examples, up to a constant factor.








  
Computation skeletons <cit.>

In this section we define a simple structure which we term a computation
skeleton. The purpose of a computational skeleton is to compactly describe
a feed-forward computation from an input to an output. A single skeleton encompasses a family of neural networks
that share the same skeletal structure. Likewise, it defines a
corresponding normalized kernel.

 A computation skeleton  is a DAG with n inputs, whose
non-input nodes are labeled by activations, and has a single output node ().


Figure <ref> shows four example skeletons, omitting
the designation of the activation functions. 
We denote by || the number of non-input nodes of . The following definition shows how a skeleton, accompanied with a
replication parameter r≥ 1 and a number of output nodes k,
induces a neural network architecture. 






Let  be a computation skeleton and consider input coordinates in
^d-1 as in (<ref>). For r, k ≥ 1 we
define the following neural network =(,r,k).

For each input node in ,  has d corresponding input
neurons with weight 1/d. For each internal node v∈ labelled by an activation
σ,  has r neurons v^1,…,v^r, each with an
activation σ and weight 1/r. In addition,  has k output neurons
o_1,…,o_k with the identity activation σ(x)=x and weight 1.

There is an edge v^iu^j∈ E() whenever uv∈
E().  For every output node v in , each neuron v^j is
connected to all output neurons o_1,…,o_k. We term  the
(r,k)-fold realization of . 



Note that the notion of the replication parameter r corresponds, in
the terminology of convolutional networks, to the number of
channels taken in a convolutional layer and to the number of hidden neurons
taken in a fully-connected layer.






In addition to networks' architectures, a computation skeleton  also
defines a normalized kernel κ_:×→[-1,1]. To define the kernel,
we use the notion of a conjugate activation. For
ρ∈[-1,1], we denote by _ρ the multivariate Gaussian
distribution on ^2 with mean 0 and covariance matrix
( [ 1 ρ; ρ 1 ]).



The conjugate activation of an activation σ is the function
σ̂:[-1,1]→ defined as
σ̂(ρ) =
	_(X,Y) ∼_ρσ(X)σ(Y)  .



The following definition gives the kernel corresponding to a skeleton



Let  be a computation skeleton and let 0≤β≤ 1.

For every node v, inductively define a kernel
κ^β_v:×→ as follows.

For an input node v corresponding to the ith coordinate,
define κ^β_v(,)=^i, ^i.

For a non-input node v, define

    κ^β_v(,) =
    	σ̂_v(
    		(1-β)∑_u∈(v)κ^β_u(,)/|(v)|+β)  .

The final kernel κ^β_ is κ^β_(). The resulting Hilbert space and norm are denoted _,β and ·_,β respectively.






§ MAIN RESULTS


An activation σ:→ is called C-bounded if σ_∞, σ'_∞, σ”_∞≤ C. Fix a skeleton  and 1-Lipschitz[If ℓ is L-Lipschitz, we can replace ℓ by 1/Lℓ and the learning rate η by Lη. The operation of algorithm <ref> will be identical to its operation before the modification. Given this observation, it is very easy to derive results for general L given our results. Hence, to save one paramater, we will assume that L=1.] convex loss ℓ. 
Define ()=∏_i=1^()max_v∈, (v)=i((v)+1) and () = (8C)^()√(()), where C is the minimal number for which all the activations in  are C-bounded, and (v) is the maximal length of a path from an input node to v. We also define '() = (4C)^()√(()), where C is the minimal number for which all the activations in  are C-Lipschitz and satisfy |σ(0)|≤ C. Through this and remaining sections we use ≳ to hide universal constants. Likewise, we fix the bias parameter β and therefore omit it from the relevant notation.


We note that for constant depth skeletons with maximal degree that is polynomial in n, () and '() are polynomial in n. These quantities are polynomial in n also for various log-depth skeletons. For example, this is true for fully connected skeletons, or more generally, layered skeletons with constantly many layers that are not fully connected.




Suppose that all activations are C-bounded. Let M,ϵ>0. Suppose that we run algorithm <ref> on the network (,r,k) with the following parameters:


  * η=η'/r for η'≲ϵ/('())^2

  * T≳M^2/η' ϵ

  * r≳C^4(Tη')^2M^2('())^4
log(C||/ϵδ)/ϵ^2 +d

  * Zero initialized prediction layer

  * Arbitrary m

Then, w.p. ≥ 1-δ over the choice of the initial weights, there is t∈ [T] such that _(^t)≤min_∈^k_, _≤ M_()+ϵ. Here, the expectation is over the training examples.


We next consider ReLU activations. Here, '() = (√(32))^()√(()). 

Suppose that all activations are the ReLU. Let M,ϵ>0. Suppose that we run algorithm <ref> on the network (,r,k) with the following parameters:


  * η=η'/r for η'≲ϵ/('())^2

  * T≳M^2/η' ϵ

  * r≳(Tη')^2M^2('())^4
log(||/ϵδ)/ϵ^2 +d

  * Zero initialized prediction layer

  * Arbitrary m

Then, w.p. ≥ 1-δ over the choice of the initial weights, there is t∈ [T] such that _(^t)≤min_∈^k_, _≤ M_()+ϵ. Here, the expectation is over the training examples.


Finally, we consider the case in which the last layer is also initialized randomly. Here, we provide guarantees in a more restricted setting of supervised learning. Concretely, we consider multiclass classification, when  is separable with margin, and ℓ is the logistic loss. 



Suppose that all activations are C-bounded, that  is M-separable with w.r.t. κ_ and let ϵ>0. Suppose we run algorithm <ref> on (,r,k) with the following parameters:


  * η=η'/r for η'≲ϵ^2/M^2 (())^4

  * T≳log(k)M^2/η' ϵ^2

  * r≳ C^4(())^4M^2(Tη')^2log(C|S|/ϵ) + k + d 

  * Randomly initialized prediction layer

  * Arbitrary m

Then, w.p. ≥1/4 over the choice of the initial weights and the training examples, there is t∈ [T] such that ^0-1_(^t)≤ϵ








 §.§ Implications

To demonstrate our results, let us elaborate on a few implications for specific network architectures. To this end, let us fix the instance space  to be either {± 1}^n or ^n-1. Also, fix a bias parameter 1≥β>0, a batch size m, and a skeleton  that is a skeleton of a fully connected network of depth between 2 and log(n). Finally, we also fix the activation function to be either the ReLU or a C-bounded activation, assume that the prediction layer is initialized to 0, and fix the loss function to be some convex and Lipschitz loss function.
Very similar results are valid for convolutional networks with constantly many convolutional layers. We however omit the details for brevity.


Our first implication shows that SGD is guaranteed to efficiently learn constant degree polynomials with polynomially bounded weights. To this end, let us denote by _t the collection of degree t polynomials. Furthermore, for any polynomial p we denote by p the ℓ^2 norm of its coefficients.

Fix any positive integers t_0,t_1.
Suppose that we run algorithm <ref> on the network (,r,1) with the following parameters:


  * η≲(ϵ/n)

  * T,r≳(n/ϵ,log(1/δ))

Then, w.p. ≥ 1-δ over the choice of the initial weights, there is t∈ [T] such that _(^t)≤min_p∈_t_0, p≤ n^t_1_(p)+ϵ. Here, the expectation is over the training examples.

We note that several hypothesis classes that were studied in PAC learning can be realized by polynomial threshold functions with polynomially bounded coefficients. This includes conjunctions, DNF and CNF formulas with constantly many terms, and DNF and CNF formulas with constantly many literals in each term.
If we take the loss function to be the logistic loss or the hinge loss, Corollary <ref> implies that SGD efficiently learns these hypothesis classes as well.

Our second implication shows that any continuous function is learnable (not necessarily in polynomial time) by SGD.

Fix a continuous function h^*:^n-1→ and ϵ,δ>0. 
Assume that  is realized[That is, if (,y)∼ then y = h^*() with probability 1.] by h^*.
Assume that we run algorithm <ref> on the network (,r,1). If η>0 is sufficiently small and T and r are sufficiently large,
then, w.p. ≥ 1-δ over the choice of the initial weights, there is t∈ [T] such that _(^t)≤ϵ.





 §.§ Extensions

We next remark on two extensions of our main results. The extended results can be proved in a similar fashion to our results. To avoid cumbersome notation, we restrict the proofs to the main theorems as stated, and will elaborate on the extended results in an extended version of this manuscript.
First, we assume that the replication parameter is the same for all nodes. In practice, replication parameters for different nodes are different. This can be captured by a vector {r_v}_v∈ Int(). Our main results can be extended to this case if for all v, r_v≤∑_u∈(v)r_u (a requirement that usually holds in practice).
Second, we assume that there is no weight sharing that is standard in convolutional networks. Our results can be extended to convolutional networks with weight sharing.

We also note that we assume that in each step of algorithm <ref>, a fresh batch of examples is given. In practice this is often not the case. Rather, the algorithm is given a training set of examples, and at each step it samples from that set. In this case, our results provide guarantees on the training loss. If the training set is large enough, this also implies guarantees on the population loss via standard sample complexity results.



§ PROOFS



  
Notation Throughout, we fix a loss ℓ:^k×→ [0,∞), a skeleton , a replication parameter r, the network =(,r,k) and a bias parameter 0≤β≤ 1. For a matrix W∈ M_r,l() we denote W_p,q = max__p≤ 1W_q, W_2=W_2,2, and W_F=√(∑_i=1^r∑_j=1^l W_ij^2). We will often use the fact that W_2≤W_F. For σ:→ and ∈^n we abuse notation and denote σ()=(σ(x_1),…,σ(x_n)). 

For a skeleton  we denote by () the set of 's internal nodes. We will aggregate the weights of  by a collection of matrices and bias vectors

    ={W^v}_v∈()∪{^v}_v∈()∪{W^} .

Here, (W^v,^v) are the matrix and vector that maps the output of all the neurons corresponding to nodes in (v), to the neurons corresponding to v. 
Likewise, W^ is the matrix that maps the output of the neurons corresponding to  () to the final output of the network. We decompose W^v further as a concatenation of two matrices W^v,, W^v, that correspond to the internal and input nodes in (v) respectively. 
For a prediction matrix W^*∈ M_k,r and weights  we denote by |W^* the weights obtained by replacing W^ with W^*.
We let

    _2 = max{W^v,_2, W^v,_2/√(r) , ^v_2/√(r) : v∈() }∪{W^_2} ,


    '_2 = max{W^v,_2, W^v,_2/√(r) , ^v_2/√(r) : v∈() } ,

and

    _F=√(W^_F^2+∑_v∈()W^v^2_F + ^v^2_F) .

Finally, we let _R = { : ≤ R} and '_R = { : '≤ R}.
For ∈ we denote by h_()=R^_() the output on  of the network  with the weights . Given v∈ V() we let R^v_()∈^r to be the output of the neurons corresponding to v. We denote by R_():=R^()_() the output of the representation layer. 
We also let R^v←_() be the concatenation of {R^u_()}_u∈(v). Note that R^v_() = σ_v(W^vR^v←_()) and R^_() = W^ R^()_(). For (,y)∈× we denote ℓ_(,y)()=ℓ(R^_(W),y) and for S={(_i,y_i)}_i=1^m we denote _S()=1/m∑_i=1^mℓ_(,y)(). We let _()=_(,y)∼ℓ_(,y)(). Finally, we let k_(,') = R_(),R_'()/r.





 §.§ Overview

We next review the proof of theorem <ref>. The proof of theorem <ref> is similar. Later, we will also comment how the proof can be modified to establish theorem <ref>.
Let ^*∈^k_ be some function with ^*≤ M and let _0,…,_T be the weights produced by the SGD algorithm. Our goal is to show that w.h.p. over the choice of _0, there is t∈ [T] such that _(_t)≤ϵ.

In section <ref> we show that w.h.p. over the choice of _0, there is a prediction matrix W∈ M_k,r so that _(_0|W^*)≤ϵ and W^*_F≤M/√(r). This follows from the results of <cit.>, and some extensions of those. Namely, we extend the original from k=1 to general k, and also eliminate a certain logarithmic dependence on the size of the support of .

Given that such W^* exists, standard online learning results (e.g. Chapter 21 in
<cit.>) imply that if we would apply SGD only on the last layer, with the learning rate specified in theorem <ref>, i.e.  η=η'/r for η'≲ϵ/('())^2, we would be guaranteed to have some step t∈ [T] in which _(_t)≤ 2ϵ.

However, as we consider SGD on all weights, this is not enough. Hence, in section <ref>, we show that with the above mentioned learning rate, the weights of the non-last layer change slowly enough, so that _(_t|W^*)≤ϵ for all t. Given this, we can invoke the online-learning based argument again.

In order to show that the last layer changes slowly, we need to bound the magnitude of the gradient of the training objective. In section <ref> we establish such a bound on the gradient of the loss for every example. As _() and _S_t() are averages of such functions, the same bound holds for them as well. We note that our bound depends on the spectral norm on the matrices {W^v}_v∈. We show that for random matrices, w.h.p.  the magnitude of the norm implies a bound that is good enough for our purposes. Likewise, trough the training process, the norm doesn't grow too much, so the desired bound is valid throughout the optimization process.

The structure of the proof of theorem <ref> is similar, but has a few differences. First, the first step would be to show that in the case that  is M-separable w.r.t. κ_, then w.h.p. over the choice of _0, there is a prediction matrix W^*∈ M_k,n such that ^1_(_0|W^*) is tiny, and W^*_F≲M/√(r). Again, this is based on the results and techniques of <cit.>, and is done in section <ref>. Given this, again, running SGD on the top layer would be fine. However, now we cannot utilize the online-learning based argument we used before, because the starting point is not 0, but rather a random vector, whose norm is too large to carry out the analysis. In light of that, we take a somewhat different approach. 

We show that the weights beneath the last layer are changing slow enough, so that the following holds throughout the optimization process: As long as the 0-1 error is larger than ϵ, the magnitude of the gradient is Ω(ϵ√(r)/M). More precisely, the derivative in the direction of W^*, is smaller than -Ω(ϵ√(r)/M). Given this, and bounds on both the first and second derivative of the loss (proved in section <ref>), we are able to establish the proof by adopting a standard argument from smooth convex optimization (done in section <ref>).






 §.§ Boundness of the objective function

Let Ω⊂^n be an open set. For a function :Ω→^m, a unit vector ∈^n and _0∈Ω we denote __0,(t)=(_0 + t). We say that  is (α,β,γ)-bounded at _0 if f is twice differentiable and

    ∀∈^n-1,  __0,(0)≤α,  '__0,(0)≤β ,  ”__0,(0)≤γ .

We say that  is (α,β,γ)-bounded if it is (α,β,γ)-bounded in any _0∈Ω.
We note that for m=1, f is (α,β,γ)-bounded at _0 if and only if |f(_0)|≤α, ∇ f(_0)≤β and ∇^2f(_0)_2≤γ. In particular, when n=1 too, f is (α,β,γ)-bounded at _0 if and only if |f(_0)|≤α, |f'(_0)|≤β and |f”(_0)|≤γ. We will say that  is C-bounded if it is (C,C,C)-bounded.


Let σ:→ be (α,C,C)-bounded function. Suppose that :Ω→^n is (∞,β,β^2)-bounded. We have that = σ∘ is (∞,Cβ,2Cβ^2)-bounded. If we furthermore assume that σ(0)=0 then we have that  is (Cα,Cβ,2Cβ^2)-bounded. 
The first part follows from the facts that

    __0,'(t) = σ'(_,(t)) _,'(t)

and

    __0,”(t) = σ”(_,(t)) (_,'(t))^2 +  σ'(_,(t)) _,”(t)

The second part follows from the fact that in the case that σ(0)=0 we have that σ()≤ Cx.




Let l:^n→ be (∞,C,C)-bounded function. Suppose that :Ω→^n is (∞,β,β^2)-bounded. We have that g= l∘ is (∞,Cβ,2Cβ^2)-bounded

This follows from the fact that

    g__0,'(t) = ∇ l(_,(t)), _,'(t)

and

    g__0,”(t) = _,'(t), H_l(_,(t)) _,'(t) +   ∇ l(_,(t)), _,”(t)



[logistic loss]
Recall that :^k→Δ^k-1 is given by p_i(ŷ) = e^ŷ_i/∑_j=1^ke^ŷ_j and ℓ:^k×→_+ by ℓ(ŷ,y)= -log(p_y(ŷ)). Denote ℓ_y(ŷ)=ℓ(ŷ,y).
We have

    ∂ p_i/∂ŷ_j = δ_ije^ŷ_i(∑_j=1^ke^ŷ_j) - 
    e^ŷ_ie^ŷ_j/(∑_j=1^ke^ŷ_j)^2

Hence, ∇ p_i = p_i_i - p_i and therefore ∇ℓ_i = -∇ p_i/p_i = -_i +. Hence, ∇^2 ℓ_i = ∇ = () - ⊗. In particular, ℓ_y is (∞,√(2),1)-bounded.



Let B be the set of l× m matrices with operator norm less than R and let :B×Ω→^m. Define :B×Ω→^l by (W,) = W(,W). Then, if  is (α,β,γ)-bounded then  is (Rα,Rβ + α,Rγ + 2β)-bounded

Fix (W_0,_0)∈ B×Ω and (U,)∈ M_l,m()×^n such that U^2_F + u^2_2 =1.
We have

    _(W_0,_0),(U,)(t) = W_0_(W_0,_0),(U,)(t) + tU_(W_0,_0),(U,)(t)

Hence, 

    '_(W_0,_0),(U,)(t) = W_0'_(W_0,_0),(U,)(t) + U_(W_0,_0),(U,)(t) + tU'_(W_0,_0),(U,)(t)


    ”_(W_0,_0),(U,)(t) = W_0”_(W_0,_0),(U,)(t) + 2U'_(W_0,_0),(U,)(t) + tU”_(W_0,_0),(U,)(t)




If _1,…,_d:Ω→^m are (α,β,γ)-bounded then (_1,…,_d):Ω→^mk is (√(d)α,√(d)β,√(d)γ)-bounded


From facts <ref>, <ref> and <ref> we conclude that


Suppose that


  * _1,1,…,_1,d_1:Ω→^r are (α,β,β^2)-bounded functions with √(r)≤α≤β

  * _2,1,…,_2,d_2:Ω→^d are (1,0,0)-bounded functions

  * σ:→ is C-bounded  for C≥1.

  * Let B_1 be the set of r× rd_1 matrices with operator norm less than R for R≥ 1, B_2 be the set of r× dd_2 matrices with operator norm less than r√(r) for R≥ 1, and B_3⊂^r the set of vectors with norm less than R√(r).
Define :B_1× B_2× B_3×Ω→^r by (W^1,W^2,,) = σ(W^1_1() + W^2_2() + ) where _i()= (_i,1(),…,_i,d_i())

Then,  is  (C√(r),  4CR√(d̃)β ,  (4CR√(d̃)β)^2)-bounded for d̃ = d_1+d_2+1.
 
By fact <ref>, _1 is (√(d_1)α,√(d_1)β,dβ^2)-bounded 
Hence, by fact <ref>, (W^1,)↦ W^1_1() is (R√(d_1)α,  R√(d_1)β + √(d_1)α ,  Rd_1β^2 + 2√(d_1)β)-bounded. Since β≥max(1,α) and R≥ 1 we have that (W^1,)↦ W^1_1() is (R√(d_1)α,  2R√(d_1)β ,  (2R√(d_1)β)^2)-bounded. Similarly, (W^2,)↦ W^2_2() is (R√(d_2r),√(d_2),0)-bounded and (,)↦ is (R√(r),1,0)-bounded. As √(r)≤α, and β,R≥ 1 it follows that
(W^1,W^2,,)↦ W^1_1() + W^2_2() + is (R√(d̃)α,  2R√(d̃)β ,  (2R√(d̃)β)^2)-bounded.

Now, by fact  <ref> and the C-boundness of σ,  is (C√(r),  2CR√(d̃)β ,  2C(2R√(d̃)β)^2)-bounded. The lemma concludes as C≥ 1






Suppose that


  * _1,1,…,_1,d_1:Ω→^r are (β,β,∞)-bounded functions with √(r)≤β

  * _2,1,…,_2,d_2:Ω→^d are (1,0,0)-bounded functions

  * σ:→ is C-Lipschitz and satisfy |σ(0)|≤ C.

  * Let B_1 be the set of r× rd_1 matrices with operator norm less than R for R≥ 1, B_2 be the set of r× dd_2 matrices with operator norm less than r√(r) for R≥ 1, and B_3⊂^r the set of vectors with norm less than R√(r).
Define :B_1× B_2× B_3×Ω→^r by (W^1,W^2,,) = σ(W^1_1() + W^2_2() + ) where _i()= (_i,1(),…,_i,d_i())

Then,  is  (C(R+1)√(d̃)β,  C(R+1)√(d̃)β ,  ∞)-bounded for d̃ = d_1+d_2+1.
 
By fact <ref>, _1 is (√(d_1)β,√(d_1)β,∞)-bounded 
Hence, by fact <ref>, (W^1,)↦ W^1_1() is (R√(d_1)β,  R√(d_1)β + √(d_1)β ,  ∞)-bounded. Similarly, (W^2,)↦ W^2_2() is (R√(d_2r),√(d_2),0)-bounded and (,)↦ is (R√(r),1,0)-bounded. As √(r)≤β and β,R≥ 1 it follows that
(W^1,W^2,,)↦ W^1_1() + W^2_2() + is ((R+1)√(d̃)β,  (R+1)d̃β ,∞)-bounded.
The lemma concludes by fact  <ref> and the C-boundness of σ.




Using a similar argument one can prove that

Suppose that


  * :Ω→^r is (α,β,β^2)-bounded function with max(1,α)≤β

  * l:^k→ is (∞,C,C)-bounded for C≥ 1.

  * Let B be the set of k× r matrices with operator norm less than R for R≥ 1. Define g:B×Ω→ by g(W,) = l(W())

Then, g is  (∞,  4CRβ ,  (4CRβ)^2)-bounded
 





Assume that all activations in  are C-bounded and that each ℓ_y is (∞,C',C')-bounded.
Let R≥ 1 and (,y)∈×. Then


  * The function ℓ_(,y):_R → is (∞,β,β^2)-bounded for β=4C'R(4CR)^()√(()r).

  * The function R_:_R→^r is (C√(r),β,β^2)-bounded for β=(4CR)^()√(()r).



Denote ^i() = ∏_j=1^imax_v∈,(v)=j ((v)+1) and
β_i = (4CR)^i√(r·^i()). We will prove that for every v∈, the function R^v_() is (C√(r),β_(v),β_(v)^2)-bounded.
This proves the second item. The first item follows from the second together with lemma <ref>.

We will use induction on (v).
For depth 0 node (i.e., an input node), the function R^v_ is a constant function with output of norm 1. Hence, it is (1,0,0)-bounded. 
For v of depth >0, the induction hypothesis and lemma <ref> implies that R^v_ is

    (C√(r),4CR√((v)+1)β_i-1,(4CR√((v)+1)β_i-1)^2)-bounded

The proof concludes as β_i≤ 4CR√((v)+1)β_i-1


Based on lemma <ref> and a similar argument we have that:

Assume that all activations in  are C-Lipschitz and satisfy |σ(0)|≤ C, and that ℓ is L-Lipschitz.
Let R≥ 1 and (,y)∈×. 
Let β = (C(R+1))^()√(()r).
Then,


  * The function ℓ_(,y):_R→ is 
(∞,LRβ,∞)-bounded when restricted to the variables ^ = {W^v}_v∈

  * The function ℓ_(,y):_R→ is 
(∞,Lβ,∞)-bounded when restricted to the variables W^

  * The function R_ is (β,β,∞)-bounded

If we furthermore assume that all activations satisfy σ_∞≤ C then (i) in the last item the conclusion is that R_:_R→ is (C√(r),β,∞)-bounded, and (ii) ℓ_(,y) is 
(∞,LC√(r),∞)-bounded when restricted to the variables W^






 §.§ Optimization given good initialization



Assume that all activations in  are C-Lipschitz and satisfy |σ(0)|≤ C, and that ℓ is L-Lipschitz. Define  α = 2L(3C)^()√(()).
Let _0 be initial weights with _0∈_1.5. Suppose that _1,…,_t are the weights obtained by running algorithm <ref> with learning rate η' = η/r>0. Then, for every t≤√(r)/2ηα we have


  *  _t∈_2

  *  For any and every , R_(_0) - R_(_t)≤ tηα^2




Let _t the stochastic gradient at time t.
To see item <ref> note that as long as _t ∈_2, by lemma <ref>,  for all v∈ V()∪{}, V^v_t_F≤α√(r). Since V^v_t_2≤V^v_t_F, and since the learning rate is η/r, at each step, the spectral norm of each W^v is changed by at most ηα√(1/r). Hence, as long at t≤√(r)/2ηα, we have that  W_t∈_2.
For item <ref>, again since  ^_t_F≤α√(r), we have that the euclidian length of the trajectory of the internal weights until step t is at most η tα/√(r). Now, by lemma <ref>, R_() is (α√(r))-Lipschitz. Hence, R_(_0) - R_(_t)≤ tηα^2 for all . 





  §.§.§ Starting from zero prediction layer

We will use the following fact from online convex optimization.

Let f_1,…,f_T:^n→ be L-Lipschitz convex functions. Let _0 = 0 and _t+1 = _t - η∇ f_t(_t). Here, ∇ f_t(_t) is some sub-gradient of f_t at _t. Then, for any ^*∈^n we have,

    ∑_t=1^T f_t(_t) ≤∑_t=1^T f_t(^*) + ^*^2/2η + η TL^2/2





Assume that all activations in  are C-Lipschitz and satisfy |σ(0)|≤ C, and that ℓ is L-Lipschitz. Define  α = 2L(3C)^()√(()). Fix ϵ >0, a prediction matrix W^*∈ M_k,r with W^*_F≤M/√(r), and _0∈_1.5 with _0^=0.
Let _1,…,_T be the weights produced by algorithm <ref> with step size η' = η/r for η≤8ϵ/α^2, with T≥M^2/2ηϵ and with arbitrary batch size m. Furthermore, assume that 

    √(r)≥MLTηα^2/ϵ + 2Tηα

Then, there is some t∈ [T] such that _(_t)≤_(_0|W^*) +3ϵ.


By Lemma <ref> we have that for all t, 

    _(_t|W^*) = _(,y)∼ℓ (W^*R_(_t),y)≤_(_0|W^*) + MLtηα^2/√(r)

Since √(r)≥MLTηα^2/ϵ we have that

    _(_t|W^*)≤_(_0|W^*)+ϵ

throughout the optimization process. Likewise, _t∈_2 for all t∈ [T], and therefore R_(_t)≤α√(r)/2L.
Now, consider the convex functions f_t:M_k,r→ defined by f_t(W)= L_S_t(_0|W). Since R_(_t)≤α√(r)/2L and ℓ is L-Lipschitz, f_t is (α√(r)/2)-Lipschitz.
Hence, applying theorem <ref> we conclude that

    ∑_t=1^T _S_t(_t)    ≤   ∑_t=1^T _S_t(_t | W^*)  + M^2/r/2η' + Tη'α^2r/8
       =   ∑_t=1^T _S_t(_t | W^*)  + M^2/2η + Tηα^2/8

Now, since T≥M^2/2ηϵ and η≤ϵ 8 /α^2
we have that

    1/T∑_t=1^T _S_t(_t) ≤1/T∑_t=1^T _S_t(_t | W^*)  +2ϵ

Taking expectation (w.r.t. the mini-batches) and using equation (<ref>) we get 

    1/T∑_t=1^T _(_t) ≤_(_0|W^*)+3ϵ

In particular, there is some t∈ [T] for which _(_t)≤_(_0|W^*)+3ϵ





  §.§.§ Starting from random prediction layer

In this section we assume that = [k], that ℓ is the logistic-loss, and that all acitivations are C-bounded. Denote α=8√(2)(8C)^()√(())




Let  be a distribution on ^r× [k] such that _(,j)∼(x> C√(r)) = 0.
Let W^*∈ M_k× r be a matrix such that _^1(W)=_(,y)∼ℓ^1(W,y)≤δ. Then, for all W∈ M_k× r

    ∇_(W)≥^0-1_(W)-δ/2W^*_F - δ√(2r)C


Let E=W^*/W^*. Fix an example (,y) and denote ℓ_(,y)(t)=ℓ_y((W+tE)). We have that ∇_(W)≥∇_(W),-E = -_(,y)∼ℓ_(,y)'(0).
By example <ref> we have

    -ℓ_(,y)'(0)=E,_y - (W) = ∑_i=1^k p_i(W)[(E)_y-(E)_i] = ∑_i y p_i(W)[(E)_y-(E)_i]

Now, if ℓ^1(W^*,y)=0 then (E)_y-(E)_i≥1/W^*_F for all i y and hence ℓ_(,y)'(0)≥1/W^*_F∑_i y p_i(W) = 1-p_y(W)/W^*_F≥ 0. If furthermore ℓ^0-1(W,y)=1 then p_y(W)≤1/2. In this case, -ℓ_(,y)'(0)≥1/2W^*_F. On the other hand, we always have ℓ_(,y)'(0)≤E··_y-(W)≤ C√(2r). It follows that

    ∇_(W)   ≥   _(,y)∼(ℓ^0-1_y(W)=1 and ℓ^1_y(W^*)=0)1/2W^*_F -
    _(,y)∼(ℓ^1_y(W^*)=1)C√(2r)
       ≥   ^0-1_(W)-δ/2W^*_F - δ√(2r)C





Fix ϵ >0, M>2 and suppose that _0 are weights such that


  * _0∈_1.5

  * There is  W^*∈ M_k,r with W^*_F≤M/√(r) such that ^2_(_0|W^*)≤δ for δ = ϵ/√(2)4CM

  * _(_0)≤_0
 
Let _1,…,_T be the weights produced by algorithm <ref> with step size η/r for η≤ϵ^2/4M^2 α^4, with T≥8M^2_0/ηϵ^2 and with arbitrary batch size m. Furthermore, assume that

    √(r)≥ TMηα^2

Then, there is some t∈ [T] such that ^0-1_(_t)≤ 2ϵ.

Since T≤√(r)/2ηα and T≤√(r)/Mηα^2, by lemma <ref>, we have ^1_(_t)≤δ for each _t.
Denote ϵ_t = ^0-1_(_t) and let _t be the stochastic gradient at time t. By claim <ref>, we have that

    ∇_(_t)_F≥(ϵ_t-δ)√(r)/2M - δ√(2r)C ≥(ϵ_t-ϵ)√(r)/2M

Now, since each ℓ_(,y) is (∞,α√(r), α^2r)-bounded (lemma <ref>), we have

    _(_t+1) ≤_(_t) - η/r∇_(_t),_t + α^2r/2η^2/r^2_t^2_F

Taking expectation over the stochastic gradient and using the fact that by the boundness of ℓ_(,y), _t_F≤α√(r), we get

    _(_t+1) ≤_(_t) - η/r∇_(_t)^2_F + η^2α^4/2

Applying equation (<ref>) we get

    _(_t+1) ≤_(_t) - η (ϵ_t-ϵ)_+^2/4M^2 + η^2α^4/2

Now, if (ϵ_t-ϵ)_+^2  ≥ϵ^2, we have

    _(_t+1) ≤_(_t) - ηϵ^2/4M^2 + η^2α^4/2

Since η≤ϵ^2/4M^2 α^4, we get

    _(_t+1) ≤_(_t) - ηϵ^2/8M^2

On the other hand, we always have _(_t+1) ≥ 0.
Hence, in the first _(_0)8M^2 /ηϵ^2 steps, there must be at least one step t in which (ϵ_t-ϵ)_+^2  ≤ϵ^2. The proof concludes as

    ϵ_t ≤(ϵ_t-ϵ)_+ + ϵ≤√((ϵ_t-ϵ)^2_+) + ϵ≤ 2ϵ







 §.§ Initial conditions




  §.§.§ Finite support representation of kernel space functions

For a Hilbert space  we define by ℬ(,^k) the collection of bounded operators from  to ^k. Concretely, (,^k) is the collection of all functions W:→^k of the form W=(_1,,…,_k,) for _1,…,_k∈. ℬ(,^k) is a Hilbert space itself w.r.t. the Frobenius inner product W,W' = ∑_i=1^k_i,'_i. For ∈^k and ∈ we denote by ⊗∈(,^k) the operator (⊗)(') = ,'. Note that ⊗_F = ·
Fix a normalized kernel κ:×→. For ∈^k and f:→ we define f:→^k by f() = f(). For ∈ we denote κ^(')=κ(,').
In this section we will show that functions in _κ^k can be replaced by functions of the form ∑_i=1^m _i κ^_i without loosing too much in terms of classification accuracy.



Let B be the unit ball in a Hilbert space . Let {(_t,y_t)}_t=1^∞⊂ B× [k] be a sequence of examples such that there is W^*∈(,^k) with W^*_F≤ M and ∀ t, ℓ^1(W^*_t,y_t) = 0.
Consider the following version of the perceptron algorithm.  Start with W_t=0 and for every t, if (W_t_t)_y_t<a+max_y' y_t(W_t_t)_y' update W_t+1 = W_t+(_y_t-_ŷ_t)⊗_t. Here, ŷ_t=_y(W_t_t)_y. Then, the algorithm makes at most (2+2a)M^2 mistakes. Likewise, the Frobenius norm of the final matrix is at most (2+2a)M

Denote U_t = (_y_t-_ŷ_t)⊗_t. We have that whenever there is an update, W_t,U_t≤ a. In this case

    W_t+1_F^2 = W_t+U_t_F^2 = W_t_F^2 + U_t^2_F + 2W_t,U_t≤W_t_F^2 + 2 + 2a

Hence, after T updates, the norm of W_t is at most √((2+2a)T). On the other hand W^*,U_t≥ 1. Hence, after T updates, the projection of W_t on the direction W^*/W^* is at least T/W^*≥T/M. It follows that T/M≤√((2+2a)T) which implies that T≤ (2+2a)M^2. Likewise, at this point W_t≤√((2+2a)T)≤ (2+2a)M.



Suppose that  is M-separable w.r.t. κ. Then,  is (4M)-separable by a function of the form ^* = ∑_i=1^m _i κ^_i with _i≤√(2) for all i and m≤ 4M^2

(sketch)
Let  be a Hilbert space and let Ψ:→ be a mapping such that κ(,')=Ψ(),Ψ('). Let {(_t,y_t)}_t=1^∞ be a sequence of i.i.d. samples from . Suppose that we ran the algorithm from lemma <ref> with a=1 on the sequence {(Ψ(_t),y_t)}_t=1^∞.
With probability 1, the number of updates the algorithm will make will be m≤ 4M^2. Hence, upon termination, we will have W∈(,^k) such that ^1_(W∘Ψ)=0 and W=∑_i=1^m _i⊗Ψ(_i) where W_F≤ 4M and each _i is a difference of two _j's and therefore has a norm of √(2). 
The proof concludes as W∘Ψ = ∑_i=1^m _i κ^_i



Let B be the unit ball in a Hilbert space ,  be a distribution on B×, ℓ:^k×→ [0,∞) a loss function that is convex and L-Lipschitz, W^*∈(,^k) and ϵ >0. There are _1,…,_m∈^k and _1,…,_m∈ B such that for W:=∑_i=1^m_i⊗_i we have,

	
  * _(W) ≤_(W^*) + ϵ
	
  * For every i, _i≤ϵ/L
	
  * W_F ≤W^*_F
	
  * m≤M^2L^2/ϵ^2


Denote M=W^*. Suppose that we run stochastic gradient decent on  w.r.t. the loss ℓ, with
learning rate η = ϵ/L^2, and with projections onto the
ball of radius M. Namely, we start with W_0=0 and at each iteration
t≥ 1, we sample (_t,y_t)∼ and perform the update,

    W̃_t = W_t-1 - η∇ℓ_y_t(W_t-1_t) ⊗_t


    W_t = W̃_t   W̃_t_F≤ M
    
    M W̃_t/W̃_t_F   W̃_t_F > M

Where ∇ℓ_y_t(W_t-1_t) is a sub-gradient of  ℓ_y_t at W_t-1_t.
After T=M^2L^2/ϵ^2 iterations the loss in expectation would
be at most ϵ (see for instance Chapter 14 in
<cit.>). In particular, there exists a sequence of
at most M^2L^2/ϵ^2 gradient steps that attains a solution
W with _(W)≤_(W) + ϵ. 
The proof concludes as each update adds a matrix of the form
⊗ with ≤ L and possibly multiply the current matrix by a scalar of absolute value ≤ 1.


Similarly to corollary <ref> we have

Let  be a distribution on ×, ℓ:^k×→ [0,∞) a loss function that is convex and L-Lipschitz, ^*∈^k_κ and ϵ >0. There are _1,…,_m∈^k and _1,…,_m∈
such that for :=∑_i=1^m_iκ^_i we have,

	
  * _() ≤_(^*) + ϵ
	
  * For every i, _i≤ϵ/L
	
  * _κ≤^*_κ
	
  * m≤M^2L^2/ϵ^2





  §.§.§ Initial conditions



Let W ∈ M_r,m be a matrix with i.i.d. entries drawn from (0,σ^2). Then, w.p. at least 1-2exp(-α^2r/2), W_2≤ (1+α)σ(√(r)+√(m))



Suppose that r≳log(|S|/δ) + d. Then, 


  * W.p. ≥ 1-δ we have that _0∈'_1.5.

  * If also r≥ k then w.p. ≥ 1-δ we have that _0∈_1.5.





Let  be a skeleton with C-bounded activations.
Let  be a random initialization 

    r ≥(4C^4)^()+1log(8||/δ)/ϵ^2 .

Then, for all ,', with probability of at least 1-δ,

    |k_(,')-k_(,')|≤ϵ .




Let  be a skeleton with ReLU activations.
Let  be a random initialization with

    r ≳^2()log(||/δ)/ϵ^2 .

Then, for all ,' and ϵ≲1/(), with probability of at least 1-δ,

    |k_(,')-k_(,')|≤ϵ .






Let  be a skeleton with C-bounded activations. Let ^*∈^k_ with ^*_≤ M. Suppose

    r ≳L^4   M^4   (4C^4)^()+1log(LMC ||/ϵδ)/ϵ^4 .

Then, with probability of at least 1-δ over the choices
of _0 there is a prediction matrix W^* such that W^*_F≤2M/√(r) and _(_0|W^*)≤_(^*) + ϵ



Let  be a skeleton with ReLU activations and
ϵ≲1/(). Let ^*∈^k_ with ^*_≤ M. Suppose

    r ≳L^4  M^4 ^3() log(LM ||/ϵδ)/ϵ^4+d  .
 
Then, with probability of at least 1-δ over the choices
of _0 there is a prediction matrix W^* such that W^*_F≤2M/√(r) and _(_0|W^*)≤_(^*) + ϵ

Theorems <ref> and <ref> are similar, but not identical, to theorems 4 and 5 from <cit.>. We next prove theorem <ref>. The proof of theorem <ref> is very similar.
(sketch)
By corollary <ref> we can restrict to the case that ^* = ∑_i=1^m _iκ_^_i such that ∀ i, _i≤ϵ/L and m≤M^2L^2/ϵ^2. Define W^* = ∑_i=1^M _i⊗R__i(_0)/r and

    () = W^*R_(_0) = ∑_i=1^m _iκ__0^_i()

Denote α = (√(18))^√(()). We will show that the conclusion of the theorem holds given the following three conditions, that by theorem <ref> and corollary <ref> happens w.p. ≥ 1-δ over the choice of _0.


  * For (1-ϵ/(1+√(2)α)ML)-fraction (according to ) of the examples, 

    ∀ i, |κ__0(_i,)-κ_(_i,)|≤ϵ^2/M^2L^2


  * For all i,j, |κ__0(_i,_j)-κ_(_i,_j)|≤ϵ^2/M^2L^2 

  * _0∈'_1.5

First, we have

    W^*^2_F = 1/r∑_i,j=1^m _i,_jκ__0(_i,_j)

Since |κ__0(_i,_j)-κ_(_i,_j)|≤ϵ^2/M^2L^2 for all i,j and also |_i,_j|≤ϵ^2/L^2 we have

    rW^*^2_F    ≤   [∑_i,j=1^m _i,_jκ_(_i,_j)]  + m^2ϵ^4/M^2L^4
       =   ^*_^2 + m^2ϵ^4/M^2L^4≤ 2M^2

Now, for the examples satisfying ∀ i, |κ__0(_i,)-κ_(_i,)|≤ϵ^2/M^2L^2 we have

    ()-^*() 
    = ∑_i=1^m _i(κ__0(_i,)-κ_(_i,)) ≤∑_i=1^m_iϵ^2/M^2L^2≤ mϵ/Lϵ^2/M^2L^2≤ϵ/L

Since the loss is L-Lipschitz, it grows by at most ϵ on these examples, when we move from ^* to . As for the remaining examples, since _0∈'_1.5 and W^*_F≤√(2)M/√(r), lemma <ref> implies that 

    ()-^*()≤() + ^*()≤√(2)α M + M

Hence, when we move from ^* to , the loss grows by at most (1+√(2)α)ML. As the remaining examples occupies at most ϵ/(1+√(2)α)ML-fraction of the examples, these examples contributes at most ϵ to the loss when moving from ^* to .



Let  be a skeleton with C-bounded activations.
Suppose that  is M-separable w.r.t. κ_, r≳ (4C^4)^()+1M^4log(||M/δ). Then, w.p. ≥ 1-δ over the choice of _0, there is W^*∈ M_k,r with W^*_F≤10M/√(r) such that ^1_(_0|W^*)≤δ

(sketch)
By corollary <ref>,  is separable by a function ^* = ∑_i=1^m _iκ_^_i such that ∀ i, _i≤√(2), m≤ 4M^2 and ^*≤ 4M.
Define W = ∑_i=1^M _i⊗R__i(_0)/r and

    () = WR_(_0) = ∑_i=1^m _iκ__0^_i()

Now, for r≳ (4C^4)^()+1M^4log(||M/δ) we have by theorem <ref> that w.p. ≥ 1-δ/2, |κ__0(_i,_j)-κ_(_i,_j)|≤1/32M^2 for all i,j and also |_i,_j|≤ 2. Hence,

    rW^2_F    ≤   [∑_i,j=1^m _i,_jκ_(_i,_j)]  + 2m^21/32M^2
       =   ^*_^2 + 2m^21/32M^2≤^*_^2 + 32M^41/32M^2≤ 17M^2 ≤ 25 M^2

Now, w.p. ≥ 1-δ/2, (1-δ)-fraction of the examples satisfies |κ__0(_i,)-κ_(_i,)|≤1/16√(2)M^2 for all i. For those examples we have

    ()-^*() 
    = ∑_i=1^m _i(κ__0(_i,)-κ_(_i,)) ≤∑_i=1^m√(2)1/16√(2)M^2≤4M^2√(2)/16√(2)M^2 = 1/4

Those examples satisfies ℓ^1/2((),y)=0, and hence ^1/2_(h)≤δ. The proof concludes by taking W^*=2W



Let X_1,…,X_k be independent standard Gaussians. Then max_iX_i≤√(2log(k))

Denote Z = max_iX_i and let t=√(2log(k)). By Jensen's inequality and the moment generating function of the normal distribution we have that

    e^t Z≤ e^tZ = max_i e^tX_i≤ k e^tX_1 = ke^t^2/2

Hence, Z≤log(k)/t + t/2 = √(2log(k))



If all activations are C bounded then __0_(_0) ≤ (1+C√(2))log(k)

Fix =(,y). We have that the distribution of ℓ_(_0)= ℓ(W^_0R_(_0),y) is the distribution of
ℓ((X_1,…,X_k),1) where X_1,…,X_k are independent Gaussians of mean zero and variance σ^2 = R_(_0)^2/r≤ C^2. Hence we have that

    __0l_(_0)    =   _X-log(e^X_1/∑_i=1^ke^X_i)
    
       =    - X_1 + log(∑_i=1^ke^X_i)
    
       =   log(∑_i=1^ke^X_i)
    
       ≤   log(k e^max_iX_i)
    
       ≤   log(k)+max_iX_i

and the proof concludes as by lemma <ref> max_iX_i≤σ√(2log(k))




  
Derivation of the main theorems. Theorem <ref> follows from theorem <ref> and lemma <ref>. Likewise, theorem <ref> follows from theorem <ref> and lemma <ref>. Finally, theorem <ref> follows from corollary <ref>, lemma <ref> and lemma <ref>.



  
Acknowledgements:
The author thanks Roy Frostig, Yoram Singer and Kunal Talwar for valuable discussions and comments.


plainnat



