<!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>CIT Kokra jhar Team: LSTM based Deep RNN Architecture for Hate Speech and O ensive Content (HASOC) Identi cation in Indo-European Languages</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Baidya Nath Saha</string-name>
          <email>baidya.saha@concordia.ab.ca</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Apurbalal Senapati</string-name>
          <email>a.senapati@cit.ac.in</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Central Institute of Technology</institution>
          ,
          <addr-line>Kokrajhar BTAD, Assam 783370</addr-line>
          ,
          <country country="IN">India</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Concordia University of Edmonton</institution>
          ,
          <addr-line>Edmonton AB T5B 4E4</addr-line>
          ,
          <country country="CA">Canada</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Recently, automated hate speech and o ensive content identi cation has received signi cant attention due to rapid propagation of cyberbullying which undermines objective discussions in social media and adversely a ects the outcome of the online social democratic processes. A special type of Recurrent Neural Network (RNN) based deep learning approach called Long Short Term Memory (LSTM) is implemented for automatic hate speech and o ensvie content identi cation. Separating o ensive content is quite challenging because the abusive language is quite subjective in nature and highly context dependent. This paper3 o ers language-agnostic solution in three Indo-European languages (English, German, and Hindi) since no pre-trained word embedding is used. Experimental results o er very attractive insights.</p>
      </abstract>
      <kwd-group>
        <kwd>Hate Speech Dtection O ensive Content Identi cation Long Short Term Memory (LSTM) Recurrent Neural Network (RNN)</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Social media communications induce strong impact on public opinion and some
