197
Logic Programming and Artificial Neural Networks
In principle, there are two ways to approximate a given T P -operator. On
the one hand, we can design an approximating function to meet a given level
of accuracy. This leads, as accuracy increases, to increasing numbers of units
in the hidden layer in the resulting networks, and we call this method approximation in space. The approaches presented in this section follow this line of
attack. Alternatively, we can construct a system which approximates a single
application of the T P -operator better and better the longer it runs, and we
22
call this method approximation in time.
Our discussion here has concentrated on the operator T P , but all our considerations apply equally well to any of the other semantic operators we have
studied, and we will return to this point in Sections 7.6 and 7.7. However,
unless stated to the contrary, for a given normal logic program P , we will
focus on the operator T P and the space I P of two-valued interpretations in
Section 7.5.1 through to Section 7.5.6.
7.5.1 Feasibility of the First-Order Approach
As mentioned previously, it is well-known that multilayer feedforward networks are universal approximators for certain real functions and, in particular,
for all continuous real functions on compact subsets of R
n . Hence, if we can
find a suitable way of representing first-order interpretations by (finite vectors
of) real numbers, say, then feedforward networks may be used to approximate the meaning function of suitable programs. It is necessary of course that
such representations are compatible with both the logic-programming and the
neural-network paradigms.
7.5.1 Program (Even2) We use the following variant of the program Even,
Program 2.1.3, as a running example. The equations on the right define a level
mapping l assigning odd numbers to even(s
i (a))-atoms and even numbers to
odd(s
i (a))-atoms.
even(a) ←
l(even(s
i (a))) := 2i + 1
even(s(X)) ← odd(X)
l(odd(s
i (a))) := 2i + 2
odd(X) ← ¬even(X)
We next define a homeomorphic embedding of the space of interpretations of a given normal logic program into some (compact) subset of the real
numbers. In doing this, we use level mappings
23 to realize this embedding.
For much of this chapter, although not everywhere, we assume that the level
mapping in question is bijective, even though some of the results we discuss
can be extended to the case of non-bijective level mappings.
24
22 This method was employed in [Bader and Hitzler, 2004] and [Bader et al., 2005a].
23 We are following [H¨ olldobler et al., 1999] here.
24 See [Seda, 2006], for example, where the requirement on level mappings l : B P → ω is
the already familiar one that l −1 (n) be a finite set for each n.
Logic Programming and Artificial Neural Networks
In principle, there are two ways to approximate a given T P -operator. On
the one hand, we can design an approximating function to meet a given level
of accuracy. This leads, as accuracy increases, to increasing numbers of units
in the hidden layer in the resulting networks, and we call this method approximation in space. The approaches presented in this section follow this line of
attack. Alternatively, we can construct a system which approximates a single
application of the T P -operator better and better the longer it runs, and we
22
call this method approximation in time.
Our discussion here has concentrated on the operator T P , but all our considerations apply equally well to any of the other semantic operators we have
studied, and we will return to this point in Sections 7.6 and 7.7. However,
unless stated to the contrary, for a given normal logic program P , we will
focus on the operator T P and the space I P of two-valued interpretations in
Section 7.5.1 through to Section 7.5.6.
7.5.1 Feasibility of the First-Order Approach
As mentioned previously, it is well-known that multilayer feedforward networks are universal approximators for certain real functions and, in particular,
for all continuous real functions on compact subsets of R
n . Hence, if we can
find a suitable way of representing first-order interpretations by (finite vectors
of) real numbers, say, then feedforward networks may be used to approximate the meaning function of suitable programs. It is necessary of course that
such representations are compatible with both the logic-programming and the
neural-network paradigms.
7.5.1 Program (Even2) We use the following variant of the program Even,
Program 2.1.3, as a running example. The equations on the right define a level
mapping l assigning odd numbers to even(s
i (a))-atoms and even numbers to
odd(s
i (a))-atoms.
even(a) ←
l(even(s
i (a))) := 2i + 1
even(s(X)) ← odd(X)
l(odd(s
i (a))) := 2i + 2
odd(X) ← ¬even(X)
We next define a homeomorphic embedding of the space of interpretations of a given normal logic program into some (compact) subset of the real
numbers. In doing this, we use level mappings
23 to realize this embedding.
For much of this chapter, although not everywhere, we assume that the level
mapping in question is bijective, even though some of the results we discuss
can be extended to the case of non-bijective level mappings.
24
22 This method was employed in [Bader and Hitzler, 2004] and [Bader et al., 2005a].
23 We are following [H¨ olldobler et al., 1999] here.
24 See [Seda, 2006], for example, where the requirement on level mappings l : B P → ω is
the already familiar one that l −1 (n) be a finite set for each n.
