<!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>DA Master at HASOC 2019: Identi cation of Hate Speech using Machine Learning and Deep Learning approaches for social media post</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Apurva Parikh</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Harsh Desai</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Abhimanyu Singh Bisht</string-name>
          <email>bisht2492g@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>DA-IICT</institution>
          ,
          <addr-line>Gujarat</addr-line>
          ,
          <country country="IN">India</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>This paper describes the research that our team, DA Master, did on the shared task HASOC, conducted by FIRE-2019, which involves identi cation of hate and o ensive language in Twitter and Facebook posts. The task is divided into three sub-tasks. Our team conducted our experiments on an English dataset. We employed Machine Learning techniques like Logistic Regression and Navies Bayes classi er and a Deep Learning based approach which utilizes Convolutional Neural Networks. Our best model obtained Macro F1 score of 0.6472 for SubTask-A, 0.4068 for SubTask-B and 0.4303 for SubTask-C.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>In the past few years, there has been an exponential rise in the number of
people who have uninhibited access to the internet. The arrival of the "Netizen"
populace, and their a nity for interacting via social media platforms like
Twitter, Facebook, Instagram etc. has led to the manifestation of diverse online user
behaviour. Sometimes the online behaviour exhibited by individuals on social
media platforms is hostile, targeting an individual(s) or a community by posting
insults or threats. Studies have shown that hate/o ensive messages are
becoming extremely common on social media platforms, accounting for almost 500
million posts daily on Twitter1. Thus, the problem of detecting and sti ing the
propagation of hateful or o ensive posts on social media is a pertinent issue for
research.</p>
      <p>
        To promote research in this eld several competitions have been organized,
