<!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>Memory Networks for RDFS reasoning: Experiments</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Sulogna Chowdhury</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Monireh Ebrahimi</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Aaron Eberhart</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Pascal Hitzler</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Kansas State University</institution>
          ,
          <country country="US">USA</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>We report on new evaluations regarding the use of a Memory Networks deep learning architecture for deductive RDF reasoning. Evaluation on the SemRec CaLiGraph dataset show performance consistent with previously reported results, even without re-training on the CaLiGraph dataset. We also report on a preliminary evaluation regarding performance of the Memory Networks system with imperfect data. It shows that the system gracefully degrades.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;RDF Reasoning</kwd>
        <kwd>Deep Deductive Reasoning</kwd>
        <kwd>Deep Learning</kwd>
        <kwd>Memory Networks</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>as the training data. While this can be useful in some cases, deductive reasoning as defined is
not dependant on the names of identifiers, i.e. the reasoning remains the same after a rewriting
of identifier names into diferent ones. Due to this, we believe that it is only fair to say that
a deep learning system has achieved deductive reasoning, if it performs well on completely
new input RDF graphs including new vocabulary (i.e., IRIs). In other words, we prefer a Deep
Deductive Reasoner to be able to transfer to completely new datasets.</p>
      <p>
        The Memory Network system we report here is indeed capable of transfer. In fact, for part of
the evaluation, the system was not re-trained – it is the trained system reported in [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] which
we re-evaluate.
      </p>
      <p>The plan of the paper is as follows. In Section 2 we will briefly recap the architecture of the
Memory Network system we use in our experiments and recall previously published evaluation
results. In Section 3 we present our new evaluation results. And in Section 4 we conclude.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Architecture and Previous Results</title>
      <p>
        Our system is an end-to-end Memory Network (MemN2N) [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] which learns memory cell
embeddings, attention mechanism, and all other model weights at the same time. Transfer is
achieved by a normalization of the inputs, whereby each IRI not in the RDF or RDFS namespaces
is converted to a random integer from a predefined set {1, . . . , }, where  is the maximum
size of the knowledge graphs (in terms of number of distinct IRIs) that can be considered by
the system. IRIs in the RDF or RDFS namespaces are not renamed, as they are necessary for
performing RDFS entailment. The system then learns to embed the normalized IRIs as a vector
in R, and a knowledge graph with  triples then becomes a ( × ) tensor. Further details and
analyses can be found in [
        <xref ref-type="bibr" rid="ref11 ref4">4, 11</xref>
        ], and the system is available at https://github.com/Monireh2/
kg-deductive-reasoner.1
      </p>
      <p>
        The evaluation of classification as reported in [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] was done using training and test data from
the LOD Laundromat2 and the Linked Data Cloud3 website. Table 1 is a partial replica from [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]
with evaluation results – see the table caption for details.
      </p>
      <p>In summary, we see that for the natural unmodified datasets the f-measure falls between 0.68
and 0.96. For the artificially harder datasets, it falls between 0.27 and 0.77 (with only one value
lower than 0.54), and for the synthetic datasets it falls between 0.25 and 0.62.</p>
    </sec>
    <sec id="sec-3">
      <title>3. New Evaluations</title>
      <p>
        We performed three evaluations of the Memory Network system. The first was on the SemRec
2022 CaLiGraph dataset, including training on the same. The second was using our pre-trained
system, exactly as used for the experiments reported in [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], for inferencing on the CaLiGraph
dataset. The third was on one of our own datasets for the purpose of understanding how the
system performs under imperfect data.
      </p>
      <p>1We actually used a cloud version of the identical algorithm that was put in place for improved training times.
2http://lodlaundromat.org
3https://lod-cloud.net</p>
      <p>Training
A
A (90%)
A
A
A
C
C (90%)
A
C
A
C</p>
      <sec id="sec-3-1">
        <title>3.1. SemRec 2022 CaLiGraph Evaluation</title>
        <p>
          The SemRec 2022 CaLiGraph dataset4 was provided as part of the ISWC 2022 Semantic Reasoning
Evaluation Challenge.5 CaLiGraph is a large cross-domain knowledge graph generated from
categories, list pages and other lists in Wikipedia [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ]. For the challenge, three diferent datasets
were provided. Clg_Full consists of approx. 54M triples, Clg_10e5 consists of approx. 4.5M
triples, and Clg_10e4 consists of approx. 300k triples.
        </p>
        <p>The current Memory Network system accepts RDF graphs consisting of maximum 1,000
