Time/Accuracy Tradeoffs for Learning a ReLU with respect to Gaussian Marginals
Surbhi Goel, Sushrut Karmalkar, Adam Klivans
Introduction
Our main results give a trade-off between the accuracy of the output hypothesis and the running time of the algorithm. We give the first evidence that there is no polynomial-time algorithm for finding a ReLU with error , even when the marginal distribution is Gaussian:
Assuming hardness of the problem of learning sparse parities with noise, any algorithm for finding a ReLU on data drawn from a distribution with Gaussian marginals that has error at most runs in time .
Since gradient descent is known to be a statistical-query algorithm (see Section 4), a consequence of Theorem 1 is the following:
Gradient descent fails to converge to the global minimum for learning the best-fitting ReLU with respect to square-loss in polynomial time, even when the marginals are Gaussian.
This above corollary is unconditional (i.e. does not rely on any hardness assumptions) and shows the necessity of the realizable/noiseless setting in the work of Soltanolkotabi [Sol17] and Brutzkus and Globerson [BG17]. We also give the first approximation algorithm for finding the best-fitting ReLU with respect to Gaussian marginals:
There exists a polynomial-time algorithm for finding a ReLU with error .
The above result uses a novel reduction from learning a ReLU to the problem of learning a halfspace with respect to loss. We note that the problem of finding a ReLU with error remains an outstanding open problem.
2 Our Techniques
In our work we must overcome two technical difficulties. First, in the Klivans and Kothari result, it is obvious that for distributions induced by learning sparse parity with noise, the best fitting majority function will be the one that is defined on inputs specified by . In our setting with respect to ReLUs, however, the constant function will have square-loss , and this may be much lower than the square-loss of any function of the form . Thus, we need to prove the existence of a gap between the correlation of ReLUs with random noise (see Claim 3) versus the correlation of ReLUs with parity (see Claim 4).
Second, Klivans and Kothari use known formulas on the discrete Fourier coefficients of the majority function and an application of the central limit theorem to analyze how much the best-fitting majority correlates with the Gaussian lift of parity. No such bounds are known, however, for the ReLU function. As such we must perform a (somewhat involved) analysis of the ReLU function’s Hermite expansion in order to obtain quantitative correlation bounds.
Approximation Algorithm.
For our polynomial-time algorithm that outputs a ReLU with error , we apply a novel reduction to agnostically learning halfspaces. We give a simple transformation on the training set to a Boolean learning problem and show that the weight vector w corresponding to the best fitting halfspace on this transformed data set is not too far from the weight vector corresponding to the best fitting ReLU. We can then apply recent work for agnostically learning halfspaces with respect to Gaussians that have constant-factor approximation error guarantees. The exponent appears due to the use of an averaging argument (see Section 5).
3 Related Work
Several recent works have proved hardness results for finding the best-fitting ReLU with respect to square loss (equivalently, agnostically learning a ReLU with respect to square loss). Results showing NP-hardness (e.g., [MR18a, BDL18]) use marginal distributions that encode hard combinatorial problems. The resulting marginals are far from Gaussian. Work due to Goel et al. [GKKT17] uses a reduction from sparse parity with noise but only obtains hardness results for learning with respect to discrete distributions (uniform on ).
Using parity functions as a source of hardness for learning deep networks has been explored recently by Shalev-Shwartz et. al. [SSSS17] and Abbe and Sandon [AS18]. Their results, however, do not address the complexity of learning a single ReLU or consider the case of Gaussian marginals. Shamir [Sha18] proved that gradient descent fails to learn certain classes of neural networks with respect to Gaussian marginals, but these results do not apply to learning a single ReLU [VW18].
In terms of positive results for learning a ReLU, work due to Kalai and Sastry [KS09] (and follow-up work [KKKS11]) gave the first efficient algorithm for learning any generalized linear model (GLM) that is monotone and Lipschitz, a class that includes ReLUs. Their algorithms work for any distribution and can tolerate bounded, mean-zero and additive noise. Soltanolkotabi [Sol17] and Brutzkus and Globerson [BG17] were the first to prove that gradient descent converges to the unknown ReLU in polynomial time with respect to Gaussian marginals as long as the labels have no noise. Other works for learning one-layer ReLU networks with respect to Gaussian marginals or marginals with milder distribution assumptions [ZYWG18, GLM17, ZSJ+17, GKLW18, GKM18, MR18b] also assume a noiseless training set or training set with mean-zero i.i.d. (typically sub-Gaussian) noise. This is in contrast to the setting here (agnostic learning), where we assume nothing about the noise model.
There are several works for the related (but different) problem of agnostically learning halfspaces with respect to Gaussian marginals [KKMS08, ABL14, Zha18, DKS18]. While agnostically learning ReLUs may seem like an easier problem than agnostically learning halfspaces (at first glance the learner sees “more information” from the ReLU’s real-valued labels), the quantitative relationship between the two problems is still open. In the halfspace setting, we can assume without loss of generality that an adversary has flipped an fraction of the labels. In contrast, in the setting with ReLUs and square loss, it is possible for the adversary to corrupt every label.
Preliminaries
The model of learning we work with in the paper is the agnostic model of learning. In this model the labels are allowed to be arbitrary and the task of the learner is to output a hypothesis within an error of the optimal. More formally,
A class is said to be agnostically learnable in time over the Gaussian distribution to error if there exists an algorithm such that for any distribution on with the marginal on being Gaussian, uses at most draws from , runs in time at most , and outputs a hypothesis such that .
We assume that succeeds with constant probability. Note that the algorithm above outputs the “best-fitting” with respect to up to an additive . We will denote to be the empirical error of over samples .
Learning Sparse Parities with Noise.
In this work we will show that agnostically learning over the Gaussian distribution is as hard as the problem of learning sparse parities with noise over the uniform distribution on the hypercube.
Given access to samples drawn from the uniform distribution over and target function being the parity function over an unknown set of size , the problem of learning sparse parities with noise is the problem of recovering the set given access to noisy labels where the label is flipped with probability .
Learning sparse parities with noise is generally considered to be a computationally hard problem and has been used to give hardness results for both supervised [GKKT17] and unsupervised learning problems [BGS14]. The current best known algorithm for solving sparse parities with constant noise rate is due to Valiant [Val15] and runs in time .
Any algorithm for solving -SLPN up to constant error must run in time .
Gaussian Lift of a Function
Our reduction will require the following definition of a Gaussian lift of a boolean function from [KK14].
Hermite Analysis and Gaussian Density
We will need the following facts about Hermite polynomials.
For all , and .
and for , .
Hardness of Learning ReLU
In this section, we will show that if there is an algorithm that agnostically learns a ReLU in polynomial time, then there is an algorithm for learning sparse parities with noise in time , violating Assumption 1. We will follow the approach of [KK14]. Let be an unknown parity for some . We will show that there is an unbiased ReLU that is correlated with the Gaussian lift of the unknown sparse parity function. Notice that dropping a coordinate from the input samples makes the labels of the resulting training set totally independent from the input. In contrast, dropping results in a training set that is still labeled by a noisy parity. Therefore, we can use an agnostic learner for ReLUs to detect a correlated ReLU and distinguish between the two cases. This allows us to identify the variables in one by one.
We formalize the above approach by first proving the following key property,
Let denote the Gaussian lift of the parity on variables in . For every with and for some , there exists such that where only depends on variables in .
Let where is 1 at coordinate and 0 everywhere else. We will show that
Let and denote the degree Hermite coefficients of the function and function respectively. It is easy to see that the Hermite expansion of the Gaussian lift of a parity supported on is,
In order to finish the proof of Lemma 1 we will need the expansion of in terms of products of univariate Hermite polynomials. Toward this end we establish the following claims.
, and for , .
Combining Equation 1 and Claim 2 now yields,
From Fact 2 and Claim 4 we see that and for . Additionally, since we see that each . This gives us,
To finish the proof of Lemma 1, we will look at each term in the outer summation above. Let the term for any fixed be denoted by . Since for odd , observe that is non-zero if and only if is even and each for . We have
Since (by assumption), for all even and equal to 0 for all odd . Thus . Lower bounding , we have
Now we present our main algorithm (Algorithm 1) that reduces learning sparse parities with noise to agnostically learning ReLUs and a proof of its correctness.
If there is an algorithm to agnostically learn unbiased ReLUs on the Gaussian distribution in time and samples , then there is an algorithm to solve -SLPN in time where is the noise rate.
In particular, if Assumption 1 is true, then any algorithm for agnostically learning (unbiased) ReLUs on the Gaussian distribution must run in time .
Given a set of samples from the -SPLN problem, we claim that Algorithm 1 can recover all indices belonging to the sparse parity when run with appropriate parameters. We will first show that if a variable is relevant then the error is smaller compared to when it is irrelevant. It is easy to see that is with probability and otherwise. Let denote the distribution obtained by dropping the th coordinate from the lifted distribution and let denote the set of active indices of the parity. The proof of the theorem follows from the following claims,
If then for all w, .
If then there exists with such that
Claims 3 and 4 imply that we have a gap of at least for some between the relevant and irrelevant variable case. Setting in Algorithm 1 will let us detect this gap. Since is an agnostic learner for ReLU, as long as we know that with probability , for all , runs on and outputs such that , and for all , .
Using standard concentration inequalities for sub-Gaussian and subexponential random variables [Ver] we see that using a validation set of samples, we have for all , . Therefore, we can differentiate the two cases as in the Algorithm with confidence . It is easy to see that the run time of the algorithm is , and that this can be amplified to obtain an algorithm with any desired confidence using standard techniques. ∎
Lower Bounds for SQ Algorithms
A consequence of Theorem 3 is that any statistical-query algorithm for agnostically learning a ReLU with respect to Gaussian marginals yields a statistical-query algorithm for learning parity functions on unknown input bits. This implies that there is no polynomial time statistical-query (SQ) algorithm that learns a ReLU with respect to Gaussian marginals for a certain restricted class of queries.
SQ Dimension.
Let be a concept class and let be the SQ dimension of with respect to . Then any learning algorithm that uses tolerance parameter lower bounded by and has access to an oracle that returns -approximate expectations (with respect to ) of unit norm correlation queries and queries that are independent of the target, requires at least queries.
In this model of learning, we show the following lower bound for the problem of learning ReLUs over the Gaussian distribution.
Any SQ algorithm for agnostically learning a ReLU with respect to any distribution satisfying Gaussian marginals over the attributes, requires unit norm correlation queries or queries independent of the target with tolerance to an oracle that returns -approximate expectations with respect to .
Define the problem of ‘restricted -sparse parities’ as the problem of learning an unknown parity function over set , where contains out of the first variables over with input distribution . Here is the uniform distribution on and the labels are given by . It is easy to see that Theorem 4 implies that we require unit norm queries to learn this function class from queries to an oracle with tolerance .
We give a proof by contradiction. Suppose we can agnostically learn ReLUs with respect to Gaussian marginals using an SQ algorithm with queries to the corresponding oracle with tolerance . We will show how to use to design an SQ algorithm for the problem of learning restricted -sparse parities using queries contradicting Theorem 4.
Since for , such an algorithm would solve the problem of ‘restricted -sparse parities’ using queries of tolerance . This contradicts the lower bound on the number of queries required to solve -SPLN of tolerance we get from Theorem 4. ∎
Approximation Algorithm
In this section we give a learning algorithm that runs in polynomial time in all input parameters and outputs a ReLU that has error where is the error of the best-fitting ReLU. The main reduction is a hard thresholding of the labels to create a training set with Boolean labels. We then apply a recent result giving a polynomial-time approximation algorithm for agnostically learning halfspaces over the Gaussian distribution due to Awasthi et. al. [ABL14]. We present our algorithm and give a proof of its correctness.
There is an algorithm (Algorithm 2) that given samples such that x is drawn from and recovers a unit vector w such that where
Let and so, . Define the to be the set of points that are -close to the optimal , i.e. . By Markov’s inequality,
We now apply Theorem 8 from [ABL14] which gives an algorithm with polynomial running time in and that outputs a w such that and . For unit vectors , for some absolute constant where is the angle between the vectors (see Lemma 2 in [ABL14]). The triangle inequality and the fact that implies that if then . Applying this to and yields . Since the ReLU function is 1-Lipschitz, we have
Setting and rescaling we have ∎
Conclusions and Open Problems
We have shown hardness for solving the empirical risk minimization problem for just one ReLU with respect to Gaussian distributions and given the first nontrivial approximation algorithm. Can we achieve approximation ? Note our results holds only for the case of unbiased ReLUs, as the constant function may achieve smaller square-loss than any unbiased ReLU. Interestingly, all positive results that we are aware of for learning ReLUs (or one-layer ReLU networks) with respect to Gaussians also assume the ReLU activations are unbiased (e.g., [BG17, Sol17, GKM18, GKLW18, GLM17, ZYWG18]). How difficult is the biased case?
References
Appendix A Useful Properties
For such that , we have
Observe that for , , thus we have
The last follows from observing that the integral is of the variance of a variable. Similarly, we have
Here the last equality follows from standard computation of mean of the absolute value of a Gaussian random variable. ∎
Appendix B Omitted Proofs
Here we used the additional property on the recurrence of , that is, . ∎
Since using Fact 3, we have
Here the third equality follows since and not in therefore, the label is random for the ReLU. The last equality follows from Lemma 1. Note that, for any ReLU, the minimum error is achieved when . Thus when the best ReLU achieves error at least . ∎
Since is not a relevant variable , from Theorem 1, we know that there exists with dependent only on variables in correlated with ,