Inductive logic programming at 30

Inductive logic programming (ILP) is a form of logic-based machine learning. The goal is to induce a hypothesis (a logic program) that generalises given training examples. As ILP turns 30, we review the last decade of research. We focus on (i) new meta-level search methods, (ii) techniques for learning recursive programs, (iii) new approaches for predicate invention, and (iv) the use of different technologies. We conclude by discussing current limitations of ILP and directions for future research.


Introduction
Inductive logic programming (ILP) [ , ] is a form of machine learning (ML). As with other forms of ML, the goal is to induce a hypothesis that generalises training examples. However, whereas most forms of ML use vectors/tensors to represent data, ILP uses logic programs (sets of logical rules). Moreover, whereas most forms of ML learn functions, ILP learns relations.
To illustrate ILP suppose you want to learn a string transformation program from the following examples: Expainability. Because of logic's similarity to natural language, logic programs can be easily read by humans, which is crucial for explainable AI. For instance, Muggleton et al [ ] provide the first demonstration of ultra-strong ML [ ], where a learned hypothesis is expected to not only be accurate but to also demonstrably improve the performance of a human when provided with the learned hypothesis.
. Recent advances Some of the aforementioned advantages come from developments in the last decade of ILP research, which we survey in this paper . To aid the reader, we coarsely compare old and new ILP systems, where new represents systems from the past decade. We Table , is, of course, vastly oversimplified, and there are many exceptions. In the rest of this paper, we survey these developments (each row in the table) in turn. After discussing these new ideas, we discuss recent application areas (Section ) before concluding by proposing directions for future research.

Search method
Top-down and Bottom-up Meta-level

Recursion
Limited Yes

Predicate invention No Limited
Hypotheses First-order ASP, Higher-order, Probabilistic

No Yes
Technology Prolog Prolog, ASP, NNs

Search methods
The fundamental ILP problem is to efficiently search a large hypothesis space. Most older ILP approaches search in either a top-down or bottom-up fashion. These methods rely on notions of generality (typically theta-subsumption [ ]), where one program is more general or more specific than another. A third search approach has recently emerged called meta-level ILP [ , , , , ]. We discuss these approaches in turn. .

Top-down and bottom-up
Top-down approaches [ , , ] start with a general hypothesis and then specialise it. HYPER, for instance, searches a tree in which the nodes correspond to hypotheses and each child of a hypothesis in the tree is more specific than or equal to its predecessor in terms of theta-subsumption. An advantage of top-down approaches is that they can often learn recursive programs (although not all do). A disadvantage is that they can be prohibitively inefficient because they can generate many hypotheses that do not cover the examples. Bottom-up approaches, by contrast, start with the examples and generalise them [ , , , ]. For instance, Golem [ ] generalises pairs of examples based on relative leastgeneral generalisation [ ]. Bottom-up approaches can be seen as being data-or exampledriven. An advantage of these approaches is that they are typically fast. As Bratko [ ] points out, disadvantages include (i) they typically use unnecessarily long hypotheses with many clauses, (ii) it is difficult for them to learn recursive hypotheses and multiple predicates simultaneously, and (iii) they do not easily support predicate invention.
Progol [ ], which inspired many other ILP approaches [ , , , ], combines both top-down and bottom-up approaches. Starting with an empty program, Progol picks an uncovered positive example to generalise. To generalise an example, Progol uses mode declarations to build the bottom clause [ ], the logically most-specific clause that explains the example. The bottom clause bounds the search from below (the bottom clause) and above (the empty set). Progol then uses an A* algorithm to generalise the bottom clause in a topdown (general-to-specific) manner and uses the other examples to guide the search.

