201
Logic Programming and Artificial Neural Networks
7.5.6 Theorem Let P be a covered logic program, and let n ∈ N. Then we
can construct a 3-layer feedforward network whose network function approximates T P up to level n.
Proof: We can obtain such an approximating network by
(1) Constructing P n as defined above.
(2) Using the construction presented in the proof of Theorem 7.4.1 to obtain
a network computing T Pn .
Since T Pn coincides with T P for all atoms of level ≤ n, we conclude that the
network we have constructed approximates T P up to level n, as required. •
7.5.7 Example Take P to be Program 7.5.1 introduced earlier. We obtain
the corresponding program P n by means of the level mapping defined in Program 7.5.1. The level of the head atom of the clauses is shown below on the
right.
P 1 = {even(a) ←}
l(even(a)) = 1
P 2 = {even(a) ←,
l(even(a)) = 1
odd(a) ← ¬even(a)}
l(odd(a)) = 2
P 3 = {even(a) ←,
l(even(a)) = 1
odd(a) ← ¬even(a),
l(odd(a)) = 2
even(s(a)) ← odd(a)}
l(even(s(a))) = 3
The corresponding networks are shown in Figure 7.7.
7.5.3 Approximation by Sigmoidal Networks
In this section, we take a different approach to the approximation of the
embedded meaning function. We start by presenting the underlying intuitions
and continue with a detailed discussion.
29
Using the embedding ι defined earlier for b = 3 and the level mapping
shown in Program 7.5.1, we obtain the embedding of the T P -operator shown
in Figure 7.8 on the left. Under the condition that P is covered and the
level mapping l is bijective, we can approximate this graph using a set of
appropriately chosen constant pieces. These, in turn, can be computed as a
sum of threshold functions, shown in Figure 7.8 in the middle. By replacing
the threshold functions by sigmoidals, we obtain an approximation which can
directly be implemented within a neural network.
29 The interested reader is referred to [Bader et al., 2005b] and [Bader, 2009] for further
details and for implementations.
Logic Programming and Artificial Neural Networks
7.5.6 Theorem Let P be a covered logic program, and let n ∈ N. Then we
can construct a 3-layer feedforward network whose network function approximates T P up to level n.
Proof: We can obtain such an approximating network by
(1) Constructing P n as defined above.
(2) Using the construction presented in the proof of Theorem 7.4.1 to obtain
a network computing T Pn .
Since T Pn coincides with T P for all atoms of level ≤ n, we conclude that the
network we have constructed approximates T P up to level n, as required. •
7.5.7 Example Take P to be Program 7.5.1 introduced earlier. We obtain
the corresponding program P n by means of the level mapping defined in Program 7.5.1. The level of the head atom of the clauses is shown below on the
right.
P 1 = {even(a) ←}
l(even(a)) = 1
P 2 = {even(a) ←,
l(even(a)) = 1
odd(a) ← ¬even(a)}
l(odd(a)) = 2
P 3 = {even(a) ←,
l(even(a)) = 1
odd(a) ← ¬even(a),
l(odd(a)) = 2
even(s(a)) ← odd(a)}
l(even(s(a))) = 3
The corresponding networks are shown in Figure 7.7.
7.5.3 Approximation by Sigmoidal Networks
In this section, we take a different approach to the approximation of the
embedded meaning function. We start by presenting the underlying intuitions
and continue with a detailed discussion.
29
Using the embedding ι defined earlier for b = 3 and the level mapping
shown in Program 7.5.1, we obtain the embedding of the T P -operator shown
in Figure 7.8 on the left. Under the condition that P is covered and the
level mapping l is bijective, we can approximate this graph using a set of
appropriately chosen constant pieces. These, in turn, can be computed as a
sum of threshold functions, shown in Figure 7.8 in the middle. By replacing
the threshold functions by sigmoidals, we obtain an approximation which can
directly be implemented within a neural network.
29 The interested reader is referred to [Bader et al., 2005b] and [Bader, 2009] for further
details and for implementations.
