Aleph Workshop

(based on material from Jian Huang, University of Melbourne, whose site is not anymore available)

This workshop aims to give you a very high level introduction to the ILP system Aleph.

Brief Overview of Aleph

Inductive Logic Programming (ILP) is a machine learning technique which aims at constructing a Hypothesis (H) to explain some Examples (E), typically making use of some existing Background Knowledge (B). All of H, B and E are represented as logic programs. The idea is to come up with H given B and E such that B ^ H |= E.

Hypothesis construction is the core of any ILP system and, unsurprisingly, there are many different techniques for constructing hypotheses, including Inverse Resolution (IR), Relative Least General Generalisations (RLGG), Inverse Implication (II), and Inverse Entailment (IE). A good introduction to various ILP techniques is here.

Aleph is the latest implementation of the Inverse Entailment algorithm. It has also incorporated features from many of its predecessors based on other techniques. Aleph is implemented in Prolog and can be run in YAP prolog and SWI prolog. In fact, all you need to run Aleph is this one file (aleph.pl).

An Aleph program typically has 3 different files: one defining the background knowledge (with an extension .b), one defining the positive examples (.f) and one defining the negative examples (.n), as in family1.b, family1.f and family1.n which will be used for the first exercise of this workshop.

Exercise 1:

The sample files (family1.b, family1.f and family1.n) contain as background knowledge some basic definitions of family relationships, such as father/2 and mother/2. There is no definition for parent/2. However, there are positive and negative examples provided for parent/2. We would like Aleph to come up with the definition for parent/2.

  1. Copy the Aleph interpreter (aleph.pl) and the sample files into your working directory.
  2. Start Prolog interpreter (e.g. by typing 'pl' in UNIX).
  3. Load Aleph interpreter by typing

    :- ['aleph.pl'].

  4. Tell Aleph to read in the sample files by typing

    :- read_all(family1).

    This loads all 3 files into the Aleph interpreter.

  5. Ask Aleph interpreter to induce the definition for 'parent' by typing

:- induce.

Task:

  1. At this stage, Aleph displays the 'theory' (the hypothesis) constructed by its inductive algorithm at the bottom of a very lengthy output. It also outputs a trace showing how it constructs this theory as well as some statistics on how many positive/negative examples the theory covers. Take a close look at the output and try to understand it.
  2. Take a look at the source files, especially the file containing the background knowledge (i.e. family1.b). Again, try to understand it because you will need to extend it in the next exercise.
  3. You will find the Aleph Manual very useful while you are exploring deeply into the source files.

Exercise 2:

In the previous exercise, Aleph successfully constructs the definition for parent/2 as:

parent(A, B) :- father(A, B).
parent(A, B) :- mother(A, B).

In this exercise, your task is to provide Aleph with some examples (positive and negative) and ask it to come up with a definition for grandparent/2.

Hint: You don't need to modify or add any new background knowledge. Just modify the type declaration section and the files containing example.

What does Aleph give you as the definition for grandparent/2? Is the definition what you expect? Is it actually correct? Think about what correctness mean for an inductive task.