<!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>Updating Direct Graph for Incremental Reasoning in OWL 2 QL Ontology</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Changlong Wang</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Zhiyong Feng</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Xin Wang</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Guozheng Rao</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Xiaowang Zhang</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>School of Computer Science and Engineer Technology</institution>
          ,
          <addr-line>NWNU,Lanzhou 730070</addr-line>
          ,
          <country country="CN">China</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>School of Computer Science and Technology, Tianjin University</institution>
          ,
          <addr-line>Tianjin 300072</addr-line>
          ,
          <country country="CN">China</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>We propose an incremental reasoning approach to QL ontologies by mapping an evolving ontology to an updatable digraph and maintaining dynamic transitive closure to obtain incremental classification. We describe the procedure of updating ontology digraph and present an approach to identify the a ected paths for incremental classification. We implement the proposed method in a prototype incR and evaluated it on widely-used ontologies. The experiments show that our approach can lead to performance gain.</p>
      </abstract>
      <kwd-group>
        <kwd>Ontology</kwd>
        <kwd>Incremental Reasoning</kwd>
        <kwd>Direct Digraph</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1 Introduction</title>
      <p>Graph Theory Notions. We use traditional notions in graph theory. A digraph D
consists of a non-empty finite vertex set V(D) and edge set E(D). The degree of a vertex v is
denoted by d(v). A path p is a sequence p=v1, v2, ..., vk of distinct vertices in V(D), such
that for every vi, vi+1 ∈ p, (vi, vi+1) ∈ E(D). A path from u to v is denoted with u v.
The size of path p is represented by the number of edges contained in p. The number of
distinct paths u v is denoted by Paths(u, v). We use T C(D) to denote the transitive
closure of a digraph D.</p>
      <p>
        Digraph Representation of QL 2 Ontology. The idea of digraph representation of
a QL ontology is that, given an OWL 2 QL ontology O and its digraph DO, each vertex
v ∈ V(DO) represents a basic concept(role). Let S 1 and S 2 be two atomic
concepts(roles), O |= S 1 ⊑ S 2 i ∃(S 1, S 2) ∈ E(T C(DO)). Please refer to [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] for details. We use
L(α) (resp. R(α)) to denote the basic concept or basic role on the left (resp. right) sides
of α. we also use d(L(α)) or d(R(α)) to represent degree of the corresponding vertex.
For an axiom of the form Q1 ⊑ Q2, we use d(Q1) and d(Q2) to represent the degrees of
Q1 and Q2, respectively.
When an axiom is added to an ontology, it is easy to update the corresponding digraph.
Let O be an ontology and α+ be an added axiom, if the basic concepts and basic roles in
α+ are already contained in O, we only insert edge(s) into DO; if α+ contains new basic
concepts and basic roles, we insert vertex and edge(s) according to Definition 2 in [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ].
Axiom deletions are complicated and discussed in details as follows:
      </p>
      <p>
        From Definition 2 in [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], there exist some di erences between concept axiom
