scieee AI-readable full text Open interactive document viewer

Accuracy vs. simplicity : a complex trade-off

Aragonès, Enriqueta; Gilboa, Itzhak; Postlewaite, Andrew; Schmeidler, David

Abstract

Inductive learning aims at finding general rules that hold true in a database. Targeted learning seeks rules for the predictions of the value of a variable based on the values of others, as in the case of linear or non-parametric regression analysis. Non-targeted learning finds regularities without a specific prediction goal. We model the product of non-targeted learning as rules that state that a certain phenomenon never happens, or that certain conditions necessitate another. For all types of rules, there is a trade-off between the rule's accuracy and its simplicity. Thus rule selection can be viewed as a choice problem, among pairs of degree of accuracy and degree of complexity. However, one cannot in general tell what is the feasible set in the accuracy-complexity space. Formally, we show that finding out whether a point belongs to this set is computationally hard. In particular, in the context of linear regression, finding a small set of variables that obtain a certain value of R2 is computationally hard. Computational complexity may explain why a person is not always aware of rules that, if asked, she would find valid. This, in turn, may explain why one can change other people's minds (opinions, beliefs) without providing new information.

Full text

Accuracy vs. Simplicity: A Complex Trade-Off∗ Enriqueta Aragones† , Itzhak Gilboa‡ , Andrew Postlewaite§ , and David Schmeidler¶ January 2003 Abstract Inductive learning aims at finding general rules that hold true in a database. Targeted learning seeks rules for the prediction of the value of a variable based on the values of others, as in the case of linear or non-parametric regression analysis. Non-targeted learning finds regularities without a specific prediction goal. We model the product of non-targeted learning as rules that state that a certain phenomenon never happens, or that certain conditions necessitate another. For all types of rules, there is a trade-offbetween the rule’s accuracy and its simplicity. Thus rule selection can be viewed as a choice problem, among pairs of degree of accuracy and degree of complexity. However, one cannot in general tell what is the feasible set in the accuracycomplexity space. Formally, we show that finding out whether a point belongs to this set is computationally hard. In particular, in the context of linear regression, finding a small set of variables that obtain ∗Earlier versions of this paper circulated under the title “From Cases to Rules: Induction and Regression.” We thank Hal Cole, Joe Halpern, Bart Lipman, Yishay Mansour, and Nimrod Megiddo for conversations and references. †Institut d’Anàlisi Econòmica, C.S.I.C. [email protected] ‡Tel-Aviv University and Cowles Foundation, Yale University. Gilboa gratefully acknowledges support from the Israel Science Foundation. [email protected] §University of Pennsylvania; Postlewaite gratefully acknowledges support from the National Science Foundation. ap[email protected]enn.edu ¶Tel-Aviv University and the Ohio State University.Schmeidler gratefully acknowledges support from the Israel Science Foundation. [email protected] 1 a certain value of R2is computationally hard. Computational complexity may explain why a person is not always aware of rules that, if asked, she would find valid. This, in turn, may explain why one can change other people’s minds (opinions, beliefs) without providing new information. “The process of induction is the process of assuming the simplest law that can be made to harmonize with our experience.” (Wittgenstein 1922, Proposition 6.363) 1Motivation Ann: “Russia is a dangerous country.” Bob: “Nonsense.” Ann: “Don’t you think that Russia might initiate a war against a Western country?” Bob: “Not a chance.” Ann: “Well, I believe it very well might.” Bob: “Can you come up with examples of wars that erupted between two democratic countries?” Ann: “I guess so. Let me see... How about England and the US in 1812?” Bob: “OK, save colonial wars.” Ann: “Well, then, let’s see. OK, maybe you have a point. Perhaps Russia is not so dangerous.” Bob seems to have managed to change Ann’s views. He did it by drawing her attention to “the democratic peace” phenomenon, sometimes attributed to Kant.1Observe, however, that Bob has not provided Ann with any new 1Kant (1795) wrote, “The republican constitution, besides the purity of its origin (having sprung from the pure source of the concept of law), also gives a favorable prospect for the desired consequence, i.e., perpetual peace. The reason is this: if the consent of the citizens is required in order to decide that war should be declared (and in this constitution it cannot but be the case), nothing is more natural than that they would be very cautious in commencing such a poor game, decreeing for themselves all the calamities of war.” Ob- 2 factual information. Rather, Bob has pointed out a certain regularity in the cases that are known to both Ann and Bob. This regularity is, apparently, new to Ann. Yet, she had had all the factual information needed to observe it before meeting Bob. It simply did not occur to Ann to test the accuracy of the generalization suggested to her by Bob. Much of human knowledge (and, indeed, all of mathematics) has to do with noticing facts and regularities that, in principle, could have been figured out based on existing knowledge, rather than with acquiring new information per se. Why do people fail to draw all the relevant conclusions from the information they possess? Sometimes the reason is that certain aspects of the observations they have simply do not occur to them. In the example above, it is quite possible that Ann never thought of the type of regime as an explanatory variable for the occurrence of wars. Sometimes a regularity involves a combination of several variables. For many real life prediction problems there are many potentially relevant variables. But the number of combinations of these variables is much larger than the number of variables (in fact, the latter increases in an exponential fashion as a function of the former), making it practically impossible to think of all possible regularities that might, once observed, prove true. A recent paper by La Porta, Lopezde-Silanes, Shleifer, and Vishny (1998) on the quality of government states, “We find that countries that are poor, close to the equator, ethnolinguistically heterogeneous, use French or socialist laws, or have high proportions of Catholics or Muslims exhibit inferior government performance.” One level of difficulty is to come up with all the variables listed above as potential explanatory variables. A second level of difficulty is to consider sophisticated combinations as the one suggested in this paragraph. In conclusion, there are many regularities that people do not notice, even though they might find them true once these regularities are pointed out to serve that Kant wrote in favor of the republican constitution, rather than democracy per se. For recent documentations of this phenomenon, see Maoz and Russett (1992, 1993), Russett (1993), and Maoz (1998). 3 them. The main results of this paper attempt to explain this phenomenon more formally. Before we present these results, however, we attempt to convince the reader that the issue under discussion has more than anecdotal interest. 2 Belief Formation Economic theory does not in general deal with the question of belief formation. Economic agents are assumed to have beliefs and to act on them, and these beliefs tend to take the form of a Bayesian prior probability. The literature offers axiomatizations of this paradigm, which may be used to elicit beliefs of agents who follow the axioms, but there is no description of a process by which one generates such beliefs. There are several reasons for an interest inthe process of belief formation. Assume, first, that one takes a normative interpretation of expected utility theory. One may be convinced by Savage’s (1954) axioms that one would like to be an expected utility maximizer. The next step would be to determinea utility function and a probability measure. At this step, one needsprobabilistic beliefs. Whereas any probability measure would do in order to be “rational” in the sense of satisfying Savage’s axioms, one would normally like to choose a reasonable probability measure. Thus, one is faced with the question, what are reasonable beliefs to hold? This question is also faced by organizations or teams, who attempt to aggregate beliefs of various individuals. Even if each of these individualshas a Bayesian prior, when these priors differ, the group mustdecide on a reasonable priorbased on their shared information. There are also descriptive reasons to be interested in the process of belief formation. First, having a theory of this process might shed light on regularities in the prior probabilities that Bayesian agents entertain. One may be able to categorize economic problems by the type of information available in 4 them, and by the corresponding process by which the available information results in probabilistic beliefs. Second, a better understanding of this process can potentiallydelineate the scope of the Bayesian paradigm, and facilitate speculationabout the types of beliefs that people might have when they do not have a Bayesian prior. The question of belief formation is beyond the scope of this paper, but the problem we deal with here can be viewed as a particular sub-problem of belief formation. Specifically, we ask how individual instances are generalized into rules.This inductive process is likely to be a part of any theory of belief formation. If the sun rises every day, wetendtobelievethatitwouldrise tomorrow. Naturally, only a small part of our beliefs can be attributed to such simple and clear regularities. Yet, slightly more complex and less accurate regularities also feed the belief formation process. Moreover, there are many circumstances in which beliefs are captured byrules. For example, when one uses linear regression to generate predictions, one may be viewed as believingin the simple rule of the regression equation.2Organizations often have simple rules that may be viewed as reflecting the organization’s beliefs. A credit card agency has to make daily decision on approval of potential card holders, where each such decision is an act that reflects beliefs regarding the applicants’ financial credibility.But the agency is not free to select any probabilistic beliefs to guide its decisions. It may berestricted by organizational feasibility to rules that can be followed by many clerks, or by a software package. Furthermore, there are legal restrictions for which the agency has to be able to justify its decisions based on simple rules. (There may also belegal restrictions on the type of variables used in these rules.) Thus, to the extent that the agency’s strategy reflects its beliefs, these beliefs are given by simple rules. It follows that for some situations, the analysis of rules in this paper may be viewed as a simplistic theory of belief formation. More generally, we tend 2Indeed, Bray and Savin (1986) suggest to model agents’ beliefs by linear regression. 5 to view the analysis of rules merely as a first step in any reasonable account of the process of belief formation. The motivating example above suggests that even this first step is, in reality, far from trivial. 3 Outline As argued by Wittgenstein (1922), “The process of induction is the process of assuming the simplest law that can be made to harmonize with our experience.” (Proposition 6.363).3Thus, in performing induction, people have a general preference, other things being equal, for rules that are as simple as possible and as accurate as possible. Simple rules that accurately describe thedatagivereasontohopethatonemaybeabletopredictfutureobservations. Generating such rules appears to be a rather modest condition that scientific theories are expected to satisfy. Simple and accurate rules can also be used to transfer information succinctly from one person to another, or to remember what seems to be the essence of a database. One should normally expect to face a trade-offbetween simplicity and accuracy. Consider the example of linear regression.4Given a set of “predicting” variables, one attempts to provide a good fit to a “predicted” variable. A common measure of accuracy is the coefficient of determination, R2.A reasonable measure of complexity is the number of predictors one uses. As is well known, sufficiently increasing the number of predictors will generically provide a perfect fit, namely, a perfectly accurate rule. But this rule will be complex. In fact, its complexity will be equal to the number of observations in the database, and it will be considered to have little predictive value. By contrast, a small number of predictors may not obtain a satisfactory level of 3Simplicity was mentioned by William of Occam seven centuries earlier. But Occam’s razor is an argument with a normative flavor, whereas here we refer to a descriptive claim about the nature of human reasoning. 4While regression analysis is a basic tool of scientific research, it can also be viewed as a (somewhat idealized) model of non-professional human reasoning. See Bray and Savin (1986), who used regression analysis to model the learning of economic agents. 6 accuracy. Thus, the trade-offbetween simplicity and accuracy is inherent in the problem of induction. Regression analysis is an example of targeted learning.Itisgearedto the prediction of a specific variable in a given set-up. Targeted learning must provide an answer to a prediction problem, typically because a decision is called for. But inductive learning can also be untargeted. Untargeted inductive learning is a process by which rules are observed for future use, without a concrete problem in mind. For example, the democratic peace example above may be modelled as a rule, “democracies do not engage in wars among themselves”. Such a rule does not predict when wars would occur in general, nor does it state that dictatorships would necessarily declare wars on other countries. It does, however, provide an observation that may prove useful. Observe that people engage in targeted as well as in untargeted learning. In fact, it may be hard to avoid untargeted learning when the data seem obviously to suggest an accurate and simple rule. One may speculate that the human brain has evolved to engage in untargeted learning for several reasons. First, since learning may be complex, it might be wise to perform some learning tasks “off-line”, without a concrete goal in mind, and to retain their output for future use. Second, memory constraints may not allow one to retain all data. In such a case, a meaningful summary of the data is called for, and untargeted learning may result in simple and accurate rules that will be easy to remember, while retaining the most relevant parts of the information.5 In this paper we deal with targeted as well as with untargeted learning. We consider linear regression and non-parametric regression as models of targeted learning, and we offer two models of untargeted learning. Our focus in these models is on the trade-offbetween simplicity and accuracy. This 5Observe that this process may generate biases as well. In particular, one may tend to remember pieces of evidence that are consistent with the rules one has observed more than one would remember inconsistent evidence. 7 trade-offis especially conspicuous in a targeted learning problem, such as a prediction problem, where one needs to select a single method for prediction. But it is also implicitly present in untargeted learning, where one has to decide which rules are worthwhile rememberingfor future use. Our main results state that the trade-offbetween simplicity and accuracy is hard to perform. The reason is that, in these models, determining whether there exists a rule with pre-specified degrees of accuracy and of simplicity is a computationally hard problem. It follows that people cannot be expected to know all the possible rules that may apply to any database of more than trivial size. This, in turn, may explain why people may be surprised to learn rules that hold in a database they are already familiar with. Thus, the motivating examples above may be explained by the computational complexity of the accuracy-simplicity trade-offof inductive learning. We employ a very simple model, in which observations (or past experiences) are vectors of numbers. An entry in the vector might be the value of a certain numerical variable, or a measure of the degree to which the observation has a particular attribute. For the quality of government example above, one vector might represent information for a single country for a particular year, with the attributes/variables including the proportion of the population of different religious orientations, the linguistic and legal background of the country, the physical location of the country, etc.Thus, we model the information available to an individual as a database consisting of a matrix of numbers, where rows correspond to observations (distinct pieces of information) and columns to attributes.6 Targeted learning is modelled by functional rules: rules that point to a functional relationship between several (“predicting”) variables and a given variable(the “predicted” variable). A well-known example of such a ruleis linear regression,wherewetakeR2to be a measure of accuracy and the number of predictors to bea measure of complexity. However, we will also 6The degree to which an observation has a certain attribute will normally be in [0,1]. 8 discuss non-parametric regression, where one may choose not only the set of predicting variables but also any function thereof in attempting to fitthe predicted variable. To model untargeted learning, we investigate two types of rules. The first are exclusionary: they state that certain phenomena cannot occur.7For instance, consider the rule “There are no instances in which a democratic country initiated war against another democratic country”. Formally, an exclusionary rule is an assignment of values to a subset of columns, interpreted as claiming that this combination of values cannot occur. It is likely that there will often be counter-examples to conjectured rules. Indeed, the war between England and the US in 1812 was quoted as a counter-example to this rule. But such a counter-example need not render the rule useless. We define a notion of accuracy of rules that can roughly be thought of as the average degree to which the rule holds in the given knowledge base. As a measure of the rule’s complexity we use the number of attributes it involves. The second closely related type of rules are conditional: they state that if an observation has certain attributes, then it also has another. For instance, the rule “Democratic countries have universal schooling” can be thought of as saying that if attribute “democratic” has the value 1, then so will attribute “universal schooling”. Formally, a conditional rule is a pair, where the first element is an assignment of values to certain columns, and the second is an assignment of a value to another column, interpreted as claiming that the first assignment necessitates the second. The complexity of a conditional rule will be defined as the number of attributes it involves. Conditional rules can be stated as exclusionary rules. For instance, “Democratic countries have universal schooling” is equivalent to “There are no countries without universal schooling that are democratic”. Conversely, exclusionary rules can also be stated as conditional ones. For instance, the 7This is in line with Popper’s (1965) dictum, which suggested that a scientifictheory be formulated by stating what cannot happen, highlighting the conditions under which the theory would be falsified. 9 whether a given kis in the r-cut of F0(X,Y )when the input is (X,Y,k).For agivenk, computing the k-cut of F0(X,Y )is a polynomial problem (when theinputis(X,Y,r)), bounded by a polynomial of degree k. Recall, however, that kis bounded only by the number of columns in X.Thus,finding the frontier of the set F0(X, Y ), as a function of Xand Y,isahardproblem. The optimization problem depicted in Figure 2 has a fuzzy feasible set, as described in Figure 3. _________________________ Insert Figure 3 about here _________________________ A predictor or a decision maker may choose a functional rule that maximizes v(k,r)outofalltherulessheisawareof,butthelatterarelikelyto constitute only a subset of the set of rules defining the actual set F0(X, Y ). Hence, many of the rules that people formulate are not necessarily the simplest (for a given degree of accuracy) or the most accurate (for a given degree of complexity). 4.2 Non-Parametric Regression Linear regression may not always be the most natural model of prediction. First, one may wish to consider non-linear functions. Second, one may not wish to commit to a particular functional form. Consider, for example the variable “the degree of corruption of the judiciary”. Such a variable allows more than one obvious quantification. However, the choice of a quantification should be made in tandem with the choice of the functional form of the regression. In this sub-section we focus on the informational content of the variables. Thus, we consider a regression problem in which one is free to choose both a 16 set of predicting variables and a function thereof that approximates a given variable. We refer to this problem as non-parametric regression.13 Consider a database consisting of observations, or cases C={1, ..., n}, with attributes (predicting variables) A={1, ..., m}.ThedataareX= (xij)i≤n,j≤mand Y=(yi)i≤nwhere xij,y i∈R. We wish to predict the value of Yas a function of (Xj)j≤m. Let a predictor for Ybe a pair (E,g)where E⊂Aand g:RE→R. Given a predictor for Y,(E,g),itisnaturaltodefine its degree of inaccuracy in case i∈Cas the squared error: SE((E,g),i)=(g(xij)j∈E−yi)2 and its degree of accuracy over the entire database as the mean squared error: MSE(E,g)=1 nPi≤nSE((E,g),i). Thus, MSE(E,g)corresponds to the mean of squared errors (MSE) in linear regression analysis. Observe that if the matrix Xand the vector Yare sampled from a continuous joint distribution, then, with probability 1all values of each variable are distinct. In this case, every single variable Xj(defining E={j}) will predict Yperfectly for an appropriately chosen function g:R→R.The accuracy-simplicity trade-offis rather trivial in this situation. But this is not the case if, for instance, the variables can assume only finitely many values, and, in particular, if these are binary variables that indicate the existence of attributes in cases. In this situation, some values of each variable Xjare likely to recur, and it is no longer clear whether Yis a function of a particular 13We remind the reader that our use of the terms “predicting variables” and “predicted variable” should be taken with a grain of salt. This section addresses the formal problem of finding a set of variables that, in a given database,providesagoodfittoanothervariable. Such a set of variables need not suggest a theory by which one can predict, let alone influence, the so-called “predicted variable”. 17 Xjor of a combination of several Xj’s. In interpreting the following result, the reader is asked to focus on models in which it is not implausible to find recurring values in the matrix Xand the vector Y.14 We define the following problem: Problem NON-PARAMETRIC REGRESSION:GivenamatrixX and a vector Y,anaturalnumberk≥1and a real number r∈R,istherea predictor for Y,(E,g), such that |E|≤kand MSE(E,g)≤r? Theorem 2 NON-PARAMETRIC REGRESSION is an NP-Complete problem. Notice that this theorem is not implied by the previous one. That is, thefactthatitishardtotellwhetheralinearrelationship(withparameters (k,r))existsdoesnotimplythatitishardtotellwhetheranyfunctional relationship (with these parameters) exists. While a sub-class of functions is easier to exhaust, solution algorithms are not restricted to enumeration of all possible functions. It follows that looking at a database and finding functional relationships in it is, in general, a hard problem. Correspondingly, one may be surprised to be told that such a functional relationship holds, even if, in principle, one had all the information needed to find it. 5UntargetedLearning 5.1 Exclusionary Rules Rules have traditionally been modelled by propositional logic, which may capture rather sophisticated formal relationships (see Carnap (1950)). By contrast, we offer here a very simplified model of rules, aiming to facilitate 14When Xand Yare sampled from a continuous joint distribution, one may wish to restrict the function g(say, to be Lipschitzian with constant bounded away from 0)and obtain similar results. 18 the discussion of the process of induction, and to highlight its the similarity of rules to regression analysis.15 As above, let C={1, ..., n}be the set of observations,orcases,and A={1, ..., m}— the set of variables,orattributes. We assume that data are given by a matrix X=(xij)i≤n,j≤mof real numbers in [0,1], such that, for all i≤n,j≤m,xij measures the degree to which case ihas attribute j.16 Observe that no predicted variable Yisgiveninthisproblem. An exclusionary rule is a pair (E,ϕ)such that E⊂Aand ϕ:E→ {0,1}.17 The interpretation of the exclusionary rule (E,ϕ)is that there is no case whose values on the attributes in Ecoincide with ϕ.Forinstance, assume that the set of cases consists of countries at given years. Saying that “democratic countries provide universal education” would correspond to setting E={democratic, universal_education}and ϕ(democratic)= 1,ϕ(universal_education)=0, stating that one cannot find a case of a democratic country that did not provide universal education. To what extent does an exclusionary rule (E,ϕ)hold in a database X? Let us begin by asking to what extent the rule applies to a particular case i. Wesuggestthatthisbemeasuredby 18 15For other approaches to modelling learning processes, see Mitchell (1997). 16The restriction of xij to the unit interval is immaterial. It is designed to facilitate the interpretation of xij as the degree to which a case has an attribute. However, our results hold also if xij are unrestricted. 17One may also define ϕ:E→[0,1], and allow rules to have intermediate values of the attributes. For some purposes it may even be useful to let ϕassume interval values, that is, to exclude ranges of the attribute value. Our analysis can be extended to these more general cases. 18There are many alternatives to this measure. First, one may choose absolute value of the difference instead of its square. We chose the latter mostly for consistency with standard statistical measures. Second, sets of attributes can be used for evaluation of accuracy. Specifically, consider the measure θ((E,ϕ),i)=max ∅6=F⊂E 1 |F|Pj∈F(xij −ϕ(j))2. Our results hold for this measure as well. 19 θ((E,ϕ),i)=max j∈E(xij −ϕ(j))2. Thus, if case iis a clear-cut counter-example to the rule (E,ϕ),iwill be a case in which all attributes in Ehave the values specified for them by ϕ.That is, xij =ϕ(j)for all j∈E, and then θ((E,ϕ),i)=0. By contrast, if at least one of the attributes in Eis not shared by iat all, that is, (xij −ϕ(j))2=1 for at least one j∈E,thenθ((E,ϕ),i)=1,reflecting the fact that ifails to constitute a counter-example to (E,ϕ), and thus (E,ϕ)holds in case i. Generally, the closer are the values (xij)j∈Eto (ϕ(j))j∈E, the closer is ito being a counter-example to (E,ϕ). For instance, one might wonder whether the Falkland Islands war is a counter-example to the democratic peacerule. Tothisend,onemustdeterminetheextenttowhichArgentina wasademocracyatthattime. ThemoreisArgentinadeemeddemocratic, the stronger is the contradiction suggested by this example to the general rule. Given the degree to which a rule (E,ϕ)applies in each case i,itisnatural to define thedegreeofaccuracyof the rule (E,ϕ)given the entire database Xas its average applicability over the individual cases:19 θ(E,ϕ)=1 nPi≤nθ((E,ϕ),i). This definition appears to be reasonable when the database contains cases that were not selectively chosen. Observe that one may increase the value of θ(E,ϕ)by adding cases to C,inwhichrule(E,ϕ)hasnobiteandis therefore vacuously true. For instance, the veracity of the democratic peace phenomenon will be magnified if we add many cases in which no conflict occurred. We implicitly assume that only relevant cases are included in C. More generally, one may augment the model by a relevance function, and weight cases in θ(E,ϕ)by this function.20 19To simplify notation, we use the letter θfor different domains. Throughout this paper it is a measure of accuracy of a rule. 20The notion of conditional rules (in sub-section 5.3 below) offers another solution to this problem. 20 In untargeted learning, one need not select a single rule by which to perform prediction. Rather, one may maintain many rules that appear to be valid, and to use them when the need may arise. Yet, people tend to prefer simpler rules also in the context of untargeted learning. For instance, the rule “democratic countries provide universal education” is more complex thantherule“thereisalwaysuniversaleducation”,correspondingtotheset E={universal_education}and ϕ(universal_education)=0. If, indeed, the column universal_education in the matrix Xconsisted of ones alone, it is more likely that one would come up with the generalization that there is always universal education than with the democracy—universal education relationship. In our model, the complexity of a rule (E,ϕ)is naturally modelled by the number of attributes it refers to, namely, |E|. Thus, performing induction may be viewed as looking for a small set Ethat, coupled with an appropriate ϕ, will have a high degree of accuracy θ(E,ϕ). Parallelingthe discussion in the context of linear regression, one may denote by F(X)the set of pairs (k,r)for which there exists a rule with degree of accuracy rand degree of complexity k.Again,onemaydefine F0(X)≡{(k,r)∈R+×[0,1] |∃(k0,r0)∈F(X),k≥k0,r≤r0} as the feasible set of (k,r)pairs. Out of this set, a subset of rules will be noticed and remembered. One may assume that, for a function v:R+× [0,1] →Rthat is decreasing in its first argument and increasing in the second, and for an appropriate constant c∈R, the subset of rules that a person would notice and remember are those for which v(k,r)≥c,as depicted in Figure 4. _________________________ Insert Figure 4 about here _________________________ 21 A person who considers possible rules is confronted with the following problem: given a database Xand a pair k,r, is it the case that (k,r)∈ F0(X)?Or,differently stated: Problem INDUCTION:GivenamatrixX, a natural number k≥1 and a real number r∈[0,1], is there an exclusionary rule (E,ϕ)such that |E|≤kand θ(E,ϕ)≥r? We can now state the following result. Theorem 3 INDUCTION is an NP-Complete problem. As mentioned above, the proof of Theorem 3 can be modified to show that the problem remains NP-Complete even if ris fixed, for a range of values of r. 5.2 Simple Exclusionary Rules The induction problem stated above is computationally hard for two combinatorial reasons: first, there are many subsets Ethat may be relevant to the rule. Second, for each given Ethere are many assignments of values ϕ. Our intuitive discussion, however, focussed on the first issue: we claim that it is hard to find minimal regularities because there are many subsets of variables one has to consider. It is natural to wonder whether the complexity of problem INDUCTION is due to the multitude of assignments ϕ,andhas little to do with our intuitive reasoning about the multitude of subsets.21 We therefore devote this sub-section to simple exclusionary rules,defined as exclusionary rules (E,ϕ)where ϕ≡1. A simple exclusionary rule can thus be identified by a subset E⊂A.Wedenoteθ((E,ϕ),i)by θ(E,i),and θ(E,ϕ)—byθ(E). Explicitly, 21This concern can only be aggravated by reading our proof: we actually use all attributes in the proof of complexity, relying solely on the difficulty of finding the assignment β. 22 θ(E,i)=max j∈E(1 −xij)2. and θ(E)=1 nPi≤nθ(E,i). We now formulate the following problem: Problem SIMPLE INDUCTION:GivenamatrixX,anaturalnumber k≥1and a real number r∈[0,1], is there a simple exclusionary rule E⊂Asuch that |E|≤kand θ(E)≥r? We can now state the following result. Proposition 4 SIMPLE INDUCTION is an NP-Complete problem. It follows that the difficulty of the problem INDUCTION is not an artifact of the function ϕ, but rather, has to do also with the selection of variables one considers.22 5.3 Conditional Rules Rules are often formulated as conditional statements. For instance, it is more natural to state the rule “All ravens are black”, or “If xis a raven, then x is black” then the rule “There are no non-black ravens”. Obviously, the two formulations are equivalent, and they are both equivalent to “If xis not black, then xis not a raven”. Indeed, this equivalence lies at the heart of Hempel’s (1945) paradox of confirmation. Yet, this equivalence holds only when the 22SIMPLE INDUCTION deals with µm k¶possible selections of subsets of kcolumns. INDUCTION, by contrast, deals with µm k¶2kselections of binary values for kcolumns. Yet, the fact that SIMPLE INDUCTION is NP-Complete does not mean that INDUCTION is as well. The reason is that one is not restricted to algorithms that exhaust all possible solutions. Using certain properties of a problem, one may be able to find a solution in a larger set of possible solutions more efficiently than in a smaller set. 23 rules are supposed to be perfectly accurate. By contrast, when we are trying to assess their degree of accuracy in general, this equivalence breaks down, asweexplainshortly.Wethereforeintroduceconditionalrulesasaseparate formal entity. Let a conditional rule be a pair ((E,ϕ),(j, b)) such that EÃA,ϕ:E→ {0,1},j∈A\E,andb∈{0,1}. The interpretation of the conditional rule ((E,ϕ),(j, b)) is that, whenever the attributes in Eassume the corresponding values specified by ϕ, attribute jassumes the value b.Thus,therule “All ravens are black” can be modelled by setting E={raven},ϕ(raven)= 1,j=black,b=1. Similarly, the democratic peace phenomenon may be captured by E={country_1_democratic,country_2_democratic}, ϕ(country_1_democratic)=ϕ(country_2_democratic)=1,j=war,and b=0. Observe that, if E=∅, the conditional rule states that attribute jalways assumes the value b.Itthuscorrespondstotheexclusionaryrulethatrules out the value (1 −b)for attribute j. To what extent does conditional rule ((E,ϕ),(j, b)) hold in case i?We propose that the applicability of the rule in the case be measured by θ(((E,ϕ),(j, b)),i)=(xij −b)2. That is, in each particular case, the rule is judged solely by the degree to which the case agrees with the rule’s consequent. However, not all cases are going to be equally relevant to the assessment of the rule given the entire database. Intuitively, the rule “All ravens are black” should be assessed based on ravens alone. Thus, a case is relevant to the assessment of a rule to the degree that it offers an example of the antecedent of the rule. Formally, let w(((E,ϕ),(j, b)),i)=1−maxl∈E(xil −ϕ(l))2. (This expression is assumed to be 1if E=∅.)23 23Observe that, using the notation from sub-section 5.1, the weight wcan be written as 24 Thus, if case iagrees with ϕon all attributes specified in E,itisavery relevant test case for the rule. If, however, at least one of the attributes of case iis completely different from ϕ(that is, for one l∈E,(xil −ϕ(l))2=1), then case iis irrelevant to the rule, and should not be part of its evaluation. With this definition, it is natural to define the degree to which conditional rule ((E,ϕ),(j, b)) holds in the entire database by θ((E,ϕ),(j, b)) = Pi≤nw(((E,ϕ),(j,b)),i)θ(((E,ϕ),(j,b)),i) Pi≤nw(((E,ϕ),(j,b)),i) in case the denominator does not vanish. If it does, we define θ((E,ϕ),(j, b)) = 1. Thus, a rule is evaluated by a weighted average of the extent to which it holds in each particular case, where the weights are defined by an endogenous relevance function. According to this definition, “All ravens are black” will be assessed based on the population of ravens, whereas “Everything that is not black is not a raven” will be judged by its correctness in the population of non-black objects. If one of these rules is true to degree 1,soistheother. 24 But if their degrees of correctness are in [0,1), they need not be equal. In fact, they can be as different as this half-open interval allows.25 w(((E,ϕ),(j, b)),i)=1−θ((E,ϕ),i). θ((E,ϕ),i)measures the degree to which case isatisfies the assignment ϕover the set E. For an exclusionary rule, a high θindicates that the case is a counter-example to the rule. For the antecedent of a conditional rule, a high θindicates low relevance of the case to the rule. 24Observe that the populations are defined as fuzzy sets. For instance, each case ioffers an example of a raven — say, attribute l— to a continuous degree xil ∈[0,1]. Foraconditionalruletobetruetodegree1, everycaseiwith Pi≤nw(((E,ϕ),(j, b)),i)>0has to satisfy xij =b. In the example, “All ravens are black” holds to degree 1if and only if every observation that is at least partly a raven is absolutely black. Equivalently, every example has to be absolutely black, or absolutely not a raven. This is equivalent to the fact that the exclusionary rule “There are no non-black ravens” holds to degree 1. 25For instance, in a database with n−1black ravens and one white raven, “All ravens are black” will be true to degree 1−1 nwhereas “All non-black objects are not ravens” — to degree 0. 25 For i≤sand j≤l,zij =0; For s<i≤s+land j≤l,xij =zij =1if i=s+jand xij =zij =1if i6=s+j; For j≤l,xnj =znj =0; For i≤s+l,yi=1and yn=0. We claim that there is a subset Kof {X1,...,X l}∪{Z1, ..., Zl}with |K|≤ k≡lfor which R2 K≥r≡1iffShas an exact cover from S. First assume that such a cover exists. That is, assume that there is a set J⊂{1, ..., l}such that {Sj}j∈Jconstitutes a partition of S.Thismeansthat Pj∈J1Sj=1Swhere 1Ais the indicator function of a set A.Letαbe the intercept, (βj)j≤lbe the coefficients of (Xj)j≤land (γj)j≤l—of(Zj)j≤lin the regression. Set α=0.Forj∈J, set βj=1and γj=0,andforj/∈Jset βj=0and γj=1.Weclaimthatα1+Pj≤lβjXj+Pj≤lγjZj=Ywhere 1is a vector of 1’s. For i≤sthe equality α+Pj≤lβjxij +Pj≤lγjzij =Pj≤lβjxij =yi=1 follows from Pj∈J1Sj=1 S.Fors<i≤s+l,theequality α+Pj≤lβjxij +Pj≤lγjzij =βj+γj=yi=1 follows from our construction (assigning precisely one of {βj,γj}to 1and the other — to 0). Obviously, α+Pj≤lβjxnj +Pj≤lγjznj =0=yi=0. The number of variables used in this regression is l. Specifically, choose K={Xj|j∈J}∪{Zj|j/∈J},with|K|=l, and observe that R2 K=1. We now turn to the converse direction. Assume, then, that there is a subset Kof {X1, ..., Xl}∪{Z1, ..., Zl}with |K|≤lfor which R2 K=1. Equality for observation nimplies that this regression has an intercept of zero (α=0in the notation above). Let J⊂{1, ..., l}be the set of indices of the Xvariables in K, i.e., {Xj}j∈J=K∩{X1, ..., Xl}. We will show that {Sj}j∈Jconstitutes a partition of S.SetL⊂{1,...,l}be the set of 32 indices of the Zvariables in K, i.e., {Zj}j∈L=K∩{Z1,...,Z l}.Considerthe coefficients of the variables in Kused in the regression obtaining R2 K=1. Denote them by (βj)j∈Jand (γj)j∈L.Define βj=0if j/∈Jand γj=0if j/∈L.Thus,wehave Pj≤lβjXj+Pj≤lγjZj=Y. We argue that βj=1for every j∈Jand γj=1for every j∈L.To see this, observe first that for every j≤l,thes+jobservation implies that βj+γj=1.Thismeansthatforeveryj≤l,βj6=0or γj6=0(this also implies that either j∈Jor j∈L). If for some jboth βj6=0and γj6=0, we will have |K|>l, a contradiction. Hence for every j≤leither βj6=0or γj6=0, but not both. (In other words, J=Lc.) This also implies that the non-zero coefficient out of {βj,γj}has to be 1. Thus the cardinality of Kis precisely l,andthecoefficients {βj,γj}define a subset of {S1,...S l}:ifβj=1and γj=0, i.e., j∈J,Sjis included in the subset, and if βj=0and γj=1, i.e., j/∈J,Sjis not included in the subset. That this subset {Sj}j∈Jconstitutes a partition of Sfollows from the first s observations as above. To conclude the proof, it remains to observe that the construction of the variables (Xj)j≤l,(Zj)j≤l,andYcan be done in polynomial time in the size of the input. ¤ Proof of Theorem 2: We firstshowthatNON-PARAMETRICREGRESSIONisinNP.Tothis end, it suffices to show that, for any given set of attributes E⊂Awith |E|= k,onemayfind in polynomial time (with respect to n×(m+1)) whether there exists a function g:RE→Rsuch that MSE(E,g)≤r. Let there be given such a set E. Restrict attention to the columns corresponding to Eand to Y. Consider these columns, together with Yas a new matrix X0of size n×(|E|+ 1).SorttherowsinX0lexicographically by the columns corresponding to E. Observe that, if there are no two identical vectors (xij)j∈E(for different i’s in 33 C), there exists a function g:RE→Rsuch that MSE(E,g)=0. Generally, MSE(E,g)will be minimized when, for every vector (xij)j∈E∈REthat appears in the matrix corresponding to C×E,g((xij)j∈E)will be set to the average of (yl)over all l∈Cwith (xlj)j∈E=(xij)j∈E.Thatis,forevery selection of values of the predicting variables, the sum of squared errors is minimized if we choose the average value (of the predicted variable) for this selection, and this selection is done separately for every vector of values of the predicting variables. It only remains to check whether this optimal choice of gyields a value for MSE(E,g)that exceeds ror not. We now turn to show that NON-PARAMETRIC REGRESSION is in NP-Complete. We use a reduction of the following problem, which is known to be NP-Complete (see Gary and Johnson (1979)): Problem COVER: Given a natural number p, a set of subsets of S≡ {1,...,p},S={S1,...,S q},andanaturalnumbert≤q, are there tsubsets in Swhose union contains S? (That is, are there indices 1≤j1≤... ≤jt≤qsuch that Sl≤tSjl=S?) Let there be given an instance of COVER: a natural number p,asetof subsets of S≡{1, ..., p},S={S1, ..., Sq},andanaturalnumbert.Define n=p+1,m=q,andk=t.Define (xij)i≤n,j≤mand (yi)i≤nas follows. For i≤p,andj≤m=q,setxij =1if i∈Sjand xij =0otherwise. For i≤n, set yi=1.Forallj≤m,letxnj =0. Finally, set yn=0. We claim that there is a predictor for Y,(E,g),with|E|=kand MSE(E,g)=0iffthere are k=tsubsets in Sthat cover S. Indeed, there exists a predictor for Y,(E,g),with|E|=kand MSE(E,g)=0iff there are kcolumns out of the mcolumns in the matrix, such that no row in the matrix, restricted to these columns, consists of zeroes alone. (Observe that the first pobservations of Yare 1.Thustheonlyproblemindefining gto obtain a perfect match MSE(E,g)=0might occur if some of these vectors, restricted to the these kcolumns, is equal to the last vector, which consists of zeroes for the predicting variables and zero also for Y.) And this 34 holds iffthere are ksets in S={S1, ..., Sq}that cover S. Finally, observe that the construction is polynomial.¤ Proof of Theorem 3: That INDUCTION is in NP is simple to verify: given a suggested rule (E,ϕ), one may calculate θ(E,ϕ)in linear time in the size of the sub-matrix C×E(which is bounded by the size of the input, |C×A|). That INDUCTION is NP-Complete may be proven by a reduction of the satisfiability problem:32 Problem SATISFIABILITY: Given a Boolean function fin Conjunctive Normal Form in the variables y1,...,y p, is there an assignment of values ({0,1}) to the variables for which f=1? Let there be given the function f=Qi≤qfiwhere each factor fiis the summation of variables yjand their negations yj. (The variables are Boolean, summation means disjunction, multiplication means conjunction, and bar denotes logical negation.) Let n=qand m=p. For each factor fi,i≤q=n, let there be a case i. For each variable yj,j≤p=m, let there be an attribute j.Define xij as follows: If yjappears in fi,let xij =0; If yjappears in fi,let xij =1; Otherwise, let xij =0.5. We claim that there exists a valued rule (E,ϕ)with |E|=k=nsuch that θ(E,ϕ)≥r=1ifffis satisfiable by some assignment of values to the variables y1, ..., yp. Observe that every rule (E,ϕ)with |E|=ndefines an assignment of values (0or 1)tothevariables(yj)j≤p,andviceversa. We claim that every rule (E,ϕ)with |E|=nobtains the value θ(E,ϕ)=1 iffthe corresponding assignment satisfies f. To see this, let (E,ϕ)be a rule with |E|=n.Notethatθ(E,ϕ)=1ifffor every case iwe have 32SATISFIABILITY is the first problem that was proven to be NP-Complete. This was done directly, whereas proofs of NP-Completeness of other problems is typically done by reduction of SATISFIABILITY to these problems (often via other problems). See Gary and Johnson (1979) for definitions and more details. 35 θ((E,ϕ),i)=1,whichholdsifffor every case ithere exists an attribute j such that (xij −ϕ(j))2=1,thatis,xij =1−ϕ(j). By construction of the matrix X,xij =1−ϕ(j)iff(i) yjappears in fi,andϕ(j)=yj=1, or (ii) yj appears in fiand ϕ(j)=yj=0. (Observe that, if neither yjnor yjappear in fi,(xij −ϕ(j))2=0.25.) In other words, xij =1−ϕ(j)iffthe variable yj(or its negation) satisfies the factor fi. It follows that θ(E,ϕ)=1iffthe assignment defined by ϕsatisfies f. Observing that the construction above can be performed in polynomial time, the proof is complete.¤ Proof of Proposition 4: It is easy to see that SIMPLE INDUCTION is in NP. To show that SIMPLE INDUCTION is NP-Complete, we use a reduction of COVER again. Given and instance of COVER, n,S={S1,...,S q},andt,define n=p, m=q,andk=t.ThuseachmemberofScorresponds to a case i∈C, and each subset Sj∈S—toanattributej∈A.Letxij =1if i/∈Sjand xij =0if i∈Sj. We argue that there is a rule E⊂Asuch that |E|≤kand θ(E)≥1iffthere are ksubsets {Sjl}l≤kwhose union covers S. Indeed, such aruleexistsiffthere is a set Eof kattributes {jl}l≤ksuch that, for every i, θ(E,i)=1.Thisholdsiff, for every ithere exists an attribute jl∈Esuch that xijl=0. And this holds iffforeachmemberofSthere is at least one of the ksets {Sjl}l≤kto which it belongs. Finally, observe that the construction of the matrix Xis polynomial in the size of the data.¤ 36 8 Appendix B: Computational Complexity Aproblem can be thought of as a set of legitimate inputs, and a correspondence from it into a set of legitimate outputs. For instance, consider the problem “Given a graph, and two nodes in it, sand t,find a minimal path from sto t”. An input would be a graph and two nodes in it. These are assumed to be appropriately encoded into finite strings over a given alphabet. The corresponding encoding of a shortest path between the two nodes would be an appropriate output. An algorithm, in the intuitive sense, is a method of solution that specifies what the solver should do at each stage. Church’s thesis maintains that algorithms are those methods of solution that can be implemented by Turing machines. It is neither a theorem nor a conjecture, because the term “algorithm” has no formal definition. In fact, Church’s thesis may be viewed as defining an “algorithm” to be a Turing machine. It has been proved that Turing machines are equivalent, in terms of the computational tasks they can perform, to various other computational models. In particular, a PASCAL (or BASIC) program run on a modern computer with an unbounded hard disk is also equivalent to a Turing machine and can therefore be viewed as a definition of an “algorithm”. It is convenient to restrict attention to YES/NO problems. Such problems are formally defined as subsets of the legitimate inputs, interpreted as the inputs for which the answer is YES. Many problems naturally define corresponding YES/NO problems. For instance, the previous problem may be represented as “Given a graph, two nodes in it sand t,andanumber k, is there a path of length kbetween sand tin the graph?” It is usually thecasethatifonecansolveallsuchYES/NOproblems,onecansolvethe corresponding optimization problem. For example, an algorithm that can solve the YES/NO problem above for any given kcan find the minimal k for which the answer is YES. Moreover, such an algorithm will typically also find a path that is no longer than the specified k. 37 Much of the literature on computational complexity focuses on time complexity: how many operations will an algorithm need to perform in order to obtain the solution and halt. It is customary to count operations of reading and writing numbers, as well as logical and algebraic operations on numbers as taking a single unit of time each. Taking into account the amount of time these operations actually take (for instance, the number of actual operations needed to add two numbers of, say, 10 digits) typically yields qualitatively similar results. Theliteraturefocusesonasymptotic analysis: how does the number of operations grow with the size of the input. It is customary to conduct worstcase analysis, though attention is also given to average-case performance. Obviously, the latter requires some assumptions on the distribution of inputs, whereas worst-case analysis is free from distributional assumptions. Hence the complexity of an algorithm is generally defined as the order of magnitude of the number of operations it needs to perform, in the worst case, to obtain a solution, as a function of the input size. A problem is polynomial (or, “of polynomial complexity”) if there exists an algorithm that always solves it correctly within a number of operations that is bounded by a polynomial of the input size. A problem is exponential if all the algorithms that solve it may require a number of operations that is exponential in the size of the input. Polynomial problems are generally considered relatively “easy”, even though they may still be hard to solve in practice, if the coefficients and/or the degree of the bounding polynomial are high. By contrast, exponential problems become intractable even for inputs of moderate sizes. To prove that a problem is polynomial, one typically points to a polynomial algorithm that solves it. Proving that a YES/NO problem is exponential, however, is a very hard task, because it is generally hard to show that there does not exist an algorithm that solves the problem in a number of steps that is, say, O(n17)or even O(2√n). 38 Anon-deterministic Turing machine is a Turing machine that allows multiple computations for a given input. These computations can be thought of as paths in a tree, in which each node is a step in a computation, and the depth of the tree measures the time it takes the machine to reach a solution. A non-deterministic Turing machine can be loosely compared to a parallel processing modern computer with an unbounded number of processors. It is assumed that these processors can work simultaneously, and, should one of them find a solution, the machine halts. Consider, for instance, the Hamiltonian path problem: given a graph, is there a path that visits each node precisely once? A straightforward algorithm for this problem would be exponential: given nnodes, one needs to check all the n!permutations to see if any of them defines a path in the graph. A non-deterministic Turing machine can solve this problem in linear time. Roughly, one can imagine that n!processors work on this problem in parallel, each checking a different permutation. Each processor will therefore need no more than O(n)operations. In a sense, the difficulty of the Hamiltonian path problem arises from the multitude of possible solutions, and not from the inherent complexity of each of them. The class NP is the class of all YES/NO problems that can be solved in Polynomial time by a Non-deterministic Turing machine. Equivalently, it can be defined as the class of YES/NO problems for which the validity of a suggested solution can be verified in polynomial time (by a regular, deterministic algorithm). The class of problems that can be solved in polynomial time (by a deterministic Turing machine) is denoted Pand it is obviously a subset of NP. Whether P=NP is considered to be the most important open problem in computer science. While the common belief is that the answer is negative, there is no proof of this fact. AproblemAis NP-Hard if the following statement is true (“the conditional solution property”): if there were a polynomial algorithm for A, there would be a polynomial algorithm for any problem Bin NP. There may 39 be many ways in which such a conditional statement can be proved. For instance, one may show that using the polynomial algorithm for Aapolynomial number of times would result in an algorithm for B. Alternatively, one may show a polynomial algorithm that translates an input for Bto an input for A, in such a way that the B-answer on its input is YES iffso is the A-answer of its own input. In this case we say that Bis reduced to A. AproblemisNP-Complete if it is in NP, and any other problem in NP can be reduced to it. It was shown that the SATISFIABILITY problem (whether a Boolean expression is not identically zero) is such a problem by a direct construction. The latter means that, for every NP problem B, there exists an algorithm that accepts an input for B,z, and generates in polynomial time a Boolean expression that can be satisfied iffthe B-answer on zis YES. With the help of one problem that is known to be NP-Complete (NPC), one may show that other problems, to which the NPC problem can be reduced, are also NPC. Indeed, it has been shown that many combinatorial problems are NPC. An NPC problem is NP-Hard, but the converse is not necessarily true. First, NP-Hard problems need not be in NP themselves, and they may not be YES/NO problems. Second, NPC problems are also defined by a particular way in which the conditional solution property is proved, namely, by reduction. There are by now hundreds of problems that are known to be NPC. Had we known one polynomial algorithm for one of them, we would have a polynomial algorithm for each problem in NP. As mentioned above, it is believed that no such algorithm exists. 40 References [1] Anderlini, L. and L. Felli (1994), “Incomplete Written Contracts: Undescribable States of Nature,” Quarterly Journal of Economics,109: 1085-1124. Al-Najjar, N., R. Casadesus-Masanell, and E. Ozdenoren (1999), “Probabilistic Models of Complexity,” Northwestern University working paper. Aragones, E., I. Gilboa, A. Postlewaite and D. Schmeidler (2001), “Rhetoric and Analogy,” mimeo. Bray, M. M., and N. E. Savin (1986), “Rational Expectations Equilibria, Learning, and Model Specification”, Econometrica,54: 1129-1160. Carnap, R. (1950). Logical Foundations of Probability.Chicago:University of Chicago Press. Dekel, E., B. L. Lipman, and A. Rustichini (1997), “A Unique Subjective State Space for Unforeseen Contingencies”, mimeo. Dekel, E., B. L. Lipman, and A. Rustichini (1998), “Recent Developments in Modeling Unforeseen Contingencies”, European Economic Review,42: 523—542. Gary, M. and D. S. Johnson (1979), Computers and Intractability: A Guide to the Theory of NP-Completeness.San-Francisco,CA:W.Freeman and Co. Gilboa,I.(1993),“Hempel,Good,andBayes”,manuscript. Gilboa, I., and D. Schmeidler (1999), “Inductive Inference: An Axiomatic Approach”, Econometrica,forthcoming. Gilboa, I. and D. Schmeidler (2001). A Theory of Case-Based Decisions. Cambridge: Cambridge University Press. 41