<!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>
      <issn pub-type="ppub">1613-0073</issn>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Querying on RDF Graphs</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Angela Bonifati</string-name>
          <email>angela.bonifati@univ-lyon1.fr</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Stefania Dumbrava</string-name>
          <email>stefania.dumbrava@ensiie.fr</email>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Haridimos Haridimos</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Georgia Troullinou</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Giannis Vassiliou</string-name>
          <email>giannisvas@ics.forth.gr</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>ECE-HMU</institution>
          ,
          <addr-line>Heraklion</addr-line>
          ,
          <country country="GR">Greece</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>FORTH-ICS</institution>
          ,
          <addr-line>Heraklion</addr-line>
          ,
          <country country="GR">Greece</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Lyon 1 University</institution>
          ,
          <addr-line>CNRS Liris and IUF, Lyon</addr-line>
          ,
          <country country="FR">France</country>
        </aff>
        <aff id="aff3">
          <label>3</label>
          <institution>SAMOVAR/Inst. Poltechnique de Paris, ENSIIE</institution>
          ,
          <addr-line>Evry</addr-line>
          ,
          <country country="FR">France</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2023</year>
      </pub-date>
      <fpage>6</fpage>
      <lpage>10</lpage>
      <abstract>
        <p>The exact evaluation of queries over RDF data has been extensively studied. However, in a wide array of applications, RDF queries do not even terminate, due to performance reasons. To address this, in this demonstration, we present PING, a novel system built on top of Spark, which allows to progressively answer RDF queries. PING first builds a hierarchical schema structure, which is used for efective data partitioning, sub-partitioning, and indexing. Then, it employs a novel RDF query evaluation algorithm that directly locates the diferent levels of the hierarchy required for query answering. This also enables answering queries progressively, by sequentially visiting the various hierarchy levels. The demonstration explains the novelty of our system and shows its efectiveness and the eficiency, on both exact and progressive query answering (PQA).</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>CEUR
ceur-ws.org</p>
    </sec>
    <sec id="sec-2">
      <title>1. Introduction</title>
      <p>Graphs are simple yet powerful abstractions for representing and analyzing semantic
relationships between real-world objects. Still, graph ecosystems face key challenges, such as data
model heterogeneity and query answering eficiency on large, highly interconnected datasets.</p>
      <p>
        The problem. While exact query answering on RDF data has received a lot of attention in
