<!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>IRIT-PREVISION AT HASOC 2020 : Fine-tuning BERT for Hate Speech and Offensive Content Identification</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Josiane Mothe</string-name>
          <email>Josiane.Mothe@irit.fr</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Pratik Parikh</string-name>
          <email>parikh.er@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Faneva Ramiandrisoa</string-name>
          <email>faneva.ramiandrisoa@irit.fr</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>IRIT, Université de Toulouse</institution>
          ,
          <country country="FR">France</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>This paper describes the participation of the IRIT-PREVISION team at HASOC (Hate Speech and Offensive Content Identification in Indo-European Languages) 2020 shared task. Our approach is based on ifne-tuning a pre-trained transformer based language model BERT (Bidirectional Encoder Representation from Transformer) [1]. We participated to the English sub-task A. We obtained a macro average F1 of 0.497 (self-computed).</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Information system</kwd>
        <kwd>Hate Speech Detection</kwd>
        <kwd>Social Media</kwd>
        <kwd>BERT</kwd>
        <kwd>Deep Learning</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>The rest of this paper is organized as follows: Section 2 presents related work in the area
of hate speech detection; Section 3 describes the HASOC 2020 shared task as well as the data
sets provided; Section 4 describes the methodology we proposed to answer the HASOC 2020
challenge as well as the preprocessing we developed; Section 5 presents the results we obtained;
ifnally, Section 6 concludes this paper and presents some future work.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Related Work</title>
      <p>
        Online detection of abusive language, hate speech, aggression, offensive content, etc. is an
important topic. Indeed, the number of users who are subject to or have witnessed hate speech or
offensive languages online is increasing [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] and can concern citizen, public persons, or
organizations. Detecting this type of content on social media platforms such as Facebook and Twitter is
an important challenge that authorities care about as illustrated for example by the recent French
government decisions 1 to force social media to act.
      </p>
      <p>
        In the past few years, a lot of research have been conducted to detect hate speech [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], offensive