. . Meta-level
Top-down and bottom-up approaches refine and revise a single hypothesis. A third approach has recently emerged called meta-level ILP [ , , , , , ]. There is no standard definition for meta-level ILP. Most approaches encode the ILP problem as a meta-level logic program, i.e. a program that reasons about programs. Meta-level approaches then often delegate the search for a hypothesis to an off-the-shelf solver [ , , , , , , ] after which the meta-level solution is translated back to a standard solution for the ILP task. In other words, instead of writing a procedure to search in a top-down or bottom-up manner, most meta-level approaches formulate the learning problem as a declarative search problem. For instance, ASPAL [ ] translates an ILP task into a meta-level ASP program that describes every example and every possible rule in the hypothesis space. ASPAL then delegates the search to an ASP system to find a subset of the rules that covers all the positive but none of the negative examples.
The main advantage of meta-level approaches is that they can more easily learn recursive programs and optimal programs [ , , , , , ], which we discuss in Sections and respectively. Moreover, whereas classical ILP systems were almost entirely based on Prolog, meta-level approaches use diverse techniques and technologies, such as ASP solvers [ , , , , ], which we expand on in Section . The development of meta-level ILP approaches has, therefore, diversified ILP from the standard clause refinement approach of earlier ILP systems.
Most meta-level approaches encode the ILP learning task as a single static meta-level program [ , , , ]. A major issue with this approach is that the meta-level program can be very large so these approaches can struggle to scale to problems with non-trivial domains and programs with large clauses. Two related approaches try to overcome this limitation by continually revising the meta-level program.
ILASP [ ] employs a counter-example-driven select-and-constrain loop. ILASP first pre-computes every clause in the hypothesis space defined by a set of given mode declarations [ ]. ILASP then starts its select-and-constrain loop. With each iteration, ILASP uses an ASP solver to find the best hypothesis (a subset of the rules) it can. If the hypothesis does not cover one of the examples, ILASP finds a reason why and then generates constraints (boolean formulas over the rules) which it adds to the meta-level program to guide subsequent search. Another way of viewing ILASP is that it uses a counter-example-guided approach and translates an uncovered example e into a constraint that is satisfied if and only if e is covered.
Popper [ ] adopts a similar approach but differs in that it (i) does not precompute every possible rule in the hypothesis space, and (ii) translates a hypothesis, rather than an uncovered example, into a set of constraints. Popper works in three repeating stages: generate, test, and constrain. Popper first constructs a meta-level logic program where its models correspond to hypotheses. In the generate stage, Popper asks an ASP solver to find a model (a hypothesis). In the test stage, Popper tests the hypothesis against the examples. A hypothesis fails when it is incomplete (does not entail all the positive examples) or inconsistent (entails a negative example). If a hypothesis fails, Popper learns constraints from the failure, which it then uses to restrict subsequent generate stages. For instance, if a hypothesis is inconsistent, then Popper generates a generalisation constraint to prune all generalisations of the hypothesis and adds the constraint to the meta-level program, which eliminates models and thus prunes the hypothesis space. This process repeats until Popper finds a complete and consistent program.
For more information about meta-level learning, we suggest the work of Inoue [ ] and Law et al [ ].

Recursion
Learning recursive programs has long been considered a difficult problem for ILP [ , ]. The power of recursion is that an infinite number of computations can be described by a finite recursive program [ ]. To illustrate the importance of recursion, reconsider the string transformation problem from the introduction. Without recursion, an ILP system would need to learn a separate clause to find the last element for each list of length n, such as this program for when n = 3: Because of the symbolic representation and the recursive nature, this program generalises to lists of arbitrary length and which contain arbitrary elements (e.g. integers and characters). In general, without recursion, it can be difficult for an ILP system to generalise from small numbers of examples [ ].
Older ILP systems struggle to learn recursive programs, especially from small numbers of training examples. A common limitation with existing approaches is that they rely on bottom clause construction [ ]. In this approach, for each example, an ILP system creates the most specific clause that entails the example and then tries to generalise the clause to entail other examples. However, this sequential covering approach requires examples of both the base and inductive cases. The classical ILP system FOIL [ ] also struggles to learn recursive programs because it induces programs one clause at a time.
Interest in recursion has resurged with the introduction of meta-interpretive learning (MIL) [ , , ] and the MIL system Metagol [ ]. The key idea of MIL is to use metarules [ ], or program templates, to restrict the form of inducible programs, and thus the hypothesis space . A metarule is a higher-order clause. For instance, the chain metarule is P (A, B) ← Q(A, C), R(C, B), where the letters P , Q, and R denote higher-order variables and A, B and C denote first-order variables. The goal of a MIL system, such as Metagol, is to find substitutions for the higher-order variables. For instance, the chain metarule allows Metagol to induce programs such as f(A,B):-tail(A,C),head(C,B) . Metagol induces recursive programs using recursive metarules, such as the tailrec metarule P(A,B) ← Q(A,C), P(C,B).
Following MIL, many meta-level ILP systems can learn recursive programs [ , , , ]

Predicate invention
A key characteristic of ILP is the use of BK, which contains facts and rules (extensional and intensional definitions) in the form of a logic program. For instance, when learning string transformation programs, we may provide helper background relations, such as head/2 and tail/2. For other domains, we may supply more complex BK, such as a theory of light to understand images [ ] or higher-order operations, such as map/3, filter/3, and fold/4, to solve programming puzzles [ ].
Choosing appropriate BK is crucial for good learning performance. ILP has traditionally relied on hand-crafted BK, often designed by domain experts. This approach is limited because obtaining suitable BK can be difficult and expensive. Indeed, the over-reliance on hand-crafted BK is a common criticism of ILP [ ].
Rather than expecting a user to provide all the necessary BK, the goal of predicate invention (PI) [ , ] is for an ILP system to automatically invent new auxiliary predicate symbols. This idea is similar to when humans create new functions when manually writing programs, to reduce code duplication or to improve readability. Whilst PI has attracted interest since the beginnings of ILP [ ], and has subsequently been repeatedly stated as a major challenge [ , , ] A key challenge faced by ILP systems is deciding when and how to invent a new symbol. As Kramer [ ] points out, PI is difficult because it is unclear how many arguments an invented predicate should have, how the arguments should be ordered, etc. Several PI approaches try to address this challenge, which we discuss in turn.
The idea of using metarules to restrict the hypothesis space has been widely adopted by many approaches [ , , , , , ]. However, despite their now widespread use, there is little work determining which metarules to use for a given learning task ([ ] is an exception), which future work must address.
Metagol can induce longer clauses though predicate invention, which is described in Section .

