<!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 Methodology for Hierarchical Classi cation of Semantic Answer Types of Questions</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Ammar Ammar</string-name>
          <email>a.ammar@maastrichtuniversity.nl</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Shervin Mehryar</string-name>
          <email>shervin.mehryar@utoronto.ca</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Remzi Celebi</string-name>
          <email>remzi.celebi@maastrichtuniversity.nl</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Bioinformatics - BiGCaT, NUTRIM, Maastricht University</institution>
          ,
          <country country="NL">The Netherlands</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Institute of Data Science, Maastricht University</institution>
          ,
          <addr-line>Maastricht</addr-line>
          ,
          <country country="NL">The Netherlands</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>University of Toronto</institution>
          ,
          <country country="CA">Canada</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Question answering systems have recently been integrated with many smart devices and search engines. Answer type prediction plays an important role in question answering systems as it can help lter irrelevant results and improve overall search and retrieval performance. Here, we present our approach for answer type prediction using the datasets provided for the International Semantic Web Conference (ISWC 2020) SMART Task Challenge. Predicting granular answer types for a question from a big knowledge graph is a greater challenge due to the large number of possible classes. Thus, we propose a 3-step approach to tackle the challenge task. We start with building a classi er that predicts the category of the types and build another classi er just for resource types. The latter model will predict the most general (frequent) type for each question, ignoring type hierarchy. We use a multi-class text classi cation algorithm built-in fastai library for these two models. The models' accuracies are 0.95 and 0.73 for category and generic type classi cation respectively in the validation set (20% randomly chosen samples) of the DBPedia dataset. Next, we train a third classi er to nd more speci c types (sub-classes) for each question based on the previous general predicted types. We achieve 0.62 and 0.61 using NDCG@5 and NDCG@10 metrics respectively for the test set.</p>
      </abstract>
      <kwd-group>
        <kwd>Question answering</kwd>
        <kwd>Hierarchical classi cation</kwd>
        <kwd>Semantic type prediction</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Question answering systems have recently been integrated with many smart
