<!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>Profiling Irony and Stereotype Spreaders on Twitter: PAN Shared Task (IROSTEREO) 2022</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Álvaro Rodríguez Sánchez</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Martín Barroso Ordóñez</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Student at the Master's Degree in Artificial Intelligence, Pattern Recognition and Digital Imaging, Department of Computer Systems and Computation (DSIC), Polytechnic University of Valencia (UPV)</institution>
          ,
          <addr-line>Valencia</addr-line>
          ,
          <country country="ES">Spain</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>We present our solution to the problem proposed by IROSTEREO's PAN Shared Task in 2022. It proposes the detection of irony and stereotype spreaders on Twitter. Throughout the memory, we will show how through: the technique based on neural networks for the pre-training of natural language processing such as BERT, the use of sentence embeddings, and two alternatives to put them together; it will be achieved from a set of tweets associated with a set of authors, predict whether an author is ironic or not. Lastly, it will be presented a model that achieves high accuracy and with which finally participated in the competition.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Author profiling</kwd>
        <kwd>Irony detection</kwd>
        <kwd>Twitter</kwd>
        <kwd>Natural language processing</kwd>
        <kwd>Sentence embeddings</kwd>
        <kwd>BERT</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
    </sec>
    <sec id="sec-2">
      <title>2. Dataset</title>
      <p>The data, for creating the first models, is located inside a folder, it contains 420 XML files, each
of them referring to diferent authors; these authors are represented with an id. Each XML file
is composed of 200 tweets from the author, these are in the English language. A truth.txt file is
also provided which contains the tag associated with each author, this tag can be I if the author
is ironic, or NI if the author is not ironic.</p>
      <p>After performing the diferent experiments with the previous dataset, we were provided with a
test dataset, which consists of 180 authors with 200 tweets each. Unlike the previous dataset,
this one does not contain the truth.txt, since this is the one that will be taken into account to be
evaluated by the contest.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Proposed solution</title>
      <p>
        It has been proposed to solve this problem by using Machine Learning based models and
without the use of a pre-processing, as the tweets are already pre-processed. Firstly, the
sentence embedding representation is going to be used through BERT [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], during this process 2
alternatives were chosen:
• Average the 200 tweets of each author just before passing them through BERT, i.e.,
having applied all the necessary pre-processes to be able to enter them in BERT (this
representation is shown in Figure 1 as the Model Input), all the 200 tweets are converted
into array (Word2vec), then applied a padding and mask for each tweet to make all the
same length and finally average all the 200 tweets into a final average vector. Once this
average is obtained, pass it through BERT to subsequently use the result as a representation
of that author.
• Pass every single tweet of each author through BERT and average the sentence embeddings
obtained from BERT of all the tweets associated with each author to obtain a final sentence
embedding per author that describes it.
      </p>
      <p>After obtaining a sentence embedding for each of the authors (with either of the two methods),
we will proceed to the training of a classical model. In our case, we have chosen to use the
sklearn library, which ofers a set of classical models; we will pass these sentence embeddings
and the associated author label to these models for training.</p>
    </sec>
    <sec id="sec-4">
      <title>4. Experiments</title>
      <p>This section shows the results, using accuracy as a metric, of both methods presented in the
previous section for diferent classical classifiers. The classifiers that have been used are the
SVM1, MLP2, GaussianNB and RandomForest. It is important to note that all experiments have
been performed using 10-fold cross-validation.</p>
      <p>1Support Vector Machine
2Multi Layer Perceptron</p>
      <sec id="sec-4-1">
        <title>4.1. Pre-BERT average embeddings method</title>
        <p>The best result obtained from each of the classifiers and the value of their hyperparameters are
shown below.</p>
        <sec id="sec-4-1-1">
          <title>Classifier SVM MLP</title>
        </sec>
        <sec id="sec-4-1-2">
          <title>GaussianNB</title>
        </sec>
        <sec id="sec-4-1-3">
          <title>RandomForest</title>
        </sec>
        <sec id="sec-4-1-4">
          <title>Hyperparameters</title>
          <p>C=0.0001
hl1=128, hl2=64, hl3=32</p>
          <p>smoothing=0.0001
max_depth=10, n_estimators=100, max_features=50</p>
        </sec>
        <sec id="sec-4-1-5">
          <title>Accuracy</title>
          <p>0.53809
0.64286
0.63095
0.64248</p>
          <p>As shown in Table 1, the model with the highest accuracy is the MLP model when 3 hidden
layers are incorporated between the input and output layers. Despite this, the accuracy value
obtained is not entirely promising, since accuracy of 0.64286 in the classification of 2 diferent
classes is not a very optimistic value. In the following method, the strategy implemented in this
method will be improved.</p>
        </sec>
      </sec>
      <sec id="sec-4-2">
        <title>4.2. Post average embeddings method</title>
        <p>The best result obtained from each of the pre-trained models used, the best classifier obtained
with each one, and the value of its hyperparameters are shown below.</p>
        <p>As we can see in Table 2 , we got a great improvement in the results achieved by averaging after
