<!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>Detecting Misogyny in Arabic Tweets</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Abdusalam Nwesri</string-name>
          <email>a.nwesri@uot.edu.ly</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Stephen Wu</string-name>
          <email>wu.stephen.t@gmail.com</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Harmain Harmain</string-name>
          <email>h.harmain@uot.edu.ly</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Faculty of Information Technology, University of Tripoli</institution>
          ,
          <addr-line>Tripoli</addr-line>
          ,
          <country country="LY">Libya</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>School of Biomedical Informatics, UTHealth</institution>
          ,
          <addr-line>Houston, TX</addr-line>
          <country country="US">USA</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Systems that can automatically detect ofensive content are of great value, for example, to provide protective settings for users or assist social media supervisors with removal of odious language. In this paper, we present three machine learning models developed at University of Tripoli, Libya, for the detection of misogyny in Arabic colloquial tweets. We present the results obtained with these models in the first Arabic Misogyny Identification shared task ArMI'21, a sub track of HASOC@FIRE2021. With our first model (optimized BERT-based pipelines), we placed as the second-ranked team on sub-task A: Misogyny Content Identification, and as the third-ranked team on sub-task B: Misogyny Behavior Identification.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Arabic Misogyny detection</kwd>
        <kwd>hate speech detection</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>extraction of text-based features a dificult task. Tweets are short and often consist of few words.</p>
      <p>In this paper, we present three models to detect misogyny in Arabic tweets, for the first
Arabic Misogyny Identification (ArMI) shared task, a sub track of Hate and Ofensive Content
Identification (HASOC) at the 2021 Forum for Information Retrieval Evaluation (FIRE@2021).</p>
    </sec>
    <sec id="sec-2">
      <title>2. Related Work</title>
      <p>Though misogyny detection in Arabic text is a recent topic, some previous work has been done
on ofensive language and hate speech detection in Arabic.</p>
      <p>
        The first study on abusive language detection in Arabic was done by
        <xref ref-type="bibr" rid="ref4">Ehab A. Abozinadah
and Jr. (2015</xref>
        ). They tested three machine learning algorithms — Naïve Bayes (NB), Support
Vector Machines (SVM), and Decision Tree (J48) classifiers — to detect abusive tweets on a set of
1,300,000 Arabic tweets collected using five swear words. They reported that the NB algorithm
was the best performer with an accuracy rate of 90%.
      </p>
      <p>
        <xref ref-type="bibr" rid="ref1">Alakrot et al. (2018)</xref>
        constructed a data set of 167,549 YouTube comments and utilized SVMs to
classify comments as either positive or negative. They reported that the SVM classifier achieved
90.05% accuracy.
      </p>
      <p>
        <xref ref-type="bibr" rid="ref6">Husain (2020)</xref>
        tested the impact of the pre-processing phase on the detection of ofensive and
hate speech for Arabic text. The author used an SVM classifier to identify ofensive and hate
speech in a data set before and after applying the pre-processing techniques on the original
text. The pre-processing techniques improved the classification with an F1 score of 89% for the
ofensive language detection task and 95% for the hate speech classification task.
      </p>
      <p>
        Mulki and Ghanem (2021b) built a levantine data set of 6,603 tweets collected from the
Twitter accounts of several female journalists who covered the Lebanese protests of October
2019. Tweets in the data set are annotated as misogynous or none. Misogynous tweets are
further classified to diferentiate between, for example, a threat of violence versus a derailing
comment. They used several models to detect misogyny and found that BERT is the best model
to classify tweets as misogynous, with an F1 score of 0.88. In the categorical classification they
reported that
        <xref ref-type="bibr" rid="ref5">Frenda et al. (2018)</xref>
        model was the best performer with an F1 score of 0.43.
      </p>
    </sec>
    <sec id="sec-3">
      <title>3. Experiment Description</title>
      <p>Our experiment was part of the ArMI shared task, a sub track of the HASOC at FIRE 2021. The
task aims at identifying misogynistic tweets and recognizing diferent misogynistic categories
in a collection of Arabic (MSA/dialectal) tweets.</p>
      <sec id="sec-3-1">
        <title>3.1. Task Details</title>
        <p>
          ArMI 2021 used a data set composed of (7,866) tweets written in Modern Standard Arabic
(MSA) and several Arabic dialects, including Gulf, Egyptian and Levantine
          <xref ref-type="bibr" rid="ref7 ref8 ref9">(Mulki and Ghanem,
2021c)</xref>
          . Participants participated in two sub-tasks. In sub-task A, participants were required to