devices and search engines. Answer type prediction plays an important role in
question answering systems as it can help lter irrelevant results and improve
Copyright c 2020 for this paper by its authors. Use permitted under Creative
Commons License Attribution 4.0 International (CC BY 4.0).
overall search and retrieval performance. Here, we present our approach for
answer type prediction using the datasets provided by the International Semantic
Web Conference (ISWC 2020) SMART Task Challenge organizers [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. The task
consists of training data of questions, categories, and types from large ontologies,
and the challenge participants are asked to provide the categories and types from
the WikiData and the DBpedia ontologies questions in the test dataset. The
DBpedia dataset contains 17,571 training questions and 4,393 test questions, and
the WikiData dataset has 18,251 training questions and 4,571 test questions.
Each training dataset is labeled with an answer category and a list of types.
These questions consist of short text that can be classi ed based on the answers
into three main categories: boolean, literal or resource. The granular
categorization is possible for `resource' categories using knowledge graphs/ontologies
classes including the WikiData ( 50K classes) and the DBpedia ( 760 classes).
Predicting granular answer types for a question from an ontology is more
challenging due to the large number of possible classes. Thus, we present a 3-step
approach to tackle the challenge task.
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>Related Work</title>
      <p>
        Most question answering systems are able to answer a wide range of world
knowledge on a production scale. However, they tend to have a modular architecture
and depend laboriously on information retrieval techniques. These systems are
known to rely on limiting the possible subset of candidates, known as answer
type modeling, which notably increases both speed and quality. Generally, the
main approach of question answering starts with building a labeled query-type
dataset and then selecting a answer prediction model. Several model
architectures including recurrent neural networks and feed-forward transition-based
neural networks have been proposed to tackle this problem. For example, in Ivan
Bogatyy's work [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], a model was developed using normalized transition-based
neural network parser. The data was encoded into two types of features: binary
features generated for the slots corresponding to the ROOT and NSUBJ of the
sentence, and integer features generated for every slot based on its depth in the
syntactic tree. Also, J. W. Murdock et.al [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] proposed a method that utilizes a
variety of strategies and resources to decide whether the candidate answer has
the desired type. These strategies and sources provide a set of type coercion
scores for each candidate answer. They used these scores to give preference to
answers that are more likely to have the right type. This method with type
coercion is signi cantly more accurate than it is without type coercion and has a
combined impact of nearly 5% on the accuracy of the IBM Watson. Moreover,
Huan Sun et.al. [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] constructed answer-type related features with two novel
probabilistic models. Such semantic features appeared to play outstanding roles
in determining the true answers from the large answer candidate collection.
Using two test datasets, the aforementioned question-answering system achieved an
improvement of 18% and 54% with the F1 metric, in comparison to several
available QA systems. Finally, Semih Yavuz et.al. [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] generated an abstract form of
the questions by replacing their topic entities with their types. A bidirectional
LSTM model was built to train over the abstract form of questions and predict
their answer types. The model was able to improve the F1-score from 49.7% to
52.6% on the WE-BQUESTIONS dataset.
3
      </p>
    </sec>
    <sec id="sec-3">
      <title>Methodology and Results</title>
      <p>
        We have developed a work ow to address the challenge of the ISWC 2020 where
the categories and types of questions must be predicted using classes from two
main Knowledge Graphs (KGs) ontologies: Wikidata and DBpedia. The
workow for the proposed methodology is shown in Fig. 2 and the code for the
workow can be accessed at our Github repository . For prediction of the question
categories (Task 1), we model the problem as multi-class classi cation to predict one
of the extended categories (boolean, number, string, date and resource)
from question text using the fastai text classi cation library [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. For each of the
datasets (Wikidata and DBpedia), the dataset given for training is split into 2
subsets: training set (80%) and validation set (20%). The preprocessing
(tokenization and numericalization if needed) is handled automatically within the
fasiai data class (TextDataBunch). The classi er (text classifier learner)
uses the LSTM neural network model [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] and is trained with the best learning
rate (1e 2), after which the process of tting is repeated two cycles; the rst
cycle with learning rate (1e 2) and the second cycle with learning rate (1e 3).
The model trained achieves an accuracy of 0:947 for category prediction.
      </p>
      <p>For the type prediction problem (Task 2), we rst obtain the most frequent
type among all the question types that are predicted to have a `resource' category,
and try to predict the generic type from the question text using the same text
classi cation model (LSTM neural network) of the fastai library. The model
achieves an accuracy of 0:73 for generic type prediction. To examine the errors
made by the classi er , we plot the confusion matrix summarizing errors for
validation set shown in Figure 1. Agent type is the classi er's most predicted
type, and also the type for which the classi er has the most errors. It can be
seen from the confusion matrix that the classi er confuse especially the Agent
class with Place class.</p>
      <p>
        Once the prediction for generic (frequent) types was obtained, a speci c type
was determined for each question by selecting a more speci c type in each
question type list . We used a random forest model to predict the speci c type. The
input representation for this model was constructed by integrating three
vector representations (embeddings) for the question text, the frequent type and
the speci c type. For the question text, two vector representations were used.
First, questions sentences were embedded using a pre-trained BERT language
model [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], resulting in a vector of length 1024 for each question. Next, word
and entity embeddings (vector size of 100) were extracted using Wikipedia2Vec.
Wikipedia2Vec is a Python-based open-source tool for learning the embeddings
https://github.com/rcelebi/iswc2020-smarttask
https://wikipedia2vec.github.io/wikipedia2vec/
of words and entities from Wikipedia. Its results on the KORE entity relatedness
dataset achieved the state-of-the-art results, and it also achieved competitive
results on various standard benchmark datasets. Next, the embeddings of tokens
(word or entity) extracted from each question) were averaged to obtain a xed
size vector for each question. The sentence embedding and the word
embedding are concatenated to represent a question. For generic and speci c types,
vector representation was learnt by training a word2vec model [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. To generate
the embeddings that capture the hierarchical relationship of types, we used the
ontology hierarchy of Wikidata/DBpedia KG. Next, the hierarchies were
attened into a sequence of ontology terms that were used as input for embedding
learning. Here, we used the Word2Vec approach in which the "CBOW" neural
network with a layer size of 100 was used to generate type embedding. The three
embedding vectors (question, generic type and speci c type) were integrated
averaging the embedding for generic and speci c type followed by concatenating
with question's embedding. We modeled this problem as a binary classi cation
problem in which the given generic type and speci c type match the question in
the positive examples, but not for negative examples. Because we lacked negative
examples to train the classi er, we generated negative examples by replacing the
speci c type in the positive instances by another type that shares the same
parent type in the hierarchy but not a correct speci c type (see Fig. 2). The positive
instances were labeled as \1" (output variable) and the negative instances were
labeled as \0". The resulting dataset was split into 2 subsets: training set (80%)
and validation set (20%). The random forest model was trained on the training
set and achieved an accuracy of 0.89 on the validation data. Finally the random
forest model is used to provide the top-K predictions (question, generic type and
speci c type) for a given question and a generic type (obtained from the previous
text classi er). We report that our nal submission using the proposed work ow
achieves 0.62 and 0.61 using NDCG@5 and NDCG@10 metrics respectively for
the DBpedia set. The correct handling of negative example selection has an
impact on this stage and proper hierarchical structures that take advantage of the
underlying connections which we leave for future research direction. When there
are multiple classes to predict, these results can be improved upon via examplar
selection [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] and reasoning type methods for knowledge basis [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] for example.
4
      </p>
    </sec>
    <sec id="sec-4">
      <title>Conclusion</title>
      <p>Since most state-of-the-art classi ers have limited capabilities in granular classi
cation tasks, we propose a framework that focuses on hierarchical type prediction
thus enabling current methods to take advantage of this method for engineering
features that can subsequently improve upon the already existing
methodologies such as Random Forests. Our methodology consists of a 3-step process. In
step one, by using o -the-shelf multi-class text algorithms, the task of category
prediction and type prediction, was separated from general versus speci c
predictions, thereby ignoring type hierarchy. The models' accuracy levels are 0:95
and 0:73 for category and generic type classi cation respectively. Next, a third
classi er is trained to predict speci c types using the previous general
categorization results. By combining the feature vectors from the question text, general
prediction, and speci c type, and applying averaging to their embeddings into a
xed size binary classi cation method, we determine a positive versus negative
speci c type for a given generic one. We report performance of the frame-work
on granular categorization data for `resource' categories using ontologies classes
including the DBpedia using NDCG@5 and NDCG@10 metrics. For test, we achieve
0:62 and 0:61, respectively in top-K prediction task and aim this for future
research direction.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Awasthi</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ghosh</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Goyal</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sarawagi</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Learning from rules generalizing labeled exemplars</article-title>
          . cs/arXiv abs/
          <year>2004</year>
          .06025 (
          <year>2020</year>
          ), https://arxiv.org/abs/
          <year>2004</year>
          .06025
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Bogatyy</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          :
          <article-title>Predicting answer types for question-answering (</article-title>
          <year>2016</year>
          ), https://cs224d.stanford.edu/reports/Bogatyy.pdf
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Hochreiter</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schmidhuber</surname>
            ,
            <given-names>J.:</given-names>
          </string-name>
          <article-title>Long short-term memory</article-title>
          .
          <source>Neural Comput</source>
          .
          <volume>9</volume>
          (
          <issue>8</issue>
          ),
          <volume>1735</volume>
          {1780 (Nov
          <year>1997</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Howard</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gugger</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Fastai: A layered api for deep learning</article-title>
          .
          <source>Information</source>
          <volume>11</volume>
          (
          <issue>2</issue>
          ),
          <volume>108</volume>
          (Feb
          <year>2020</year>
          ). https://doi.org/10.3390/info11020108
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Mihindukulasooriya</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dubey</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gliozzo</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lehmann</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ngomo</surname>
            ,
            <given-names>A.C.N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Usbeck</surname>
          </string-name>
          , R.:
          <article-title>SeMantic AnsweR Type prediction task (SMART) at ISWC 2020 Semantic Web Challenge</article-title>
          . CoRR/arXiv abs/
          <year>2012</year>
          .00555 (
          <year>2020</year>
          ), https://arxiv.org/abs/
          <year>2012</year>
          .00555
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Mikolov</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chen</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Corrado</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dean</surname>
            ,
            <given-names>J.:</given-names>
          </string-name>
          <article-title>E cient estimation of word representations in vector space (</article-title>
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Murdock</surname>
            ,
            <given-names>J.W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kalyanpur</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Welty</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fan</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ferrucci</surname>
            ,
            <given-names>D.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gondek</surname>
            ,
            <given-names>D.C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhang</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kanayama</surname>
          </string-name>
          , H.:
          <article-title>Typing candidate answers using type coercion</article-title>
          .
          <source>IBM Journal of Research and Development</source>
          <volume>56</volume>
          (
          <issue>3</issue>
          .4), 7:
          <issue>1</issue>
          {7:
          <issue>13</issue>
          (
          <year>2012</year>
          ). https://doi.org/10.1147/JRD.
          <year>2012</year>
          .2187036
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Reimers</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gurevych</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          :
          <article-title>Sentence-bert: Sentence embeddings using siamese bertnetworks</article-title>
          .
          <source>In: Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing. Association for Computational Linguistics (11</source>
          <year>2019</year>
          ), http://arxiv.org/abs/
          <year>1908</year>
          .10084
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Socher</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chen</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Manning</surname>
            ,
            <given-names>C.D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ng</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Reasoning with neural tensor networks for knowledge base completion</article-title>
          . In: Burges,
          <string-name>
            <given-names>C.J.C.</given-names>
            ,
            <surname>Bottou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            ,
            <surname>Welling</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Ghahramani</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            ,
            <surname>Weinberger</surname>
          </string-name>
          ,
          <string-name>
            <surname>K.Q</surname>
          </string-name>
          . (eds.)
          <source>Advances in Neural Information Processing Systems</source>
          . vol.
          <volume>26</volume>
          , pp.
          <volume>926</volume>
          {
          <fpage>934</fpage>
          . Curran Associates, Inc. (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Sun</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          , Ma, H.,
          <string-name>
            <surname>Yih</surname>
          </string-name>
          , W.t.,
          <string-name>
            <surname>Tsai</surname>
            ,
            <given-names>C.T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Liu</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chang</surname>
            ,
            <given-names>M.W.</given-names>
          </string-name>
          :
          <article-title>Open domain question answering via semantic enrichment</article-title>
          .
          <source>In: Proceedings of the 24th International Conference on World Wide Web</source>
          . p.
          <volume>1045</volume>
          {
          <fpage>1055</fpage>
          . WWW '15,
          <string-name>
            <given-names>International</given-names>
            <surname>World Wide Web Conferences Steering Committee</surname>
          </string-name>
          , Republic and Canton of Geneva, CHE (
          <year>2015</year>
          ). https://doi.org/10.1145/2736277.2741651
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Yavuz</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gur</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Su</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Srivatsa</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Yan</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          :
          <article-title>Improving semantic parsing via answer type inference</article-title>
          .
          <source>In: Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing</source>
          . pp.
          <volume>149</volume>
          {
          <fpage>159</fpage>
          . Association for Computational Linguistics, Austin, Texas (Nov
          <year>2016</year>
          ). https://doi.org/10.18653/v1/
          <fpage>D16</fpage>
          -1015
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>