<!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 DBpedia-based Benchmark for Ontology-mediated Query Answering</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Suxue Ma</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Zhe Wang</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Kewen Wang</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>College of Intelligence and Computing, Tianjin University</institution>
          ,
          <country country="CN">China</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>School of Information and Communication Technology, Gri th University</institution>
          ,
          <country country="AU">Australia</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Ontology-mediated query answering (OMQA) is a framework for querying data with a background ontology. Detailed evaluation of OMQA systems remains a challenge due to limitations in existing benchmarks. In this paper, we propose a new benchmark for OMQA based on natural language questions over DBpedia. In particular, the data are sampled from DBpedia with adjustable volumes and can easily reach a scale that is di cult for existing OMQA systems to handle. Logical rules are automatically extracted from DBpedia using a rule learner, and the queries come from real-life natural language questions over DBpedia. We evaluated two state-of-the-art systems under various settings, to demonstrate the potential of our benchmark in benchmarking and analyzing the behavior of OMQA systems.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Ontology-mediated query answering (OMQA) is a framework for querying data
with a background ontology, a collection of logical rules. A prominent approach
for OMQA is query rewriting [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], which transforms a query with relevant rules
into another query that can be processed by conventional database management
systems. Several OMQA systems have been developed aiming at scalable query
answering over complex ontologies and large datasets. Yet comprehensive
evaluations of these systems remains a challenge due to limitation in benchmarks.
      </p>
      <p>
        To analyse the behavior of various OMQA systems, it is desirable for a