(and not before) putting the data into the pre-training model. The best performer was given by
the Multilingual Universal Sentence Encoder, although the diference is not significant.</p>
        <sec id="sec-4-2-1">
          <title>Classifier</title>
        </sec>
        <sec id="sec-4-2-2">
          <title>BERT MLP</title>
        </sec>
        <sec id="sec-4-2-3">
          <title>Distill BERT SVM</title>
        </sec>
        <sec id="sec-4-2-4">
          <title>MUSE MLP</title>
        </sec>
        <sec id="sec-4-2-5">
          <title>Hyperparameters</title>
          <p>hl1=32, hl2=32, hl3=16</p>
          <p>C=21
hl1=4, hl2=64, hl3=32</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>5. Final model and conclusion</title>
      <p>Finally, we have to train a final model with all the data with the characteristics that we have
seen that have performed best in the experiments. In order not to over-fit we are going to put
only a few iterations, 250, since we have observed that if we do more we easily reach 100%
accuracy in the training samples, which is not desirable. So we have trained a final MLP with 4,
64, and 32 hidden units for 250 iterations that receive as input the averaged embeddings of a
user’s tweets that have been taken as input from the MUSE.</p>
      <p>
        In the first submission to the TIRA platform [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] the test dataset predictions were uploaded in
the requested XML format; an accuracy of 0.9556 was achieved.
      </p>
      <p>As shown throughout the experiments and results, the use of MUSE together with an MLP has
proven to be the most successful case for maximizing accuracy and detecting the presence of
irony or non-irony of an author within a set of tweets associated with him/her.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>O</given-names>
            <surname>.-B. Reynier</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Berta</surname>
          </string-name>
          , R. Francisco,
          <string-name>
            <given-names>R.</given-names>
            <surname>Paolo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Elisabetta</surname>
          </string-name>
          ,
          <article-title>Profiling Irony and Stereotype Spreaders on Twitter (IROSTEREO) at PAN 2022, in: CLEF 2022 Labs and Workshops, Notebook Papers, CEUR-WS</article-title>
          .org,
          <year>2022</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>J.</given-names>
            <surname>Bevendorf</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Chulvi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Fersini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Heini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Kestemont</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Kredens</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Mayerl</surname>
          </string-name>
          , R. OrtegaBueno, P. Pezik,
          <string-name>
            <given-names>M.</given-names>
            <surname>Potthast</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Rangel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Rosso</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Stamatatos</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Stein</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Wiegmann</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Wolska</surname>
          </string-name>
          , E. Zangerle, Overview of PAN 2022:
          <article-title>Authorship Verification, Profiling Irony and Stereotype Spreaders, and Style Change Detection</article-title>
          , in: M.
          <string-name>
            <surname>D. E. F. S. C. M. G. P. A. H. M. P. G. F. N. F. Alberto</surname>
          </string-name>
          Barron-Cedeno, Giovanni Da San Martino (Ed.),
          <source>Experimental IR Meets Multilinguality, Multimodality, and Interaction. Proceedings of the Thirteenth International Conference of the CLEF Association (CLEF</source>
          <year>2022</year>
          ), volume
          <volume>13390</volume>
          of Lecture Notes in Computer Science, Springer, ????
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>I. H. F. L. C. W. Z. A. C. Paolo Rosso</surname>
          </string-name>
          , Francisco Rangel,
          <article-title>A survey on author profiling, deception, and irony detection for the arabic language</article-title>
          ,
          <year>2018</year>
          . URL: https://compass.onlinelibrary. wiley.com. doi:
          <volume>10</volume>
          .1111/lnc3.
          <fpage>12275</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>L.</given-names>
            <surname>Wanner</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Soler</surname>
          </string-name>
          ,
          <article-title>Feature engineering for author profiling and identification: on the relevance of syntax and discourse, Universitat Pompeu Fabra</article-title>
          . Departament de Tecnologies de la
          <source>Informació i les Comunicacions</source>
          (
          <year>2017</year>
          ). URL: http://hdl.handle.net/10803/404984, applications of Natural Language to Information Systems.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>A.</given-names>
            <surname>Reyes</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Rosso</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Buscaldi</surname>
          </string-name>
          ,
          <article-title>From humor recognition to irony detection: The figurative language of social media</article-title>
          ,
          <source>Data Knowledge Engineering</source>
          <volume>74</volume>
          (
          <year>2012</year>
          )
          <fpage>1</fpage>
          -
          <lpage>12</lpage>
          . URL: https://www.sciencedirect.com/science/article/pii/S0169023X12000237. doi:https://doi. org/10.1016/j.datak.
          <year>2012</year>
          .
          <volume>02</volume>
          .005, applications of Natural Language to Information Systems.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <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>
          . URL: https://arxiv.org/abs/
          <year>1810</year>
          .04805. doi:
          <volume>10</volume>
          .48550/ARXIV.
          <year>1810</year>
          .
          <volume>04805</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>M.</given-names>
            <surname>Potthast</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Gollub</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Wiegmann</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Stein</surname>
          </string-name>
          , TIRA Integrated Research Architecture, in: N.
          <string-name>
            <surname>Ferro</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          Peters (Eds.),
          <source>Information Retrieval Evaluation in a Changing World, The Information Retrieval Series</source>
          , Springer, Berlin Heidelberg New York,
          <year>2019</year>
          . doi:
          <volume>10</volume>
          .1007/ 978-3-
          <fpage>030</fpage>
          -22948-1\_5.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>