Arxiv:2009.05908V2 [Cs.LG] 16 Jun 2021
Total Page:16
File Type:pdf, Size:1020Kb
Understanding Boolean Function Learnability on Deep Neural Networks Anderson R. Tavares1 Pedro Avelar1 Joao˜ Flach1 Marcio Nicolau1 Lu´ıs C. Lamb1 Moshe Y. Vardi2 1Institute of Informatics, Federal University of Rio Grande do Sul, Brazil 2Department of Computer Science, Rice University, Houston, USA fartavares,phcavelar,jmflach,mnicolau,[email protected], [email protected] Abstract problems (Galassi et al. 2020; van Steenkiste et al. 2018; Kahneman et al. 2020). To respond to these challenges, Computational learning theory states that many classes of neural-symbolic methods have recently been the subject of boolean formulas are learnable in polynomial time. This intense investigation and great interest of both academic and paper addresses the understudied subject of how, in prac- tice, such formulas can be learned by deep neural networks. industry researchers (d’Avila Garcez et al. 2019; Mao et al. Specifically, we analyse boolean formulas associated with 2019; Raedt et al. 2020; Marcus 2020; Raghavan 2019). the decision version of combinatorial optimisation problems, Nobel prize winner Daniel Kahneman also referred ex- model sampling benchmarks, and random 3-CNFs with vary- plicitly to the need for symbolic reasoning systems being ing degrees of constrainedness. Our extensive experiments integrated to deep learning. At the AAAI2020 conference, indicate that: (i) regardless of the combinatorial optimisa- when Kahneman compared his own classification of the two tion problem, relatively small and shallow neural networks modes of thinking described in (Kahneman 2011), i.e.:2 Sys- are very good approximators of the associated formulas; (ii) tem 1: that operates automatically and quickly with little smaller formulas seem harder to learn, possibly due to the or no effort and no sense of voluntary control) and Sys- fewer positive (satisfying) examples available; and (iii) in- tem 2: that allocates attention to the effortful mental activ- terestingly, underconstrained 3-CNF formulas are more chal- lenging to learn than overconstrained ones. Source code and ities that demand it, including complex computations, with relevant datasets are publicly available1. the so-called AI systems 1 (deep learning) and 2 (reasoning layer), Kahneman clearly emphasized the need for a sym- bolic layer as necessary to achieve richer AI models: “...so 1 Introduction far as I’m concerned, System 1 certainly knows language... System 2... does involve certain manipulation of symbols.”. The construction of Artificial Intelligence systems that in- Moreover, at the AAAI2020 Robert S. Engelmore Memorial tegrate the fundamental cognitive abilities of reasoning and Lecture, Henry Kautz proposed several challenges for AI in learning has been pointed out by Turing Award winner and his address titled The Third AI Summer. These challenges machine learning pioneer Leslie Valiant as a key challenge include the development of effective systems along the lines for computer science (Valiant 2003, 2013). There remain, of Valiant by stating that “The next steps in AI are tighter however, several challenges with respect to closing the gap symbolic-neuro integration”3. between theoretical and practical advances in machine learn- In order to achieve such integration in AI, one has to ing that would allow for such effective integration. In the re- consider the challenges and questions still open in machine cent Montreal AI Debate between Yoshua Bengio and Gary learning and computational learning theory, such as effec- Marcus and at the recent AAAI2020 conference in New tive algorithms for reasoning and learning over classes of York, leading researchers including deep learning pioneers boolean formulas, learnable in polynomial time. Yet there arXiv:2009.05908v2 [cs.LG] 16 Jun 2021 Bengio, Hinton and LeCun have singled out the effective remains outstanding questions to be addressed, particularly development of integrated reasoning mechanisms as a key referring to effective experimentation on classes of boolean challenge to machine learning (Kahneman et al. 2020). Fur- functions (Kearns, Li, and Valiant 1994). Further, the devel- ther, machine learning in general and deep learning in par- opment of efficient learning algorithms for learning boolean ticular have achieved noticeable technological advances in a formulas remains a challenge in AI (Valiant 2013). Learn- wide range of applications. These include natural language ing unrestricted Disjunctive Normal Formulas (DNFs) still processing, machine translation, computer vision and image remains a difficult problem as proven by (Klivans and Serve- understanding, to name a few (LeCun, Bengio, and Hinton dio 2004). 2015; Schmidhuber 2015). The integration of machine learning and symbolic reason- 2Please see (Kahneman 2011) for a full account of the meaning ing has been the subject of recent debates in AI and as a of the terms and the origins of this terminology from psychology. methodology that can lead to the answer to challenging AI 3Henry Kautz AAAI2020 Robert S. Engelmore memorial lec- ture is available at https://vimeo.com/389560858. Slides are avail- 1https://github.com/machine-reasoning-ufrgs/mlbf able at https://www.cs.rochester.edu/u/kautz/talks/index.html Aiming at responding to the above challenges, this paper literals. Every BF can be transformed into a logically equiv- offers three key contributions: (i) it contributes to the inte- alent CNF; and every CNF can be converted into a logically gration of learning and reasoning, since we show that deep equivalent k-CNF (for k ≥ 3). learning can learn several families of boolean functions that Given a Boolean Formula, the Boolean Satisfiability prob- encode combinatorial optimisation problems. Regardless of lem (SAT) is to find an assignment of the variables where the the combinatorial optimisation problem, relatively small and BF evaluates to true, or to provide a proof that no satisfiying shallow neural networks are very good approximators of the assignment exists. Usually, SAT solvers takes as input a BF associated formulas; (ii) we analyse the difficulty of learning in the CNF format. The SAT problem is important because it boolean formulas of varying sizes and contrainedness over can be found in different areas in science and also in numer- the clauses in CNF formulations. Our extensive experiments ous practical problems. Besides that, it is general enough show that smaller formulas can be harder to learn, possi- that several other problems that, at first, are not related to bly due to the fewer positive (satisfying) examples available; SAT, can be converted into a SAT problem - for example, and (iii) interestingly, underconstrained 3-CNF formulas are some problems in graph theory, such as the clique and col- more challenging to learn than overconstrained ones. oring problems (Garey and Johnson 1979). The remainder of this paper is organised as follows. Sec- tion 2 presents the fundamental concepts and definitions about boolean learnability and related work in the field. Related work Computational learning theory presents Section 3 presents our methodology to assess the learn- hardness results on the learnability of boolean functions re- ing capabilities of deep neural networks on boolean func- lated to certain classes of problems, such as cryptography tions. Section 4 presents our learnability experiments on (Rivest 1991), robust learning (Gourdeau et al. 2019) and boolean formulas encoding combinatorial optimisation for- distribution learning (Kearns et al. 1994). It also presents mulas, whereas Section 5 investigates random 3-CNFs with many positive results on polynomial-time learnability of various number of variables and clause-to-variable ratios boolean formulas, which are of our interest. Here we (constrainedness). Section 6 presents concluding remarks describe results concerning conjunctive normal formulas and directions for future work. (CNFs) and neural networks. Within the probably approximately correct (PAC) learn- 2 On Deep Boolean Function Learnability ing framework, (Valiant 1984) shows that conjunctive nor- Already in his seminal PAC learning paper (Valiant 1984), mal formulas with a bounded number of literals per clause Valiant highlighted the importance of knowledge represen- (k-CNFs) are learnable in general, although not mentioning tation and the relationship with logic and the design of ma- neural networks specifically. chine learning systems: “...[the] remaining design choice Artificial Neural networks (ANNs) are universal learn- that has to be made is that of knowledge representation. ers of boolean formulas (Blum 1989; Steinbach and Kohut Since our declared aim is to represent general knowledge, 2002), since classical perceptrons can be arranged to im- it seems almost unavoidable that we use some kind of logic plement any logical gate and such gates can be arranged rather than, for example, formal grammars or geometri- to implement any boolean formula, also with the possi- cal constructs. [...] we shall represent concepts as Boolean blity of extracting boolean formulas from trained neural functions of a set of propositional variables. The recogni- networks (Tsukimoto 1997). Moreover, even single-hidden- tion algorithms that we attempt to deduce will be therefore layer networks are universal boolean function learners (An- Boolean circuits or expressions.” Over the years, machine thony 2010), although the worst-case number of neurons in learning and automated reasoning (in A.I., knowledge rep- the hidden layer is exponential on the number of inputs. (An-