additions and role axiom additions. Let α− be a deleted axiom, we consider two cases :
— Case 1: α− is a concept inclusion.
(1) If d(L(α−)) &gt; 1 and d(R(α−)) &gt; 1, then, only the edge (L(α−), R(α−)) is removed.
(2) If d(L(α−)) &gt; 1 and d(R(α−)) = 1, then, the edge (L(α−), R(α−)) and its head are
removed.
(3) If d(L(α−)) = 1 and d(R(α−)) &gt; 1, then, the edge (L(α−), R(α−)) and its tail are
removed.
(4) If d(L(α−))) = 1 and d(R(α−)) = 1, then, the edge (L(α−), R(α−)) is removed, both
its tail and head are removed.
— Case 2: α− is a role inclusion axiom of the form Q1 ⊑ Q2.
(1) If d(Q1) &gt; 1 and d(Q2) &gt; 1, then, the 4 edges (Q1, Q2), (Q1−, Q2−), (∃Q1, ∃Q2),
(∃Q1−, ∃Q2−) need to be removed.
(2) If d(Q1) &gt; 1 and d(Q2) = 1, then, the 4 edges (Q1, Q2), (Q1−, Q2−), (∃Q1, ∃Q2),
(∃Q1−, ∃Q2−), and the 4 vertices Q2, Q2−, ∃Q2, ∃Q2− need to be removed.
(3) If d(Q1) = 1 and d(Q2) &gt; 1, then, the 4 edges (Q1, Q2),(Q1−, Q2−), (∃Q1, ∃Q2),(∃Q1−, ∃Q2−),
and 4 vertices Q1, Q1−, ∃Q1,∃Q1− need to be removed.
(4) If d(Q1) = 1 and d(Q2) = 1, then, the 4 edges (Q1, Q2),(Q−, Q2−), (∃Q1, ∃Q2),(∃Q1−, ∃Q2−),
1
and the 8 vertices Q1, Q1−, ∃Q1, ∃Q1−,Q2,Q2−, ∃Q2,∃Q2− are removed.
4
      </p>
    </sec>
    <sec id="sec-2">
      <title>Identifying the A ected Path for Incremental Classification</title>
      <p>An edge addition (deletion) into (from) digraph may change the number of path i j.
It is necessary to identify those a ected paths and recompute the transitive closure of
such a ected subdigraph.</p>
      <p>Definition 1 (a ected path). Given a digraph DO containing vertices i, j, u, v, and
path i j, if the number of i j changes after an edge (u, v) is inserted (removed)
into (from) DO, the path i j is called a ected path.</p>
      <p>
        When we add (delete) axioms, no cycles is created in the corresponding digraph
DO. From Lemma 3.1 in [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], the following proposition holds:
      </p>
      <p>Updating Direct Graph for Incremental Reasoning in OWL 2 QL Ontology
Proposition 1. Let i j be an a ected path after the edge (u, v) is inserted (or deleted),
the number of the paths i j increases (or decreases) by Paths(i, u) ∗ Paths(v, j).</p>
      <p>
        In ontology development, a domain engineer often adds (or deletes) a set of axioms
related to a certain concept (role). Such modification will lead to a changed set of edges
incident to a common vertex and more a ected paths in the corresponding digraph.
Proposition 2 [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] Let DO be a digraph and Ev be a updating set of edges incident to a
common vertex v, let ∆Paths(i, j) be the change to Paths(i, j),
      </p>
      <p>∆Paths(i, j) ← Paths(i, v) ∗ ∆Paths(v, j) + ∆Paths(i, v) ∗ Paths(v, j) + ∆Paths(i, v) ∗
∆Paths(v, j).</p>
      <p>From above discussion, it is feasible to design an algorithm for incremental
classification in QL ontologies. Give a digraph D and any two vertices i, j ∈ D, the number of
the path i j can be represented by an n × n adjacency matrix Q such that Q(i, j) = 0
if there exists no path from i to j. The transitive closure of a digraph D is presented
by an n × n adjacency matrix MD∗ such that MD∗(i, j)=1 if Q(i, j) , 0, else MD∗(i, j)=0.
While updating the digraph, if Q(i, j) increases from 0, MD∗(i, j)=1, if Q(i, j) decreases
to 0, MD∗(i, j)=0.</p>
    </sec>
    <sec id="sec-3">
      <title>5 Implementation and Evaluation</title>
      <p>
        We implement our approach in IncR. We perform experiments to compare IncR with