. Placeholders
A classical approach to PI is to predefine invented symbols through mode declarations, which Leban et al [ ] call placeholders. However, this placeholder approach is limited because it requires that a user manually specify the arity and argument types of a symbol [ ], which rather defeats the point, or requires generating all possible invented predicates [ , ], which is computationally expensive. .

Metarules
Interest in automatic PI (where a user does not need to predefine an invented symbol) has resurged with the introduction of MIL. MIL avoids the issues of older ILP systems by using metarules to define the hypothesis space and in turn reduce the complexity of inventing a new predicate symbol. To learn this program, Metagol invents the predicate symbol inv1 and induces a definition for it using the chain metarule. Metagol uses this new predicate symbol in the definition for the target predicate f. A side-effect of this metarule-driven approach is that problems are forced to be decomposed into reusable solutions. For instance, to learn a program that drops the first four elements of a list, Metagol learns the following program, where the invented predicate symbol inv1 is used twice: PI has been shown to help reduce the size of target programs, which in turn reduces sample complexity and improves predictive accuracy [ ]. Several new ILP systems support PI using a metarule-guided approach [ , , ].
. Pre/post-processing Metarule-driven PI approaches perform PI during the learning task. A recent trend is to perform PI as a pre/post-processing step to improve knowledge representation [ , , , ]. CUR 2 LED [ ] performs PI by clustering constants and relations in the provided BK, turning each identified cluster into a new BK predicate. The key insight of CUR 2 LED is not to use a single similarity measure, but rather a set of various similarities. This choice is motivated by the fact that different similarities are useful for different tasks, but in the unsupervised setting the task itself is not known in advance. CUR 2 LED performs PI by producing different clusterings according to the features of the objects, community structure, and so on.
ALPs [ ] perform PI using an auto-encoding principle: they learn an encoding logic program that maps the provided data to a new, compressive latent representation (defined in terms of the invented predicates), and a decoding logic program that can reconstruct the provided data from its latent representation. This approach shows improved performance on supervised tasks, even though the PI step is task-agnostic.
Knorf [ ] pushes the idea of ALPs even further. Knorf compresses a program by removing redundancies in it. If the learnt program contains invented predicates, Knorf revises them and introduces new ones that would lead to a smaller program. The refactored program is smaller in size and contains less redundancy in clauses, both of which lead to improved performance. The authors experimentally demonstrate that refactoring improves learning performance in lifelong learning and that Knorf substantially reduces the size of the BK program, reducing the number of literals in a program by % or more.
. Lifelong Learning An approach to acquiring BK is to learn it in a lifelong learning setting. The general idea is to reuse knowledge gained from solving one problem to help solve a different problem.
Metagol DF is an ILP system [ ] which given a set of tasks, uses Metagol to try to learn a solution for each task using at most one clause. If Metagol finds a solution for a task, it adds the solution to the BK and removes the task from the set. Metagol DF then asks Metagol to find solutions for the rest of the tasks but can now (i) use an additional clause, and (ii) reuse solutions from previously solved tasks. This process repeats until Metagol DF solves all the tasks or reaches a maximum program size. In this approach, Metagol DF automatically identifies easier problems, learn programs for them, and then reuses the solutions to help learn programs for more difficult problems. The authors experimentally show that their multitask approach performs substantially better than a single-task approach because learned programs are frequently reused and leads to a hierarchy of induced programs.
Metagol DF saves all learned programs (including invented predicates) to the BK, which can be problematic because too much irrelevant BK is detrimental to learning performance [ ]. To address this problem, Forgetgol [ ] introduces the idea of forgetting. In this approach, Forgetgol continually grows and shrinks its hypothesis space by adding and removing learned programs to and from its BK. The authors show that forgetting can reduce both the size of the hypothesis space and the sample complexity of an ILP learner when learning from many tasks.

. Limitations
The aforementioned techniques have improved the ability of ILP to invent high-level concepts. However, PI is still difficult and there are many challenges to overcome, notably that (i) many systems struggle to perform PI at all, and (ii) those that do support PI mostly need much user-guidance, such as metarules to restrict the space of invented symbols or that a user specifies the arity and argument types of invented symbols. There are notable exceptions. Ferilli [ ] describe an PI approach based on the ideal of specialising a theory to account for negative examples, similar to early work in non-monotonic ILP [ ]. POPPI [ ] is an ILP system that supports automatic predicate invention, i.e. does not require metarules nor requires a user to predefine invented symbols.
By developing better approaches for PI, we can make progress on existing challenging problems. For instance, in inductive general game playing (IGGP) [ ], the task is to learn the symbolic rules of games from observations of gameplay, such as learning the rules of connect four. The target solutions, which come from the general game playing competition [ ], often contain auxiliary predicates. For instance, the rules for connect four are defined in terms of definitions for lines which are themselves defined in terms of columns, rows, and diagonals. Although these auxiliary predicates are not strictly necessary to learn the target solution, inventing such predicates significantly reduces the size of the solution, which in turn makes them easier to learn. Although new methods for PI can invent high-level concepts, they are not yet sufficiently powerful enough to perform well on the IGGP dataset. Making progress in this area would constitute a major advancement in ILP.

