<!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>A new Model for Scalable -subsumption</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>Hippolyte Leger</institution>
          ,
          <addr-line>Dominique Bouthinon, Mustapha Lebbah, and Hanane Azzag</addr-line>
        </aff>
      </contrib-group>
      <fpage>41</fpage>
      <lpage>47</lpage>
      <abstract>
        <p>The -subsumption test is known to be a bottleneck in Inductive Logic Programming. The state-of-the-art learning systems in this eld are hardly scalable. So we introduce a new -subsumption algorithm based on an Actor Model, with the aim of being able to decide subsumption on very large clauses. We use Akka, a powerful tool to build distributed actor systems based on the JVM and the Scala language.</p>
      </abstract>
      <kwd-group>
        <kwd>-subsumption</kwd>
        <kwd>Inductive Logic Programming</kwd>
        <kwd>Actor Model</kwd>
        <kwd>distributed computing</kwd>
        <kwd>Akka</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>substitution is a nite set fX1=v1; : : : ; Xn=vng where Xi is a variable and vi is
a constant. A variable appears only once in a substitution, which is applied to a
rst order formula to substitute variables with constants. Two substitutions are
not compatible if they assign two distinct values to the same variable, otherwise
they are said compatible. Let us introduce an example of -subsumption that
will be used throughout this paper:
Example 1
C = t(X)
D = t(a)
p(X; Y; Z) ^ q(Z; T ) ^ r(T; T; U ):
p(a; b; c) ^ q(c; e) ^ r(e; e; g) ^
p(a; b; d) ^ q(d; f ) ^ r(f; f; g) ^</p>
      <p>r(e; f; g):
