<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Towards Structure Learning under the Credal Semantics</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>David Tuckey</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Krysia Broda</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Alessandra Russo?</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Imperial College London</institution>
          ,
          <country country="UK">UK</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>We present the Credal-FOIL system for structure learning of probabilistic logic programs under the credal semantics. The credal semantics is a generalisation of the distribution semantics based on the answer set semantics. Our learning approach takes a set of examples that are atoms with target lower and upper bounds probabilities and a background knowledge that can have negative loops. We de ne accuracy in this setting and learn a set of normal rules without loops that maximises this notion of accuracy. We showcase the system on two proof-of-concept examples.</p>
      </abstract>
      <kwd-group>
        <kwd>Structure learning</kwd>
        <kwd>Credal Semantics</kwd>
        <kwd>Probabilistic Induc- tive Logic Programming</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        Probabilistic Logic Programming is a eld that has its roots in the nineties. It
augments the eld of Logic Programming to allow probabilistic inference using
logical rules. While there exist many formulations, a major approach is based on
the Distribution Semantics [
        <xref ref-type="bibr" rid="ref22">22</xref>
        ] (DS). In this context, a possible syntax consists
in dividing probabilistic logic programs (PLP) into a logic program detailing
deterministic relations and a set of independent probabilistic facts (events) to
yield a single probability distribution over the atoms of the program (through
a probability distribution over possible worlds). A well-known tool based on the
DS is ProbLog [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] where programs are strati ed.
      </p>
      <p>
        The credal semantics [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] is a generalisation of the DS for unstrati ed
