Golem is an inductive logic programming algorithm developed by Stephen Muggleton and Cao Feng in 1990.[1] It uses the technique of relative least general generalisation proposed by Gordon Plotkin, leading to a bottom-up search through the subsumption lattice.[2] In 1992, shortly after its introduction, Golem was considered the only inductive logic programming system capable of scaling to tens of thousands of examples.
Golem takes as input a definite program as background knowledge together with sets of positive and negative examples, denoted and respectively. The overall idea is to construct the least general generalisation of with respect to the background knowledge. However, if is not merely a finite set of ground atoms, then this relative least general generalisation may not exist.[3] Therefore, rather than using directly, Golem uses the set of all ground atoms that can be resolved from in at most resolution steps. An additional difficulty is that if is non-empty, the least general generalisation of may entail a negative example. In this case, Golem generalises different subsets of separately to obtain a program of several clauses. Golem also employs some restrictions on the hypothesis space, ensuring that relative least general generalisations are polynomial in the number of training examples. Golem demands that all variables in the head of a clause also appears in a literal of the clause body; that the number of substitutions needed to instantiate existentially quantified variables introduced in a literal is bounded; and that the depth of the chain of substitutions needed to instantiate such a variable is also bounded.[4]
The following example about learning definitions of family relations uses the abbreviations
,,,,,,,, and . It starts from the background knowledge (cf. picture)
it{par}(h,m)\landit{par}(h,t)\landit{par}(g,m)\landit{par}(t,e)\landit{par}(n,e)\landit{fem}(h)\landit{fem}(m)\landit{fem}(n)\landit{fem}(e)
it{dau}(m,h)\landit{dau}(e,t)
The relative least general generalisation is now computed as follows to obtain a definition of the daughter relation.
\begin{align} it{dau}(m,h)\leftarrowit{par}(h,m)\landit{par}(h,t)\landit{par}(g,m)\landit{par}(t,e)\landit{par}(n,e)\landit{fem}(h)\landit{fem}(m)\landit{fem}(n)\landit{fem}(e)\\ it{dau}(e,t)\leftarrowit{par}(h,m)\landit{par}(h,t)\landit{par}(g,m)\landit{par}(t,e)\landit{par}(n,e)\landit{fem}(h)\landit{fem}(m)\landit{fem}(n)\landit{fem}(e) \end{align}
\begin{align} it{dau}(m,h)\lorlnotit{par}(h,m)\lorlnotit{par}(h,t)\lorlnotit{par}(g,m)\lorlnotit{par}(t,e)\lorlnotit{par}(n,e)\lorlnotit{fem}(h)\lorlnotit{fem}(m)\lorlnotit{fem}(n)\lorlnotit{fem}(e)\\ it{dau}(e,t)\lorlnotit{par}(h,m)\lorlnotit{par}(h,t)\lorlnotit{par}(g,m)\lorlnotit{par}(t,e)\lorlnotit{par}(n,e)\lorlnotit{fem}(h)\lorlnotit{fem}(m)\lorlnotit{fem}(n)\lorlnotit{fem}(e) \end{align}
it{dau}(xme,xht)
it{dau}(m,h)
it{dau}(e,t)
lnotit{par}(xht,xme)
lnotit{par}(h,m)
lnotit{par}(t,e)
lnotit{fem}(xme)
lnotit{fem}(m)
lnotit{fem}(e)
lnotit{par}(g,m)
lnotit{par}(g,m)
lnotit{par}(g,m)
lnotit{par}(xgt,xme)
lnotit{par}(g,m)
lnotit{par}(t,e)
xme,xht
it{dau}(xme,xht)\lorlnotit{par}(xht,xme)\lorlnotit{fem}(xme)
it{dau}(xme,xht)\leftarrowit{par}(xht,xme)\landit{fem}(xme)\land(allbackgroundknowledgefacts)
xme
xht
xht
xme
xme