<!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>Factuality Classification Using BERT Embeddings and Support Vector Machines</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Biswarup Ray</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Avishek Garain</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Computer Science and Engineering, Jadavpur University</institution>
          ,
          <addr-line>Kolkata-700032, West Bengal</addr-line>
          ,
          <country country="IN">India</country>
        </aff>
      </contrib-group>
      <fpage>214</fpage>
      <lpage>221</lpage>
      <abstract>
        <p>For any topic, its factuality can be defined as the category that determines the status of events with certainty of presentation of them. The first edition of the FACT task mainly focused on determination of the factuality of verb based events. The present edition is aimed at identifying noun based events and determine the factuality of all events be it verbs or nouns. We have participated in Subtask-1 of FACT 2020 task which is to automatically propose a factual tag for each event in the text. In this paper we have presented a method which extracts various features like BERT embeddings, Word2Vec embeddings and TF-IDF (Term Frequency-Inverse Document Frequency) scores of commonly recurring words, along with other manually extracted features as input features and passes them through a SVM (Support Vector Machine) classifier for classification purposes. Our system has achieved a f1-score of 36.6% and accuracy of 59.9% which is quite satisfactory relative to performance of other systems.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;BERT</kwd>
        <kwd>embeddings</kwd>
        <kwd>Factuality</kwd>
        <kwd>SVM</kwd>
        <kwd>Word2Vec</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        the fact-verification pipeline is quite challenging, despite the recent progress in natural language
