Lecture 161
Lecture 161
Lecture Outline:
• Propositional Resolution
Reading:
Chapter 10.6-10.7 of Mitchell
Inductive Logic Programming: Theory and Methods, S. Muggleton and L. de Raedt (on
course web page)
CProgol4.4: a tutorial introduction, S. Muggleton and J. Firth (on course web page)
• A second approach to inductive logic programming is based on the observation that induction
is the inverse of deduction.
Induction is, in fact, the inverse operation of deduction, and cannot be conceived to
exist without the corresponding operation, so that the question of relative importance
cannot arise. Who thinks of asking whether addition or subtraction is the more
important process in arithmetic? But at the same time much difference in difficulty may
exist between a direct and inverse operation; . . . it must be allowed that inductive
investigations are of a far higher degree of difficulty and complexity than any questions
of deduction. . . . (Jevons 1874)
• A second approach to inductive logic programming is based on the observation that induction
is the inverse of deduction.
Induction is, in fact, the inverse operation of deduction, and cannot be conceived to
exist without the corresponding operation, so that the question of relative importance
cannot arise. Who thinks of asking whether addition or subtraction is the more
important process in arithmetic? But at the same time much difference in difficulty may
exist between a direct and inverse operation; . . . it must be allowed that inductive
investigations are of a far higher degree of difficulty and complexity than any questions
of deduction. . . . (Jevons 1874)
• More formally, induction is finding a hypothesis h such that
where
– D is training data
– xi is ith training instance
– f (xi ) is the target function value for xi
– B is other background knowledge
• A second approach to inductive logic programming is based on the observation that induction
is the inverse of deduction.
Induction is, in fact, the inverse operation of deduction, and cannot be conceived to
exist without the corresponding operation, so that the question of relative importance
cannot arise. Who thinks of asking whether addition or subtraction is the more
important process in arithmetic? But at the same time much difference in difficulty may
exist between a direct and inverse operation; . . . it must be allowed that inductive
investigations are of a far higher degree of difficulty and complexity than any questions
of deduction. . . . (Jevons 1874)
• More formally, induction is finding a hypothesis h such that
where
– D is training data
“For each training data instance, the instance’s
– xi is ith training instance target classification is logically entailed by the
– f (xi ) is the target function value for xi background knowledge, together with hypoth-
– B is other background knowledge esis and the instance itself”
• A second approach to inductive logic programming is based on the observation that induction
is the inverse of deduction.
Induction is, in fact, the inverse operation of deduction, and cannot be conceived to
exist without the corresponding operation, so that the question of relative importance
cannot arise. Who thinks of asking whether addition or subtraction is the more
important process in arithmetic? But at the same time much difference in difficulty may
exist between a direct and inverse operation; . . . it must be allowed that inductive
investigations are of a far higher degree of difficulty and complexity than any questions
of deduction. . . . (Jevons 1874)
• More formally, induction is finding a hypothesis h such that
where
– D is training data
“For each training data instance, the instance’s
– xi is ith training instance target classification is logically entailed by the
– f (xi ) is the target function value for xi background knowledge, together with hypoth-
– B is other background knowledge esis and the instance itself”
• Suggests we design an inductive algorithm by inverting operators for automated deduction . . .
h1 : Child(u, v) ← Father(v, u)
h2 : Child(u, v) ← Parent(v, u)
• There are pluses and minuses to casting the learning task as a search for hypotheses h such that
• There are pluses and minuses to casting the learning task as a search for hypotheses h such that
• Positives:
– Subsumes earlier idea of finding h that “fits” training data
– Domain theory B helps define meaning of “fit” the data
B ∧ h ∧ xi ⊢ f (xi )
• There are pluses and minuses to casting the learning task as a search for hypotheses h such that
• Positives:
– Subsumes earlier idea of finding h that “fits” training data
– Domain theory B helps define meaning of “fit” the data
B ∧ h ∧ xi ⊢ f (xi )
F(A, B) = C, where A ∧ B ⊢ C
F(A, B) = C, where A ∧ B ⊢ C
F(A, B) = C, where A ∧ B ⊢ C
C: PassExam V Study
C: PassExam V Study
C: PassExam V Study
C: PassExam V Study
• So, to invert we need to go from C and C1 to C2 . A general operation for doing this is (inverted
resolution):
1. Given initial clauses C1 and C, find a literal L that occurs in clause C1 , but not in clause C.
2. Form the second clause C2 by including the following literals
• Like propositional resolution, first order resolution takes two clauses C1 and C2 as input and
yields a third C as output.
Unlike propositional resolution the C1 and C2 must be related not by sharing a literal and its
negation, but by sharing a literal and negated literal that can be matched by a unifying
substitution.
• Like propositional resolution, first order resolution takes two clauses C1 and C2 as input and
yields a third C as output.
Unlike propositional resolution the C1 and C2 must be related not by sharing a literal and its
negation, but by sharing a literal and negated literal that can be matched by a unifying
substitution.
• Example:
• First note the substitution θ can be factored into two substitutions θ1 and θ2 such that:
– θ = θ1 θ2
– θ1 contains all and only variable bindings involving variables in C1
– θ2 contains all and only variable bindings involving variables in C2
Since C1 and C2 are universally quantified they can be rewritten, if necessary, to contain no
variables in common. Hence the above definition can be rewritten as:
• First note the substitution θ can be factored into two substitutions θ1 and θ2 such that:
– θ = θ1 θ2
– θ1 contains all and only variable bindings involving variables in C1
– θ2 contains all and only variable bindings involving variables in C2
Since C1 and C2 are universally quantified they can be rewritten, if necessary, to contain no
variables in common. Hence the above definition can be rewritten as:
• If we restrict inverse resolution to infer clauses C2 that contain no literals in common with C1
(i.e. we prefer the shortest C2 ’s) then re-write above as:
• First note the substitution θ can be factored into two substitutions θ1 and θ2 such that:
– θ = θ1 θ2
– θ1 contains all and only variable bindings involving variables in C1
– θ2 contains all and only variable bindings involving variables in C2
Since C1 and C2 are universally quantified they can be rewritten, if necessary, to contain no
variables in common. Hence the above definition can be rewritten as:
• If we restrict inverse resolution to infer clauses C2 that contain no literals in common with C1
(i.e. we prefer the shortest C2 ’s) then re-write above as:
2 ∪ {¬L1 θ1 θ2 }
Inverse Resolution: C2 = (C − (C1 − {L1 })θ1 )θ−1 −1
{Bob/y, Tom/z}
{Shannon/x}
{Bob/y, Tom/z}
{Shannon/x}
{Bob/y, Tom/z}
{Shannon/x}
{Bob/y, Tom/z}
{Shannon/x}
{Bob/y, Tom/z}
{Shannon/x}
{Bob/y, Tom/z}
{Shannon/x}
B ∧ h ∧ xi ⊢ f (xi )
B ∧ h ∧ xi ⊢ f (xi )
• P ROGOL reduces this combinatorial explosion by using an alternative approach, called mode
directed inverse entailment (MDIE)
– Use inverse entailment to generate most specific h that together with background
information entails observed data
– Then perform general-to-specific search through a hypothesis space H bounded by the
most specific hypothesis and constrained by user-specified predicates
• P ROGOL reduces this combinatorial explosion by using an alternative approach, called mode
directed inverse entailment (MDIE)
– Use inverse entailment to generate most specific h that together with background
information entails observed data
– Then perform general-to-specific search through a hypothesis space H bounded by the
most specific hypothesis and constrained by user-specified predicates
• More fully:
1. User specifies H by stating predicates, functions, and forms of arguments allowed for each
2. P ROGOL uses sequential covering algorithm:
For each hxi , f (xi )i not covered by learned rules
– Find most specific hypothesis hi s.t. B ∧ hi ∧ xi ⊢ f (xi )
∗ actually, considers only k-step entailment
– Conduct general-to-specific search of H bounded by specific hypothesis hi , choosing
hypothesis with minimum description length
– remove positive examples covered by new hypothesis
Modes Describe relations (predicates) between objects of given types which can be used in
• the head of hypothesized clauses (modeh declarations)
• the body of hypothesized clauses (modeb declarations)
E.g. suppose we are learning a rule for the aunt of predicate.
modeh declarations A head mode declaration might be:
:- modeh(1,aunt_of(+person,+person))?
This declaration states that:
• the head literal has predicate aunt of
• the head literal’s arguments are of type person
• arguments are input variables – i.e. these variables should be bound when clause is
called (indicated by ‘+’; ‘-’ indicates output variable; ‘#’ indicates constant required)
• the recall is 1 – the recall bounds the number of alternative solutions when the literal is
instantiated (aunt of returns a unique answer – yes or no – when its arguments are
instantiated) – can be any number or ‘*’
• See also:
– http://www.doc.ic.ac.uk/˜shm/ilp.html
– http://en.wikipedia.org/wiki/Inductive_logic_programming
• Applications include learning structural principles underlying protein folding from structural
genomics data (Cootes, Muggleton, and Sternberg: The automatic discovery of structural
principles describing protein fold space. Journal of Molecular Biology, 2003)
– See also http://www.doc.ic.ac.uk/˜shm/applications.html