language [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], and aggression [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. Supervised learning approaches are predominantly used to
solve the problem ranging from deep learning based methods [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] such as convolutional neural
networks (CNN) to traditional machine learning based methods [10] such as support vector
machine (SVM).
      </p>
      <p>
        During the first edition of HASOC (2019) [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], deep learning based methods were widely used
and achieved the top performances. However, it can also be observed that some of the non-deep
learning systems performances were quite close to the top ones. The team from IIIT-Hyderabad
even obtained the best result on one sub-task in Hindi language with traditional machine learning
[10].
      </p>
    </sec>
    <sec id="sec-3">
      <title>3. Task Description and Data</title>
      <p>HASOC is a shared task, where the goal is to detect hateful content in textual posts published on
social media, namely Twitter. This shared task is a multilingual track joining English, German,
and Hindi, and consists of two main sub-tasks:
1. Sub-task A (Identifying Hate, offensive and profane) : it focuses on Hate speech and
Offensive language identification offered for English, German, and Hindi. This sub-task
is a coarse-grained binary classification in which the objective is to classify tweets into
two classes : HOF (Hate and Offensive) and NOT (Non- Hate and Offensive).
2. Sub-task B (Discrimination between Hate, profane and offensive) : it is a fine-grained
classification for English, German, and Hindi. Here, the posts labeled as HOF from the
sub-task A are further classified into three categories : HATE (Hate speech), OFFN
(Offenive) and PRFN (Profane).</p>
      <p>
        No context or meta-data like the users’ network are provided [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ].
      </p>
      <p>1https://www.theguardian.com/world/2019/jul/09/france-online-hate-speech-law-social-media, accessed on
October 15ℎ , 2020.</p>
    </sec>
    <sec id="sec-4">
      <title>4. Methodology</title>
      <p>Before building our model, we pre-processed the data set: we converted all the texts into
lowercase, substituted all "URL" by "http", also substituted emoticon into their text equivalents by
using the online emoji project on github2. Finally, we removed all non UTF-8 words.</p>
      <p>
        During the HASOC 2020 shared task, we submitted only one model. Our model is based
on BERT or Bidirectional Encoder Representations from Transformers [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. More precisely, we
ifne-tuned a pre-trained BERT model called  _  _  which contains 24 layers
of size 1024, 16 self-attention heads and 340M parameters. Fine-tuning a pre-trained BERT
model is less expensive than training a BERT model from scratch and fine-tuning is also very
interesting and works well on small data sets which is the case of the HASOC data set. The
pretrained model we used was trained at Google on the corpus data composed of English Wikipedia
(2,500M words) and BooksCorpus (800M words) [11]. This pre-trained model is publicly
available on github3.
      </p>
      <p>During the fine-tuning, we used a batch size of 16, the Adam optimizer with a learning rate
of 5e-5 and a number of epochs of 10 as parameters. Each sequence is truncated to max allowed
sequence length of 40 characters. We used the library pytorch-pretrained-bert4 for
implementation. Training was carried out on a Nvidia Geforce GTX 1080TI GPU and took about 14 minutes
in total.</p>
      <p>2https://github.com/carpedm20/emoji, accessed on February, 04ℎ 2020.
3https://github.com/google-research/bert, accessed on February, 04ℎ 2020.</p>
      <p>4https://github.com/shehzaadzd/pytorch-pretrained-BERT, accessed on February, 04ℎ 2020.</p>
    </sec>
    <sec id="sec-5">
      <title>5. Results</title>
      <p>This section reports the result our team obtained on the English sub-task A when participating
to HASOC 2020. Table 2 reports the result as well as the three best teams’ results. We obtained
a macro average F1 of 0.4969 which places our team in the twenty-first ℎ place (out of
thirtyvife participants). The difference between our result and the best one is 0.0183. In general, the
differences between participants’ results are very small, where the difference between the best
team and the thirty third team is 0.05815. Only two teams out of thirty vfie got much lower
results. The data set used for evaluation is non-shared by the organizers.</p>
    </sec>
    <sec id="sec-6">
      <title>6. Conclusion and Future Work</title>
      <p>In this paper, we presented our participation at the second edition of HASOC shared task in
English language for sub-task A: identifying hate, offensive and profane content. We used a
model that relies on BERT to tackle the problem. Our model achieved a macro average F1 of
0.4969 which ranked our team on the twenty-first place over thirty-vfie participants. However
the difference with the best team is very small (0.0183).</p>
      <p>For the short term future work, we plan to apply our model to the other HASOC 2020
subtasks and on the other two languages. For long term future work, we want to integrate or
combine a keyphrase representation in our model [12]. We already created some models based on
keyphrase lexicons but we did not submit it due to lack of time. We would also like to analyse
the cross-domain transfer of some models that we developed to detect weak signals in social
media [13].</p>
      <p>Ethical issues. Working on online data raises ethical issues which are out of the scope of
this paper. Training has been made on a publicly available data set while test was ran by the
organizers them-selves.</p>
    </sec>
    <sec id="sec-7">
      <title>Acknowledgments</title>
      <p>This work is partially supported by the PREVISION project, which has received funding from
5https://competitions.codalab.org/competitions/26027#learn_the_details-results, accessed on October 14ℎ ,
2020.
the European Union’s Horizon 2020 research and innovation programme under GA No 833115
(https://cordis.europa.eu/project/id/833115). The paper reflects the authors’ view and the
Commission is not responsible for any use that may be made of the information it contains.
ings, 2018, pp. 141–153. URL: https://doi.org/10.1007/978-3-319-76941-7_11. doi:10.
1007/978-3-319-76941-7\_11.
[10] V. Mujadia, P. Mishra, D. M. Sharma, Iiit-hyderabad at HASOC 2019: Hate speech
detection, in: Working Notes of FIRE 2019 - Forum for Information Retrieval
Evaluation, Kolkata, India, December 12-15, 2019, 2019, pp. 271–278. URL: http://ceur-ws.org/
Vol-2517/T3-12.pdf.
[11] Y. Zhu, R. Kiros, R. S. Zemel, R. Salakhutdinov, R. Urtasun, A. Torralba, S. Fidler,
Aligning books and movies: Towards story-like visual explanations by watching movies and
reading books, in: 2015 IEEE International Conference on Computer Vision, ICCV 2015,
Santiago, Chile, December 7-13, 2015, 2015, pp. 19–27. URL: https://doi.org/10.1109/
ICCV.2015.11. doi:10.1109/ICCV.2015.11.
[12] J. Mothe, F. Ramiandrisoa, M. Rasolomanana, Automatic keyphrase extraction using
graph-based methods, in: Proceedings of the 33rd Annual ACM Symposium on
Applied Computing, SAC 2018, Pau, France, April 09-13, 2018, 2018, pp. 728–730. URL:
https://doi.org/10.1145/3167132.3167392. doi:10.1145/3167132.3167392.
[13] F. Ramiandrisoa, J. Mothe, F. Benamara, V. Moriceau, IRIT at e-risk 2018, in: Working
Notes of CLEF 2018 - Conference and Labs of the Evaluation Forum, Avignon, France,
September 10-14, 2018, 2018. URL: http://ceur-ws.org/Vol-2125/paper_102.pdf.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>J.</given-names>
            <surname>Devlin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</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>
          ,
          <article-title>BERT: pre-training of deep bidirectional transformers for language understanding, in: Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL-HLT 2019, Minneapolis</article-title>
          , MN, USA, June 2-7,
          <year>2019</year>
          , Volume
          <volume>1</volume>
          (Long and Short Papers),
          <year>2019</year>
          , pp.
          <fpage>4171</fpage>
          -
          <lpage>4186</lpage>
          . URL: https://doi.org/10.18653/v1/ n19-
          <fpage>1423</fpage>
          . doi:
          <volume>10</volume>
          .18653/v1/n19-
          <fpage>1423</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>Z.</given-names>
            <surname>Lu</surname>
          </string-name>
          , J. Nie, RALIGRAPH at HASOC 2019:
          <article-title>VGCN-BERT: augmenting BERT with graph embedding for offensive language detection</article-title>
          , in: Working Notes of FIRE 2019 -
          <article-title>Forum for Information Retrieval Evaluation, Kolkata</article-title>
          , India,
          <source>December 12-15</source>
          ,
          <year>2019</year>
          ,
          <year>2019</year>
          , pp.
          <fpage>221</fpage>
          -
          <lpage>228</lpage>
          . URL: http://ceur-ws.
          <source>org/</source>
          Vol-
          <volume>2517</volume>
          /
          <fpage>T3</fpage>
          -6.pdf.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>S. T.</given-names>
            <surname>Roberts</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Tetreault</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Prabhakaran</surname>
          </string-name>
          ,
          <string-name>
            <surname>Z.</surname>
          </string-name>
          Waseem (Eds.),
          <source>Proceedings of the Third Workshop on Abusive Language Online</source>
          , Association for Computational Linguistics, Florence, Italy,
          <year>2019</year>
          . URL: https://www.aclweb.org/anthology/W19-3500.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>R.</given-names>
            <surname>Kumar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. K.</given-names>
            <surname>Ojha</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Malmasi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Zampieri</surname>
          </string-name>
          ,
          <article-title>Evaluating aggression identification in social media</article-title>
          ,
          <source>in: Proceedings of the Second Workshop on Trolling, Aggression and Cyberbullying</source>
          ,
          <source>TRAC@LREC</source>
          <year>2020</year>
          , Marseille, France, May
          <year>2020</year>
          ,
          <year>2020</year>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>5</lpage>
          . URL: https://www.aclweb.org/anthology/2020.trac-
          <volume>1</volume>
          .1/.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>M.</given-names>
            <surname>Zampieri</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Malmasi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Nakov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Rosenthal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Farra</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Kumar</surname>
          </string-name>
          ,
          <article-title>Semeval2019 task 6: Identifying and categorizing offensive language in social media (offenseval)</article-title>
          ,
          <source>in: Proceedings of the 13th International Workshop on Semantic Evaluation, SemEval@NAACL-HLT</source>
          <year>2019</year>
          ,
          <article-title>Minneapolis</article-title>
          , MN, USA, June 6-7,
          <year>2019</year>
          ,
          <year>2019</year>
          , pp.
          <fpage>75</fpage>
          -
          <lpage>86</lpage>
          . URL: https://doi.org/10.18653/v1/s19-
          <fpage>2010</fpage>
          . doi:
          <volume>10</volume>
          .18653/v1/s19-
          <fpage>2010</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>T.</given-names>
            <surname>Mandl</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Modha</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G. K.</given-names>
            <surname>Shahi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. K.</given-names>
            <surname>Jaiswal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Nandini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Patel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Majumder</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Schäfer</surname>
          </string-name>
          ,
          <article-title>Overview of the HASOC track at FIRE 2020: Hate Speech and Offensive Content Identification in Indo-European Languages</article-title>
          , in: Working Notes of FIRE 2020 -
          <article-title>Forum for Information Retrieval Evaluation</article-title>
          ,
          <string-name>
            <surname>CEUR</surname>
          </string-name>
          ,
          <year>2020</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>S.</given-names>
            <surname>Modha</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Mandl</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Majumder</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Patel</surname>
          </string-name>
          ,
          <source>Overview of the HASOC track at FIRE</source>
          <year>2019</year>
          :
          <article-title>Hate speech and offensive content identification in indo-european languages</article-title>
          ,
          <source>in: Working Notes of FIRE 2019 - Forum for Information Retrieval Evaluation</source>
          , Kolkata, India,
          <source>December 12-15</source>
          ,
          <year>2019</year>
          ,
          <year>2019</year>
          , pp.
          <fpage>167</fpage>
          -
          <lpage>190</lpage>
          . URL: http://ceur-ws.
          <source>org/</source>
          Vol-
          <volume>2517</volume>
          /
          <fpage>T3</fpage>
          -1.pdf.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>F.</given-names>
            <surname>Ramiandrisoa</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Mothe</surname>
          </string-name>
          ,
          <article-title>Aggression identification in social media: a transfer learning based approach</article-title>
          , in: Proceedings of the Second Workshop on Trolling, Aggression and Cyberbullying,
          <source>TRAC@LREC</source>
          <year>2020</year>
          , Marseille, France, May
          <year>2020</year>
          ,
          <year>2020</year>
          , pp.
          <fpage>26</fpage>
          -
          <lpage>31</lpage>
          . URL: https://www.aclweb.org/anthology/2020.trac-
          <volume>1</volume>
          .5/.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>S.</given-names>
            <surname>Agrawal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Awekar</surname>
          </string-name>
          ,
          <article-title>Deep learning for detecting cyberbullying across multiple social media platforms</article-title>
          ,
          <source>in: Advances in Information Retrieval - 40th European Conference on IR Research</source>
          , ECIR
          <year>2018</year>
          , Grenoble, France, March 26-29,
          <year>2018</year>
          , Proceed-
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>