triples. In order to process the CaLiGraph datasets, they were split into disjoint subsets of
maximum 1,000 triples each. Inferences were obtained for each of the resulting datasets, thus
providing the required ground truth for training and validation. We note that this means that
the system does not provide all inferences over the full dataset, it is limited to graphs with
maximum 1,000 triples, and combining all inferences from the smaller subsets does not in
general provide all infereneces over the full graph.</p>
        <p>The evaluation results we received are shown in Table 2 (left) for the correctly inferrable
triples. We note that the values are well in line with previously reported results, see Section 2.</p>
      </sec>
      <sec id="sec-3-2">
        <title>3.2. CaLiGraph Evaluation On Pre-Trained System</title>
        <p>In order to assess transfer capability of our Memory Network system, we also used the SemRec
CaLiGraph validation datasets to assess how well our pre-trained system can reason over this
4http://data.dws.informatik.uni-mannheim.de/CaLiGraph/CaLiGraph-for-SemREC/SemREC-2022-Datasets/
5https://semrec.github.io/</p>
        <p>Dataset
Clg_Full
Clg_10e4
Clg_10e5
completely new dataset. The results can be found in Table 2 (right). We see that the system
manages transfer well to this dataset. The values are not quite as good as for the the system
trained on the CaLiGraph data, but the correctness loss is moderate.</p>
      </sec>
      <sec id="sec-3-3">
        <title>3.3. Evaluation With Imperfect Data</title>
        <p>We finally ran an evaluation on data into which we introduced random errors, in order to assess
whether system performance degrades gracefully. We ran a series of test with diferent error
rates; e.g., an error rate of 10% means that we modified 10% of the IRIs by replacing them with
randomly chosen IRIs from the same pool. Evaluation, however was done with respect to the
inferences in the unmodified data (i.e., no introduced errors). The base datasets used were those
from the original evaluation reported on in Section 2.</p>
        <p>Results of the experiments can be found in Table 3, for correctly inferrable triples. We see
that the correctness values are lower than for data without introduced errors, but precision,
recall and f-measure are only moderately lower. We also notice that higher error rates hardly
decrease correctness, which is somewhat surprising; further evaluation and analysis will be
needed to understand this behavior.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Conclusion</title>
      <p>Performance of our Memory Network based deep deductive reasoner on the SemRec CaLiGraph
data was consistent with our previous findings. In addition, we note that the system transferred
well to the new dataset without re-training. Regarding reasoning over data with introduced
errors, the system showed graceful degradation, but follow-up analysis will be needed.</p>
      <p>A major limitation of our system is that it can only deal with input RDF graphs of at most
