<!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>RDF* Knowledge Graph Completion by Translation</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Linda Kwan</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Pouya Ghiasnezhad Omran</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Armin Haller</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Australian National University</institution>
          ,
          <addr-line>Acton, ACT, 2601</addr-line>
          ,
          <country country="AU">Australia</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Knowledge graphs (KGs) are valuable for many applications, but they are incomplete due to their construction process or available information in a corresponding domain. Thus, Link Prediction (LP) techniques for inferring missing triples have been presented. Usually, such LP methods work on plain RDF triples, while more complex KGs like RDF*, where each fact can be qualified with another fact, are emerging. In this paper, we propose a translation-based method that can translate RDF* graphs to RDF graphs while the translation does not harm the performance of LP, whence we query the core facts (not qualifiers). We demonstrate that our translation-based method can help the link predictors that can handle RDF* directly like StarE to handle this specific kind of query more accurately. We also demonstrated that the extra complexity we create by translating could be manageable using more eficient link predictors like AnyBURL.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;RDF*</kwd>
        <kwd>Knowledge Graph</kwd>
        <kwd>Knowledge Graph Completion</kwd>
        <kwd>Link Prediction</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <sec id="sec-1-1">
        <title>Algorithm 1 Converting an RDF* KG to RDF KG using ExtRet</title>
        <p>Input: RDF* KG , Output: RDF KG representation of 
1: Let ℋ be a blank RDF graph.
2: for RDF* triple (, , ) in  do
3: if (, , ) is an RDF triple then
4: Add (, , ) to ℋ 9:
5: if  is an RDF triple then 10:
6: Create a new intermediate node  for 
if no existing node maps to . Otherwise, 11:
use the existing node that maps to .
7: Let  = (, , )
8: Add the following triples to ℋ:
(, unstar:S, ), (, unstar:P, ),
(, unstar:O, ), (, , ), (, /, ),
(, − 1/, ), (, , )
if  is an RDF triple then</p>
        <p>Perform same as lines 6-7, but with  in
lieu of .</p>
        <p>
          Add (, unstar:S, ), (, unstar:P, ),
(, unstar:O, ), (, , ), (, /, ),
(, /− 1, ), (, , ) to ℋ.
12: return ℋ
example of RDF* KG. An RDF* triple without qualifiers is considered a core fact. While there
are a vast number of methods for carrying out LPs for RDF KGs like AnyBURL [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ], there are a
few LP methods that can handle RDF* directly like StarE [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ].
        </p>
        <p>We propose a translation method called ExtRet (Extended Reification) which converts RDF*
KG to RDF KG. We aim to improve the quality of LPs by applying our algorithm to RDF* KGs.
We use existing state-of-the-art (SOTA) RDF link predictors to accomplish our research goals.</p>
        <p>Our main contribution is proposing a novel translation method that can improve the
performance of link predictors, specifically for queries of core facts. In our system, the input is RDF*
and the queries are about core facts.</p>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>2. Our RDF* Translation Algorithm (ExtRet)</title>
      <p>
        Standard reification [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] (orange arrows in Fig. 1) is a common method of converting RDF* KG
to RDF KG. It works by replacing nested RDF* triples with intermediate nodes, then linking the
intermediate nodes with subjects, predicates and objects of nested triples. However, it does not
establish direct links between entities inside nested triples and entities outside them. Hence,
link predictors might fail to recognise those sorts of links seen in RDF* triples.
      </p>
      <p>Unqualification (grey arrow in Fig. 1) is not intended to produce an RDF KG that represents the
whole RDF* KG but is used to set a minimum performance standard. It works by extracting the
nested RDF triples from each RDF* triple in the KG, then constructing a separate KG from those.
We introduce a novice translation algorithm named ExtRet (Extended Reification) which aims to
minimise structural information loss while extending its ability to make LPs on unqualified facts.
On top of standard reification and unqualification to maintain existing links, our algorithm
involves adding direct relations between nested and outer entities within the same RDF* triple
to the translated KG. The additional relations allow link predictors to recognise frequently
occurring patterns in RDF* triples which results in higher quality LPs. Furthermore, ExtRet is
designed to generalise to RDF* triples with multiple levels of nested RDF* triples.</p>
      <p>The process of RDF* to RDF KG conversion using ExtRet is outlined in Algorithm 1. The
