<!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 Knowledge Graph Question-Answering Platform Trained Independently of the Graph</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>Concordia University</institution>
          ,
          <country country="CA">Canada</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>We will demonstrate KGQAn, a question-answering platform trained independently of KGs. KGQAn transforms a question into semantically equivalent SPARQL queries via a novel three-phase strategy based on natural language models trained generally for understanding and leveraging short English text. Without preprocessing or annotated questions on KGs, KGQAn outperformed the existing systems in KG question answering by an improvement of at least 33% in F1-measure and 61% in precision. During the demo, the audience will experience KGQAn for question answering on real KGs of topics of interest to them, such as DBpedia and OpenCitations Graph, and review the generated SPARQL queries and answers. A demo video is available online 1.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>of predicates, e.g., &lt;http://dbpedia.org/property/leadfigures&gt;, and
entities, e.g., &lt;http://dbpedia.org/resource/Boston_Tea_Party&gt;, and (ii)
identify basic graph patterns (BGP), e.g., a set of triple patterns connected through
a common subject/object. Thus, forming a SPARQL query is challenging.</p>
      <p>
        To easily explore KGs, KG question answering systems map a question into
semantically equivalent SPARQL queries. Existing systems need thousands of
fully annotated questions or require excessive preprocessing. DTQA [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] used
about fifteen thousand fully annotated questions to train its models. Other
systems access the entire KG in a preprocessing phase to build indexes, such as
gAnswer [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], and encode semantics in KGs, such as WDAqua-core1 [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. The
complexity of the preprocessing phase is proportional to the KG size. The time
complexity of the preprocessing phase in gAnswer is polynomial to the number
of vertices in the KG [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. A less data-intensive approach is taken by NLQSK [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ],
a primarily rule-based system. However, this system fails to outperform
gAnswer on QALD-7 [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], which is less challenging than QALD-9 [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. QALD-9 is
a widely used question answering benchmark. Existing systems suffer from low
accuracy and high false positives. For example, DTQA and gAnswer are the
top-ranked systems for QALD-9 achieving F1-measure of 30.88 and 29.81 with
precision 31.41 and 29.34, respectively, as reported at [
        <xref ref-type="bibr" rid="ref1 ref9">9,1</xref>
        ]. KGs are frequently
updated, i.e., these systems will need to get more annotated questions or redo
the preprocessing. Hence, there is a need for novel techniques that are trained
independently of KGs.
      </p>
      <p>We developed KGQAn, a question-answering platform trained independently
of KGs, to address the above challenges. NLP-based models are effectively used
to construct KGs from text.This fact inspired us to develop a three-phase
strategy based on NLP models trained generally for understanding and leveraging
a short English text. KGQAn outperforms the state-of-the-art systems by
improving F1-measure and precision by least 33% and 61%, respectively. In this
demo, Section 2 outlines the KGQAn architecture. Section 3 gives a glimpse on
the evaluation. Section 4 explains the demo scenario and concludes.
2</p>
    </sec>
    <sec id="sec-2">
      <title>The KGQAn System</title>
      <p>We outline our three-phase strategy and demonstrate each phase as illustrated
in Figure 1. Unlike existing systems, our strategy utilizes NLP models trained
independently of the targeted KG, then uses lightweight SPARQL queries to
annotate PGP’s node and edges with corresponding vertices and predicates using
semantic similarity models. KGQAn starts by extracting relation triples from
the question to construct a phrase graph pattern (PGP). The relation triples
are extracted from a question using our relation triple generator model
pretrained for short English text. KGQAn fetches via SPARQL queries vertices
and predicates, ranks them semantically to annotate the PGP with top-k ones.
Finally, KGQAn executes the BGP queries with the highest rank, then filters
the queries whose answers do not match the predicted answer data type.</p>
      <p>The PGP Predictor extracts a set of relation triples patterns from the
question to construct the PGP. A relation triple pattern is a triple of a relation
phrase connecting two entities, e.g., a relation triple is hBoston Tea Party, take
PHRASE GRAPH PATTERN
(PGP) PREDICTOR
A Seq2Seq Model to
extract Relation Triples
Boston Tea Party, take place, ?when
Boston Tea Party, led by, ?who .</p>
      <p>BASIC GRAPH PATTERN SPARQL QUERY
(BGP) MATCHER AND ANNOTATOR MANAGER</p>
      <p>Entity Name: ?when Queries Builder and</p>
      <p>Relation Phrase: “take place” n2 TPyopses:ibDlaeteanswers: Ambiguity-Based Filtering
n1 Predicates: {((pdlaatcee,,00.4.83,,SS))} {&lt;answer, score&gt;}
“EBnotisttyonNaTemaeP:arty” PRreeladtiicoantePsh:r{ase: “led by”
Type: Named Entity (leadfigures, 0.52, S)
Vertices: (partof, 0.49, S)}
{&lt;v_uri, score&gt;}
BGP_I : {
dbpediaR:Boston_Tea_Party
dbpediaP:date ?When .</p>
      <p>
        Entity Name: ?whom dbdpbepdeidaiRa:PB:olsetaodnf_iTgeuar_ePsar?twyhome.
n3 TPyopses:ibPleersaonnswers: }
{&lt;answer, score&gt;}
place, ?wheni in Figure 1. Our triple generator model is a Sequence to Sequence
(Seq2Seq) Deep Learning model based on BART [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] model. The BART model
is a transformer model which can be used in different generation tasks such as
machine translation and text summarization. We mapped the relation triples
extraction task to a Seq2SeqPPRRgEEFFeIIXXnddbbppeeddiitaaiRPo:: nhhttttpp::a////sddbbppeewddiiaa..oorrgg//rpersotopuerrcteey input is a short English
era t k here h
text and the output are the triples extracted from this input. The models
submitted in WEBNLG Challenge 8 attempted to solve this task. However, these
models were trained on long English text which was not suitable for KGQAn.
Due to the lack of datasets for the triples generation task for short English
text, we prepared a manually annotated dataset, independent of KGs, where the
source (input) is a short English text (Question) and the target (output) is the
extracted triples. This dataset is built using 1000 questions collected from the
LC-QuAD 1.0 benchmark [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ].
      </p>
      <p>Preparing our annotated dataset does not need the annotated SPARQL query
from LC-QuAD. We only extract the English questions from LC-QuAD to
annotate them. For example, for the input Q: How many movies did Stanley Kubrick
direct?, the output is ”Subject”: Stanley Kubrick, ”Object”: ?unknown,
”Predicate”: direct. The dataset covers a wide variety of question types. In our relation
triples generation model, we fine-tuned the BART large model to work on the
triples generation task. First, the triples generation model is trained separately
using the prepared dataset on a GPU machine. We trained the model for 3
epochs with a batch size of 4. Moreover, we used Adam optimizer with a
learning rate of 0.0005, and a gelu activation function. The resulting trained model is
saved to be integrated with KGQAn. After that KGQAn uses this trained model
to extract the relation triples from the question under consideration. Then, the
predicted triples are post-processed to construct the PGP. The generated triples
are in (subject, predicate, object) format where the subject, object, and variables
correspond to PGP nodes, and the relation phrases correspond to PGP edges as
shown in Figure 1.</p>
      <p>
        The BGP Matcher aims to annotate the PGP nodes and edges with
candidate vertices and predicates in the target KG. The main idea is to prune the
search space, i.e., the KG, by identifying a set of vertices that match
syntactically the detected entities. The BGP Matcher then calculates the semantic
affinity between the vertex’s label and the entity to rank the top-k vertices. Our
semantic affinity model is based on Word Embeddings [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. For example, Table
8 https://webnlg-challenge.loria.fr/challenge_2020/
1 shows the top three vertices used to annotate the node ”Boston Tea Party”.
VURI denotes the list of vertices annotating a particular entity. For the lack of
space, we do not show the label retrieved with each vertex.
      </p>
      <p>To annotate the PGP edges, KGQAn fetches, for each vertex v, a set of
predicates connected to v when v is a subject and when it is an object. The
PGP is an undirected graph, as the direction of the edge is based on the actual
triple in the KG. KGQAn annotates each edge in the PGP with a set of tuples.
Each tuple indicates a specific predicate, its direction, and its semantic affinity
score to the extracted predicate. We formulate intermediate SPARQL queries
searching for (i) a subject whose label matches a set of keywords, or the subject
is of a particular type to fetch v, and (ii) a set of predicates connected with a
given v as subject or object.</p>
      <p>SPARQL Query Manager: This component generates the top-k SPARQL
queries by traversing the annotated PGP to select the top-k basic graph
patterns (BGP) semantically equivalent to the question. Our algorithm generates
all the combinations of hsubject, predicate, objecti using these lists. Our
Ambiguity-Based Ranking and Filtering module adjusts the final score of a
BGP based on the semantic affinity between the predicate and the predicted
answer type. Furthermore, the result of the queries is filtered depending on the
answer data type. KGQAn filters the query whose result does not match the
predicted answer data type.
3</p>
    </sec>
    <sec id="sec-3">
      <title>Experimental Evaluation</title>
      <p>
        The state-of-the-art systems, such as DTQA, gAnswer, and WDAqua, were
evaluated using the most recent Challenge on Question Answering over Linked
Data (QALD-9) [
        <xref ref-type="bibr" rid="ref1 ref9">9,1</xref>
        ]. gAnswer and WDAqua are ranked first and second in the
QALD-9 challenge, respectively [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. DTQA was also evaluated using a subset
of LC-QuAD 1.0 [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] test questions. Both LC-QuAD and QALD-9 use DBpedia.
Recently, DTQA slightly outperformed gAnswer in QALD-9. We used the
common benchmark, i.e., QALD-9, in our evaluation. DTQA and gAnswer trained
their models based on DBpedia’s vertices and predicates, indirectly (by seeing
thousands of questions and their corresponding SPARQL queries) or directly (by
accessing the full graph in the preprocessing phase).
      </p>
      <p>For the word embedding, we used a GloVe model pre-trained on 16B
tokens from a large English corpus. We deployed the DBpedia dataset used with
QALD-9 at a virtuoso SPARQL endpoint running at a remote VM. KGQAn
submits SPARQL queries via HTTP calls to the remote SPARQL endpoint. We
evaluated KGQAn using the QALD-9 test dataset, i.e., the 150 questions on
DBpedia. Unlike other systems, KGQAn did not use the the QALD-9 training
dataset to tune its performance. Without preprocessing on DBpedia or annotated
questions, KGQAn significantly outperformed DTQA and gAnswer, especially
in terms of precision and F1-measure, as shown in Table 2. Moreover, KGQAn
is efficient in terms of time. The average time is less than 3 seconds for the
endto-end KGQAn pipeline, including the execution time of all the intermediate
SPARQL queries, which fetch the candidate URIs for vertices and predicates,
plus the execution of the final top-k semantically equivalent queries.</p>
    </sec>
    <sec id="sec-4">
      <title>4 Demonstration and Conclusion</title>
      <p>In this demo, we will use real datasets in the order of billions RDF triples from
DBpedia and OpenCitations Graph. KGQAn uses models trained independently
of the KG. Thus, we will also allow participants to explore a KG of their choice if
the KG has a public SPARQL endpoint. We integrated our Seq2Seq model into
a pipeline of lightweight queries to efficiently map a question to its semantically
equivalent SPARQL queries. The demo will give a chance to discuss exciting
research ideas inspired by such a pipeline to solve similar problems.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Abdelaziz</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ravishankar</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kapanipathi</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          , et al.:
          <article-title>A semantic parsing and reasoning-based approach to knowledge base question answering (</article-title>
          <year>2021</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Diefenbach</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Singh</surname>
            ,
            <given-names>K.D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Maret</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Wdaqua-core1: A question answering service for RDF knowledge bases</article-title>
          .
          <source>In: Companion of the The Web Conference</source>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Goikoetxea</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Agirre</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Soroa</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Single or multiple? combining word representations independently learned from text and wordnet</article-title>
          .
          <source>In: Thirtieth AAAI Conference on Artificial Intelligence</source>
          (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Hu</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zou</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Yu</surname>
            ,
            <given-names>J.X.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhao</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Answering natural language questions by subgraph matching over knowledge graphs</article-title>
          .
          <source>TKDE</source>
          <volume>30</volume>
          (
          <issue>5</issue>
          ),
          <fpage>824</fpage>
          -
          <lpage>837</lpage>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Hu</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Duan</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dang</surname>
          </string-name>
          , et al.:
          <article-title>Natural language question answering over knowledge graph: the marriage of sparql query and keyword search</article-title>
          .
          <source>Knowledge and Information Systems</source>
          (
          <year>2021</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Lewis</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Liu</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Goyal</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          , et al.:
          <article-title>Bart: Denoising sequence-to-sequence pretraining for natural language generation, translation, and comprehension</article-title>
          . arXiv preprint arXiv:
          <year>1910</year>
          .
          <volume>13461</volume>
          (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Trivedi</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Maheshwari</surname>
          </string-name>
          , et al.:
          <article-title>Lc-quad: A corpus for complex question answering over knowledge graphs</article-title>
          . In: International Semantic Web Conference (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <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>
          </string-name>
          , J.:
          <article-title>Lc-quad: A corpus for complex question answering over knowledge graphs</article-title>
          .
          <source>In: ISWC</source>
          . pp.
          <fpage>210</fpage>
          -
          <lpage>218</lpage>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Usbeck</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gusmita</surname>
            ,
            <given-names>R.H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ngomo</surname>
            ,
            <given-names>A.N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Saleem</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>9th challenge on question answering over linked data (QALD-9)</article-title>
          .
          <source>CEUR Workshop</source>
          , vol.
          <volume>2241</volume>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Usbeck</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ngomo</surname>
            ,
            <given-names>A.C.N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Haarmann</surname>
          </string-name>
          , et al.:
          <article-title>7th open challenge on question answering over linked data (qald-7)</article-title>
          . In:
          <article-title>Semantic web evaluation challenge (</article-title>
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>