Hypotheses
ILP systems have traditionally induced definite and normal logic programs, typically represented as Prolog programs. A recent development has been to use different hypothesis representations. .

Datalog
Datalog is a syntactical subset of Prolog which disallows complex terms as arguments of predicates and imposes restrictions on the use of negation. Datalog is a truly declarative language, whereas in Prolog reordering clauses can change the program. Moreover, Datalog query is guaranteed to terminate, though this guarantee is at the expense of not being a Turing-complete language, which Prolog is. Several works [ , , ] induce Datalog programs. The general motivation for reducing the expressivity of the representation language from Prolog to Datalog is to allow the problem to be encoded as a satisfiability problem, particularly to leverage recent developments in SAT and SMT. We discuss the advantages of this approach more in Section . .

. Answer Set Programming
ASP [ ] is a logic programming paradigm based on the stable model semantics of normal logic programs that can be implemented using the latest advances in SAT solving technology. Law et al [ ] discuss some of the advantages of learning ASP programs, rather than Prolog programs, which we reiterate. When learning Prolog programs, the procedural aspect of SLD-resolution must be taken into account. For instance, when learning Prolog programs with negation, programs must be stratified; otherwise, they may loop under certain conditions. By contrast, as ASP is a truly declarative language, no such consideration needs to be taken into account when learning ASP programs. Compared to Datalog and Prolog, ASP supports additional language constructs, such as disjunction in the head of a clause, choice rules, and hard and weak constraints. A key difference between ASP and Prolog is semantics. A definite logic program has only one model (the least Herbrand model). By contrast, an ASP program can have one, many, or even no stable models (answer sets). Due to its non-monotonicity, ASP is particularly useful for expressing common-sense reasoning [ ].
To illustrate the benefits of learning ASP programs, we reuse an example from Law et al [ ]. Given a sufficient examples of Hamiltonian graphs, ILASP [ ] can learn a program to definite them: This program illustrates useful language features of ASP. The first rule is a choice rule, which means that an atom can be true. In this example, the rule indicates that there can be an in edge from the vertex V to V . The last two rules are hard constraints, which essentially enforce integrity constraints. The first hard constraint states that it is impossible to have a node that is not reachable. The second hard constraint states that it is impossible to have a vertex with two in edges from distinct nodes. For more information about ASP we recommend the book by Gebser et al [ ].
Approaches to learning ASP programs can mostly be divided into two categories: brave learners, which aim to learn a program such that at least one answer set covers the examples, and cautious learners, which aim to find a program which covers the examples in all answer sets. ILASP is notable because it supports both brave and cautious learning, which are both needed to learn some ASP programs [ ]. Moreover, ILASP differs from most Prolog-based ILP systems because it learns ASP programs, including programs with normal rules, choice rules, and both hard and weak constraints, which classical ILP systems cannot. Learning ASP programs allows for ILP to be used for new problems, such as inducing answer set grammars [ ].
. Higher-order programs Imagine learning a droplasts program, which removes the last element of each sublist in a list, e.g. Although semantically correct, the program is verbose. To learn smaller programs, Metagol ho [ ] extends Metagol to support learning higher-order programs, where predicate symbols can be used as terms. For instance, for the same droplasts problem, Metagol ho learns the higher-order program: To learn this program, Metagol ho invents the predicate symbol f1, which is used twice in the program: as term in the map(A,B,f1) literal and as a predicate symbol in the f1(A,B) literal. Compared to the first-order program, this higher-order program is smaller because it uses map/3 (predefined in the BK) to abstract away the manipulation of the list and to avoid the need to learn an explicitly recursive program (recursion is implicit in map/3). Metagol ho has been shown to reduce sample complexity and learning times and improve predictive accuracies [ ]. All three examples clearly spell the word "ILP", with some alterations: noisy pixels, shifted and elongated letters. If we would be to learn a program that simply draws "ILP" in the middle of the picture, without noisy pixels and elongated letters, that would be a correct program.
. Probabilistic logic programs A major limitation of logical representations, such as Prolog and its derivatives, is the implicit assumption that the BK is perfect. That is, most ILP systems assume that atoms are true or false, leaving no room for uncertainty. This assumption is problematic if data is noisy, which is often the case.
ILP systems have limited capabilities for dealing with noise. If a perfect program is not in the hypothesis space, the most common strategy is to find a program that covers as many positive and as few negative examples as possible. Though this approach helps us handle mislabelled examples, is not a good way for dealing with observational noise generally. The limitations of the approach become obvious when examples are structured (e.g., complex relations, images, or lists) rather than simple labels. Consider the example in Figure , in which we want to learn a program drawing simple images spelling "ILP". Each of the examples displays a clear concept but with some alterations: every image contains three 'noisy' pixels: the second example has the first letter shifted to the left, while the arc in the letter "P" is elongated in the third example. All of these alterations are noise and not something we want our program to explicitly represent -the ground truth program is the one that draws "ILP" in the middle of the figure, without any noise. However, ILP systems based on entailment would consider a solution to be correct only if it models all of the noisy aspects. An ILP system capable of handling such noise is Brute [ ], which uses a distance to the target solution (e.g., pixel distance in case of images) as an optimisation criterion instead of entailment.
The most principle way of handling noise is to integrating probabilistic aspects into logical representations so that uncertainties in data can be directly modelled. This integration is the focus of statistical relational artificial intelligence (StarAI) [ , ]. In essence, StarAI hypothesis representations extend BK with probabilities or weights indicating the degree of confidence in the correctness of parts of BK. StarAI is a big and prolific field; for that reason, we will not cover it in entirety but rather briefly introduce the main ideas that overcome limitations of logic programming-based ILP systems.
Generally, StarAI techniques are based on two ideas: distribution semantics and maximum entropy. Distribution semantics approaches [ ], including Problog [ ] and PRISM [ ], explicitly annotate uncertainties in BK. To allow such annotation, they extend Prolog with two primitives for stochastic execution: probabilistic facts and annotated disjunctions. Probabilistic facts are the most basic stochastic primitive and they take the form of logical facts labelled with a probability p. Each probabilistic fact represents a Boolean random variable that is true with probability p and false with probability 1 − p. For instance, the following probabilistic fact states that there is % chance of an earthquake in Naples. 0.01::earthquake(naples).
An alternative interpretation of this statement is that % of executions of the probabilistic program would observe an earthquake. The second type of stochastic primitive is an annotated disjunction. Whereas probabilistic facts introduce non-deterministic behaviour on the level of facts, annotated disjunctions introduce non-determinism on the level of clauses. Annotated disjunctions allow for multiple literals in the head, where only one of the head literals can be true at a time. For instance, the following annotated disjunction states that a ball can be either green, red, or blue, but not a combination of colours: 1 3 ::colour(B,green); 1 3 ::colour(B,red); 1 3 ::colour(B,blue) :-ball(B). By contrast, maximum entropy approaches annotate uncertainties only at the level of a logical theory. That is, they assume that the predicates in the BK are labelled as either true or false, but the label may be incorrect. These approaches are not based on logic programming, but rather on first-order logic. Consequently, the underlying semantics are different: rather than consider proofs, these approaches consider models or groundings of a theory. This difference primarily changes what uncertainties represent. For instance, Markov Logic Networks (MLN) [ ] represent programs as a set of weighted clauses. The weights in MLN do not correspond to probabilities of a formula being true but, intuitively, to a log odds between a possible world (an interpretation) where the clause is true and a world where the clause is false. For instance, a clause that is true in % of the worlds would have a weight of .
( Huynh and Mooney [ ] use Aleph to find interesting clauses and then learn the corresponding weights. Kok and Domingos [ ] use relational pathfinding over BK to identify useful clauses. That is, they interpret the BK as a hypergraph in which constants form vertices and atoms form hyper-edges and perform random walks. Frequently occurring walks, or their subparts, are then turned into clauses. Such random walks could be seen as an approximate way to construct bottom clauses.
It is worth noting that StarAI also considers an alternative learning problem -that of learning the probabilistic parameters of a given program. We do not survey these approaches here as the problem is different in nature from the ILP problem: whereas ILP searches from a program solving the tasks, parameter learning methods assume that such program is given.

Optimality
There are often multiple (sometimes infinitely many) hypotheses that explain the data. Deciding which hypothesis to choose has long been a difficult problem. Many systems aim for maximum classification accuracy. For instance, Aleph, by default, aims to maximum coverage of each clause it adds to a hypothesis, where coverage is measured as P − N , where P and N are the number of positive and negative examples covered by the clause respectively. Note that Aleph supports various evaluation metrics, such as compression, measured as P −N −L+1, where P and N are as before and L is the number of literals in the clause. However, older ILP systems are typically not guaranteed to induce optimal programs/theories. A key reason for this limitation was that most search techniques learned a single clause at a time, leading to the construction of sub-programs that are sub-optimal in terms of program size and coverage. For instance, Aleph offers no guarantee of optimality with respect to the program size and coverage.
Newer ILP systems try to address this limitation. As with the ability to learn recursive programs, the main development is to take a global view of the induction task by using meta-level search techniques. In other words, rather than induce a single clause at a time from a single example, the idea is to induce multiple clauses from multiple examples. For instance, ILASP uses ASP's optimisation abilities to provably learn the program with the fewest literals. ILASP [ ] adopts a similar approach to account for noise.
The ability to learn optimal programs opens up ILP to new problems. For instance, learning efficient logic programs has long been considered a difficult problem in ILP [ , ], mainly because there is no declarative difference between an efficient program, such as mergesort, and an inefficient program, such as bubble sort. To address this issue, Metaopt [ ] extends Metagol to support learning efficient programs. Metaopt maintains a cost during the hypothesis search and uses this cost to prune the hypothesis space. To learn minimal time complexity logic programs, Metaopt minimises the number of resolution steps. For instance, imagine trying to learn a find duplicate program, which finds any duplicate element in a list e.g. [p,r,o,g,r,a,m] → r, and [i,n,d,u,c,t,i,o,n]  This program first sorts the input list and then goes through the list to check whether for duplicate adjacent elements. Although larger, both in terms of clauses and literals, the program learned by Metaopt is more efficient O(n log n) than the program learned by Metagol O(n 2 ). Metaopt has been shown to learn efficient robot strategies, efficient time complexity logic programs, and even efficient string transformation programs.
FastLAS [ ] is an ASP-based ILP system that takes as input a custom scoring function and computes an optimal solution with respect to the given scoring function when learning non-recursive programs without PI. The authors show that this approach allows a user to optimise domain-specific performance metrics on real-world datasets, such as access control policies.

Technologies
Older ILP systems mostly use Prolog for reasoning. Recent work considers using different technologies.

. Constraint satisfaction and satisfiability
There have been tremendous recent advances in SAT [ ]. To leverage these advances, much recent work in ILP uses related techniques, notably ASP [ , , , , , , , , ]. The main motivations for using ASP are to leverage (i) the language benefits of ASP (Section . ), and (ii) the efficiency and optimisation techniques of modern ASP solvers, such as CLASP [ ], which supports conflict propagation and learning. With similar motivations, other approaches encode the ILP problem as SAT [ ] or SMT [ ] problems. These approaches have been shown able to reduce learning times compared to standard Prologbased approaches. However, some unresolved issues remain. A key issue is that most approaches encode an ILP problem as a single (often very large) satisfiability problem. These approaches therefore often struggle to scale to very large problems [ ], although preliminary work attempts to tackle this issue [ ].
. Neural networks With the rise of deep learning, several approaches have explored using gradient-based methods to learn logic programs. These approaches all replace discrete logical reasoning with a relaxed version that yields continuous values reflecting the confidence of the conclusion.
The various neural approaches can be characterised along four orthogonal dimensions. The first dimension is whether the neural network implements forward or backward inference. While some [ ] use backward (goal-directed) chaining with a neural implementation of unification, most approaches [ , , ] use forward chaining. The second dimension is whether the network is designed for big data problems [ , ] or for data-efficient learning from a handful of data items [ ]. Few neural systems to date are capable of handling both big data and small data, with the notable exception of [ ]. The third dimension is whether the neural system jointly learns embeddings (mapping symbolic constants to continuous vectors) along with the logical rules [ ]. The advantage of jointly learning embeddings is that it enables fuzzy unification between constants that are similar but not identical. The challenge for these approaches that jointly learn embeddings is how to generalize appropriately to constants that have not been seen at training time. The fourth dimension is whether or not the neural system is designed to allow explicit human-readable logical rules to be extracted from the weights of the network. While most neural ILP systems [ , , ] do produce explicit logic programs, some [ ] do not. It is perhaps moot whether implicit systems that do not produce explicit programs count as ILP systems at allbut note that even in the implicit neural systems, the weight sharing of the neural net is designed to achieve strong generalisation by performing the same computation on all tuples of objects.
Currently, most neural approaches to ILP require the use of metarules or templates to make the search space tractable and fail to support predicate invention, recursion and abduction. This severely limits the applicability of these approaches, as the user cannot always be expected to provide suitable and complete background knowledge and metarules for a new problem. The only approach that avoids the use of metarules or templates is Neural Logic Machines [ ], and the only one to fully integrate neural net learning with predicate invention, recursion, and abduction is Abductive Meta-Interpretive Learning [ ].

Applications
We now survey recent application areas for ILP.
Scientific discovery. Perhaps the most prominent application of ILP is in scientific discovery. ILP has, for instance, been used to identify and predict ligands ( Data curation and transformation. Another successful application of ILP is in data curation and transformation, which is again largely because ILP can learn executable programs. The most prominent example of such tasks is string transformations, such as the example given in the introduction. There is much interest in this topic, largely due to success in synthesising programs for end-user problems, such as string transformations in Microsoft Excel [ ]. String transformations have become a standard benchmark for recent ILP papers [ , , , ]. Other transformation tasks include extracting values from semi-structured data (e.g. XML files or medical records), extracting relations from ecological papers, and spreadsheet manipulation [ ].
Learning from trajectories. Learning from interpretation transitions (LFIT) [ ] automatically constructs a model of the dynamics of a system from the observation of its state transitions. Given time-series data of discrete gene expression, it can learn gene interactions, thus allowing to explain and predict states changes over time [ ]. LFIT has been applied to learn biological models, like Boolean Networks, under several semantics: memory-less deterministic systems [ , ], and their multi-valued extensions [ , ]. Martínez et al [ ] combine LFIT with a reinforcement learning algorithm to learn probabilistic models with exogenous effects (effects not related to any action) from scratch. The learner was notably integrated with a robot to perform the task of clearing the tableware on a table. In this task external agents interacted, people brought new tableware continuously and the manipulator robot had to cooperate with mobile robots to take the tableware to the kitchen. The learner was able to learn a usable model in just five episodes of action executions. Evans et al [ ] apply the Apperception Engine to explain sequential data, such as cellular automata traces, rhythms and simple nursery tunes, image occlusion tasks, game dynamics, and sequence induction intelligence tests. Surprisingly, they show that their system can achieve human-level performance on the sequence induction intelligence tests in the zero-shot setting (without having been trained on lots of other examples of such tests, and without hand-engineered knowledge of the particular setting). At a high level, these systems take the unique selling point of ILP systems (the ability to strongly generalise from a handful of data), and apply it to the self-supervised setting, producing an explicit humanreadable theory that explains the observed state transitions.

Summary and future work
In a survey paper from a decade ago, Muggleton et al [ ] proposed directions for future research. In the decade since, there have been major advances on many of the topics, notably in predicate invention (Section ), using higher-order logic as a representation language (Section . ) and to represent hypotheses (Section . ), and applications in learning actions and strategies (Section ). Despite the advances, there are still many limitations in ILP that future work should address.

. Limitations and future research
Better systems. Muggleton et al [ ] argue that a problem with ILP is the lack of wellengineered tools. They state that whilst over ILP systems have been built, less than a handful of systems can be meaningfully used by ILP researchers. In the decade since the authors highlighted this problem, little progress has been made: most ILP systems are not easy to use. In other words, ILP systems are still notoriously difficult to use and you often need a PhD in ILP to use any of the tools. Even then, it is still often only the developers of a system that know how to properly use it. By contrast, driven by industry, other forms of ML now have reliable and well-maintained implementations, such as PyTorch and TensorFlow, which has helped drive research. A frustrating issue with ILP systems is that they use many different language biases or even different syntax for the same biases. For instance, the way of specifying a learning task in Progol, Aleph, TILDE, and ILASP varies considerably despite them all using mode declarations. If it is difficult for ILP researchers to use ILP tools, then what hope do non-ILP researchers have? For ILP to be more widely adopted both inside and outside of academia, we must develop more standardised, user-friendly, and betterengineered tools.

Language biases. As Cropper et al [ ] state
, one major issue with ILP is choosing an appropriate language bias. For instance, Metagol uses metarules (Section . ) to restrict the syntax of hypotheses and thus the hypothesis space. If a user can provide suitable metarules, then Metagol is extremely efficient. However, if a user cannot provide suitable metarules (which is often the case), then Metagol is almost useless. This same brittleness applies to ILP systems that employ mode declarations [ ]. In theory, a user can provide very general mode declarations, such as only using a single type and allowing unlimited recall. In practice, however, weak mode declarations often lead to very poor performance. For good performance, users of mode-based systems often need to manually analyse a given learning task to tweak the mode declarations, often through a process of trial and error. Moreover, if a user makes a small mistake with a mode declaration, such as giving the wrong argument type, then the ILP system is unlikely to find a good solution. Even for ILP experts, determining a suitable language bias is often a frustrating and time-consuming process. We think the need for an almost perfect language bias is severely holding back ILP from being widely adopted. By contrast, there are some neural net architectures (e.g. the transformer [ ]) that can be applied successfully to a large range of diverse problems without requiring any domain-specific tuning. We think that an important direction for future work in ILP is to develop techniques for automatically identifying suitable language biases. Although there is some work on mode learning [ , , , ] and work on identifying suitable metarules [ ], this area of research is largely under-researched.
Better datasets. Interesting problems, alongside usable systems, drive research and attract interest in a research field. This relationship is most evident in the deep learning community which has, over a decade, grown into the largest AI community. This community growth has been supported by the constant introduction of new problems, datasets, and wellengineered tools. Challenging problems that push the state-of-the-art to its limits are essential to sustain progress in the field; otherwise, the field risks stagnation through only small incremental progress. ILP has, unfortunately, failed to deliver on this front: most research is still evaluated on -year old datasets. Most new datasets that have been introduced often come from toy domains and are designed to test specific properties of the introduced technique. To an outsider, this sends a message that ILP is not applicable to real-world problems. We think that the ILP community should learn from the experiences of other AI communities and put significant efforts into developing datasets that identify limitations of existing methods as well as showcase potential applications of ILP. After all, it is no coincidence that SAT solving performance increased dramatically after the introduction of the SAT solving competitions [ ].
Relevance. New methods for predicate invention (Section ) have improved the abilities of ILP systems to invent high-level concepts. These techniques raise the potential for ILP to be used in lifelong learning settings. However, inventing and acquiring new BK could lead to a problem of too much BK, which can overwhelm an ILP system [ , ]. On this issue, a key under-explored topic is that of relevancy. Given a new induction problem with large amounts of BK, how does an ILP system decide which BK is relevant? One emerging technique is to train a neural network to score how relevant programs are in the BK and to then only use BK with the highest score to learn programs [ , ]. However, the empirical efficacy of this approach has yet to be demonstrated. Moreover, these approaches have only been demonstrated on small amounts of BK and it is unclear how they scale to BK with thousands of relations. Without efficient methods of relevance identification, it is unclear how efficient lifelong learning can be achieved.

Handling mislabelled and ambiguous data.
A major open question in ILP is how best to handle noisy and ambiguous data. Neural ILP systems [ , ] are designed from the start to robustly handle mislabelled data. Although there has been work in recent years on designing ILP systems that can handle noisy mislabelled data, there is much less work on the even harder and more fundamental problem of designing ILP systems that can handle raw ambiguous data. ILP systems typically assume that the input has already been preprocessed into symbolic declarative form (typically, a set of ground atoms representing positive and negative examples). But real-world input does not arrive in symbolic form. Consider e.g. a robot with a video camera, where the raw input is a sequence of pixel images. Converting each pixel image into a set of ground atoms is a challenging non-trivial achievement that should not be taken for granted. For ILP systems to be widely applicable in the real world, they need to be redesigned so they can handle raw ambiguous input from the outset [ , ].
Probabilistic ILP. Real-world data is often noisy and uncertain. Extending ILP to deal with such uncertainty substantially broadens its applicability. While StarAI is receiving growing attention, learning probabilistic programs from data is still largely under-investigated due to the complexity of joint probabilistic and logical inference. When working with probabilistic programs, we are interested in the probability that a program covers an example, not only whether the program covers the example. Consequently, probabilistic programs need to compute all possible derivations of an example, not just a single one. Despite added complexity, probabilistic ILP opens many new challenges. Most of the existing work on probabilistic ILP considers the minimal extension of ILP to the probabilistic setting, by assuming that either (i) BK facts are uncertain, or (ii) that learned clauses need to model uncertainty. These assumptions make it possible to separate structure from uncertainty and simply reuse existing ILP techniques. Following this minimal extension, the existing work focuses on discriminative learning in which the goal is to learn a program for a single target relation. However, a grand challenge in probabilistic programming is generative learning. That is, learning a program describing a generative process behind the data, not a single target relation. Learning generative programs is a significantly more challenging problem, which has received very little attention in probabilistic ILP.
Explainability. Explainability is one of the claimed advantages of a symbolic representation. Recent work [ , ] evaluates the comprehensibility of ILP hypotheses using Michie's [ ] framework of ultra-strong machine learning, where a learned hypothesis is expected to not only be accurate but to also demonstrably improve the performance of a human being provided with the learned hypothesis. [ ] empirically demonstrate improved human understanding directly through learned hypotheses. However, given the demonstration of both beneficial and harmful effects of explainability [ ] more work is required to better understand the conditions under which this can be achieved, especially given the rise of PI.
Unifying ILP with neural methods. It has often been noted [ ] that the strengths and weaknesses of neural networks and ILP are complementary: neural networks ( ) scale to huge datasets, ( ) are robust to mislabelled data, ( ) are robust to ambiguous (raw, undiscretised) data, but ( ) are very data hungry, ( ) often struggle to generalise outside the training distribution, and ( ) are uninterpretable. ILP systems, by contrast ( ) often fail to scale to large datasets, ( ) sometimes fail to handle mislabelled data, ( ) almost always fail to handle raw undiscretised data, but ( ) are very data efficient, ( ) often generalise well outside the training distribution, and ( ) produce human-readable programs. Given that the strengths and weaknesses of the two approaches are complementary, many people have advocated some sort of unification of the two [ , , ]. There is much activity in this area, and much work still to do to produce a truly convincing unification of these very different paradigms.

. Summary
As ILP approaches , we think that the advances made in the last decade, surveyed in this paper, have opened up new areas of research for ILP to explore. Moreover, we hope that the next decade sees developments on the numerous limitations we have discussed so that ILP can have a significant impact on AI.

Declarations
Funding. Not applicable.

Conflicts of interest/Competing interests. Not applicable.
Ethics approval. Not applicable.
Consent to participate. Not applicable.

Consent for publication. Not applicable.
Availability of data and material. Not applicable.
Code availability. Not applicable.

Consent to participate. Not applicable.
Authors' contributions. AC wrote Sections -, and . SD wrote Sections . , . , and . RE wrote Sections . , , and . SM wrote Section .