social platforms possess enough social capital to in uence the outcome of
democratic processes [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. However, hate speech and o ensive language such as
insulting, hurtful, derogatory and objectionable obscene content seriously a ect the
dynamics and usefulness of online social communities. Public communication
potentially realizes substantive rational critical discourse [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. Hate and o ensive
content widely circulated in social media rejects or subverts the status quo of
objective discussions, leads to the polarization, stigmatization and radicalization
of public debates, and poses a potential threat to democratic society. However,
3 Copyright c 2019 for this paper by its authors. Use permitted under Creative
Commons License Attribution 4.0 International (CC BY 4.0). FIRE 2019, 12-15
December 2019, Kolkata, India
open societies need to adopt a means to restrict hate speech and o ensive content
by addressing speci c issues about intimidation or incitement, without
prohibiting the free exercise, and thereof abridging the freedoom of speech and enforcing
general social regulation. As a consequence, many platforms of social media
websites follow a standard measure by manually reviewing hefty online contents to
identify and delete o ensive materials which is a cumbersome process and not
sustainbale in reality. This leads to a pressing need for developing scalable,
automated methods for HAte Speech and O ensive Content (HASOC) identi cation
and has attracted signi cant research using semantic content analysis based on
Natural Language Processing (NLP) and Machine Learning (ML).
      </p>
      <p>
        Automating its' detection and then adpoting proper countermeasures could
reduce the propagation of HASOC signi cantly. However, it encounters severe
challenges such as disagreements in de ning hate speech depending on it's
subjectivity and context-dependent characteristics which make di cult to separate
hate speech from the remaining texts [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. From di erent cultural perspectives,
using abusive words while expressing opinion are not always regarded as
insulting or inciting hatred which indicates that some content can be considered hate
speech to some and not to others, based on their respective de nitions. On the
other hand, hate speech does not always contain o ensive words while o
ensive language does not always express hate. In addition, nuance and subtleties
in language provide further challenges in automatic hate speech identi cation,
however, it also depends on the de nition.
      </p>
      <p>
        This research portrays the HASOC identi cation problem as sentence classi
cation problem similar to sentiment analysis which is an active research area over
the last few years [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. Several researches have been founded on HASOC identi
cation in English. However, there are limited works found in other Indo-European
languages such as German and Hindi. Our approach employs a neural network
solution based on Long-Short-Term-Memory (LSTM). The intended methodology
does not use any pre-trained word embedding which provides language-agnostic
solution.
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>Data description</title>
      <p>
        Dataset has been created by FIRE 2019 organizers for the HASOC identi cation
shared task from the Twitter and Facebook in three Indo-European (German [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]
English and code-mixed hindi) and distributed in TSV (Tab Separated Value)
format [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. Training data corpus for English, German, and Hindi consist of 5853,
3820, and 4666 sentences respectively. Test data corpus for English, German,
and Hindi contain 1153, 850, and 1318 sentences respectively. There are three
tasks available in the dataset [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ], [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. Task 1 focuses on HASOC
identi cation o ered for English, German, Hindi. Task 1 is coarse-grained binary
classi cation where tweets data are classi ed into two class, namely: Hate and
OFfensive (HOF) and Non- hate and o ensive (NOT). HOF post contains hate,
o ensive, and profane content. A post is annotated as HOF if it contains any
form of non-acceptable language such as hate speech, aggression, and profanity.
NOT post does not contain any hate speech, and o ensive content. Task 2 is a
ne-grained classi cation. For task 2, hate-speech and o ensive posts from the
task 1 are further classi ed into three categories: HATE speech (HATE): posts
under this class contain hate speech content, OFFeNive (OFFN): posts under
this class contain o ensive content, and PRoFaNe (PRFN): these posts
contain profane words. Hate speech describes negative attributes or de ciencies to
groups of individuals because they are members of a group (e.g. all poor people
are stupid). These are hateful comment toward groups because of race, political
opinion, sexual orientation, gender, social status, health condition or similar.
Then degrading, dehumanizing, insulting an individual, threatening with
violent acts are categorized into o ensive category. Profanity is the unacceptable
language in the absence of insults and abuse. This typically concerns the usage
of swearwords (Schei e, Fuck etc.) and cursing (Zur Holle! Verdammt! etc.) are
categorized into PRFN category. Most posts belong to OTHER category, some
are HATE and the other two categories are less frequent. Dubious cases which
are di cult to decide even for humans, are left out. Task 3 examines the type
of o ense. Only posts labeled as HOF in task 1 are included in task 3. The two
categories in task3 include: (a) Targeted Insult (TIN): posts containing an
insult/threat to an individual, group, or others, and (b) Untargeted (UNT): posts
containing nontargeted profanity and swearing. Posts with general profanity are
not targeted, but they contain non-acceptable language.
3
      </p>
    </sec>
    <sec id="sec-3">
      <title>Methodology</title>
      <p>ft = (Wf [ht 1; xt] + bf )</p>
      <p>
        We developed a special type of Recurrent Neural Network (RNN) [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] based
deep learning approach called Long Short Term Memory (LSTM) to detect hate
speech and identify o ensive content in three Indo-European languages (Hindi,
English, and German). RNN is a family of neural networks used for processing
of sequential data. Traditional RNN can learn the model of complex
spatiotemporal dynamics by mapping the input sequence to a sequence of hidden
states, and the exit of the hidden states to the output layer.
Cct = tanh(WC [ht 1; xt] + bC )
Ct = ft
      </p>
      <p>Ct 1 + it</p>
      <p>Cct
ot = (Wo[ht 1; ht] + bo)
ht = ot tanh(Ct)</p>
      <p>
        Fig. 4. Output layer. Inspired from [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]
The rst step in LSTM network is to decide the information we are going to keep
so that it continues its path throughout the cell state. This decision is achieved
using a sigmoid layer called the layer of the forget gate. This layer can be seen
in Fig. 1 where the information is discriminated against when using a sigmoid
function. After this, the information that survived this process enters a new
layer where it is processed again by a sigmoid function and then recon gured in
another layer with a hyperbolic tangent function in order to create a vector of
new candidate values as observed in the Fig. 2.
      </p>
      <p>
        Then the old cell state, Ct 1 is updated into the new cell state Ct which is
demonstrated in Fig. 3. Finally, this new vector is ltered again using a
combination of sigmoid activation function and tangent hyperbolic as can be seen in
Fig. 4. The following notations are used for describing the LSTM netwotk:
{ xt 2 Rd is the input vector of LSTM unit
{ ft 2 Rh activation vector (forget gate)
{ it 2 Rh input and update of the gate vector
{ ot 2 Rh exit of the activation
{ ht 2 Rh hidden state vectors (exit vector of the LSTM unit)
{ Cct 2 Rh New candidate vectors for cell status
{ W y b Weight matrices and bias vectors that need to be learned during
network training
It is to be noted that Figures 1, 2, 3, and 4 are inspired from the online tutorial
"Understanding LSTM Networks" [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
4
      </p>
    </sec>
    <sec id="sec-4">
      <title>Experimental results and discussions</title>
      <p>In our experiment, we exploited the following architecture:</p>
      <p>word embedding ! LSTM with hidden layer ! Dense layer with a
neuron ! sigmoid activation function.</p>
      <p>Vectors length 128 for embeddings layer, 128 neurons in each hidden layer,
batch size 60, 10 number of epochs and a dropout of 20% were chosen for this
experiment. In order to establish the convergence of the network, binary and
categorical cross entropy type error function were used for two- and multi-class
classi cation respectively. ADAM optimizer was used for all the tasks classi
cation. We used the default parameters of Keras for ADAM optimizer.</p>
      <p>Results of LSTM based deep RNN architecture for task 1, task 2, and task
3 associated with HASOC identi cation are mentioned in Table 1, Table 2, and
Table 3 respectively. Binary cross-entropy loss function is used for binary
sentence classi cation: hate and o ensive (HOF) and non hate-o ensive classi
cation (NOT) associated with task 1. Categorical cross-entropy loss function is
used for multiclass sentence classi cation associated with task 2: hate speech
(HATE), o ensice (OFFN), profane (PRFN), and NOT and task 3: targeted
insult (TIN), untargeted insult (UNT), and NOT. Table 1, Table 2, and
Table 3 demonstrates the performance of LSTM based RNN claasi er in terms of
weighted average of accuracy, precision, recall and F-measure. Results
demonstrate that LSTM based RNN classi er performs better in German than English
and Hindi dataset.
Long Short Term Memory (LSTM) based Recurrent Neural Network (RNN) is
implemented for automatic HASOC identi cation in three Indo-European
languages: English, German, and Hindi. The potential challenge of HASOC
detection comes from its subjectivity and context-dependent characteristic. Proposed
methodology does not utilize any pre-trained model which leads to
languageneutral solution as well as there is no unwieldy feature engineering required
for the proposed model. In future, we would like to exploit other deep learning
models for HASOC identi cation.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <article-title>Understanding lstm networks</article-title>
          . https://colah.github.io/posts/2015-08- Understanding-LSTMs/, accessed:September,
          <year>2019</year>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Graves</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Supervised Sequence Labelling with Recurrent Neural Networks (</article-title>
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Habermas</surname>
          </string-name>
          , J.:
          <source>The Theory of Communicative Action</source>
          , Volume
          <volume>1</volume>
          :
          <article-title>Reason and the Rationalization of Society</article-title>
          . Boston: Beacon Press (
          <year>1984</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Kumar</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ojha</surname>
            ,
            <given-names>A.K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Malmasi</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zampieri</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Benchmarking aggression identi cation in social media</article-title>
          .
          <source>In: Proceedings of the First Workshop on Trolling</source>
          ,
          <article-title>Aggression and Cyberbullying (TRAC-</article-title>
          <year>2018</year>
          ) (aug
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Lee</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Yoon</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jung</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          :
          <article-title>Comparative studies of detecting abusive language on twitter</article-title>
          . CoRR abs/
          <year>1808</year>
          .10245 (
          <year>2018</year>
          ), http://arxiv.org/abs/
          <year>1808</year>
          .10245
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Modha</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mandl</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Majumder</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Patel</surname>
            ,
            <given-names>D.</given-names>
          </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>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Pang</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lee</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>Opinion mining and sentiment analysis</article-title>
          .
          <source>Found. Trends Inf. Retr</source>
          .
          <volume>2</volume>
          (
          <issue>1-2</issue>
          ),
          <volume>1</volume>
          {
          <fpage>135</fpage>
          (Jan
          <year>2008</year>
          ). https://doi.org/10.1561/1500000011, http://dx.doi.org/10.1561/1500000011
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Pitsilis</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ramampiaro</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Langseth</surname>
          </string-name>
          , H.:
          <article-title>E ective hate-speech detection in twitter data using recurrent neural networks</article-title>
          .
          <source>Applied Intelligence</source>
          p.
          <source>in press. (07</source>
          <year>2018</year>
          ). https://doi.org/10.1007/s10489-018-1242-y
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Wiegand</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Siegel</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ruppenhofer</surname>
          </string-name>
          , J.:
          <article-title>Overview of the germeval 2018 shared task on the identi cation of o ensive language</article-title>
          .
          <source>In: Proceedings of GermEval 2018, 14th Conference on Natural Language Processing (KONVENS</source>
          <year>2018</year>
          )
          <article-title>(09</article-title>
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Zampieri</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Malmasi</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nakov</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rosenthal</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Farra</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kumar</surname>
          </string-name>
          , R.:
          <article-title>Predicting the type and target of o ensive posts in social media</article-title>
          .
          <source>In: Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies</source>
          , Volume
          <volume>1</volume>
          (Long and Short Papers). pp.
          <volume>1415</volume>
          {
          <fpage>1420</fpage>
          . Association for Computational Linguistics, Minneapolis,
          <source>Minnesota (Jun</source>
          <year>2019</year>
          ). https://doi.org/10.18653/v1/
          <fpage>N19</fpage>
          -1144, https://www.aclweb.org/anthology/N19-1144
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Zampieri</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Malmasi</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nakov</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rosenthal</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Farra</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kumar</surname>
          </string-name>
          , R.:
          <article-title>Semeval-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>
          . pp.
          <volume>75</volume>
          {
          <issue>86</issue>
          (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>