probabilistic logic programs under the answer set semantics [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. Informally, this
semantics attributes to the atoms of a program a set of probability measures
(instead of a single one) and by taking the extremums of this set, we obtain the
notion of a lower-bound and upper-bound for the probability of each atom.
      </p>
      <p>
        Rule learning is a well studied subject in logic programming and is often
called inductive logic programming [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ] (ILP). The goal is to nd an hypothesis
that, together with a background knowledge, covers a set of positive examples
while not covering any of the negative examples. Its probabilistic variant is called
? Copyright c 2020 for this paper by its authors. Use permitted under Creative
Commons License Attribution 4.0 International (CC BY 4.0).
probabilistic inductive logic programming [
        <xref ref-type="bibr" rid="ref21 ref6">6, 21</xref>
        ]. Another popular type of
learning with PLP is parameter learning: with one set of rules, we aim to estimate the
best probabilities of the initial events to describe the data [
        <xref ref-type="bibr" rid="ref1 ref22">22, 1</xref>
        ]. Some systems
do both types of learning at the same time [
        <xref ref-type="bibr" rid="ref2 ref5">5, 2</xref>
        ].
      </p>
      <p>
        In this paper we introduce Credal-FOIL, a framework and algorithm for
learning the structure of probabilistic logic programs under the credal semantics.
In Credal-FOIL the learned hypothesis is a non-probabilistic set of normal rules
with no negative loops and the logic program in the background knowledge is
expressed as a non strati ed answer set program. Examples in our Credal-FOIL
learning task are single atoms with an associated target lower and upper bound
probability. To the best of our knowledge no attempt had been proposed yet
for structure learning under the credal semantics. Our system de nes a notion
of coverage over our examples and learns incrementally a hypothesis that
maximises a notion of accuracy. We showcase our system using two proof of concept
examples: the rst example shows that in the speci c case when the background
knowledge is strati ed the learning task coincides with the ProbFOIL [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]
learning task. In the second example we show that our algorithm allows also for
a background knowledge that is not strati ed so exploiting in full the credal
semantics.
      </p>
      <p>The rest of the paper is composed as follows: Section 2 presents the
background necessary for reading this paper, Section 3 presents our learning task and
our methodology to solve it. We apply our system to two examples in Section 4
and talk about related works in Section 5. Finally we discuss our work and next
steps in Section 6 and conclude in Section 7.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Background</title>
      <p>
        This section introduces notions of logic programming [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ] and answer set
semantics [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] to then present the credal semantics [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
2.1
      </p>
      <sec id="sec-2-1">
        <title>The answer set semantics</title>
        <p>In a logic program, a term is either a constant a; b; c:: or a variable X; Y; Z::, an
atom is of the form p(t1; :::; tn) where p is a predicate of arity n and t1; :::; tn are
terms (n can be 0). A literal is an atom p or a negated atom not p (negation as
failure), a normal rule is of the form A :- B1; :::; Bn where A is an atom (called
the head of the rule) and B1; :::; Bn are literals (called the body of the rule). A
rule with an empty body is called a fact. A ground literal is a literal with no
variable, a ground rule contains only ground literals. A normal logic program is
a set of normal rules. The Herbrand universe of a program is the set of all the
ground terms appearing in the program. The Herbrand Base HBP of a program
P is the set of all the ground atoms that can be formed from the predicates in P
and the ground terms in the Herbrand universe. A substitution is a mapping
from variables to terms. The grounding of a program P is the set of all ground
rules r where r is in P and is a mapping from variables to ground terms in
the Herbrand universe. We call an interpretation of P any subset of HBP .</p>
        <p>We can now introduce the answer set semantics. Given a program P and an
interpretation I, the reduct P I is the program made from the grounding of P
in the following way: remove all rules that has in the body the negation of an
atom in I and then delete all negative literals from the body of the remaining
rules. The reduct P I is a ground de nite program and thus has a single minimal
model. I is an answer set of P if it is the minimal model of P I . We denote the
set of answer sets of P as AS(P ). A strati ed program P is a program that can
be divided in the form P = P1 [ P2 [ ::: [ Pm where Pi and Pj are disjoint for all
i 6= j such that if an atom occurs positively in Pi then it appears in the head of
a rule in Pj with j i and if an atom appears negatively in Pi then it appears in
the head of a rule in Pj with j &lt; i. It is known that a strati ed program admits
one single answer set if any, and that unstrati ed programs can admit more than
one. As a program may have multiple answer sets, the entailment of an atom
can be of two types: brave and cautious. An atom p is cautiously entailed by P
if p is in all the answers sets of P and bravely entailed by P if p is in at least one
answer set of P. For an interpretation I and conjunctive formula F , we denote
I j= F if F is entailed (true) in I. The notion of brave and cautious entailment
is extended to conjunctive formulas.
2.2</p>
      </sec>
      <sec id="sec-2-2">
        <title>The credal semantics</title>
        <p>
          The credal semantics is a generalisation of the Distribution semantics [
          <xref ref-type="bibr" rid="ref22">22</xref>
          ]: it uses
the same interpretation for probabilistic facts given in the PLP but attributes
to it a set of probability measures. For an extensive review of probabilistic logic
programming we redirect the reader to [
          <xref ref-type="bibr" rid="ref20">20</xref>
          ] and for a more in-depth description
of the credal semantics to [
          <xref ref-type="bibr" rid="ref15 ref3 ref4">15, 3, 4</xref>
          ].
        </p>
        <p>
          The syntax we consider in this paper for probabilistic logic programs is as
follows: a PLP is a pair &lt; P; P F &gt; where P is a logic program and P F is a
set of independent ground probabilistic facts. A probabilistic fact is of the form
:: p (using the Problog notation [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ]) where p is an atom (of any arity) and
2 [0; 1] is the probability with which p is true. We say that a PLP is strati ed
if P is a strati ed logic program. Let n be the cardinality of P F . Informally,
we can choose a probabilistic fact :: p with probability and discard it with
probability 1 . A total choice C is a subset of P F in which we consider to
have \chosen" p if p 2 C (p is chosen true) and \discarded" p if p 2= C (p is
chosen false). There exist 2n total choices. To each total choice C we associate the
probability P rob(C) = Q ::p2C (as the probabilistic facts are independent).
Let's de ne P FC = fpj :: p 2 Cg to be the set of facts that correspond to the
total choice C and ^C = ^ ::p2C p the formula corresponding to the conjunction
of all the facts in C.
        </p>
        <p>We denote HBP the Herbrand Base HBP augmented with the atoms in
the probabilistic facts. When referring to interpretations of P in the context of
a PLP &lt; P; P F &gt;, we mean subsets of HBP . Probabilities are de ned over
interpretations of P using probability measures P r: for an interpretation I
var1 (X) , not walk (X) , s u n s h i n e (X) , not wind (X) .</p>
        <p>var1 (X) , not run (X) .
var1 (X) , run (X) , t i r e d (X) .</p>
        <p>
          var1 (X) , walk (X) , not warm(X) .
HBP and a probability measure P r over 2HBP , P r(I) denotes the probability
associated to I by P r. We surcharge the notation and de ne the probability of
a conjuctive formula F as P r(F ) = PI22HBP ;Ij=F P r(I) for a given probability
measure P r over 2HBP . A PLP is consistent if there is at least one answer set
for each total choice, meaning that 8C 2 2P F ; AS(P [ P FC ) 6= ;. We give the
de nition from Cozman and Maua [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ]: a probability model for a consistent PLP
&lt; P; P F &gt; is a probability measure P r over interpretations of P such as:
{ every interpretation I HBP with P r(I) &gt; 0 has to be an answer set for a
total choice: P r(I) &gt; 0 ) 9C 2 2P F such that I 2 AS(P [ P FC )
{ for C total choice: P r(^C) = P rob(C)
        </p>
      </sec>
      <sec id="sec-2-3">
        <title>The credal semantics of a PLP is the set of all its probability models.</title>
        <p>
          In other words, we accept all probability measures that only give non-zero
probability to elements of fAS(P [ P FC )jC total choiceg such that for each total
choice, the sum of the probability of the corresponding answer sets equals the
probability of the total choice. Now, the probability of a conjunctive formula F
can be di erent depending on the probability model considered. However there
exists a minimum value [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ] P r(F ) to this probability: whatever the probability
model P r considered we have P r(F ) P r(F ). Similarly there exists a maximum
value P r(F ) to this probability: whatever the probability model P r considered
we have P r(F ) P r(F ). We call P r(F ) (resp. P r(F )) the lower bound
probability of F (resp. upper bound probability of F ). Naturally, it always holds that
P r(F ) P r(F ).
        </p>
        <p>
          An algorithm is given in [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ] for computing the lower and upper bound
probability using the answer sets of P [ P FC . Informally, P r(F ) (resp. P r(F )) is
the sum of the probabilities of the total choices P rob(C) where F is cautiously
(resp. bravely) entailed by P [ P FC .
        </p>
        <p>We give an example of probabilistic logic program in Figure 1. It de nes 4
probabilistic facts with their corresponding probabilities, which yield 24 = 16
total choices. There will be a negative loop in P [ P FC for all the total choices C
where sunshine is true and wind is false at the same time (that is with probability
0:4 0:8 = 0:32), so run(d1) appears in one out of two answer sets for these
total choices. Otherwise run is always false. That makes for: P r(run(d1)) = 0
and P r(run(d1)) = 0:32. While the atom sick(d1) is not in a negative loop,
it depends on run(d1) or walk(d1) and so will have di erent lower and upper
bound probabilities: P r(sick(d1)) = 0:15 and P r(sick(d1)) = 0:27.
3</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Structure learning under the credal semantics</title>
      <p>
        The rst di culty of learning a probabilistic program under the credal semantics
is that we aim to learn a set of probability distributions instead of a single one.
We use as targets the lower and upper bound probabilities of example atoms.
Our approach builds on ProbFOIL [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] to adapt inductive logic programming
paradigms to our setting. Calling the hypothesis space SM , we de ne our learning
task:
De nition: Learning task. Given a set of examples E = f(ei; pi; pi)ji = 1; ::; ng
where each ei are grounded atoms, pi (resp. pig) is the target lower (resp. upper)
bound probability for ei and a background knowledge B =&lt; P; P F &gt; in the form
of a (possibly non-strati ed) PLP, nd an hypothesis H 2 SM that maximises
accuracy (as de ned later in Equation 3).
      </p>
      <p>
        The hypothesis we learn here is a set of rules with no negative loops. In
practice, these examples are di erent groundings of the same predicate (the
target predicate) and the rules in the hypothesis all have the same head. We
extend ProbFOIL [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] to de ne the coverage of our probabilistic examples and
notions such as accuracy, precision and recall.
      </p>
      <p>Each example can be interpreted in the following way: they provide
information about the proportion of the worlds (total choices) in which the atom ei
should be true or false, the probability of each total choice being given by the DS.
In this context, we interpret the probabilities as percentages and when talking
about proportions of the worlds, we mean taking into account the probabilities
of each world. For example when writing \in 0:5 of the worlds", we do not mean
in exactly half of them but in a certain amount such that their probabilities sum
to 0:5. Now as in our setting one total choice can lead to multiple answer sets, we
not only have atoms being true or false but also the notion of brave and cautious
inference for each total choice. Each example provides targets for these di
erent inference types. Informally, (ei; pi; pi) can be interpreted as meaning that
ei should be cautiously entailed (cautiously true) in pi (in percentage) of the
worlds, bravely entailed (bravely true) in (pi pi) of the worlds and not entailed
(false) in (1 pi) of the worlds. We call respectively these quantities the
\True/Positive" (ti = pi), \Brave" (bi = pi pi) and \False/Negative" (fi = 1 pi)
parts of example (ei; pi; pi). This is illustrated in Figure 2. We can then de ne
the Positive, Brave and Negative parts of the dataset as:
1
pi</p>
    </sec>
    <sec id="sec-4">
      <title>Negative</title>
    </sec>
    <sec id="sec-5">
      <title>Brave</title>
      <p>p
i</p>
    </sec>
    <sec id="sec-6">
      <title>Positive</title>
      <p>0
ei</p>
      <p>Not entailed
Cautiously
entailed</p>
      <p>Bravely
entailed
Set of total choices</p>
      <p>To rate an hypothesis, we use the notions of ROC analysis (True Positive,
False Positive, True Negative, False Negative) to which we introduce two new
categories: True Brave (TB) and False Brave (FB). These are aimed at de ning
the coverage over the brave part of the dataset. It is important to note that each
example participates at the same time to the Positive, Brave and Negative parts
of the dataset. Given the PLP B [ H =&lt; P [ H; P F &gt; composed of background
B =&lt; P; P F &gt; together with an hypothesis H and an example (ei; pi; pi), let qi =
P rB[H (ei) and qi = P rB[H (ei) the predicted lower probability and predicted
upper probability for atom ei. The aforementioned quantities are de ned on each
example (ei; pi; pi) as follows:
{ true positive tpi = min(pi; qi)
{ true negative tni = min(1 pi; 1 qi)
{ true brave tbi = max(0; min(pi; qi)
{ false positive f pi = max(0; qi pi)
{ false negative f ni = max(0; pi qi)
{ false brave left f bli = max(0; min(pi; qi) qi)
{ false brave right f bri = max(0; qi max(qi; pi))
max(pi; qi))</p>
      <p>These quantities are illustrated in Figure 3. If qi &lt; pi (ex. 1,2 and 5 of Figure
3), that means that in qi of the worlds, we rightfully predict that ei is cautiously
entailed so tpi = qi. However if qi &gt; pi (ex. 3,4 and 6 of Figure 3), we predict
that ei is cautiously entailed in qi of the worlds, which is \too many". Thus
tpi = pi and f pi = qi pi, meaning that we predict that in f pi worlds ei is
tpi
0.1
tpi
0.1
0.1
0.1
tpi
0.1
0.1
cautiously entailed when it should not be. The argument is of the same nature
for tni and f ni depending on pi and qi. Now the true brave part of the example
is the intersection of the two segments [pi; pi] and [qi; qi]. There are two \ways
of obtaining" some false brave: the segment [qi; qi] over ows [pi; pi] to the left
or to the right. When it over ows to the left then qi &lt; pi (assume qi &gt; pi, ex.
2 and 5 of Figure 3), then we predict that in f bli = pi qi of the worlds ei
is bravely entailed when it should be cautiously entailed. Symmetrically, when
[qi; qi] over ows to the right, qi &gt; pi (assume qi &lt; pi, ex. 3 and 5 of Figure 3), we
predict that in f bri = qi pi of the worlds ei is bravely entailed when it should
no be entailed. Informally, false brave left can be seen as \we predict bravely
entailed when it should be cautiously entailed" and false brave right as \we
predict bravely entailed when it should not be entailed". The same arguments
hold when the segments [pi; pi] and [qi; qi] do not intersect (ex. 1 and 4 of Figure
3). We compute these quantities over the entire dataset by summing them over
each individual example:</p>
      <p>The false brave (FB) quantity is the sum of the false brave left (FBL) and
the false brave right (FBR). These allow us to de ne the following loss functions:
T P =
T N =</p>
      <p>F N =
F BL =</p>
      <p>X tpi
i=1::n
X tni
i=1::n
X f ni
i=1::n
X f bli</p>
      <p>
        They are a modi cation of the usual heuristics from ROC analysis used in
inductive logic programming [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. For example precision usually represents the
ratio of true positives over all predicted positive examples. We add FBR to the
denominator to penalise an hypothesis that is also \too bravely optimistic",
while not adding TB to the numerator to get the precision to prioritise keeping
qi under pi. We de ned m-estimatetb to favor hypotheses with better T P and
T B at the same time. In the case of a strati ed background knowledge we get
qi = qi and pi = pi which makes that T B = F BR = F BL = 0. Thus our loss
functions reduce to the usual ones and the other quantities (TB, TN, FP, FN)
are equivalent to their de nition in ProbFOIL [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ].
      </p>
      <p>
        Our algorithm (Figure 4) is a version of the coverage algorithm and is similar
to that of ProbFOIL+'s [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. The algorithm is composed of an outer loop which
iteratively adds a rule to the hypothesis. The outer loop stops once adding a new
rule does not improve the accuracy. At each iteration, it nds a most speci c
rule (line 6 of Algorithm 1) that is then pruned (line 7) to get the sub-rule that
maximizes the localscore:
localscore(H; c) = m-estimatetb(H [ fcg)
m-estimatetb(H)
(4)
      </p>
      <p>This pruning checks for which i the rules h b1; ::; bi maximises this
localscore. As such, multiple (or none or all) literals might be removed from the
body. The re nement process is shown in Algorithm 2: from a rule with empty
body, we iteratively re ne it until either it does not increase the TP or TB part
of the dataset or does not have any FP or FBR (line 2). The rst step to the
re nement loop consists of nding the set of all possible literals that can be
added at the end of the rule r (line 3). Next we reject some possible re nements
(line 4) to compensate for the fact that we do not discard covered examples as a
normal FOIL algorithm would. In our case, we cannot discard the examples as
a rule might only cover a part of that example. This implies that when learning
a second rule, we need to make sure it is not going to cover exactly the same
part of the examples as the rst one. The reject function checks each possible
re nement (literal) by appending it to the body of the rule r and checking if
adding this latter to the hypothesis changes the computed probabilities. If the
probabilities stay the same, that means that this potential rule would not be
useful, thus the re nement is rejected. Finally, the re nement process selects the
best literal in the set of retained re nements (lines 7-8) and appends it to the
current rule. This process is repeated until the stopping criteria is met.</p>
      <p>In practice, the re nement process of Algorithm 2 is included within a beam
search to allow for a better search through the hypothesis space. We keep the
rules that had the best maximum localscore until none can be re ned further,
at which point we return the one with the maximum potential localscore.
4</p>
    </sec>
    <sec id="sec-7">
      <title>Proof of concept</title>
      <p>
        We demonstrate our system Credal-FOIL on two examples of probabilistic
program reconstruction and then give some implementation details about our
experiments. The rst is the sur ng example from De Raedt et Thon [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] while the
second is the program in Figure 1 which has a negative loop in the background
knowledge. To de ne the hypothesis space, we use a simple mode declaration [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ]:
Algorithm 1: Covering algorithm
1 H = ;
2 h = target_predicate
3 Let SM be the hypothesis space
4 stop_search = False
5 While not stop_search:
6 Let (h b1, .., bn) be find_best_rule(SM , H, h)
7 new_rule = argmaxi localscore(H, h b1,..,bi) % i 2 [1,n]
8 if accuracy(H) accuracy(H [ {new_rule}):
9 stop_search=True
10 else:
11 H = H [ {new_rule}
12 return H
Algorithm 2: nd best rule(SM , H, h)
1 r = h
2 While not (TP(H[{r})-TP(H)+TB(H[{r})-TB(H)) == 0 OR (FP({r}) +
      </p>
      <p>FBR({r})) == 0):
3 refinements = refinement(SM , r) %Set of all possible</p>
      <p>literals that can be added to c based on SM
4 refinements = reject(H, r, refinements) %We reject some
refinements
5 Let (h b1, .., bi) be r % i 0
6 Let N be the cardinality of refinements
7 l = argmaxk2[1;N] localscore(H, h b1,..,bi,refinements[k])
8 r = h b1,..,bi,refinements[l]
9 return r
modeh(pred1(Var)) (mode head) and modeb(pred2(Var)) (mode body)
respectively de ne that \pred1(X)" can be in the head of a rule and that \pred2(X)"
and \not pred2(X)" can be in the body of a rule. In our examples, we only use
predicates of arity one. Of course with our learning setting, there can only be
one mode head declaration.</p>
      <p>In the following examples, an added atom var1(X) appears in the programs.
It is automatically added by our learning system for practical reasons but does
not in uence the probabilities. We explain why we do so in section 4.3.
var1 (X) , not pop (X) , windok (X ) .</p>
      <p>var1 (X) , not pop (X) , s u n s h i n e (X ) .
The sur ng example has three probabilistic facts per example: pop(ti), windok(ti)
and sunshine(ti) which each have a probability. The full program is given in
Figure 5. The mode bias allows only for sur ng in the head and for pop, windok and
sunshine (and their negation by failure) in the body. We generated 50 di erent
examples by grounding each set of three probabilistic facts 50 times and
attributing to each grounding a random probability. We then computed the probability
of sur ng(ti) (where i = 1::50) using the full program to obtain a set of examples
of the form: e(sur ng(t1); 0.84; 0.84) (which correspond to probabilities 0.03,
0.67 and 0.6 to pop(t1), windok(t1) and sunshine(t1) respectively). We can note
here that as the PLP is strati ed, the target upper and lower probabilities are
the same. Using the value m = 5 for the m-estimatetb, the program terminated
after 3 iterations of the outer-loop with the following rules:
sur ng(X) :- var1(X), not pop(X), windok(X).
sur ng(X) :- var1(X), sunshine(X), not pop(X):
sur ng(X) :- var1(X).</p>
      <p>The third rule was rejected by Credal-FOIL as it lowered the overall
accuracy. This example aims to show that our system works in the case of point
probabilities and is not only tailored for unstratifed background knowledge.
4.2</p>
      <sec id="sec-7-1">
        <title>Sickness example</title>
        <p>We now consider the program in Figure 1 and use as target predicate sick. The
mode declaration allows for tired, run, walk and warm (and their negation by
failure) in the body. We proceed in the same way as with the sur ng example
to compute (using the full program) the examples of the form: e(sick(t1); 0.15;
0.27). For learning, we delete from the program the two rules with sick in the
head. The logic program part of the background knowledge thus contains the
two rules with run and walk in the head, forming a negative loop. We attempt
to reconstruct the original program using 50 examples (sick(ti) for i = 1::50).
Using the value m = 5 for the m-estimatetb, after three outer-loop iterations we
obtain the following rules:
sick(X) :- var1(X), not warm(X), not run(X).
sick(X) :- var1(X), run(X), tired(X).</p>
        <p>sick(X) :- var1(X):</p>
        <p>
          The third rule is of course discarded by the algorithm as it lowers the
accuracy. As not run(X) and walk(X) are logically equivalent in this PLP,
CredalFOIL is capable here to recover the two missing rules.
We give here some additional information about our experimental setting. Our
system does not use knowledge compilation to compute the probability values
but instead simply computes the answer sets for each total choice using CLINGO
[
          <xref ref-type="bibr" rid="ref23">23</xref>
          ]. This is highly ine cient so, to make it tractable, we run every example
separately. It makes that instead of having 2150 total choices, we only have
50 23. We also paralellise the calls to CLINGO to speed up execution. The
choice of using 50 examples was made to keep the run-time relatively low. In
average, running time for the sickness task is of 8 and 14 minutes for 30 and
50 examples respectively. For the sur ng example running time is of 5 and 7
minutes for 30 and 50 examples respectively. Experiments were run on a Intel
i7-7700K 4.20GHz.
        </p>
        <p>In fact, the sickness learning only needed two examples to nd the original
rules while sur ng needed ve examples at minimum. The factor that explains
this di erence is probably that m-estimatetb had access to more information
(TB, FBR) in the sickness case.</p>
        <p>CLINGO uses GRINGO to ground programs. Thus rules need to be safe,
meaning amongst other things that negative literals cannot appear alone in the
body of rules. To avoid this problem altogether, we automatically add to the
body of rules the atom var1(X) and add ground facts var1(ti) (i = 1::50) in the
program.
5</p>
      </sec>
    </sec>
    <sec id="sec-8">
      <title>Related Works</title>
      <p>
        Structure learning is not new in probabilistic logic programming and comes from
the eld of inductive logic programming. We took inspiration from ProbFOIL
[
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] which learns the same types of hypothesis under the DS (with a strati ed
background PLP). This system has been extended to simultaneously learn the
structure and probability values in ProbFOIL+ [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. One recent system is
SLIPCOVER [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] that allows to learn multi-head rules together with probabilities.
While ProbFOIL uses an approach similar to the one we presented, SLIPCOVER
rst generates a set of best rules and then inserts them one by one in the theory
if it improves its score. SLIPCOVER is also capable of learning rules that have
in the head a non target predicate. An interesting point is that each system
has a di erent learning task: we maximise our de nition of accuracy, ProbFOIL
de nes a regression problem and SLIPCOVER maximizes the log-likelihood of
its examples.
      </p>
      <p>
        While (to the best of our knowledge) our work is the rst attempt at structure
learning under the credal semantics, previous work has been done in learning
using semantics that are based on the answer set semantics. PrASP [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ] is such a
system allowing de nition of rules in rst-order logic and probability intervals.
The weight learning as described in Nickles and Mileo [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ] aims at maximising
the likelihood of the set of examples and is de ned in the case of point
probabilities. Another system called LP MLN [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ], bringing together the answer set
semantics with markov-logic-networks, also allows for weight learning [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ] with
point probabilities.
6
      </p>
    </sec>
    <sec id="sec-9">
      <title>Discussion</title>
      <p>We discuss in this section our work and future steps. We will rst comment on
practical sides of our approach. We would like to point out that di erent parts of
our system are based on empirical choices. The rst is the choice of m-estimatetb
in the local score: it has shown to perform better than the other candidates for
unstrati ed PLPs. Also, the construction of our heuristic functions aimed to
follow the original goals of each loss function in ROC analysis, but one might decide
to use entirely new metrics based on the new categories we de ned. Finally, our
way to formulate our TB and FB quantities can be debatable. Consider the case
where, for an example ei, we have pi = 0:5, pi = 0:7, qi = 0:1 and qi = 0:3. Our
system would consider that f bli = 0:2 and f ni = 0:4 but one can argue it to
be unfair as pi pi = qi qi, which means that we predict the example to be
bravely entailed in the right amount of worlds. We could instead compute the
quantities using the following formulas:
tbi = min(pi
pi; qi</p>
      <p>qi)
f bli = 0
f bri = qi
qi
tbi
(5)</p>
      <p>X
(ei;pi;pi)2E
We can see it as favoring the intervals [pi; pi] and [qi; qi] to be of the same
lengths instead of intersecting. Empirically this formulation did not make much
of a di erence in our tests.</p>
      <p>We made the choice of maximising our notion of accuracy which is intuitive,
but a case could be made to instead formulate the learning task using a regression
loss of the form ( nd H such as):</p>
      <p>H = argminH
jP rB[H (ei)
pij + jP rB[H (ei)
pij
(6)</p>
      <p>This would require the de nition of a speci c heuristic function as it is not
equivalent to maximising accuracy because of speci c cases illustrated by
examples 1 and 4 in Figure 3.</p>
      <p>
        While we ful lled our goal of proving the feasibility of learning under the
credal semantics, expanding it in a concrete context will be complex. The main
di culty comes from our de nition of examples: we required the target lower
and upper bound probabilities. We do not have at the time a protocol to extract
them from statistical data. While arti cial intelligence has used semantics based
on intervals (Dempster-Shafer Belief Functions [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] for example), they di er a
lot in term of interpretation. As such more in-depth studies are necessary to
understand how to extract from statistical data the lower and upper bounds
probability for them to correspond to the meaning given by the credal
semantics. Immediate future work will thus look into more applicable learning tasks
which will require to de ne a precise context for the interpretation of the credal
semantics. We also aim to add weight learning to our algorithm and will consider
allowing negative loops in the hypothesis.
7
      </p>
    </sec>
    <sec id="sec-10">
      <title>Conclusion</title>
      <p>In this paper we presented the system Credal-FOIL aimed at learning the
structure of a probabilistic logic program interpreted under the credal semantics.
Credal-FOIL is capable of learning a set of normal rules with a single head
using an unstrati ed background knowledge. From the set of examples and an
hypothesis, we introduce heuristic functions that are inspired by ROC
analysis. We make a proof-of-concept using two examples of program reconstruction
using possibly non-strati ed background knowledge. Future work will focus on
learning weights and negative loops as well as considering alternative learning
tasks.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Bellodi</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Riguzzi</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>Expectation maximization over binary decision diagrams for probabilistic logic programs</article-title>
          .
          <source>Intelligent Data Analysis</source>
          <volume>17</volume>
          (
          <issue>2</issue>
          ),
          <volume>343</volume>
          {
          <fpage>363</fpage>
          (
          <year>2013</year>
          ). https://doi.org/10.3233/IDA-130582
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Bellodi</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Riguzzi</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>Structure learning of probabilistic logic programs by searching the clause space</article-title>
          .
          <source>Theory and Practice of Logic Programming</source>
          <volume>15</volume>
          (
          <issue>2</issue>
          ),
          <volume>169</volume>
          {
          <fpage>212</fpage>
          (
          <year>2015</year>
          ). https://doi.org/10.1017/S1471068413000689
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Cozman</surname>
            ,
            <given-names>F.G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Maua</surname>
          </string-name>
          , D.D.:
          <article-title>On the Semantics and Complexity of Probabilistic Logic Programs</article-title>
          .
          <source>CoRR abs/1701</source>
          .0 (
          <issue>2017</issue>
          ), http://arxiv.org/abs/1701.09000
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Cozman</surname>
            ,
            <given-names>F.G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Maua</surname>
            ,
            <given-names>D.D.:</given-names>
          </string-name>
          <article-title>The joy of Probabilistic Answer Set Programming: Semantics, complexity, expressivity, inference</article-title>
          .
          <source>International Journal of Approximate</source>
          Reasoning pp.
          <volume>91</volume>
          {
          <issue>101</issue>
          (jul
          <year>2020</year>
          ). https://doi.org/10.1016/j.ijar.
          <year>2020</year>
          .
          <volume>07</volume>
          .004, https://linkinghub.elsevier.com/retrieve/pii/S0888613X20302012
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>De Raedt</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dries</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Thon</surname>
          </string-name>
          , I., Van Den Broeck, G.,
          <string-name>
            <surname>Verbeke</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Inducing probabilistic relational rules from probabilistic examples</article-title>
          .
          <source>IJCAI International Joint Conference on Arti cial Intelligence 2015-Janua</source>
          ,
          <year>1835</year>
          {
          <year>1843</year>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>De Raedt</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kersting</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          :
          <article-title>Probabilistic Inductive Logic Programming</article-title>
          . In: BenDavid,
          <string-name>
            <given-names>S.</given-names>
            ,
            <surname>Case</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            ,
            <surname>Maruoka</surname>
          </string-name>
          ,
          <string-name>
            <surname>A</surname>
          </string-name>
          . (eds.)
          <article-title>Algorithmic Learning Theory</article-title>
          . pp.
          <volume>19</volume>
          {
          <fpage>36</fpage>
          . Springer Berlin Heidelberg, Berlin, Heidelberg (
          <year>2004</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>De Raedt</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Thon</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          :
          <article-title>Probabilistic rule learning</article-title>
          .
          <source>Lecture Notes in Computer Science (including subseries Lecture Notes in Arti cial Intelligence and Lecture Notes in Bioinformatics) 6489 LNAI</source>
          ,
          <volume>47</volume>
          {
          <fpage>58</fpage>
          (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Fierens</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          , den Broeck, G.V.,
          <string-name>
            <surname>Renkens</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Shterionov</surname>
            ,
            <given-names>D.S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gutmann</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Thon</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Janssens</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Raedt</surname>
          </string-name>
          , L.D.:
          <article-title>Inference and learning in probabilistic logic programs using weighted Boolean formulas</article-title>
          .
          <source>CoRR abs/1304</source>
          .6 (
          <issue>2013</issue>
          ), http://arxiv.org/abs/1304.6810
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9. Furnkranz, J.,
          <string-name>
            <surname>Flach</surname>
            ,
            <given-names>P.A.</given-names>
          </string-name>
          :
          <article-title>ROC n' rule learning - Towards a better understanding of covering algorithms</article-title>
          .
          <source>Machine Learning</source>
          <volume>58</volume>
          (
          <issue>1</issue>
          ),
          <volume>39</volume>
          {
          <fpage>77</fpage>
          (
          <year>2005</year>
          ). https://doi.org/10.1007/s10994-005-5011-x
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Gelfond</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lifschitz</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          :
          <article-title>The stable model semantics for logic programming</article-title>
          .
          <source>5th International Conf. of Symp. on Logic Programming (December)</source>
          ,
          <volume>1070</volume>
          {
          <fpage>1080</fpage>
          (
          <year>1988</year>
          ). https://doi.org/10.1.1.24.6050
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Halpern</surname>
            ,
            <given-names>J.Y.</given-names>
          </string-name>
          :
          <source>Reasoning about Uncertainty</source>
          (
          <year>2018</year>
          ). https://doi.org/10.7551/mitpress/10951.001.0001
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Lee</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          :
          <article-title>A probabilistic extension of the stable model semantics</article-title>
          .
          <source>In: Logical Formalizations of Commonsense Reasoning - Papers from the AAAI Spring Symposium</source>
          ,
          <source>Technical Report</source>
          . vol.
          <source>SS-15-04</source>
          , pp.
          <volume>96</volume>
          {
          <fpage>102</fpage>
          .
          <string-name>
            <surname>AI Access Foundation</surname>
          </string-name>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Lee</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          :
          <article-title>Weight learning in a probabilistic extension of answer set programs</article-title>
          .
          <source>Principles of Knowledge Representation and Reasoning: Proceedings of the 16th International Conference</source>
          , KR 2018 pp.
          <volume>22</volume>
          {
          <issue>31</issue>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Lloyd</surname>
            ,
            <given-names>J.W.</given-names>
          </string-name>
          :
          <article-title>Foundations of logic programming (</article-title>
          <year>1984</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Lukasiewicz</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>Probabilistic Description Logic Programs</article-title>
          . In: Godo,
          <string-name>
            <surname>L</surname>
          </string-name>
          . (ed.)
          <article-title>Symbolic and Quantitative Approaches to Reasoning with Uncertainty</article-title>
          . pp.
          <volume>737</volume>
          {
          <fpage>749</fpage>
          . Springer Berlin Heidelberg, Berlin, Heidelberg (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>Muggleton</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Inverse entailment and progol</article-title>
          .
          <source>New Generation Computing</source>
          <volume>13</volume>
          (
          <issue>3</issue>
          ),
          <volume>245</volume>
          {
          <fpage>286</fpage>
          (
          <year>1995</year>
          ). https://doi.org/10.1007/BF03037227, https://doi.org/10.1007/BF03037227
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>Muggleton</surname>
          </string-name>
          , S.,
          <string-name>
            <surname>de Raedt</surname>
          </string-name>
          , L.:
          <article-title>Inductive Logic Programming: Theory and methods</article-title>
          .
          <source>The Journal of Logic Programming</source>
          <volume>19</volume>
          -
          <issue>20</issue>
          (
          <issue>2</issue>
          ),
          <volume>629</volume>
          {679 (may
          <year>1994</year>
          ). https://doi.org/10.1016/
          <fpage>0743</fpage>
          -
          <lpage>1066</lpage>
          (
          <issue>94</issue>
          )
          <fpage>90035</fpage>
          -
          <lpage>3</lpage>
          , https://linkinghub.elsevier.com/retrieve/pii/0743106694900353
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <surname>Nickles</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>A Tool for Probabilistic Reasoning Based on Logic Programming and First-Order Theories Under Stable Model Semantics</article-title>
          . In: Michael,
          <string-name>
            <given-names>L.</given-names>
            ,
            <surname>Kakas</surname>
          </string-name>
          ,
          <string-name>
            <surname>A</surname>
          </string-name>
          . (eds.)
          <source>Logics in Arti cial Intelligence</source>
          . pp.
          <volume>369</volume>
          {
          <fpage>384</fpage>
          . Springer International Publishing,
          <string-name>
            <surname>Cham</surname>
          </string-name>
          (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19.
          <string-name>
            <surname>Nickles</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mileo</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>A System for Probabilistic Inductive Answer Set Programming</article-title>
          .
          <source>Lecture Notes in Computer Science</source>
          <volume>9310</volume>
          ,
          <issue>99</issue>
          {
          <fpage>105</fpage>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          20.
          <string-name>
            <surname>Riguzzi</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>Foundations of Probabilistic Logic Programming</article-title>
          . River Publishers (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          21.
          <string-name>
            <surname>Riguzzi</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bellodi</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zese</surname>
            ,
            <given-names>R.:</given-names>
          </string-name>
          <article-title>A History of Probabilistic Inductive Logic Programming</article-title>
          .
          <source>Frontiers in Robotics and AI 1</source>
          ,
          <issue>6</issue>
          (
          <year>2014</year>
          ). https://doi.org/10.3389/frobt.
          <year>2014</year>
          .
          <volume>00006</volume>
          , https://www.frontiersin.org/article/10.3389/frobt.
          <year>2014</year>
          .00006
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          22.
          <string-name>
            <surname>Sato</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>A Statistical Learning Method for Logic Programs with Distribution Semantics</article-title>
          . In: ICLP (
          <year>1995</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          23. University of Potsdam:
          <article-title>Potsdam answer set solving collection</article-title>
          , https://potassco.org/
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>