identify a tweet as a misogynistic (misogyny) or non-misogynistic (none). In sub-task B,
participants were required to classify misogynistic tweets to (discredit, derailing, dominance,
stereotyping &amp; objectification, threat of violence, sexual harassment, or
damning). Two data sets were released, a training set with its gold standard classifications,
and a test set with the gold standard withheld. The training set was used to tune detection
algorithms and the test set was used to blindly classify new unannotated tweets. More details
about tasks are described in
          <xref ref-type="bibr" rid="ref7 ref8 ref9">(Mulki and Ghanem, 2021a)</xref>
          .
        </p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Experiments</title>
      <p>We have participated under the name of University of Tripoli (UoT) with three diferent runs in
each sub-task. Below is the description of these runs in each task:</p>
      <sec id="sec-4-1">
        <title>4.1. Sub-task A (Misogyny Content Identification)</title>
        <sec id="sec-4-1-1">
          <title>4.1.1. UoT run1: Large BERT-based pipelines</title>
          <p>
            Full pipelines with BERT models
            <xref ref-type="bibr" rid="ref3">(Devlin et al., 2019)</xref>
            at their center were compared for
performance on the training set. Words are were segmented using Farasa stemmer.4 We then
then used the American University of Beirut’s AraBERT v2
            <xref ref-type="bibr" rid="ref2">(Antoun et al., 2020)</xref>
            with the
BERT-large architecture, pretrained on OSCAR, Arabic Wikipedia, 1.5B words Arabic Corpus,
OSIAN Corpus, and Assafir news articles. We then fine-tuned the model on our training data
set for misogyny content identification.
          </p>
        </sec>
        <sec id="sec-4-1-2">
          <title>4.1.2. UoT run2: Statistical ML Classifiers</title>
          <p>
            We also created a classical machine learning pipeline based on sklearn library
            <xref ref-type="bibr" rid="ref10">(Pedregosa et al.,
2011)</xref>
            . The pipeline consists of 4 stages: a pre-processor, count vectorizer, tf-idf transformer
and a multinomialNB classifier. In the text pre-processing stage, any special characters, links,
commas, and usernames in @-mentions were removed from the tweets. Hyper parameters were
used to tune the transformers and classifier.
          </p>
        </sec>
        <sec id="sec-4-1-3">
          <title>4.1.3. UoT run3: Feed-forward networks</title>
          <p>We started by removing all non-Arabic characters for the text, then we removed repeated