algorithm takes an RDF* KG as an input and outputs the translated KG. First, a blank graph
ℋ is initialised to store the translated KG. The algorithm iterates through each RDF* triple in
. When an RDF* triple, denoted by (, , ), is an RDF triple, then the triple itself is added to
ℋ. Alternatively, if the subject  is an RDF triple, then a new intermediate node  is created to
represent the core fact (, , ) =  unless such a node already exists. A set of RDF triples
are added to ℋ (see Line 8 of Alg. 1). Triples (, unstar:S, ), (, unstar:P, ) and (, unstar:O,
) represent the links between each component of the core fact and the intermediate node,
where metadata predicates with unstar-tags are used. (, /, ) and (, − 1/, ) represent
direct links between the entities in the core fact and the object of the entire triple, where /
and − 1/ are distinct new predicates formed essentially by concatenating  and . (, , )
represents the RDF* triple with the core fact replaced by the intermediate node. Also, the core
fact itself is added to ℋ to preserve the relationship between it entities. In the case where the
object  is a core fact instead of , the process of decomposing the RDF* triple into several
RDF triples is similar, but with small changes to account for the position of the core fact (see
Lines 9-11 of Alg. 1). The algorithm returns the translated KG after converting each RDF*
triple in . ExtRet generalises to KGs with multi-levelled RDF* triples by repeatedly applying
Algorithm 1 and treating each nested triple as a core fact.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Experiments</title>
      <p>
        We conducted a set of experiments to evaluate our proposed system 1. We demonstrate: (i)