recent years, performance problems are widespread, as shown by empirical analyses of SPARQL
query logs [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Several queries of publicly available SPARQL endpoints, such as Wikidata and
DBPedia, are actually timed out, due to the fact that their evaluation on the entire RDF graph
is time-consuming. As such, approaches have emerged trying to ensure the termination of
queries by introducing restricted servers such as TPF [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], SAGE [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] and SmartKG [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. However,
these require a smart client to perform key operations, such as joins, and shipping intermediate
results from the server to the client might require overall more time to finally evaluate the
query.
      </p>
      <p>Nonetheless, distributed big data infrastructures like Spark have emerged and ofer increased
eficiency. Indeed, Spark has been exploited for eficient query answering [</p>
      <sec id="sec-2-1">
        <title>5], by employing partitioning techniques, precomputing joins, and constructing indexes to reduce the amount of</title>
        <p>
          CEUR
Workshop
Proceedings
data needed for query answering. Such works like SPARQLGX [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ], S2RDF [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ], and WORQ [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ]
adopt simplistic partitioning schemes and fail to exploit multi-level hierarchical partitioning for
exact query answering. However, on big RDF graphs users still have to wait for a considerable
amount of time before seeing the first answer to their queries. One reason for this is that query
answering on interconnected data typically requires loading large chunks of it. Currently, an
approach for progressively returning query results to users is lacking.
        </p>
        <p>
          Our solution. To tackle this problem, in this demo, we present the novel PING system
that leverages schema information to eficiently identify the data fragments required to return
the first part of the answer and to progressively return the remaining parts, thus enabling
progressive query answering (PQA). While schemas have been successfully used to represent
RDF graphs [
          <xref ref-type="bibr" rid="ref10 ref11 ref9">9, 10, 11</xref>
          ], ours is the first work to exploit these for fine-grained graph partitioning and
progressive query answering. The code base of PING is open source and the used datasets/queries
are available online1 as well as a video demonstrating its functionality2.
        </p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>2. PING System Overview</title>
      <p>We depict the global architecture of our PING system in Figure 1 (top). The framework comprises
three main parts. The GUI allows users to select a pre-loaded dataset or add a new one, visualize
statistics regarding their partitioning, write SPARQL queries, and inspect diagrams depicting the
eficiency and accuracy of evaluating them with PING’s progressive query answering module.
The query processor exploits the hierarchical partitioning in order to perform progressive query
answering. The partitioner processes the chosen dataset, extracts its hierarchical schema, and
generates hierarchical partitions, as well as sub-partitions and indexes. We will focus hereafter
on the partitioner and query processor, which are PING’s core components.</p>
      <p>
        Hierarchical Dataset Partitioning. For capturing the underlying structure of an RDF
dataset we leverage characteristic sets [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. The characteristic set of a node is the set of all
predicates, i.e., outgoing edges, attached to it. Such characteristic sets exhibit hierarchical
relationships, due to overlaps in their sets of properties. For example, in Figure 1(a), the
characteristic sets for the Protein nodes are identified and placed in a corresponding hierarchical
structure. PING visits all instances, constructs their characteristic sets, and then constructs a CS
hierarchy  , as shown in Figure 1(b). Based on  , we construct a multi-level partitioning  of
the initial graph  comprising partitions   ; these regroup all instances whose characteristic set
belongs to the  level of  ( Figure 1(c)). The partitions are computed once, by assigning instances
to their respective level, and enjoy the modularity and losslessness properties by construction.
These state that the sets of instances corresponding to the hierarchical partitioning levels
are pairwise disjoint and, respectively, that they contain all triples in the initial dataset, i.e.,
  ∩   = ∅, for all ,  ≤ | | (modularity) and  = ⋃≤| |   (losslessness).
      </p>
      <p>Sub-partitioning. On top of partitioning, we also implement, for each partition, a vertical
partition (VP ) step, called sub-partitioning, in order to further reduce the size of the data touched
at query answering. For this, we split the triples of each partition   , into multiple vertical
partitions   [] , one per predicate  . Each vertical partition contains the subjects and the objects</p>
      <sec id="sec-3-1">
        <title>1https://anonymous.4open.science/r/PING_ISWC_2023-B9F3/README.md 2https://tinyurl.com/ISWCPING</title>
        <p>for a single predicate, enabling a more fine-grained selection of data at query time.</p>
        <p>Indexing. To speed up query evaluation, we generate appropriate indexes, so that the necessary
sub-partitions can be directly identified during query execution. PING constructs property,
subject, and object indexes (VP,  , and  , respectively as shown in Figure 1(d)). Thus, we can
directly identify to which partitions each such instances belong.</p>
        <p>Progressive Query Answering and Visualization. In order to perform PQA, PING
implements a novel algorithm. This iterates over all query triple patterns and inspects all their
symbols. Depending on whether they correspond to a predicate, to a subject, or object constant,
it then inspects the corresponding vertical partitioning and index structures to collect the set of
all levels whose instances mention them. Note that a query can be (at least partially) answered
on a particular set of levels, if the latter contains all its triple pattern symbols; we call this set a
slice. Next, PING computes the minimal, duplicate-free, slice that covers all query symbols, by
taking the intersection of all such slices. This is then used for query answering, by iterating
over the cartesian product of its individual triple pattern levels.</p>
        <p>As shown in Figure 1(e), the user can select to execute the query only on a subset of the levels,
trading eficiency for accuracy, as only a subset of the results will be returned. To the best of our
knowledge, the PING system is the first to enable this trade-of for performing PQA over KGs .</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>3. Demo Overview</title>
      <p>To demonstrate the functionalities of PING, we will use three synthetic datasets, i.e., Uniprot
(3GB), WatDiv (13GB &amp; 100GB), and LDBC Social Network Benchmark (18GB), and a real one,
DBpedia (30GB). For each dataset, we will use 6 example queries of diferent shapes: 2 star, 2
chain, and 2 complex queries. The demonstration will proceed in six phases:</p>
      <p>1. Overview. The demonstration will start by explaining the various choices made for
data partitioning, sub-partitioning, and indexing. We will highlight that the characteristics of
hierarchical partitioning are dataset dependent, by inspecting the partitioning of each dataset,
the distribution of its triples across the various levels, as well as its sub-partitions and indexes.</p>
      <p>2. Progressive Query Answering. We will then focus on PQA. Through the GUI, the user
will be able to select example queries and also set the number of partitions on which this query
will run. We will visualize the result and also we will discuss the trade-of between accuracy
(percentage of returned results vs. the total results) and execution time. We will show that
by increasing the number of visited partitions more data are added to the result and, thus, the
query answering accuracy improves, albeit resulting in an increase in execution time as well.</p>
      <p>3. Exact Query Answering. When all partitions are used, the query can be answered
with 100% accuracy. We will discuss the impact of our partitioning/sub-partitioning/indexing
scheme on answering queries considering the entire dataset. We will also show the comparative
performance of PING with respect to the state-of-the-art S2RDF and WORQ systems, empirically
establishing that our method boosts performance for all types of queries (star, chain, complex).</p>
      <p>We illustrate the demonstration scenario in Figure 2. In the left screenshot, the user first
chooses the WatDiv dataset, whose characteristics are computed and displayed in the right-hand
side panel. As captured by the corresponding histogram, the dataset contains 1B triples and is
partitioned by PING into 6 levels, of varying sizes. Next, the user selects, from the associated
queries of diferent complexities, the chain-shaped Query 3, shown at the bottom of the screen.
PING analyzes it and indicates in green which are the valid slices on which the query can
be partially answered. PING can perform PQA on any subset of these slices and report the
runtime, memory consumption, and accuracy (right screenshot). In our example, the user chose
to evaluate on all 5 slices and can inspect the corresponding statistics. In general, slices can be
freely added or dropped, following the desired balance between eficiency and accuracy.</p>
      <p>To conclude, in this demonstration we present PING, the first system enabling progressive
query answering over KGs. PING uses a hierarchical schema structure to partition KGs and
enables progressive query evaluation. As such, it ofers minimal latency and allows trading
query accuracy for eficiency.</p>
    </sec>
    <sec id="sec-5">
      <title>Acknowledgments</title>
      <p>This research project was supported by the Hellenic Foundation for Research and Innovation
(H.F.R.I.) under the “2nd Call for H.F.R.I. Research Projects to support Post-Doctoral Researchers”
(iQARuS Project No 1147) and by the SafePolymed (GA 101057639) EU project.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>A.</given-names>
            <surname>Bonifati</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Martens</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Timm</surname>
          </string-name>
          ,
          <article-title>An analytical study of large SPARQL query logs</article-title>
          ,
          <source>VLDB J</source>
          .
          <volume>29</volume>
          (
          <year>2020</year>
          )
          <fpage>655</fpage>
          -
          <lpage>679</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>R.</given-names>
            <surname>Verborgh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. V.</given-names>
            <surname>Sande</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Hartig</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. V.</given-names>
            <surname>Herwegen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L. D.</given-names>
            <surname>Vocht</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B. D.</given-names>
            <surname>Meester</surname>
          </string-name>
          , G. Haesendonck,
          <string-name>
            <given-names>P.</given-names>
            <surname>Colpaert</surname>
          </string-name>
          ,
          <article-title>Triple pattern fragments: A low-cost knowledge graph interface for the web</article-title>
          ,
          <source>J. Web Semant</source>
          .
          <fpage>37</fpage>
          -
          <lpage>38</lpage>
          (
          <year>2016</year>
          )
          <fpage>184</fpage>
          -
          <lpage>206</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>T.</given-names>
            <surname>Minier</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Skaf-Molli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Molli</surname>
          </string-name>
          , Sage:
          <article-title>Web preemption for public SPARQL query services</article-title>
          , in: WWW, ACM,
          <year>2019</year>
          , pp.
          <fpage>1268</fpage>
          -
          <lpage>1278</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>A.</given-names>
            <surname>Azzam</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. D.</given-names>
            <surname>Fernández</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Acosta</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Beno</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Polleres</surname>
          </string-name>
          ,
          <article-title>SMART-KG: hybrid shipping for SPARQL querying on the web</article-title>
          ,
          <source>in: WWW, ACM / IW3C2</source>
          ,
          <year>2020</year>
          , pp.
          <fpage>984</fpage>
          -
          <lpage>994</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>G.</given-names>
            <surname>Agathangelos</surname>
          </string-name>
          , G. Troullinou,
          <string-name>
            <given-names>H.</given-names>
            <surname>Kondylakis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Stefanidis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Plexousakis</surname>
          </string-name>
          ,
          <article-title>RDF query answering using Apache Spark: Review and assessment</article-title>
          ,
          <source>in: ICDE Workshops</source>
          ,
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>D.</given-names>
            <surname>Graux</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Jachiet</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Genevès</surname>
          </string-name>
          ,
          <string-name>
            <surname>N. Layaïda,</surname>
          </string-name>
          <article-title>SPARQLGX in action: Eficient distributed evaluation of SPARQL with Apache Spark</article-title>
          , in: ISWC,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>A.</given-names>
            <surname>Schätzle</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Przyjaciel-Zablocki</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Skilevic</surname>
          </string-name>
          , G. Lausen,
          <article-title>S2RDF: RDF querying with SPARQL on Spark</article-title>
          , PVLDB
          <volume>9</volume>
          (
          <year>2016</year>
          )
          <fpage>804</fpage>
          -
          <lpage>815</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>A.</given-names>
            <surname>Madkour</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. M.</given-names>
            <surname>Aly</surname>
          </string-name>
          , W. G.
          <article-title>Aref, WORQ: workload-driven RDF query processing</article-title>
          ,
          <source>in: ISWC</source>
          ,
          <year>2018</year>
          , pp.
          <fpage>583</fpage>
          -
          <lpage>599</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>K.</given-names>
            <surname>Kellou-Menouer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Kardoulakis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Troullinou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Kedad</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Plexousakis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Kondylakis</surname>
          </string-name>
          ,
          <article-title>A survey on semantic schema discovery</article-title>
          ,
          <source>VLDB J</source>
          .
          <volume>31</volume>
          (
          <year>2022</year>
          )
          <fpage>675</fpage>
          -
          <lpage>710</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>N.</given-names>
            <surname>Kardoulakis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Kellou-Menouer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Troullinou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Kedad</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Plexousakis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Kondylakis</surname>
          </string-name>
          ,
          <article-title>Hint: Hybrid and incremental type discovery for large RDF data sources</article-title>
          , in: SSDBM, ACM,
          <year>2021</year>
          , pp.
          <fpage>97</fpage>
          -
          <lpage>108</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>M.</given-names>
            <surname>Meimaris</surname>
          </string-name>
          , G. Papastefanatos,
          <article-title>Hierarchical characteristic set merging for optimizing SPARQL queries in heterogeneous RDF</article-title>
          , CoRR abs/
          <year>1809</year>
          .02345 (
          <year>2018</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>T.</given-names>
            <surname>Neumann</surname>
          </string-name>
          , G. Moerkotte,
          <article-title>Characteristic sets: Accurate cardinality estimation for RDF queries with multiple joins</article-title>
          , in: ICDE, IEEE Computer Society,
          <year>2011</year>
          , pp.
          <fpage>984</fpage>
          -
          <lpage>994</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>