Learning programs by learning from failures

We introduce learning programs by learning from failures. In this approach, an inductive logic programming (ILP) system (the learner) decomposes the learning problem into three separate stages: generate, test, and constrain. In the generate stage, the learner generates a hypothesis (a logic program) that satisfies a set of hypothesis constraints (constraints on the syntactic form of hypotheses). In the test stage, the learner tests the hypothesis against training examples. A hypothesis fails when it does not entail all the positive examples or entails a negative example. If a hypothesis fails, then, in the constrain stage, the learner learns constraints from the failed hypothesis to prune the hypothesis space, i.e. to constrain subsequent hypothesis generation. For instance, if a hypothesis is too general (entails a negative example), the constraints prune generalisations of the hypothesis. If a hypothesis is too specific (does not entail all the positive examples), the constraints prune specialisations of the hypothesis. This loop repeats until (1) the learner finds a hypothesis that entails all the positive and none of the negative examples, or (2) there are no more hypotheses to test. We implement our idea in Popper, an ILP system which combines answer set programming and Prolog. Popper supports infinite domains, reasoning about lists and numbers, learning optimal (textually minimal) programs, and learning recursive programs. Our experimental results on three diverse domains (number theory problems, robot strategies, and list transformations) show that (1) constraints drastically improve learning performance, and (2) Popper can substantially outperform state-of-the-art ILP systems, both in terms of predictive accuracies and learning times.

[1]  Andrew Cropper,et al.  Turning 30: New Ideas in Inductive Logic Programming , 2020, ArXiv.

[2]  Katsumi Inoue,et al.  Exploiting Answer Set Programming with External Sources for Meta-Interpretive Learning , 2018, Theory Pract. Log. Program..

[3]  Krysia Broda,et al.  Inductive Learning of Answer Set Programs , 2014, JELIA.

[4]  Maurice Bruynooghe,et al.  Interactive Concept-Learning and Constructive Induction by Analogy , 1992, Machine Learning.

[5]  Ashwin Srinivasan,et al.  Query Transformations for Improving the Efficiency of ILP Systems , 2003, J. Mach. Learn. Res..

[6]  Alessandra Russo,et al.  Inductive Logic Programming as Abductive Search , 2010, ICLP.

[7]  Krysia Broda,et al.  Learning Through Hypothesis Refinement Using Answer Set Programming , 2013, ILP.

[8]  Jorge Lobo,et al.  FastLAS: Scalable Inductive Logic Programming Incorporating Domain-Specific Optimisation Criteria , 2020, AAAI.

[9]  Stephen Muggleton,et al.  Learning Efficient Logical Robot Strategies Involving Composable Objects , 2015, IJCAI.

[10]  Stephen Muggleton,et al.  Inverse entailment and progol , 1995, New Generation Computing.

[11]  Wannes Meert,et al.  Learning Relational Representations with Auto-encoding Logic Programs , 2019, IJCAI.

[12]  Isil Dillig,et al.  Synthesizing data structure transformations from input-output examples , 2015, PLDI.

[13]  Oliver Ray,et al.  Nonmonotonic abductive inductive learning , 2009, J. Appl. Log..

[14]  Katsumi Inoue,et al.  ILP turns 20 - Biography and future challenges , 2012, Mach. Learn..

[15]  Krysia Broda,et al.  Learning weak constraints in answer set programming , 2015, Theory and Practice of Logic Programming.

[16]  Ivan Bratko,et al.  Refining Complete Hypotheses in ILP , 1999, ILP.

[17]  Ehud Shapiro,et al.  Algorithmic Program Debugging , 1983 .

[18]  Vítor Santos Costa,et al.  Inductive Logic Programming , 2013, Lecture Notes in Computer Science.

[19]  Antonius Weinzierl,et al.  Blending Lazy-Grounding and CDNL Search for Answer-Set Solving , 2017, LPNMR.

[20]  Mukund Raghothaman,et al.  Provenance-guided synthesis of Datalog programs , 2019, Proc. ACM Program. Lang..

[21]  Martin Gebser,et al.  Answer Set Solving in Practice , 2012, Answer Set Solving in Practice.

[22]  Andrew Cropper,et al.  Learning large logic programs by going beyond entailment , 2020, IJCAI.

[23]  José Hernández-Orallo,et al.  Making sense of sensory input , 2019, Artif. Intell..

[24]  William W. Cohen Grammatically Biased Learning: Learning Logic Programs Using an Explicit Antecedent Description Language , 1994, Artif. Intell..

[25]  Luc De Raedt,et al.  ILP turns 20 , 2011, Machine Learning.

[26]  Alonzo Church,et al.  A note on the Entscheidungsproblem , 1936, Journal of Symbolic Logic.

[27]  Stephen Muggleton,et al.  Meta-Interpretive Learning of Data Transformation Programs , 2015, ILP.

[28]  Alessandra Russo,et al.  Inductive Logic Programming in Answer Set Programming , 2011, ILP.