1,000 triples. However, training time is already rather substantial for this size, i.e. a significant
increase in processable knowledge graph size does currently not appear to be reasonable with
this exact approach. Another limitation of the Memory Network based system is that it is query
based, i.e. the system does not quickly produce a graph with inferred triples; rather, it has to be
queried about each triple whether it is inferred or not. A generative system that would be able
to quickly produce a graph with inferred triples would be much preferred, however at this time
we know of no published work that would describe a Deep Deductive Reasoning system that is
both generative and that can transfer, even for as simple a logic as RDFS.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>M. K.</given-names>
            <surname>Sarker</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Zhou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Eberhart</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Hitzler</surname>
          </string-name>
          ,
          <article-title>Neuro-symbolic artificial intelligence: Current trends</article-title>
          ,
          <source>AI Commun</source>
          .
          <volume>34</volume>
          (
          <year>2021</year>
          )
          <fpage>197</fpage>
          -
          <lpage>209</lpage>
          . doi:
          <volume>10</volume>
          .3233/AIC-210084.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>P.</given-names>
            <surname>Hitzler</surname>
          </string-name>
          , M. K. Sarker (Eds.),
          <source>Neuro-Symbolic Artificial Intelligence: The State of the Art</source>
          , volume
          <volume>342</volume>
          <source>of Frontiers in Artificial Intelligence and Applications</source>
          , IOS Press,
          <year>2021</year>
          . doi:
          <volume>10</volume>
          .3233/FAIA342.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>P.</given-names>
            <surname>Hitzler</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Bianchi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Ebrahimi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. K.</given-names>
            <surname>Sarker</surname>
          </string-name>
          ,
          <article-title>Neural-symbolic integration and the semantic web</article-title>
          ,
          <source>Semantic Web</source>
          <volume>11</volume>
          (
          <year>2020</year>
          )
          <fpage>3</fpage>
          -
          <lpage>11</lpage>
          . doi:
          <volume>10</volume>
          .3233/SW-190368.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>M.</given-names>
            <surname>Ebrahimi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Eberhart</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Bianchi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Hitzler</surname>
          </string-name>
          ,
          <article-title>Towards bridging the neuro-symbolic gap: deep deductive reasoners</article-title>
          ,
          <source>Appl. Intell</source>
          .
          <volume>51</volume>
          (
          <year>2021</year>
          )
          <fpage>6326</fpage>
          -
          <lpage>6348</lpage>
          . doi:
          <volume>10</volume>
          .1007/ s10489-020-02165-6.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>D.</given-names>
            <surname>Brickley</surname>
          </string-name>
          , R. Guha (Eds.),
          <source>RDF Schema 1.1, W3C Recommendation 25 February</source>
          <year>2014</year>
          ,
          <year>2014</year>
          . Available from http://www.w3.org/TR/rdf-schema/.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <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>
            <surname>M.</surname>
          </string-name>
          Lanthaler (Eds.),
          <source>RDF 1.1 Concepts</source>
          and
          <string-name>
            <given-names>Abstract</given-names>
            <surname>Syntax</surname>
          </string-name>
          ,
          <source>W3C Recommendation 25 February</source>
          <year>2014</year>
          ,
          <year>2014</year>
          . Available from http://www.w3.org/TR/rdf11- concepts/.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>P.</given-names>
            <surname>Hitzler</surname>
          </string-name>
          ,
          <article-title>A review of the semantic web field</article-title>
          ,
          <source>Commun. ACM</source>
          <volume>64</volume>
          (
          <year>2021</year>
          )
          <fpage>76</fpage>
          -
          <lpage>83</lpage>
          . doi:
          <volume>10</volume>
          . 1145/3397512.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>P.</given-names>
            <surname>Hayes</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Patel-Schneider</surname>
          </string-name>
          (Eds.),
          <source>RDF 1.1 Semantics, W3C Recommendation 25 February</source>
          <year>2014</year>
          ,
          <year>2014</year>
          . Available from http://www.w3.org/TR/rdf11-mt/.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>B.</given-names>
            <surname>Makni</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. A.</given-names>
            <surname>Hendler</surname>
          </string-name>
          ,
          <article-title>Deep learning for noise-tolerant RDFS reasoning</article-title>
          ,
          <source>Semantic Web</source>
          <volume>10</volume>
          (
          <year>2019</year>
          )
          <fpage>823</fpage>
          -
          <lpage>862</lpage>
          . doi:
          <volume>10</volume>
          .3233/SW-190363.
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>S.</given-names>
            <surname>Sukhbaatar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Szlam</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Weston</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Fergus</surname>
          </string-name>
          ,
          <article-title>End-to-end memory networks</article-title>
          , in: C.
          <string-name>
            <surname>Cortes</surname>
            ,
            <given-names>N. D.</given-names>
          </string-name>
          <string-name>
            <surname>Lawrence</surname>
            ,
            <given-names>D. D.</given-names>
          </string-name>
          <string-name>
            <surname>Lee</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Sugiyama</surname>
          </string-name>
          , R. Garnett (Eds.),
          <source>Advances in Neural Information Processing Systems 28: Annual Conference on Neural Information Processing Systems</source>
          <year>2015</year>
          , December 7-
          <issue>12</issue>
          ,
          <year>2015</year>
          , Montreal, Quebec, Canada,
          <year>2015</year>
          , pp.
          <fpage>2440</fpage>
          -
          <lpage>2448</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>M.</given-names>
            <surname>Ebrahimi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. K.</given-names>
            <surname>Sarker</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Bianchi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Xie</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Doran</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Hitzler</surname>
          </string-name>
          ,
          <article-title>Reasoning over RDF knowledge bases using deep learning</article-title>
          , arXiv preprint arXiv:
          <year>1811</year>
          .
          <volume>04132</volume>
          (
          <year>2018</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>N.</given-names>
            <surname>Heist</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Paulheim</surname>
          </string-name>
          ,
          <article-title>The CaLiGraph ontology as a challenge for OWL reasoners</article-title>
          , in: G. Singh,
          <string-name>
            <given-names>R.</given-names>
            <surname>Mutharaju</surname>
          </string-name>
          , P. Kapanipathi (Eds.),
          <source>Proceedings of the Semantic Reasoning Evaluation Challenge (SemREC</source>
          <year>2021</year>
          )
          <article-title>co-located with the 20th International Semantic Web Conference (ISWC</article-title>
          <year>2021</year>
          ), Virtual Event,
          <year>October 27th</year>
          ,
          <year>2021</year>
          , volume
          <volume>3123</volume>
          <source>of CEUR Workshop Proceedings, CEUR-WS.org</source>
          ,
          <year>2021</year>
          , pp.
          <fpage>21</fpage>
          -
          <lpage>31</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>