processing, databases and information retrieval [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Many prior studies had begun by manual
inspection of tweet messages in the training datasets to come up with an initial curated list of
word features. It was found that these words could be categorized into meaningful groups which
have been useful in identifying an author’s certainty in journalism, detecting disagreement in
online dialogue and determining veracity of rumors [
        <xref ref-type="bibr" rid="ref2 ref3 ref4">2, 3, 4</xref>
        ] .
      </p>
      <p>The verification of facts in this task, that is, the commitment of the source to the truth-value of
the event is not in context of real word problems but is just assessed on basis of the way these
facts are presented by the annotator. In view of this perspective, the task can be conceived as a
core methodology for other tasks ranging from fake-news to fact-checking, paving way for future
tasks like comparison of what is narrated in the text (fact tagging) to what is happening in the
world (fact-checking and fake-news). Here, we have designed a system which extracts various
word based features making use of BERT pretained vectors along with other manually extracted
features as input features and classifies them into corresponding classes using a SVM (Support
Vector Machine) classifier.</p>
      <p>The rest of the paper has been organized as follows. Previous works related to this task have been
briefly described in Section 2. Section 3 describes the data on which the task was performed. The
methodology followed is described in Section 4. This is followed by the results and concluding
remarks in Section 5 and 6 respectively.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Related Works</title>
      <p>
        In 2019, the FACT shared task (Factuality Annotation and Classification Task), was hosted by the
First Iberian Languages Evaluation Forum (IberLEF) [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. The corpus contained Spanish texts
with more than 5,000 events classified as F (Fact), CF (Counterfact), U (Undefined). The corpus
was divided in two subcorpora: the training corpus (80%), and the testing corpus (20%). Many
teams participated and proposed different system designs for the task.
      </p>
      <p>
        Premjith et al.[
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] proposed a system based on word embeddings using a Random Forest classifier.
Since the data was unbalanced in nature, the implementation assigned a higher weight to the (CF)
label to improve the prediction of the less frequent categories. The model obtained an accuracy
of 72.1% and a Macro F1-score of 0.561 when tested.
      </p>
      <p>
        Giudice [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] proposed a system with a character-level convolutional recurrent neural network.
It took advantage of tokenization to classify individual words within the text. Each word was
represented as a fixed-size list of vectors. An event flag was added to indicate whether the word
represented an event or not. In the final step a dense layer was applied to get, classification for
each word among one of the three classes.The system obtained an accuracy of 63.5% and a Macro
F1-score of 0.554 when tested.
      </p>
      <p>
        For this task, Mao [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] chose BERT-Base, multilingual cased model. The corpus was divided into
two parts, Uruguayan texts and Spanish texts for the training task. The training and the prediction
for the categories for each subcorpus was made separately for the two models. Finally, both
outputs were combined in order to create the final result. The model obtained an accuracy of
62.2% and a Macro F1-score of 0.489 when tested.
Another team macro128 (Pastorini) utilized SentencePiece tokenizer in its pre-processing phase.
Pre-trained BERT language model was used having one end layer classifying each token among
the three possible categories. Since each and every words were not initially classified, each token
was randomly assigned to a category.The model was initially trained without the classification
layer, until convergence, for a maximum of 100 epochs. The entire model was then trained to
converge for a maximum of 100 epochs using F1 measure for early stopping. The system obtained
an accuracy of 57.9% and a Macro F1-score of 0.362 when tested.
      </p>
    </sec>
    <sec id="sec-3">
      <title>3. Data</title>
      <p>The corpus that has been used for this task contains Spanish texts with approximately 6,300 events
classified into respective categories of factuality. The texts belong to the journalistic register and
most of them are from the political sections from Spanish and Uruguayan newspaper. The three
possible categories established in the dataset are:
• Fact (F): current and past situations in the world that are presented as real.
• Counterfact (CF): current and past situations that the writer presents as not having happened.
• Undefined (U): Possibilities, future situations, predictions, hypothesis and other options.
Words have been tagged with these factuality tags. All these words are related to some event
and proper placement in the sentences converts the sentences into events. We have divided the
dataset in the ratio 80:20 for training and validation purposes respectively. The distribution of
data instances is given in Table 1.</p>
      <sec id="sec-3-1">
        <title>Label F CF U</title>
        <p>All</p>
      </sec>
      <sec id="sec-3-2">
        <title>Train</title>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Methodology</title>
      <p>For FACT Task, our method is based on a SVM classifier with BERT embeddings, Word2Vec
embeddings and TF-IDF (Term Frequency-Inverse Document Frequency) of commonly recurring
words as input features. The system architecture for the proposed method is represented in Fig.1</p>
      <sec id="sec-4-1">
        <title>4.1. Feature Extraction</title>
        <p>
          For the BERT [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ] embeddings firstly, for a given sentence, rfist token representation is obtained
from the pre-trained BERT model using the help of a WordPiece model (cased). The pre-trained
BERT models are pre-trained on large corpus (Wikipedia + BookCorpus). In FACT, we utilised
a BERT-Base, multilingual cased model as: First, multilingual model are much better than
English-only models for Spanish documents in FACT as the strictly-English models split tokens
unavailable in its vocabulary into sub-tokens, which affects the accuracy of the classification
task. Also BERT-Large generally outperforms BERT-Base in NLP tasks in English language,
BERT-Large versions of multilingual models haven’t been published yet.The tokens are indexed
and alongwith their segment ids are fed to a BERT model as torch tensors which are termed as
the input embeddings. The output given by the final hidden layer has four dimensions, in the
order of:
• The number of the layer (13 layers). The first element is the input embeddings, the rest are
the outputs of each of BERT’s 12 layers.
• Batch number (number of sentences)
• Word / token number (number of tokens in the sentence)
• Feature number (768 features)
The batch dimension is not needed hence it is removed. The output is then permuted into the
desired dimension of [,  ,   ]. To get a single vector for an entire sentence a
simple approach is used by averaging the second to last hidden layer of each token producing a
single vector of length 768. The value of these vectors are contextually dependent.
An example of input embeddings for a particular sentence to find the BERT embeddings from the
BERT model is shown in Fig.2
        </p>
        <p>The vector representation of each of the word is produced using the Gensim module. The
vectors of each word are the context in which the words appear (Word2Vec). Each of the texts
is also converted into numerical vectors using the word vectors produced. Thus, we train the
Doc2Vec model by feeding in our text data. By applying this model on the texts, we get the
representation vectors.</p>
        <p>The manually extracted features thus added to the model for classification apart from the BERT
embeddings are:</p>
        <sec id="sec-4-1-1">
          <title>1. The vector representations obtained using Word2Vec.</title>
          <p>2. The TF-IDF for the words that frequently occur in the text are also added to the feature list.</p>
          <p>
            The TF computes the number of times a word recurs in the dataset, and IDF computes the
relative importance of the word which depends on how many times the word can be found,
and are added as features to filter and reduce the size of the final output.
3. Normalized counts of words with positive sentiment, negative sentiment and neutral
sentiment in Spanish by dividing with word count of the corresponding sentence. [
            <xref ref-type="bibr" rid="ref10">10</xref>
            ]
4. Normalized Frequency of auxiliary verbs like "es", "estaba", "son", "fueron" by dividing
by word count of the sentence.
5. Subjectivity score of the text (calculated using predefined libraries). [
            <xref ref-type="bibr" rid="ref11">11</xref>
            ]
          </p>
        </sec>
      </sec>
      <sec id="sec-4-2">
        <title>4.2. Classification</title>
        <p>
          For the classification task the features extracted through the various above mentioned processes
are selected by using the feature importance rankings for each feature. To train the SVM (Support
Vector Machine) with a linear kernel [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ] model the categorical labels present for the data were
label encoded into numerical values. The numerical labels along with the selected features were
used to train the SVM model. As done in the work [
          <xref ref-type="bibr" rid="ref13">13</xref>
          ], class weights were assigned to the
SVM model as the dataset is unbalanced and contains a very low quantity of texts having the
Counterfact (CF) label.
        </p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>5. Results</title>
      <p>The FACT corpus contains Spanish texts with approximately 6,300 events classified into respective
categories of F (Fact), CF (Counterfact), and U (Undefined).</p>
      <p>In FACT, the performance is measured against the evaluation corpus using the Macro-F1(%),
Macro-Precision(%), Macro-Recall(%), Accuracy(%) and Global accuracy metrics. Macro-F1 is
the most important measure for this task. We have presented the results for the unknown test set
in Table.2. As shown in Table.2 our proposed method outperformed the FACT baseline in all
of the metrics: Macro-F1(%), Macro-Precision(%), Macro-Recall(%), Accuracy(%) and Global
accuracy. Using class weights is one of the main reason for the better performance as it ensures
lesser misclassification of the label CF present in much lesser quantity than other labels. Also
using various features and implementing feature selection for the classification task ensures better
performance.</p>
      <sec id="sec-5-1">
        <title>Model</title>
      </sec>
      <sec id="sec-5-2">
        <title>Our model FACT_baseline</title>
      </sec>
      <sec id="sec-5-3">
        <title>Macro-F1(%)</title>
      </sec>
      <sec id="sec-5-4">
        <title>Macro-Precision(%)</title>
      </sec>
      <sec id="sec-5-5">
        <title>Macro-Recall(%) Accuracy(%) 36.6 24.6</title>
        <p>However the lower performance of the proposed method may be due to the poor performance
of the SVM model as word vectors may be highly non-linearly separable. Also even with
class weights the lower number of instances in the CF class in the training data is a reason for
misclassification.</p>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>6. Conclusion</title>
      <p>We have presented our system that we have used for participating in the FACT: Factuality Analysis
and Classification Task in IberLEF 2020. Considering previous approaches, our approach is
a comparatively different approach in terms of architecture as well as methodology of feature
extraction. It is a generalized and versatile framework and has showed satisfactory performance
among all participating systems during the FACT 2020 evaluations. In future works, we will use
an ensemble of different classification models to increase the performance and we will explore
some practical applications such as fake news detection, etc.
[17] A. Garain, S. K. Mahata, S. Dutta, Normalization of numeronyms using nlp techniques, in:
2020 IEEE Calcutta Conference (CALCON), 2020, pp. 7–9.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>A.</given-names>
            <surname>Vlachos</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Riedel</surname>
          </string-name>
          ,
          <article-title>Fact checking: Task definition and dataset construction</article-title>
          ,
          <source>in: Proceedings of the ACL 2014 Workshop on Language Technologies and Computational Social Science</source>
          ,
          <year>2014</year>
          , pp.
          <fpage>18</fpage>
          -
          <lpage>22</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>A.</given-names>
            <surname>Misra</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Walker</surname>
          </string-name>
          ,
          <article-title>Topic independent identification of agreement and disagreement in social media dialogue</article-title>
          ,
          <source>arXiv preprint arXiv:1709.00661</source>
          (
          <year>2017</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>U. D.</given-names>
            <surname>Reichel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Lendvai</surname>
          </string-name>
          ,
          <article-title>Veracity computing from lexical cues and perceived certainty trends</article-title>
          ,
          <source>arXiv preprint arXiv:1611.02590</source>
          (
          <year>2016</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>S.</given-names>
            <surname>Soni</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Mitra</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Gilbert</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Eisenstein</surname>
          </string-name>
          ,
          <article-title>Modeling factuality judgments in social media text</article-title>
          ,
          <source>in: Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics (Volume</source>
          <volume>2</volume>
          :
          <string-name>
            <surname>Short</surname>
            <given-names>Papers)</given-names>
          </string-name>
          ,
          <year>2014</year>
          , pp.
          <fpage>415</fpage>
          -
          <lpage>420</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>A.</given-names>
            <surname>Rosa</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Castellón</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Chiruzzo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Curell</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Etcheverry</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Fernández</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Vázquez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Wonsever</surname>
          </string-name>
          , Overview of fact at iberlef 2019:
          <article-title>Factuality analysis</article-title>
          and
          <source>classification task</source>
          ,
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>B.</given-names>
            <surname>Premjith</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K. P.</given-names>
            <surname>Soman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Poornachandran</surname>
          </string-name>
          ,
          <article-title>Amrita_cen@fact: Factuality identification in spanish text</article-title>
          , in: IberLEF@SEPLN,
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>V.</given-names>
            <surname>Giudice</surname>
          </string-name>
          , Aspie96 at fact (iberlef
          <year>2019</year>
          )
          <article-title>: Factuality classification in spanish texts with character-level convolutional rnn and tokenization</article-title>
          , in: IberLEF@SEPLN,
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>J.</given-names>
            <surname>Mao</surname>
          </string-name>
          , W. Liu,
          <article-title>Factuality classification using the pre-trained language representation model bert</article-title>
          , in: IberLEF@SEPLN,
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>J.</given-names>
            <surname>Devlin</surname>
          </string-name>
          , M.-
          <string-name>
            <given-names>W.</given-names>
            <surname>Chang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Lee</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Toutanova</surname>
          </string-name>
          , Bert:
          <article-title>Pre-training of deep bidirectional transformers for language understanding</article-title>
          ,
          <year>2018</year>
          . arXiv:
          <year>1810</year>
          .04805.
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>A.</given-names>
            <surname>Garain</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. K.</given-names>
            <surname>Mahata</surname>
          </string-name>
          ,
          <article-title>Sentiment analysis at sepln (tass)-2019: Sentiment analysis at tweet level using deep learning (</article-title>
          <year>2019</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>A.</given-names>
            <surname>Garain</surname>
          </string-name>
          ,
          <article-title>Humor analysis based on human annotation (haha)-2019: Humor analysis at tweet level using deep learning (</article-title>
          <year>2019</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>C.</given-names>
            <surname>Cortes</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Vapnik</surname>
          </string-name>
          ,
          <article-title>Support-vector networks</article-title>
          ,
          <source>Machine Learning</source>
          <volume>20</volume>
          (
          <year>1995</year>
          )
          <fpage>273</fpage>
          -
          <lpage>297</lpage>
          . URL: https://doi.org/10.1007/BF00994018. doi:
          <volume>10</volume>
          .1007/BF00994018.
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>A.</given-names>
            <surname>Garain</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Basu</surname>
          </string-name>
          , The titans at semeval
          <article-title>-2019 task 5: Detection of hate speech against immigrants and women in twitter</article-title>
          ,
          <source>in: Proceedings of the 13th International Workshop on Semantic Evaluation</source>
          ,
          <year>2019</year>
          , pp.
          <fpage>494</fpage>
          -
          <lpage>497</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>A.</given-names>
            <surname>Rosá</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Alonso</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Castellón</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Chiruzzo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Curell</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Fernández</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Góngora</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Malcuori</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Vázquez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Wonsever</surname>
          </string-name>
          , Overview of fact at iberlef 2020:
          <article-title>Events detection and classification (</article-title>
          <year>2020</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>J.</given-names>
            <surname>Mao</surname>
          </string-name>
          , W. Liu,
          <article-title>Factuality classification using the pre-trained language representation model bert</article-title>
          ., in: IberLEF@ SEPLN,
          <year>2019</year>
          , pp.
          <fpage>126</fpage>
          -
          <lpage>131</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>A.</given-names>
            <surname>Garain</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Basu</surname>
          </string-name>
          , The titans at semeval
          <article-title>-2019 task 6: Offensive language identification, categorization and target identification</article-title>
          ,
          <source>in: Proceedings of the 13th International Workshop on Semantic Evaluation</source>
          ,
          <year>2019</year>
          , pp.
          <fpage>759</fpage>
          -
          <lpage>762</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>