benchmark to possess the following properties: (P1) the volume of data is adjustable
and large enough to test the limits of existing systems; (P2) the complexity
of the ontology can be ne-tuned, in terms of the number and the lengths of
rules, as well as the rewriting depths [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]; and (P3) the benchmark comes from
real-life applications [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. The existing benchmarks in the OMQA literature
include LUBM [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] and its variants, ChaseBench [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], and various real-life ontologies.
      </p>
      <p>
        LUBM comes with a data generator that satis es (P1), and thus has been widely
used for OMQA benchmarking, but its ontology is relatively small and does not
satisfy (P2). ChaseBench is recently developed to achieve both (P1) and (P2),
yet its rules are synthesised and do not satisfy (P3). Benchmarks with real-life
ontologies satisfy (P3), but not (P1) or (P2). Also, the existing benchmarks may
not be signi cantly challenging to systems like Graal [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] and Drewer [
        <xref ref-type="bibr" rid="ref7 ref8">7, 8</xref>
        ].
      </p>
      <p>
        In this paper, we propose a new benchmark for OMQA based on natural
language questions over DBpedia [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], with properties (P1) { (P3). In particular,
the data are sampled from DBpedia with adjustable volumes and can easily
reach a scale that is di cult for existing OMQA systems to handle. Logical rules
are automatically extracted from DBpedia using a rule learner, which allows
the con guration of the lengths of learned rules and their head predicates. By
iteratively learning rules with speci ed head predicates, the rewriting depths can
also be con gured. Furthermore, the queries come from real-life natural language
questions and are converted into conjunctive queries with predicates in DBpedia.
We evaluated Graal and Drewer on their time and memory e ciency under
various settings, to demonstrate the potential of our benchmark in benchmarking
and analysing the behavior of OMQA systems. Our benchmark is available at
https://github.com/bohemianc/benchmarking.
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>Our Benchmark</title>
      <p>
        DBpedia [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] contains structured and multilingual knowledge extracted from
Wikipedia, and is the backbone of many Semantic Web applications. Our
benchmark include queries, rules and data obtained from natural language questions
about DBpedia, and the ontology and data from DBpedia, as shown in Figure 1.
The queries come from question collection LC-QuAD [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] about DBpedia, which
consists of 5K questions in natural language together with their corresponding
SPARQL queries. For example, the question \Name the scientist whose
supervisor was Ernest Rutherford and had a doctoral students named Charles
Drummond Ellis? " has the corrsponding SPARQL query
      </p>
      <p>?uri rdf:type dbo:Scientist g.</p>
      <p>
        We converted the SPARQL queries into conjunctive queries in the DLGP
format proposed by Graal [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Among SELECT, ASK, and COUNT queries,
only SELECT queries can be directly converted. Also, some special characters
are not supported by Graal. After ltering, 1961 SPARQL queries were converted
into conjunctive queries, among which 1264 have more than one atoms.
2.2
      </p>
      <sec id="sec-2-1">
        <title>Ontologies</title>
        <p>An ontology in our benchmark is constructed in two ways. As DBpedia provides
an ontology with a large number of rules which we can use for our benchmark.
Yet such rules are relatively simple and have bounded lengths. On the other
hand, to answer a given query q, the time and memory e ciency of OMQA
systems are largely impacted by three factors related to the complexity of the
ontology: the number of applicable rules, their lengths, and the rewriting depths.
A rule is applicable if it is used in the rewriting of q, and the length of a rule
refers to the the number of atoms in it. The depth of rewriting q is the largest
number n 0 with a sequence of queries q0, : : : , qn such that q0 = q and qi+1 is
a result of rewriting qi for 0 i n. For example, consider the following rules:
nationality(X, Y )
birthPlace(X, Y )
birthPlace(X, Z) ^ country(Z, Y ),
parent(X, Z) ^ liveIn(Z, Y ).
(1)
(2)
Both rules have a length of 3. A query nationality(Bill, X) can be rewritten by
rule (1) and then by rule (2) into 9Y , Z.parent(Bill, Y )^liveIn(Y , Z)^country(Z, X).
The rewriting depth is 2. In general, for an ontology of l rules with the maximum
rule length m and rewriting depth n, the rewriting is bounded by ln+1 (m
1) n + 1 .</p>
        <p>
          Thus, we also use the embedding-based rule learner R-Linker [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ] to extract
rules with con gurable rule lengths and rewriting depths based on DBpedia
data, as a supplement to the DBpedia ontology. Another reason of choosing
RLinker is that it allows us to specify target predicates and extracts rules with the
speci ed predicates in their heads, such as nationality in rule (1) and birthPlace in
rule (2). Other rule learners, such as RLvLR [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ], can also be used. Given a query
q, to extract rules with rewriting depth n, our method runs in n iterations. In
the 1st iteration, the target predicates are the predicates in q. Then, in the i-th
iteration for 2 i n, the target predicates are those occurring in the bodies
of the rules extracted in the previous iteration (i.e., iteration i
not been target predicates before.
        </p>
        <p>For example, let q be
1) that have</p>
        <p>WHERE f?uri dbo : doctoralAdvisor dbr : Ernest Rutherford g,
the rule length be 2, and the rewriting depth be 2. Then, after 2 iterations the
rule learner can get rules as
dbp:doctoralAdvisor(X, Y )</p>
        <p>dbp:doctoralStudents(Y , X),
dbp:doctoralStudents(X, Y )</p>
        <p>dbo:in uencedBy(X, Y ).</p>
        <p>The extracted rules may be recursive, that is when a predicate occurs both in
the head and the body of the rule, which cannot be handled by some
rewritingbased OMQA systems. Such rules are eliminated from the ontology.
2.3</p>
      </sec>
      <sec id="sec-2-2">
        <title>Datasets</title>
        <p>DBpedia contains a huge amount of data, which cannot be handled by
existing OMQA systems. Hence, our method samples subsets of the data with
various sizes for evaluation. At the same time, a signi cant portion of the sampled
dataset should be relevant to the queries and the applicable rules in the
ontology. Thus, datasets are sampled according to the predicates occurring in the
queries and the applicable rules. For instance, if the above rule (1) is applicable,
then our method adds to the sample dataset those retrieved with the SPARQL
query SELECT ?x P ?z WHERE {?x P ?z}, where P is nationality, birthPlace, and
country, respectively.
3</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Evaluation</title>
      <p>
        We evaluated two state-of-the-art OMQA systems, Graal [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] and Drewer [
        <xref ref-type="bibr" rid="ref7 ref8">7, 8</xref>
        ],
on their time and memory e ciency under various settings using our benchmark.
For each setting, we used 5 queries with 2 - 3 atoms. For the complexity of the
ontology, it is easy to control the rule lengths (Len., 2 or 3) and rewriting depths
(Dep., 1 or 5 or 10), but it is relatively di cult to x the exact numbers of
applicable rules (#R) which is dynamically determined. We kept the applicable
rule in a range of 75 - 200 by adjusting the total numbers of rules used for
rewriting. The sizes of sampled datasets (#F) range from 5M to 20M. A `-'
means the system exceeded the 10 minutes time limit.
      </p>
      <p>From Table 1, in general, the processing times of both systems are impacted
by the rule lengths, the rewriting depths, the numbers of applicable rules, and the
data sizes, while the impacts may also depend on other factors such as the exact
rules applied. On the other hand, their impact on the memory consumption is
less obvious. Finally, Graal failed to complete when the data size was increased
2
2
2
3
3
3
3
3
3
Len. Dep. #R
to 20M, whereas Drewer had di culty when the applicable rules are increased
to 181. It may suggest Graal is more sensitive to data sizes while Drewer is more
impacted by the numbers of rules.</p>
      <p>Acknowledgements This work was partially supported by the National
Natural Science Foundation of China under grant 61976153.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Baget</surname>
            ,
            <given-names>J.F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Leclere</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mugnier</surname>
            ,
            <given-names>M.L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rocher</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sipieter</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>Graal: A toolkit for query answering with existential rules</article-title>
          .
          <source>In: Proc. of RuleML</source>
          . pp.
          <volume>328</volume>
          {
          <issue>344</issue>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Benedikt</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Konstantinidis</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mecca</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Motik</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Papotti</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Santoro</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tsamoura</surname>
          </string-name>
          , E.:
          <article-title>Benchmarking the chase</article-title>
          .
          <source>In: Proc. of SIGMOD</source>
          . pp.
          <volume>37</volume>
          {
          <issue>52</issue>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Guo</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pan</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          , He in, J.:
          <article-title>LUBM: A benchmark for owl knowledge base systems</article-title>
          .
          <source>J. Web Semant</source>
          .
          <volume>3</volume>
          (
          <issue>2-3</issue>
          ),
          <volume>158</volume>
          {
          <fpage>182</fpage>
          (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Lehmann</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Isele</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jakob</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jentzsch</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kontokostas</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mendes</surname>
            ,
            <given-names>P.N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hellmann</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Morsey</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Van Kleef</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Auer</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          , et al.:
          <article-title>DBpedia{a large-scale, multilingual knowledge base extracted from Wikipedia</article-title>
          .
          <source>Semantic Web</source>
          <volume>6</volume>
          (
          <issue>2</issue>
          ),
          <volume>167</volume>
          {
          <fpage>195</fpage>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Omran</surname>
            ,
            <given-names>P.G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          :
          <article-title>An embedding-based approach to rule learning in knowledge graphs</article-title>
          .
          <source>IEEE Transactions on Knowledge and Data Engineering</source>
          (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Trivedi</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Maheshwari</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dubey</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lehmann</surname>
            ,
            <given-names>J.:</given-names>
          </string-name>
          <article-title>LC-QuAD: A corpus for complex question answering over knowledge graphs</article-title>
          .
          <source>In: Proc. of ISWC</source>
          . pp.
          <volume>210</volume>
          {
          <issue>218</issue>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Xiao</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhuang</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wan</surname>
          </string-name>
          , H.:
          <article-title>Query answering for existential rules via e cient datalog rewriting</article-title>
          .
          <source>In: Proc. of IJCAI</source>
          . pp.
          <year>1933</year>
          {
          <year>1939</year>
          (
          <year>2020</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Xiao</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhuang</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wan</surname>
          </string-name>
          , H.:
          <article-title>E cient datalog rewriting for query answering in TGD ontologies</article-title>
          .
          <source>IEEE Transactions on Knowledge and Data Engineering</source>
          (
          <year>2021</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Wu</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhang</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Omran</surname>
            ,
            <given-names>P.G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Feng</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          :
          <article-title>A system for reasoning-based link prediction in large knowledge graphs</article-title>
          .
          <source>In: Proc. of ISWC Satellites</source>
          . pp.
          <volume>121</volume>
          {
          <issue>124</issue>
          (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>