Complexity theoretic limitations on learning DNF's
Amit Daniely, Shai Shalev-Shwatz
Introduction
In the PAC learning model , a learner is given an oracle access to randomly generated samples where is sampled from some unknown distribution on and for some unknown . It is assumed that comes from a predefined hypothesis class , consisting of valued functions on . The learning problem defined by is to find that minimizes . For concreteness, we take , and say that the learning problem is tractable if there is an algorithm that on input , runs in time and outputs, w.h.p., a hypothesis with .
Assuming , the status of most basic computational problems is fairly well understood. In a sharp contrast, years after Valiant’s paper, the status of most basic learning problems is still wide open – there is a huge gap between the performance of best known algorithms and hardness results (see ). The main obstacle is the ability of a learning algorithm to return a hypothesis which does not belong to (such an algorithm is called improper). This flexibility makes it very hard to apply reductions from -hard problems (again, see ). Until recently, there was only a single framework, due to Kearns and Valiant , to prove lower bounds on learning problems. The framework of makes it possible to show that certain cryptographic assumptions imply hardness of certain learning problems. As indicated above, the lower bounds established by this method are very far from the performance of best known algorithms.
Learning intersections of halfspaces is hard, even over the boolean cube.
AgnosticallySee section 2.1 for a definition of agnostic learning. learning conjunctions is hard.
Agnostically learning halfspaces is hard, even over the boolean cube.
Agnostically learning parities is hard, even when is uniform.
We note that 4, 6 can be established under cryptographic assumptions, using the cryptographic technique . Also, 5 follows from the hardness of learning parities with noiseNote that agnostically learning parities when is uniform is not equivalent to the problem that is usually referred as “learning parities with noise”, since in agnostic learning, the noise might depend on the instance. , which is often taken as a hardness assumption. As for 2, the previously best lower bounds only rule out learning intersections of polynomially many halfspaces, again under cryptographic assumptions. To the best of our knowledge, 1-6 implies the hardness of virtually all (distribution free) learning problems that were previously shown hard (under various complexity assumptions).
Unless we face a dramatic breakthrough in complexity theory, it seems unlikely that hardness of learning can be established on standard complexity assumptions such as (see ). Indeed, all currently known lower bounds are based on cryptographic assumptions. Similarly to Feige’s paper , we rely here on the hardness of refuting random -SAT formulas. As cryptographic assumptions, our assumption asserts the hardness on average of a certain problem that have been resisted extensive attempts of attack during the last 50 years (e.g. ).
Let be a random -SAT formula on variables. Precisely, each -SAT constraint is chosen independently and uniformly from the collection of -variate -SAT constraints. A simple probabilistic argument shows that for some constant (depending only on ), if , then is not satisfiable w.h.p. The problem of refuting random -SAT formulas (a.k.a. the problem of distinguishing satisfiable from random -SAT formulas) seeks efficient algorithms that provide, for most formulas, a refutation. That is, a proof that the formula is not satisfiable.
Concretely, we say that an algorithm is able to refute random -SAT instances with clauses if on fraction of the -SAT formulas with constraints, it outputs “unsatisfiable”, while for every satisfiable -SAT formula with constraints, it outputs “satisfiable”See a precise definition in section 2.2. Since such an algorithm never errs on satisfiable formulas, an output of “unsatisfiable” provides a proof that the formula is not satisfiable.
The problem of refuting random -SAT formulas has been extensively studied during the last 50 years. It is not hard to see that the problem gets easier as gets larger. The currently best known algorithms can only refute random instances with constraints for and constraints for . In light of that, Feige made the assumption that for , refuting random instances with constraints, for every constant , is hard (and used that to prove hardness of approximation results). Here, we put forward the following assumption.
Computational problem is RSAT-hard if its tractability refutes assumption 1.1.
We outline below some evidence to the assumption, in addition to known algorithms’ performance.
Resolution lower bounds. The length of resolution refutations of random -SAT formulas have been extensively studied (e.g. ). It is known (theorem 2.24 in ) that random formulas with constraints only have exponentially long resolution refutations. This shows that a large family of algorithms (the so-called Davis-Putnam algorithms ) cannot efficiently refute random formulas with constraints. These bounds can also be taken as an indication that random instances do not have short refutations in general, and therefore hard to refute.
Hierarchies lower bounds. Another family of algorithms whose performance has been analyzed are convex relaxations . In it is shown that relaxations in the Lasserre hierarchy with sub-exponential many constraints cannot refute random formulas with constraints.
2 Results
By boosting results , hardness of improper learning is automatically very strong quantitatively. Namely, for every , it is hard to find a classifier with error . Put differently, making a random guess on each example, is essentially optimal.
Additional results. Theorem 1.3 implies the hardness of several problems, in addition to DNFs.
Learning intersections of halfsapces over is RSAT-hard.
Agnostically learning conjunctions is RSAT-hard.
Agnostically learning halfspaces over is RSAT-hard.
Agnostically learning paritiesA parity is any hypothesis of the form for some . is RSAT-hard, even when the marginal distribution is uniform on .
For every , learning automata of size is RSAT-hard.
Theorem 1.6 is a direct consequence of theorem 1.3, as a DNF formula with clauses is an intersection of halfspaces. Theorem 1.7 follows from theorem 1.3, as learning DNFs can be reduced to agnostically learning conjunctions . Theorem 1.8 follows from theorem 1.7, as conjunctions are a subclass of halfspaces. Theorem 1.9 follows from theorem 1.3 and , who showed that learning DNFs can be reduced to agnostically learning parities over the uniform distribution. Theorem 1.10 follows from theorem 1.3 by a simple reduction (see section 4).
3 Related work
As indicated above, hardness of learning is traditionally established based on cryptographic assumptions. The first such result follows from , and show that if one-way functions exist, than it is hard to learn polynomial sized circuits. To prove lower bounds on simpler hypothesis classes, researchers had to rely on more concrete hardness assumptions. Kearns and Valiant were the first to prove such results. They showed that assuming the hardness of various cryptographic problems (breaking RSA, factoring Blum integers and detecting quadratic residues), it is hard to learn automata, constant depth threshold circuits, -depth circuits and boolean formulae. Kharitanov showed, under a relatively strong assumption on the complexity of factoring random Blum integers, that learning constant depth circuits (for unspecified constant) is hard. Klivans and Sherstov showed that, under the hardness of the shortest vector problem, learning intersections of polynomially many halfspaces is hard. By , it also follows that agnostically learning halfspaces is hard. Hardness of agnostically learning halfspaces also follows from the hardness of learning parities with noise .
There is a large body of work on various variants of the standard (improper and distribution free) PAC model. Hardness of proper learning, when the leaner must return a hypothesis from the learnt class, in much more understood (e.g. ). Hardness of learning with restrictions on the distribution were studied in, e.g., . Hardness of learning when the learner can ask the label of unseen examples were studied in, e.g., .
Preliminaries
A hypothesis class, , is a series of collections of functions . We often abuse notation and identify with . The instance spaces we consider are , or (see section 2.2). Distributions on are denoted . The error of is . For a class , we let . We say that is realizable by (resp. ) if (resp. ). A sample is a sequence . The empirical error of on is , while the empirical error of on is . We say that is realizable by (resp. ) if (resp. ).
A learning algorithm, , obtains an error, confidence and complexity parameters , , and , as well as oracle access to examples from unknown distribution on . It should output a (description of) hypothesis . We say that (PAC) learns if, for every realizable , w.p. , outputs a hypothesis with error . We say that agnostically learns if, for every , w.p. , outputs a hypothesis with error . We say that is efficient if it runs in time , and outputs a hypothesis that can be evaluated in time . Finally, is proper if it always outputs a hypothesis in . Otherwise, we say that is improper.
2 Random Constraints Satisfaction Problems
Let be the collection of (signed) -tuples, that is, vectors for and distinct . For we denote . Each defines a function by .
3 The methodology of [14]
In this section we briefly survey the technique of to prove hardness of improper learning. Let be a polynomial ensemble of distributions, that is, is a distribution on and . Think of as a distribution that generates samples that are far from being realizable. We say that it is hard to distinguish realizable from -random samples if there is no efficient randomized algorithm with the following properties:
For every realizable sample ,
If , then with probability over the choice of , it holds that
Let be a distribution over such that if , then is a Bernoulli r.v. with parameter , independent from . Let be the distribution over obtained by taking independent examples from . For , is the probability of getting at most heads in independent tosses of a fair coin. By Hoeffding’s bound, this probability is . Therefore, is -scattered.
Hardness of distinguishing realizable from scattered samples turns out to imply hardness of learning.
Every hypothesis class that satisfies the following condition is not efficiently learnable. There exists such that for every there is an -scattered ensemble for which it is hard to distinguish between a -random sample and a realizable sample.
The basic observation of is that an efficient algorithm, running on a very scattered sample, will return a bad hypothesis w.h.p. The reason is that the output classifier has a short description, given by the polynomially many examples the algorithm uses. Hence, the number of hypotheses the algorithm might return is limited. Now, since the sample is scattered, all these hypotheses are likely to perform purely. Based on that observation, efficient learning algorithm can efficiently distinguish realizable from scattered samples: We can simply run the algorithm on the given sample to obtain a classifier . Now, if the sample is realizable, will perform well. Otherwise, if the sample is scattered, will perform purely. Relying on that, we will be able to distinguish between the two cases. For completeness, we include the proof of theorem 2.2 in section 5.
Proof of theorem 1.3
The main conceptual idea is to interpret CSP problems as learning problems. Let be some predicate. Every naturally defines , by mapping each -tuple to the truth value of the corresponding constraint, given the assignment . Namely, . Finally, let be the hypothesis class .
In the case that sample is random, it is, in a sense, “very random”. Yet, it is not scattered at all! Since all the labels are , the constant function realizes the sample.
Next, we explain how we address these two points.
Making the sample scattered
We will consider the predicate defined by
We will group the coordinates of vectors in into groups, corresponding to ’s literals, and index them by . For , will be the vector whose all coordinates are , except that for , the coordinate is .
Now, given , we show that equals to for a DNF formula with clauses. Indeed, suppose that is a DNF representation of . It is enough to show that for every there is a conjunction of literals such that for all , . To see that such exists, note that if and only if, for every , all the values in in the coordinates of the form are .
It will be convenient to use the following strengthening of Chernoff’s bound, recently proved (with a very simple proof) by Linial and Luria
Let be indicator random variables such that for every , . Then, for every ,
Partition the constraints in into blocks, .
If and, for all , the set variables appearing in is disjoint from the set of variables appearing in , add to .
If , return “satisfiable”.
Let be the -constraint which is the conjunction of all the constraints in .
Run on the instance and return the same answer as .
Suppose now that is random. First, we claim that will reach 3 w.p. . Indeed, we will show that for large enough and any fixed , the probability of exiting at step 2c is , from which it follows that the probability of exiting at step 2c for some is . To show that, let be the indicator r.v. that is if and only if one of the variables appearing in also appears in one of . Denote also
Let . It is enough to show that w.p. . Indeed, for every fixed , since the number of variables appearing in is , the probability that is , even if we condition on . Hence, the probability that any fixed variables out of are all is . By theorem 3.2,
It follows that w.p. , , and the claim follows as for sufficiently large , . Finally, it is not hard to see that, conditioning on the event that the algorithm reaches step 3, is random as well, and therefore w.p. over the choice of , (and therefore ) will return “random” w.p. over its internal randomness.
Proof The realization is defined by the function , defined as follows. We will index the coordinates of vectors in by and let
Indeed, write for and . Now consider the formula defined by
5 Wrapping up – concluding theorem 1.3
Proof theorem 1.10
Proof of theorem 2.2 [14]
Let be the hypothesis class in question and suppose toward a contradiction that algorithm learns efficiently. Let be the maximal number of random bits used by when it run on the input . This includes both the bits describing the examples produced by the oracle and “standard” random bits. Since is efficient, . Define
By assumption, there is a -scattered ensemble for which it is hard to distinguish a -random sample from a realizable sample. Consider the algorithm defined below. On input ,
Run with parameters and , such that the examples’ oracle generates examples by choosing a random example from .
Let be the hypothesis that returns. If , output “realizable”. Otherwise, output “unrealizable”.
Next, we derive a contradiction by showing that distinguishes a realizable sample from a -random sample. Indeed, if the input is realizable, then is guaranteed to return, with probability , a hypothesis with . Therefore, w.p. will output “realizable”.
What if the input sample is drawn from ? Let be the collection of functions that might return when run with parameters and . We note that , since each hypothesis in can be described by bits. Namely, the random bits that uses and the description of the examples sampled by the oracle. Now, since is -scattered, the probability that for some is at most . It follows that the probability that responds “realizable” is . This leads to the desired contradiction and concludes our proof.
Open questions
An obvious direction for future work is to establish more lower bounds. We list below some basic learning problems that we are unable to resolve even under the random -SAT assumption.
Learning intersections of a constantly many halfspaces. It is worth noting that no known algorithm can learn even intersections of halfspaces.
Agnostically Learning halfspaces with a constant approximation ratio. We note that the last problem was shown hard under the much stronger assumption of .
In addition, as discussed in , our work and have connections to several TCS areas, including hardness of approximation, cryptography, refutation algorithms and average case complexity.
Amit Daniely is a recipient of the Google Europe Fellowship in Learning Theory, and this research is supported in part by this Google Fellowship. Shai Shalev-Shwartz is supported by the Israeli Science Foundation grant number 590-10. We thank Uri Feige, Guy Kindler and Nati Linial for valuable discussions.