such as O enseEval[
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], GermanEval[
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. Recently, HASOC [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] was organized as
a shared task for FIRE 2019. The task is aimed at identifying hateful and o
ensive language in social media posts. The task was organized for three languages
namely English, Hindi and German, but our team conducted our investigation
only on the English dataset.
      </p>
      <p>Organizers proposed a hierarchical model which consists of three sub-tasks:
{ TASK-A: Identi cation of hate and o ensive language, posts are
classi ed as follows:</p>
      <p>Hate and O ensive(HOF)</p>
      <p>Not Hate and O ensive(NOT)
{ TASK-B: Categorization of Hate and O ensive, posts identi ed as
HOF in task-A are further categorized as:</p>
      <p>Hate Speech(HATE)
O ensive(OFFN)</p>
      <p>Profane(PRFN)
{ TASK-C: Identi cation of target,in which posts identi ed as HOF in
task-A are further classi ed on the basis of whether the post targets a
particular individual/group or not.</p>
      <p>Targeted Insult(TIN)</p>
      <p>Untargeted Insult(UNT)</p>
      <p>The rest of paper is organized as follows. In Section 2 we discuss related
works and the dataset is discussed in Section 3. Proposed methods are presented
in Section 4 and the results in Section 5. Finally, we conclude our work in Section
6.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Related Work</title>
      <p>
        The past few years have seen an increase in aggressive user behaviour on
social media platforms, usually exhibited via the use of targeted or untargeted
hateful and o ensive language. This has encouraged NLP researchers to work in
this eld and develop automatic detection systems to preemptively discard such
posts. The term hate speech was coined by [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. Hate speech detection proposed
by [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] used a Convolutional Neural Network with Word2Vec for classifcation.
Schmidt and Wiegand [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] gave a detailed survey on hate speech detection using
Natural Language Processing. They identi ed various features for hate speech
like words, sentiment, linguistic, etc. After performing various experiments they
observed that, bag of words or word embedding based representation gave better
classi cation results, a character-level approach works better than token-level,
sometimes the text may not contain hate speech but it may be accompanied by
images or other media which might contain hateful messages.
      </p>
      <p>
        Recent work on the topic by [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] has focused on the type and target of the
o ensive language and was the rst to categorically de ne o ensive language.
They created a dataset based on these distinctions which was used to train
models utilizing SVM, BiLSTM and CNN.
3
      </p>
    </sec>
    <sec id="sec-3">
      <title>Dataset</title>
      <p>
        The datasets provided by the organizers [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] were annotated in a hierarchical
fashion. Table 1 shows detailed analysis of the provided datasets.
It can be observed from Table 1 that the train data for TASK-A consists of 61%
Non Hate posts and 39% were classi ed as hateful, o ensive or profane, whereas
TASK-B has a distribution of approximately 50% Hate , 30% O ensive and 20%
Profane posts, and more than 90% of the TASK-C dataset are posts which are
targeted insults and the remaining are untargeted insults.
      </p>
      <p>Therefore, only 39% of the given data can be used for training further tasks.
There is a huge imbalance in TASK-C data.</p>
      <p>The authors have provided 1153 posts for testing, which were to be lled based
on a prediction of model.
4</p>
    </sec>
    <sec id="sec-4">
      <title>Proposed Method</title>
      <p>For our experiment we used two approaches. For the rst approach we
represented the input features using CountVectorizer and T df, which were then used
to train logistic regression and Naive-Bayes classi ers. The models used were
imported from the Scikit-learn Python package.</p>
      <p>
        Our second implementation took inspiration from [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. Our model used a
hierarchical CNN i.e 3 layers of 1D convolution. The words were represented using
pre-trained GloVe [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] 200d vectors. No data pre-processing was performed by in
any of the experiments.
5
      </p>
    </sec>
    <sec id="sec-5">
      <title>Results 6</title>
    </sec>
    <sec id="sec-6">
      <title>Conclusion</title>
      <p>The organizers had allowed a maximum of 3 submission for each sub-tasks.
Macro F1 Score was the primary metric for evaluation. Table 2 shows results
obtained by our methods and that of top performed of each task. Figure 1, 2, 3
show confusion matrix of our best performing system for all three sub-tasks.
In this paper we have presented two approaches to solve the hierarchical task of
detecting and classifying hate speech and o ensive posts. The accuracy of our
methods did not cross 70% for any of the sub-tasks. The methods used did not
perform well when for the sub-task B, a possible reason for it may have been
that, the model could not di erentiate between profane, hateful and o ensive
posts properly. Our future experiments will try to solve the problem of class
imbalance by using data augmentation and explore the e ciency of pre-trained
language models like ULMFit, XLNet, RoBERTa for tackling this hierarchical
task.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>Marcos</given-names>
            <surname>Zampieri</surname>
          </string-name>
          , Shervin Malmasi, Preslav Nakov, Sara Rosenthal, Noura Farra, and
          <string-name>
            <given-names>Ritesh</given-names>
            <surname>Kumar</surname>
          </string-name>
          . Semeval
          <article-title>-2019 task 6: Identifying and categorizing o ensive language in social media (o enseval)</article-title>
          .
          <source>In Proceedings of the 13th International Workshop on Semantic Evaluation</source>
          , pages
          <volume>75</volume>
          {
          <fpage>86</fpage>
          ,
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>Michael</given-names>
            <surname>Wiegand</surname>
          </string-name>
          , Melanie Siegel, and
          <string-name>
            <given-names>Josef</given-names>
            <surname>Ruppenhofer</surname>
          </string-name>
          .
          <article-title>Overview of the germeval 2018 shared task on the identi cation of o ensive language</article-title>
          .
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>Sandip</given-names>
            <surname>Modha</surname>
          </string-name>
          , Thomas Mandl, Prasenjit Majumder, and
          <string-name>
            <given-names>Daksh</given-names>
            <surname>Patel</surname>
          </string-name>
          .
          <article-title>Overview of the HASOC track at FIRE 2019: Hate Speech and O ensive Content Identi cation in Indo-European Languages</article-title>
          .
          <source>In Proceedings of the 11th annual meeting of the Forum for Information Retrieval Evaluation</source>
          ,
          <year>December 2019</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>William</given-names>
            <surname>Warner</surname>
          </string-name>
          and
          <string-name>
            <given-names>Julia</given-names>
            <surname>Hirschberg</surname>
          </string-name>
          .
          <article-title>Detecting hate speech on the world wide web</article-title>
          .
          <source>In Proceedings of the Second Workshop on Language in Social Media</source>
          , pages
          <volume>19</volume>
          {
          <fpage>26</fpage>
          . Association for Computational Linguistics,
          <year>2012</year>
          . URL https://www.aclweb.org/anthology/W12-2103.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>Bj</surname>
          </string-name>
          <article-title>orn Gamback and Utpal Kumar Sikdar</article-title>
          .
          <article-title>Using convolutional neural networks to classify hate-speech</article-title>
          .
          <source>In Proceedings of the First Workshop on Abusive Language Online</source>
          , pages
          <volume>85</volume>
          {
          <fpage>90</fpage>
          . Association for Computational Linguistics,
          <year>2017</year>
          . https://doi.org/10.18653/v1/
          <fpage>W17</fpage>
          -3013. URL https: //www.aclweb.org/anthology/W17-3013.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>Anna</given-names>
            <surname>Schmidt</surname>
          </string-name>
          and
          <string-name>
            <given-names>Michael</given-names>
            <surname>Wiegand</surname>
          </string-name>
          .
          <article-title>A survey on hate speech detection using natural language processing</article-title>
          .
          <source>In Proceedings of the Fifth International Workshop on Natural Language Processing for Social Media</source>
          , pages
          <volume>1</volume>
          {
          <fpage>10</fpage>
          ,
          <string-name>
            <surname>Valencia</surname>
          </string-name>
          , Spain,
          <year>April 2017</year>
          .
          <article-title>Association for Computational Linguistics</article-title>
          . https://doi.org/10.18653/v1/
          <fpage>W17</fpage>
          -1101. URL https://www.aclweb. org/anthology/W17-1101.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>Marcos</given-names>
            <surname>Zampieri</surname>
          </string-name>
          , Shervin Malmasi, Preslav Nakov, Sara Rosenthal, Noura Farra, and
          <string-name>
            <given-names>Ritesh</given-names>
            <surname>Kumar</surname>
          </string-name>
          .
          <article-title>Predicting the type and target of o ensive posts in social media</article-title>
          .
          <source>pages 1415{1420</source>
          ,
          <fpage>01</fpage>
          <lpage>2019</lpage>
          . https://doi.org/10.18653/v1/
          <fpage>N19</fpage>
          - 1144.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>Kim</given-names>
            <surname>Yoon</surname>
          </string-name>
          .
          <article-title>Convolutional neural networks for sentence classi cation</article-title>
          .
          <source>In Empirical Methods in Natural Language Processing (EMNLP)</source>
          , pages
          <fpage>1746</fpage>
          {
          <fpage>1751</fpage>
          ,
          <year>2014</year>
          . URL http://aclweb.org/anthology/D/D14/D14-1181.pdf.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <surname>Je</surname>
            <given-names>rey Pennington</given-names>
          </string-name>
          , Richard Socher, and
          <string-name>
            <given-names>Christopher D.</given-names>
            <surname>Manning</surname>
          </string-name>
          . Glove:
          <article-title>Global vectors for word representation</article-title>
          .
          <source>In Empirical Methods in Natural Language Processing (EMNLP)</source>
          , pages
          <fpage>1532</fpage>
          {
          <fpage>1543</fpage>
          ,
          <year>2014</year>
          . URL http://www. aclweb.org/anthology/D14-1162.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>