QUONTO [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] and Pellet [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]—QUONT supports the graph-based approach in [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] and
Pellet supports module-based incremental classification [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
      </p>
      <p>We select 4 widely-used ontologies from Bioportal 1, of which the EL-Galen falls
out of OWL 2 QL and need to be approximated by a QL ontology. Table 1 provides
1 http://bioportal.bioontology.org/
basic information: the DL language , the number of atomic concept and role, the size of
ontology. The last column of Table 1 presents the time in seconds taken by QUONTO.</p>
      <p>
        In order to compare IncR with Pellet, we use similar experimental methodology in
[
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]: for various values of n, 1) remove n random axioms; 2) classify the resulting
ontology using IncR and Pellet ; then, we repeat the following steps 30 times: 3) randomly
remove an additional n axioms, add back the previously removed n axioms, and
reclassify the ontology using IncR and Pellet. All the results are gathered during step 3) of
the experiment. All tests are performed on a server with Intel Xeon E5620 2.40GHz
CPU, running Windows Server 2008 R2 Enterprise and Java 1.7 with 16GB of RAM
available to JVM.
      </p>
      <p>Table 2 summarizes the results of our experiments for n=1,2,4 and 8, where Av
means average value and M x represents maximum value. Column 3 Number o f A.P.(Av/M x)
and 4 S ize o f A.P.(Av/M x) indicates the number of a ected paths and their total size,
respectively. Colomn 5 shows the time spent in maintaining the transitive closure of the
updated digraph, the time value includes time spent in identifying a ected paths and
time in re-computing the transitive closure of all the a ected paths. The last column
provides the time taken to classify those updated ontologies by Pellet.
6</p>
    </sec>
    <sec id="sec-4">
      <title>Conclusion</title>
      <p>We have proposed an approach to incremental classification in QL ontology by
exploiting digraph algorithm, which allows us to e ciently identify the small a ected paths
and to reuse previous computation. We demonstrate the performance gain indicated by
the significant reduction of classification time. As a big challenge in the future, we
will develop a parallel version of our method to exploit many cores/CPUs available in
modern systems.</p>
      <p>Acknowledgments. This work is supported by the NSFC (61100049,61373165) and
the 863 Program of China (2013AA013204).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Grau</surname>
            <given-names>B. C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wiener</surname>
            <given-names>C. H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kazakov</surname>
            <given-names>Y.</given-names>
          </string-name>
          ,et al.:
          <article-title>Incremental classification of description logics ontologies</article-title>
          .
          <source>J. of Automated Reasoning</source>
          .
          <volume>44</volume>
          (
          <issue>4</issue>
          ),
          <fpage>337</fpage>
          -
          <lpage>369</lpage>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Kazakov</surname>
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Klinov</surname>
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Incremental reasoning in OWL EL without bookkeeping</article-title>
          .
          <source>In ISWC</source>
          ,
          <fpage>232</fpage>
          -
          <lpage>247</lpage>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Motik</surname>
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nenov</surname>
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Piro</surname>
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Horrocks</surname>
            <given-names>I.</given-names>
          </string-name>
          :
          <article-title>Incremental update of datalog materialisation : the backward/forward algorithm</article-title>
          .
          <source>In AAAI</source>
          ,
          <fpage>1560</fpage>
          -
          <lpage>1568</lpage>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Calvanese</surname>
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Giacomo</surname>
            <given-names>G. D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lembo</surname>
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lenzerini</surname>
            <given-names>M.</given-names>
          </string-name>
          ,et al.:
          <article-title>The mastro system for ontologybased data access</article-title>
          .
          <source>Semantic Web</source>
          ,
          <volume>2</volume>
          (
          <issue>1</issue>
          ),
          <fpage>43</fpage>
          -
          <lpage>53</lpage>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Domenico</surname>
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Santarelli</surname>
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Savo</surname>
            <given-names>D. F.</given-names>
          </string-name>
          :
          <article-title>A graph-based approach for classifying owl 2 QL ontologies</article-title>
          . In Description logic,
          <fpage>747</fpage>
          -
          <lpage>759</lpage>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>King</surname>
          </string-name>
          , Valerie, Garry Sagert:
          <article-title>A fully dynamic algorithm for maintaining the transitive closure</article-title>
          .
          <source>In STOC</source>
          ,
          <fpage>492</fpage>
          -
          <lpage>498</lpage>
          ,
          <year>1999</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>