[29]  Shan-Hwei Nienhuys-Cheng,et al.  Foundations of Inductive Logic Programming , 1997, Lecture Notes in Computer Science.

[30]  Andrew Cropper,et al.  Playgol: learning programs through play , 2019, IJCAI.

[31]  G. Plotkin Automatic Methods of Inductive Inference , 1972 .

[32]  Phillip D. Summers,et al.  A Methodology for LISP Program Construction from Examples , 1977, J. ACM.

[33]  Luc De Raedt,et al.  Logical and relational learning , 2008, Cognitive Technologies.

[34]  Andrew Cropper,et al.  Forgetting to learn logic programs , 2019, AAAI.

[35]  Armando Solar-Lezama,et al.  Sketching concurrent data structures , 2008, PLDI '08.

[36]  Peter Schüller,et al.  Best-effort inductive logic programming via fine-grained cost-based hypothesis generation , 2017, Machine Learning.

[37]  William Yang Wang,et al.  Structure Learning via Parameter Learning , 2014, CIKM.

[38]  Andrew Cropper,et al.  Logical reduction of metarules , 2019, Machine Learning.

[39]  Rolf Morel,et al.  Learning higher-order logic programs , 2019, Machine Learning.

[40]  Krysia Broda,et al.  Inductive Learning Using Constraint-Driven Bias , 2014, ILP.

[41]  J. Ross Quinlan,et al.  Learning logical definitions from relations , 1990, Machine Learning.

[42]  Krysia Broda,et al.  Iterative Learning of Answer Set Programs from Context Dependent Examples , 2016, Theory and Practice of Logic Programming.

[43]  Stephen Muggleton,et al.  Meta-interpretive learning: application to grammatical inference , 2013, Machine Learning.

[44]  Krysia Broda,et al.  Inductive Learning of Answer Set Programs from Noisy Examples , 2018, ArXiv.

[45]  Shiu Yin Yuen,et al.  Efficient program synthesis using constraint satisfaction in inductive logic programming , 2013, J. Mach. Learn. Res..

[46]  Armando Solar-Lezama,et al.  Program synthesis from polymorphic refinement types , 2015, PLDI.

[47]  Richard Evans,et al.  Learning Explanatory Rules from Noisy Data , 2017, J. Artif. Intell. Res..

[48]  Martin Gebser,et al.  Clingo = ASP + Control: Preliminary Report , 2014, ArXiv.

[49]  Armando Solar-Lezama,et al.  Learning Libraries of Subroutines for Neurally-Guided Bayesian Program Induction , 2018, NeurIPS.

[50]  Richard Evans,et al.  Inductive general game playing , 2019, Machine Learning.

[51]  J. Lloyd Foundations of Logic Programming , 1984, Symbolic Computation.

[52]  Rolf Morel,et al.  Typed Meta-interpretive Learning of Logic Programs , 2019, JELIA.

[53]  Luc De Raedt,et al.  A Theory of Clausal Discovery , 1993, IJCAI.

[54]  Aws Albarghouthi,et al.  Constraint-Based Synthesis of Datalog Programs , 2017, CP.

[55]  Andrew Cropper,et al.  Learning Large Logic Programs By Going Beyond Entailment , 2020, IJCAI.

[56]  Isil Dillig,et al.  Program synthesis using conflict-driven learning , 2017, PLDI.

[57]  Andrew Cropper,et al.  Inductive logic programming at 30: a new introduction , 2020, J. Artif. Intell. Res..

[58]  Ashwin Srinivasan,et al.  A Study of Applying Dimensionality Reduction to Restrict the Size of a Hypothesis Space , 2005, ILP.

[59]  Joshua B. Tenenbaum,et al.  Building machines that learn and think like people , 2016, Behavioral and Brain Sciences.

[60]  Sebastian Nowozin,et al.  DeepCoder: Learning to Write Programs , 2016, ICLR.

[61]  Donald Michie,et al.  Machine Learning in the Next Five Years , 1988, EWSL.

[62]  Martin Gebser,et al.  Multi-shot ASP solving with clingo , 2017, Theory and Practice of Logic Programming.

[63]  Armando Solar-Lezama,et al.  Write, Execute, Assess: Program Synthesis with a REPL , 2019, NeurIPS.

[64]  Hendrik Blockeel,et al.  Top-Down Induction of First Order Logical Decision Trees , 1998, AI Commun..

[65]  Herman Midelfart A Bounded Search Space of Clausal Theories , 1999, ILP.

[66]  Gary James Jason,et al.  The Logic of Scientific Discovery , 1988 .

[67]  Liviu Badea A Refinement Operator for Theories , 2001, ILP.

[68]  Stephen Muggleton,et al.  Turning 30: New Ideas in Inductive Logic Programming , 2020, IJCAI.

[69]  Stephen Muggleton,et al.  Meta-interpretive learning of higher-order dyadic datalog: predicate invention revisited , 2013, Machine Learning.

[70]  Stephen Muggleton,et al.  Bias reformulation for one-shot function induction , 2014, ECAI.