Example 1 shows that C D both for = fX=a; Y =b; Z=c; T =e; U=gg and
= fX=a; Y =b; Z=d; T =f; U=gg. Let us consider the following properties that
will be used in our model:
Property 1. C -subsumes D if and only if
1) there exists a substitution only referring to the variables of head (C), such
that head (C) = head (D) and,
2) there exists a substitution only referring to the variables of body(C) , such
that body(C) body(D).</p>
      <p>(The proofs of all the properties presented in this paper can be found here :
https://lipn.univ-paris13.fr/~leger/ilp2016.html)</p>
      <p>Example 1 we have head (C) = head (D) = t(a) with = fX=ag, and
body(C) = fp(a; Y; Z); q(Z; T ); r(T; T; U )g. For = fY =b, Z=c, T =e, U=gg we
have body(C) body(D). Thus C -subsumes D with = [ .
Property 2. Let A = fa1; : : : ; ang be a conjunction of literals and B be a
conjunction of ground literals. Then A -subsumes B if and only if there exists a
set of compatible substitutions f 1; : : : ; ng such that ai i 2 B (1 i n).</p>
      <p>Let us consider A = body(C) and B = body(D) mentioned above. We notice
that A B with = 1 [ 2 [ 3 where 1 = fY =b; Z=cg, 2 = fZ=c; T =eg and
3 = fT =e; U=gg. So, according to properties 1 and 2, the subsumption problem
of two clauses C and D can be modelled as:
1. seek a substitution only referring the variables of head (C) such that
head(C) = head(D),
2. if step1 succeeds: (let body(C) = fa1; ; ang) nd a set of compatible
substitutions f 1; ; ng, where i only refers the variables of ai, such that
ai i 2 body(D) (1 i n),
3. if step 2 succeeds: output the substitution =
[ 1 [
[ n.</p>
      <p>Step 1 is very easy to check, so the new model of -subsumption we introduce
in the next section focuses on step 2.</p>
      <p>
        -subsumption based on an Actor Model
Given a (usually non-ground) conjunction A = fa1; : : : ; ang and a ground
conjunction B, we seek for a set of compatible substitutions f 1; : : : ; ng such that
i refers only the variables of ai and ai i belongs to B (1 i n). To solve
this problem we introduce an original subsumption procedure based on an
Actor Model. The Actor Model was motivated by the prospect of highly
parallel computing machines communicating via a high-performance communications
network [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. An actor is a computational entity linked to some other actors
forming a graph, or network. Actors may modify private state, but can only
affect each other through asynchronous messages. The message-driven framework
of the Actor Model is well adapted to represent the -subsumption process. To
solve our problem we start by building an actor network from A. Then we send
the atoms of B to the network which outputs the rst (or all) substitution(s)
ensuring the -subsumption. If there is no possible substitution it will only
produce the message "end". The network (actually a directed graph) is made of four
types of actors as illustrated in Figure 1:
the input actor is the single input of the network. Each message it receives is a
ground atom from B.
the substitution actor (represented by a circle): each one is associated with an
atom ai of A and is devoted to build substitutions from ground atoms it
receives.
the join actor (represented by a rectangle) has two parents and is devoted to
join the compatible substitutions provided by his parents. It has two internal
memories (left and right ) to store the substitutions provided by its left and
right parents.
the output actor is the single output of the network. It receives the nal
substitutions (if they exist) establishing the -subsumption between A and B.
If we do not consider the input and output actors the network is a binary tree
where the substitution actors are the leaves, the other nodes being join actors. A
single join actor, the root of the tree, is linked with the output actor (Algorithm
1 presents the way we build the whole network). The network contains 2n + 1
nodes so the time complexity to build the network is O(n).
      </p>
      <p>Algorithm 1 Building the actors network
buildNetwork(A) = A = fa1; : : : ; ang is a conjunction of n literals =
begin
create the output actor out ;
buildTree(out, n) ; = build the tree of join and substitution actors =
S = fs1; ; sng leaves(out) ; = get the substitution actors of the tree of root root =
create the input actor in ;
for i 1 to n do</p>
      <p>link si with in ; set ai as internal label of si ;
end for
return in ;
end.</p>
      <p>= j: join (or output) actor of the preceding level =
buildTree(j, n)
begin
if n = 1 then
create a substitution actor a and store it ;
= a new leaf for the tree =
else
end if
link a to j ;
end.</p>
      <p>create a join actor a ; buildTree(a, n=2 + n mod 2) ; buildTree(a, n=2) ;
Let us illustrate how such a network is used to check the subsumption through
the network presented in Figure 2 built from the conjunction A = body(C) =
fp(a; Y; Z); q(Z; T ); r(T; T; U )g where C is the clause given in Example 1. We
also assume that the atoms of B = body(D) = fp(a; b; c), p(a; b; d), q(c; e), q(d; f ),
r(e; e; g), r(f; f; g), r(e; f; g)g are sent to the network. Note that all the
operations of the actors are made concurrently:
{ When a ground atom b of B is provided to the input actor, this actor sends
b to all substitution actor s associated with the atoms of A built from the
same predicate as b. ex) the input actor receives b = p(a; b; c), then it sends
p(a; b; c) to the actor p(a; Y; Z).
{ When a substitution actor associated with an atom ai of A receives a ground
atom b it checks if there exists a substitution i such that ai i = b. If i
exists the actor sends it to the single join actor with which it is linked. ex)
b = p(a; b; c) and ai = p(a; Y; Z) then the substitution i = fY =b; Z=cg is
sent to the join actor j1, if b = p(e; b; c) no substitution is sent. The worst
case complexity to check if there exists i with ai i = b is O(v:ln(v)) where
v is the common arity of ai and b (ln(v) is the worst case complexity to
access any argument of ai and b).
{ When a join actor receives a substitution from its left (right) parent it
rst stores it in its left (right) internal memory. Then, it joins with each
compatible substitution found in its right (left) memory and sends [
to its single successor. ex) the join actor j1 receives = fY =b; Z=cg from
its left parent, then it stores it in its left memory. Assume the right
memory of j1 contains the substitutions 1 = fZ=c; T =eg and 2 = fZ=d; T =f g.
Thus [ 1 = fY =b; Z=c; T =eg is sent to the successor of j1, while [ 2 =
fY =b; Z=c; Z=d; T =f g is not considered because it is not a valid
substitution. The complexity to check that and are compatible is O(j j:ln(j )j)
(we assume that and have approximately the same size). So the
number of operations made by a join actor when it receives a message is in
O(m:j j:ln(j j)) where m is the current size of the right (left) memory.
{ When the output actor receives a substitution it displays as a solution
(A B). If we do not want any other solutions, the process terminates,
otherwise the actor waits for other substitutions.</p>
      <p>We send all the atoms of B to the input actor. To ensure that the activity
of the network stops we then send it a speci c end-message. The end message
is broadcasted through the network to the output actor which terminates the
process if there is no solution. The model is correct and complete: each
substitution reaching the output actor is a solution, and every possible solution can be
outputed if the user wishes to (see https://lipn.univ-paris13.fr/~leger/
ilp2016.html for proofs).
4</p>
    </sec>
    <sec id="sec-2">
      <title>Experiments</title>
      <p>
        Several programming languages implement the Actor Model. In this work we
use the Akka [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] toolkit which is integrated to Scala [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ], a multi-paradigms
(mainly functional) programming language built on the Java Virtual Machine.
The dataset was generated to hold a unique solution substitution. The subsumer
consists of a single clause with 20 literals (20 distinct predicate symbols with an
arity of 10). The subsumee holds 5 literals for each predicate symbol, giving a
total of 100 literals. Note that we have run the test to only nd the rst possible
solution. We have run the same subsumption test (with the same subsumer
and subsumee) multiple times with a varying number of processor cores. This
experiment was done using the Grid'5000 testbed, on an Intel Xeon E5-2660v2
CPU, with reservations ranging from 1 to 20 cores.
      </p>
      <p>In Figure 3, we can see that the performance of the subsumption test increases
along with the number of cores used. In this case the decrease in computation
time eventually reaches a plateau, due to the data size. Please keep in mind that
the number of actors is directly linked to the number of literals the hypothesis
(subsumer) holds. This means that for a bigger clause, the cost-e ciency of
parallelism would be higher.
5</p>
    </sec>
    <sec id="sec-3">
      <title>Conclusion and perspectives</title>
      <p>
        We have shown that Actor Modeling is indeed e ective at reducing the running
time of the -subsumption problem. Due to a lack of time we did not compare
the implementation of our model with classical state-of-the-art solutions like
Subsumer [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ] or Resumer[
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. We must also re ne our model by applying the
major ILP optimizations, like clause partitioning and linked variables analysis.
We have just implemented a distributed version of our model and started our
rst distributed experiment using the Grid'5000 testbed, supported by a
scienti c interest group hosted by Inria and including several Universities as well
as other organizations (see https://www.grid5000.fr). Finally, we are
investigating another Actor Model for scalable -subsumption where the actors are the
subsumee's literals. This would lead to an increasing number of actors but an
important reduction of the workload for each actor.
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>Gul</given-names>
            <surname>Agha</surname>
          </string-name>
          .
          <article-title>An overview of actor languages</article-title>
          .
          <source>In Proceedings of the 1986 SIGPLAN Workshop on Object-oriented Programming</source>
          ,
          <source>OOPWORK '86</source>
          , pages
          <fpage>58</fpage>
          {
          <fpage>67</fpage>
          , New York, NY, USA,
          <year>1986</year>
          . ACM.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>Jamie</given-names>
            <surname>Allen</surname>
          </string-name>
          . E ective
          <string-name>
            <surname>Akka. O'Reilly Media</surname>
          </string-name>
          , Inc.,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>Annalisa</given-names>
            <surname>Appice</surname>
          </string-name>
          , Michelangelo Ceci, Antonio Turi, and
          <string-name>
            <given-names>Donato</given-names>
            <surname>Malerba</surname>
          </string-name>
          .
          <article-title>A parallel, distributed algorithm for relational frequent pattern discovery from very large data sets</article-title>
          .
          <source>Intell. Data Anal.</source>
          ,
          <volume>15</volume>
          (
          <issue>1</issue>
          ):
          <volume>69</volume>
          {
          <fpage>88</fpage>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>Stefano</given-names>
            <surname>Ferilli</surname>
          </string-name>
          , Nicola Mauro,
          <string-name>
            <surname>Teresa M. A. Basile</surname>
          </string-name>
          , and Floriana Esposito.
          <source>AI*IA</source>
          <year>2003</year>
          :
          <article-title>Advances in Arti cial Intelligence: 8th Congress of the Italian Association for Arti cial Intelligence</article-title>
          , Pisa, Italy,
          <year>September 2003</year>
          . Proceedings, chapter
          <string-name>
            <given-names>A Complete</given-names>
            <surname>Subsumption</surname>
          </string-name>
          <string-name>
            <surname>Algorithm</surname>
          </string-name>
          , pages
          <fpage>1</fpage>
          <lpage>{</lpage>
          13. Springer Berlin Heidelberg, Berlin, Heidelberg,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Nuno</surname>
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Fonseca</surname>
            , Fernando Silva, and
            <given-names>Rui</given-names>
          </string-name>
          <string-name>
            <surname>Camacho</surname>
          </string-name>
          . Strategies to Parallelize
          <source>ILP Systems</source>
          , pages
          <fpage>136</fpage>
          {
          <fpage>153</fpage>
          . Springer Berlin Heidelberg, Berlin, Heidelberg,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Nuno</surname>
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Fonseca</surname>
            , Ashwin Srinivasan, Fernando Silva, and
            <given-names>Rui</given-names>
          </string-name>
          <string-name>
            <surname>Camacho</surname>
          </string-name>
          .
          <article-title>Parallel ilp for distributed-memory architectures</article-title>
          .
          <source>Machine Learning</source>
          ,
          <volume>74</volume>
          (
          <issue>3</issue>
          ):
          <volume>257</volume>
          {
          <fpage>279</fpage>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>Georg</given-names>
            <surname>Gottlob</surname>
          </string-name>
          .
          <article-title>Subsumption and implication</article-title>
          .
          <source>Information Processing Letters</source>
          ,
          <volume>24</volume>
          (
          <issue>2</issue>
          ):
          <volume>109</volume>
          {
          <fpage>111</fpage>
          ,
          <year>1987</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>Carl</given-names>
            <surname>Hewitt</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Peter</given-names>
            <surname>Bishop</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Richard</given-names>
            <surname>Steiger</surname>
          </string-name>
          .
          <article-title>A universal modular actor formalism for arti cial intelligence</article-title>
          .
          <source>In Proceedings of the 3rd International Joint Conference on Arti cial Intelligence</source>
          ,
          <source>IJCAI'73</source>
          , pages
          <fpage>235</fpage>
          {
          <fpage>245</fpage>
          , San Francisco, CA, USA,
          <year>1973</year>
          . Morgan Kaufmann Publishers Inc.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Jrg-Uwe Kietz</surname>
          </string-name>
          and
          <article-title>Marcus Lubbe. An e cient subsumption algorithm for inductive logic programming</article-title>
          .
          <source>In Proceedings of the 11th International Conference on Machine Learning</source>
          , pages
          <volume>130</volume>
          {
          <fpage>138</fpage>
          ,
          <year>1994</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <given-names>Ondrej</given-names>
            <surname>Kuzelka</surname>
          </string-name>
          and
          <string-name>
            <given-names>Filip</given-names>
            <surname>Zelezn</surname>
          </string-name>
          .
          <article-title>A restarted strategy for e cient subsumption testing</article-title>
          .
          <source>Fundam</source>
          . Inform.,
          <volume>89</volume>
          (
          <issue>1</issue>
          ):
          <volume>95</volume>
          {
          <fpage>109</fpage>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11. John W. Lloyd.
          <source>Foundations of Logic Programming, 1st Edition</source>
          . Springer,
          <year>1984</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Jero</surname>
          </string-name>
          <article-title>^me Maloberti and Michele Sebag</article-title>
          .
          <article-title>Fast theta-subsumption with constraint satisfaction algorithms</article-title>
          .
          <source>Machine Learning</source>
          ,
          <volume>55</volume>
          (
          <issue>2</issue>
          ):
          <volume>137</volume>
          {
          <fpage>174</fpage>
          ,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <given-names>S</given-names>
            <surname>Muggleton</surname>
          </string-name>
          and
          <string-name>
            <given-names>C</given-names>
            <surname>Feng</surname>
          </string-name>
          .
          <article-title>E cient induction of logic programs</article-title>
          .
          <source>pages 368{381</source>
          ,
          <year>1990</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Stephen</surname>
            <given-names>Muggleton</given-names>
          </string-name>
          , Jose Santos, and
          <string-name>
            <surname>Alireza</surname>
          </string-name>
          Tamaddoni-Nezhad.
          <source>Inductive Logic Programming: 19th International Conference, ILP</source>
          <year>2009</year>
          , Leuven, Belgium,
          <source>July 02- 04</source>
          ,
          <year>2009</year>
          . Revised Papers, chapter
          <source>ProGolem: A System Based on Relative Minimal Generalisation</source>
          , pages
          <volume>131</volume>
          {
          <fpage>148</fpage>
          . Springer Berlin Heidelberg, Berlin, Heidelberg,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <article-title>Martin Odersky and al. An Overview of the Scala Programming Language</article-title>
          .
          <source>Technical Report IC/</source>
          <year>2004</year>
          /64, EPFL, Lausanne, Switzerland,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>J. A. Robinson.</surname>
          </string-name>
          <article-title>A machine-oriented logic based on the resolution principle</article-title>
          .
          <source>J. ACM</source>
          ,
          <volume>12</volume>
          (
          <issue>1</issue>
          ):
          <volume>23</volume>
          {
          <fpage>41</fpage>
          ,
          <year>January 1965</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17. Jose Santos and
          <string-name>
            <given-names>Stephen</given-names>
            <surname>Muggleton</surname>
          </string-name>
          .
          <article-title>Subsumer: A Prolog theta-subsumption engine</article-title>
          .
          <source>In Manuel Hermenegildo and Torsten Schaub</source>
          , editors,
          <source>Technical Communications of the 26th International Conference on Logic Programming</source>
          , volume
          <volume>7</volume>
          of Leibniz International Proceedings in Informatics (LIPIcs), pages
          <fpage>172</fpage>
          {
          <fpage>181</fpage>
          ,
          <string-name>
            <surname>Dagstuhl</surname>
          </string-name>
          , Germany,
          <year>2010</year>
          . Schloss Dagstuhl{
          <article-title>Leibniz-Zentrum fuer Informatik</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <given-names>Ashwin</given-names>
            <surname>Srinivasan</surname>
          </string-name>
          .
          <article-title>The aleph system</article-title>
          .
          <year>1987</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19.
          <string-name>
            <surname>Ashwin</surname>
            <given-names>Srinivasan</given-names>
          </string-name>
          , Tanveer A.
          <string-name>
            <surname>Faruquie</surname>
            , and
            <given-names>Sachindra</given-names>
          </string-name>
          <string-name>
            <surname>Joshi</surname>
          </string-name>
          .
          <article-title>Data and task parallelism in ilp using mapreduce</article-title>
          .
          <source>Machine Learning</source>
          ,
          <volume>86</volume>
          (
          <issue>1</issue>
          ):
          <volume>141</volume>
          {
          <fpage>168</fpage>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>