ExtRet can be used to generate a set of RDF facts that can be used to answer the queries about
the core facts with higher accuracy than the original RDF* using SOTA RDF* LP StarE [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. (ii)
Although ExtRet generates more entities, predicates and facts, the complexity of LPs on the
translated system is manageable by using more eficient link predictors like AnyBURL [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
      </p>
      <p>
        Link Prediction We performed our experiment using the JF17K dataset [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] as our benchmark.
Due to our computational resource restriction, we prepared a sampled JF17K to run StarE on
the translated version of sampled JF17K. Our train-valid-test split ratio is 64:16:20. The statistics
of original and samples KG can be found in Table 1. The three algorithms used to convert those
training and validation sets are standard reification, ExtRet and unqualification (which removes
the qualifiers from each statement). Additionally, we applied the unqualification algorithm to
      </p>
      <sec id="sec-3-1">
        <title>1Extensive results and code can be found at https://github.com/lindakwan/ExtRet</title>
        <p>
          each testing set since we are mainly interested in making predictions about the core facts. We
used both StarE and AnyBURL to investigate their ability to make LPs on translated KGs. We
evaluate the performance of LPs using the metrics MRR (Mean Reciprocal Rank) and hits@N
adopted from [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ].
        </p>
        <p>KG Statistics In Table 1, percentages next to the number of entities, predicates and facts
indicate the amount of change from the original KG. ExtRet involves constructing many new
components, especially more new predicates and facts than standard reification, resulting in
large percentage increases. Unqualification involves decreasing the number of components as
qualifiers are deleted from facts, resulting in missing entities and predicates, and duplicate core
facts. The percentages in the last column indicate the proportion of RDF* facts in the training
set where core facts have qualifiers.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Results &amp; Discussion</title>
      <p>Our experiment in Table 2 demonstrates that ExtRet outperforms standard reification when
tested on both StarE and AnyBURL in all three metrics and two datasets with significant margins.
The extra triples added to the decomposed RDF* triple help to reinforce connections between
entities in nested RDF* triples and outer entities. Those extra connections result in better LP
results as the existence of those relations is taken into account. However, increasing the number
of triples in the translated graph increases the training time of StarE despite the performance
improvements. This is due to the need to update all the embedding matrices corresponding to
the additional entities and relations added to the translated graph. 51.9% of statements in the
training set of our sampled JF17K dataset consists of qualifiers and those require more than 14
hours of training. Thus, a training set with the same amount of statements, but with 100% of
them containing qualifiers, could potentially require more training time. Also, a dataset with the
same amount of statements, but with more unique core facts, would result in a larger number
of triples in the translated graph, and therefore, longer training time in StarE. Due to the long
waiting time involved when using StarE to train a large dataset, only AnyBURL was run on the
full JF17K dataset.</p>
      <p>While training using AnyBURL is significantly faster than the StarE, its performance is much
less optimal. Critics of rule-based approaches argue that rules generated become redundant
when making predictions about sets of entities connected by diferent rules. Hence, our decision
to use both AnyBURL and StarE to evaluate the performance of ExtRet is justified by the need
to verify that our translation algorithm can result in good performance across LP systems with
diferent limitations. As it is not ideal to rely on MRR and hits scores alone, we measure the
performance of translation algorithms by comparing them against benchmarks.</p>
      <p>We compare the results of both standard reification and ExtRet against the performance of
the original RDF* KGs and the KGs generated by unqualification. We use unqualification as
a performance benchmark for ExtRet to meet since AnyBURL does not support RDF* triples.
It makes sense for a KG rich in metadata information to make better predictions than an
unqualified graph. In most cases, our algorithm manages to meet those standards. Also, the
performance of ExtRet exceeds the performance of the original RDF* graph where StarE is
applied to the sampled JF17K dataset. Hence, ExtRet results in significant information gain.</p>
    </sec>
    <sec id="sec-5">
      <title>5. Conclusion &amp; Future Work</title>
      <p>Our proposed translation algorithm ExtRet outperforms SOTA translation algorithms when
using StarE to make LPs about core facts. AnyBURL is more scalable than StarE although their
results are less optimal than StarE. For future work, we would consider using other benchmark
datasets to compare the LP quality of ExtRet against standard reification. Additionally, we could
run our experiment on a machine with GPUs that is capable of handling larger datasets.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>C.</given-names>
            <surname>Meilicke</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. W.</given-names>
            <surname>Chekol</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Rufinelli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Stuckenschmidt</surname>
          </string-name>
          ,
          <article-title>Anytime bottom-up rule learning for knowledge graph completion</article-title>
          ,
          <source>in: IJCAI</source>
          ,
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>M.</given-names>
            <surname>Galkin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Trivedi</surname>
          </string-name>
          , G. Maheshwari,
          <string-name>
            <given-names>R.</given-names>
            <surname>Usbeck</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Lehmann</surname>
          </string-name>
          ,
          <article-title>Message passing for hyperrelational knowledge graphs</article-title>
          ,
          <source>in: EMNLP</source>
          ,
          <year>2020</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>R.</given-names>
            <surname>Cyganiak</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Wood</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Lanthaler</surname>
          </string-name>
          , G. Klyne,
          <string-name>
            <given-names>J. J.</given-names>
            <surname>Carroll</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>McBride</surname>
          </string-name>
          ,
          <article-title>Rdf 1.1 concepts and abstract syntax</article-title>
          ,
          <year>2014</year>
          . URL: https://www.w3.org/TR/rdf11-concepts/.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>D.</given-names>
            <surname>Arndt</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Broekstra</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>DuCharme</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Lassila</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P. F.</given-names>
            <surname>Patel-Schneider</surname>
          </string-name>
          , E. Prud'hommeaux, T. Thibodeau,
          <string-name>
            <surname>Jr.</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          <string-name>
            <surname>Thompson</surname>
          </string-name>
          ,
          <article-title>Rdf-star and sparql-star</article-title>
          , https://w3c.github.io/rdf-star/ cg-spec/editors_draft.html,
          <year>2021</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>J.</given-names>
            <surname>Wen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Mao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Chen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Zhang</surname>
          </string-name>
          ,
          <article-title>On the representation and embedding of knowledge bases beyond binary relations</article-title>
          ,
          <source>in: IJCAI</source>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>A.</given-names>
            <surname>Bordes</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Usunier</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>García-Durán</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Weston</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Yakhnenko</surname>
          </string-name>
          ,
          <article-title>Translating embeddings for modeling multi-relational data</article-title>
          ,
          <source>in: NIPS</source>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>