characters leaving only two of the following characters ( 0ð", " è", "@", "È", "ø", "¬" ) We then
removed the dot character, normalized the diferent forms of Hamza to a bare Hamza " @", and
split the starting combination of "AK" from any word in the text. This last adjustment was made
since this combination is used to address someone in Arabic, is widely used in Arabic hate
speech, and is often attached to the following word. We have also normalized wrongly written
Arabic phrases widely used in damming someone, such as: " é&lt;Ë@ iJ.¯", " é&lt;Ë@ ½jJ.¯", " é&lt;Ë@ àX@",
" é&lt;Ë@ IJªË", " é&lt;Ë@ ZA @", " é&lt;Ë@ àX@" . We then normalized " è" to " è" and final " ø" to "ø". Finally,
we replaced the female addressee pronoun "úaeK@" with "IK@" since most tweets are addressing
females. Using word frequency in the training data set, we have removed a list of 29 tokens
chosen based on their frequency in the training data set. The remaining words are transformed
to a matrix of numbers based on their tf-idf score in tweets. A 2-layer feedforward neural
network was implemented in keras. We trained the model with a batch of size 100, and trained
the model for 4 epochs. The final F1 score we got is 0.838.</p>
        </sec>
      </sec>
      <sec id="sec-4-2">
        <title>4.2. Sub-task B (Misogyny Behavior Identification)</title>
        <p>We treated Sub-task B as a multi-class classification problem, using essentially the same strategy
and system for each of the 3 runs, respectively, but training on the more fine-grained descriptions
of misogyny behavior: damning, discredit, dominance, sexual harassment, stereotyping &amp;
objectification, and threat of violence. Based on the full-pipeline comparisons for UoT_run 1, we
selected the highest-performing pipeline, which included basic tokenization and a BERT-large
model from Koc University. For run 3, we used the same experimental setup used in sub-task A,
however, we used the "binary" mode to transform words to either 0 or 1 based on their presence
in the tweets. Results on the training data set are shown in Table 2.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>5. Oficial results</title>
      <p>The test set has been released and above runs have been submitted for evaluation to the
organizing committee. Table 3 shows results obtained by participating teams including our
submitted runs. Our UoT_run1 scored in the 4th position (2nd-best team), while the UoT_run3
and UoT_run2 scored the 12th and the 14th respectively. Our results show that BERT algorithm
is the best performer in our runs.</p>
      <p>Table 4 shows results of the participants’ submitted runs for the sub-task B. Our best performer
is again the UoT_run1 at the 8th position (3rd-best team). UoT_run3 and UoT_run2 were in the
11th and the 13th positions respectively.</p>
    </sec>
    <sec id="sec-6">
      <title>6. Conclusion</title>
      <p>We have tested three machine learning algorithms in classifying Arabic tweets. AraBert,
feedforward networks, and traditional machine learning models have been tested on classifying
Arabic tweets as a non-misogynous or misogynous and additionally on classifying misogynic
tweets into six predefined categories. By far the AraBERT algorithm was the best performer
with an F1 score of 90% in the first task and 51.7% in the second. In future work, we plan to test
the combination of the preprocessing steps we made with the Keras model and the AraBERT
approach.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <string-name>
            <surname>Alakrot</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Murray</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Nikolov</surname>
            ,
            <given-names>N. S.</given-names>
          </string-name>
          (
          <year>2018</year>
          ).
          <article-title>Towards accurate detection of ofensive language in online communication in arabic</article-title>
          .
          <source>Procedia Computer Science</source>
          ,
          <volume>142</volume>
          :
          <fpage>315</fpage>
          -
          <lpage>320</lpage>
          . Arabic Computational Linguistics.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          <string-name>
            <surname>Antoun</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Baly</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Hajj</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          (
          <year>2020</year>
          ).
          <article-title>AraBERT: Transformer-based model for Arabic language understanding</article-title>
          .
          <source>In Proceedings of the 4th Workshop on Open-Source Arabic Corpora and Processing Tools, with a Shared Task on Ofensive Language Detection</source>
          , pages
          <fpage>9</fpage>
          -
          <lpage>15</lpage>
          , Marseille, France. European Language Resource Association.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <string-name>
            <surname>Devlin</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chang</surname>
          </string-name>
          , M.-W.,
          <string-name>
            <surname>Lee</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Toutanova</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          (
          <year>2019</year>
          ).
          <article-title>Bert: Pre-training of deep bidirectional transformers for language understanding</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          <string-name>
            <given-names>Ehab A.</given-names>
            <surname>Abozinadah</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. V. M.</given-names>
            and
            <surname>Jr.</surname>
          </string-name>
          ,
          <string-name>
            <surname>J. H. J.</surname>
          </string-name>
          (
          <year>2015</year>
          ).
          <article-title>Detection of abusive accounts with arabic tweets</article-title>
          .
          <source>International Journal of Knowledge Engineering</source>
          ,
          <volume>1</volume>
          :
          <fpage>113</fpage>
          -
          <lpage>119</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          <string-name>
            <surname>Frenda</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ghanem</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          , and y Gómez,
          <string-name>
            <surname>M. M.</surname>
          </string-name>
          (
          <year>2018</year>
          ).
          <article-title>Exploration of misogyny in spanish and english tweets</article-title>
          . In IberEval@SEPLN.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          <string-name>
            <surname>Husain</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          (
          <year>2020</year>
          ).
          <article-title>Osact4 shared task on ofensive language detection: Intensive preprocessingbased approach</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          <string-name>
            <surname>Mulki</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          <article-title>and</article-title>
          <string-name>
            <surname>Ghanem</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          (
          <year>2021a</year>
          ).
          <article-title>ArMI at FIRE2021: Overview of the First Shared Task on Arabic Misogyny Identification</article-title>
          . In Working Notes of FIRE 2021 -
          <article-title>Forum for Information Retrieval Evaluation</article-title>
          . CEUR.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          <string-name>
            <surname>Mulki</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          <article-title>and</article-title>
          <string-name>
            <surname>Ghanem</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          (
          <year>2021b</year>
          ).
          <article-title>Let-mi: An arabic levantine twitter dataset for misogynistic language</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          <string-name>
            <surname>Mulki</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          <article-title>and</article-title>
          <string-name>
            <surname>Ghanem</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          (
          <year>2021c</year>
          ).
          <article-title>Let-Mi: An Arabic Levantine Twitter Dataset for Misogynistic Language</article-title>
          .
          <source>In Proceedings of the 6th Arabic Natural Language Processing Workshop (WANLP</source>
          <year>2021</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          <string-name>
            <surname>Pedregosa</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Varoquaux</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gramfort</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Michel</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Thirion</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Grisel</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Blondel</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Prettenhofer</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Weiss</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dubourg</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vanderplas</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Passos</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cournapeau</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Brucher</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Perrot</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Duchesnay</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          (
          <year>2011</year>
          ).
          <article-title>Scikit-learn: Machine learning in Python</article-title>
          .
          <source>Journal of Machine Learning Research</source>
          ,
          <volume>12</volume>
          :
          <fpage>2825</fpage>
          -
          <lpage>2830</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>