<!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>Aggressiveness Detection through Deep Learning Approaches.</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Victor Nina-Alcocer</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Jose-Angel Gonzalez</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Llu s-F. Hurtado</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ferran Pla</string-name>
          <email>fplag@dsic.upv.es</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>VRAIN: Valencian Research Institute for Arti cial Intelligence. Universitat Politecnica de Valencia Cam de Vera</institution>
          <addr-line>s/n 46022 Valencia</addr-line>
          ,
          <country country="ES">Spain</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2019</year>
      </pub-date>
      <fpage>544</fpage>
      <lpage>549</lpage>
      <abstract>
        <p>This paper presents a description of our participation in task \MEX-A3T: Authorship and aggressiveness analysis in Twitter: case study in Mexican Spanish" at Iberian Languages Evaluation Forum (IberLEF) 2019. This work is focused on studying the detection of aggressiveness on Spanish tweets. For a ner-grained study of the task, we analyzed three di erent approaches: the rst two approaches consider the design of architectures using convolutional and recurrent neural networks. Meanwhile, the third approach is focused on pay attention to certain important parts of a sentence using self-attention networks.</p>
      </abstract>
      <kwd-group>
        <kwd>Twitter Aggressiveness Convolutional Neural Networks Recurrent Neural Networks Self-Attention Networks</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        The shared task \MEX-A3T: Authorship and aggressiveness analysis in Twitter:
case study in Mexican Spanish"[
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] considers that aggressive comments on social
networks can represent a certain type of threat or risk for users. Therefore, they
proposed a main subtask to tackle this social issue: the detection of aggressive
comments on Mexican Spanish tweets. This subtask is focused in determining
whether a tweet is aggressive or not.
      </p>
      <p>
        Considering the systems proposed in the last edition of MEX-A3T(2018)[
        <xref ref-type="bibr" rid="ref1">1</xref>
        ],
we saw that the classical machine-learning algorithms [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] reached good results.
Nevertheless, the main goal of this paper is to explore deep learning approaches
using convolutional [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], recurrent [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] and self-attention networks [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] (CNNs,
RNNs, and SANs) to see whether these paradigms can contribute in some way
to reach competitive results.
      </p>
      <p>This paper is organized into four sections: the rst one presents an
introduction to this study. The second section provides a description of the proposed
systems. The third one explains the experiments conducted and the results achieved
by our models and comments the o cial results. And the last section shows some
conclusions.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Systems Description</title>
      <p>
        As it is known, CNNs allow us to process a sentence using di erent n-grams
at a time to recognize some patterns or information that can be useful for text
classi cation. Also, LSTM and GRU [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] are mostly used for capturing
longterm dependencies, learning the dependencies in lengths of considerably large
text. Moreover, some research studies demonstrated that attention mechanism
approach achieved good results for machine translation problem [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]. In our case,
we will focus on discovering whether self-attention networks behave satisfactorily
for the text classi cation task, knowing that it does not have recurrence or
convolutional components.
      </p>
      <p>This paper considers three main approaches: the rst one takes into account
a bunch of architectures which use CNNs as the base layer to handle n-grams.
Basically, this architecture is composed of an input embedding layer, followed
by an spatial dropout and a convolutional layer with a set up of 256 lters and
kernel size of 2, 3 or 4. Next, a GlobalMaxPooling1D is de ned (or a Maxpooling
to add a LSTM or GRU layers) and nally, a dense layer with softmax is used
to generate the results.</p>
      <p>The second approach takes into account a stack of di erent layers: rstly,
three CNNs are de ned, the rst CNN considers bigrams, the second one
considers trigrams, and the last one considers quadrigrams. All these CNNs are
attened for feeding a dense layer (of 256 nodes). Finally a last dense layer with
softmax is used to obtain the predictions.</p>
      <p>
        The third approach considers the use of self-attention networks [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. We used
a similar Transformer architecture proposed by [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] for the machine translation
problem. Nevertheless, we just kept part of this architecture because we are
interested only in the rst stage which pays close attention to some important
parts of the input (tweet or sentence) [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. Basically, this architecture has
embeddings as inputs, next a SpatialDropout1D is applied and posteriorly attention
is considered over the input (sentence-level). Then the encoder is followed by a
GlobalMaxPooling1D and nally, a layer normalization and a dense layer with
softmax was set up.
3
      </p>
    </sec>
    <sec id="sec-3">
      <title>Experiments and results</title>
      <p>In this section all the experiments carried out in this task are commented as well
as the results obtained.</p>
      <p>For Aggressive detection, the organizers of MEX-A3T provided a training
set of 7700 tweets written in Spanish. (labeled with two possible classes: 0 =
\non-aggressive\(NOA), 1 = \aggressive\(AGG)). Regarding the distribution
of the classes we can observe that these are not balanced (the NOA class (65%)
and the AGG class (35%)). In order to evaluate the performance of the proposed
systems, 3156 unlabeled tweets were provided as a test set.</p>
      <p>
        We applied the following text-preprocessing to all the tweets that are the
input to our systems: we remove all URLs, numbers, users, times, dates, emails,
percents [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. However, we normalize hashtags (i.e., \#ChileSinMundial\ is
converted to \chile sin mundial\) [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] and emojis with its Unicode Common
Locale Data Repository (CLDR) version, elongated words, repetitions, emphasis,
and censored words. All the proposed systems in this paper used the
textpreprocessing already mentioned and two di erent word embeddings: Twitter87
embeddings trained over 87 millions of tweets and MexE embeddings provided
by the organizers [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ].
      </p>
      <p>Furthermore, 5-fold cross-validation sets were used to avoid over- tting in
all the experiments. The o cial evaluation metric to evaluate the systems was
F1 score for aggressiveness (f1 aggr). However, we show in Table 1 and Table 2
some additional metrics, accuracy (acc.) and macro f1 to have a better
interpretation of the results.
pared to other architectures that follow this rst focus (see Table 1, rows 1 to
9).</p>
      <p>As we mentioned in Section 2. The second approach takes into account a
variety of layers. the main idea behind this approach is to vary the number of
inputs with its respective CNNs. Also, we want to vary the number of nodes of the
next dense layer which process the outputs of the previous CNNs. Firstly, we used
only a CNN to process bigrams, then we added a dense layer of 128 nodes plus
another dense layer with two nodes with softmax. The next tested architecture
kept the same structure, however, we added another input and its CNN to process
trigrams. And for the last tested architecture, we added another CNN to process
the quadrigrams. Summing up, the system called stacked (row 10 in Table 1)
which reached good results use MexE embeddings and it is structured by three
inputs and its respective CNNs, a dense layer of 256 nodes and a last dense layer
of two nodes.</p>
      <p>To work and make experiments with the third approach based on SANs,
rstly, we de ned the architecture commented on Section 2. After de ning the
system, we set up some parameters to see the importance and impact that those
have over the performance reached by the system. For instance, one interesting
fact was the de nition of the Dropout in the inputs to sentence-level on the
encoder, we tried on a range of 0.2 to 0.8, and we noticed that a dropout of
0.7 achieved the best performance in this particular case, meaning that hiding a
huge part of the sentence helps a lot to reach good results. Another important
consideration, it was taken into account the unbalanced training dataset, to
face this fact we set up the experiments to treat every instance of the class
NOA as two instances of the class AGG (minority class), it means that we are
assigning higher values to AGG instances for having a balanced training dataset.
Therefore, having de ned our system named attention (see row 11 in Table 1)
and the parameters tuned, all this combined with the Twitter87 embeddings
allow us to reach the highest results for f1 agg.
3.1</p>
      <p>O</p>
      <p>
        cial Results
Table 2 shows the o cial results published by the organizers of MEX-A3T-2019.
For the aggressiveness detection subtask, we submitted two runs, both
submissions obtained worst results than the baselines proposed by the organizers. The
Run1 (attention) was the submission which reached the best result, this
system uses SANs as explained on Section 2. Meanwhile, Run2 (cnn b) achieved
low results, all of them below bag-of-words (BoW) [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] baseline. Additionally, we
can highlight Run3 (stacked) because it was the only architecture that achieved
good results with (MexE) the embeddings provided by the organizers.
Unfortunately, this Run3 did not achieve good results as Run1 or Run2. Moreover, it
is worth mentioning that on MEX-A3T(2018) edition, some of the best results
were reached by systems which used classic machine-learning algorithms. We
assume that the two baselines proposed on the o cial ranking use some of these
classic algorithms and trigrams or bag-of-words as features.
      </p>
      <p>Some interesting fact that we noticed was the performance of our third
approach based on SANs, this system worked really good on the training dataset.
But it did not reach good results on the test dataset. We assume that this issue
is due to the fact that the content of the test data is too di erent from the
training set. It means that our system has trained and learned some patterns
that would not be founded on the test data.</p>
      <p>Team f1 aggr macro f1 acc.</p>
      <p>Baseline (Trigrams) 0,4300 0,6080 0,6688
Our System Run1 0,4081 0,4897 0,5029
Baseline (BoW ) 0,3690 0,5760 0,6777</p>
      <p>Our System Run2 0,2921 0,5122 0,6115
4</p>
    </sec>
    <sec id="sec-4">
      <title>Conclusions</title>
      <p>In this work we have presented our participation in the MEX-A3T-2019 shared
task focused on aggressiveness detection. We proposed three approaches: the
rst two approaches consider the use of convolutional and recurrent neural
networks to compute n-grams and long-term dependencies in tweets. The third
approach considers the use of self-attention networks to pay close attention to
some words of the tweet. Based on the experiments and the results obtained
in this paper, we noticed that the architectures proposed on the rst two
approaches reached slightly similar results. But making a comparison between the
rst two approaches and the last approach, we see good results reached by
selfattention networks. Therefore, we have observed that a deeper study on SANs
can help us to improve our results.</p>
    </sec>
    <sec id="sec-5">
      <title>Acknowledgments References</title>
      <p>This work has been partially supported by the Spanish MINECO and FEDER
founds under project AMIC (TIN2017-85854-C4-2-R) . Work of Jose-Angel Gonzalez
is also nanced by Universitat Politecnica de Valencia under grant PAID-01-17.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Alvarez-Carmona</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Guzman-Falcon</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Montes-y Gomez</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Escalante</surname>
            ,
            <given-names>H.J.</given-names>
          </string-name>
          ,
          <article-title>Villasen~or-</article-title>
          <string-name>
            <surname>Pineda</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Reyes-Meza</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rico-Sulayes</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Overview of MEX-A3T at IberEval 2018: Authorship and aggressiveness analysis in Mexican Spanish tweets</article-title>
          .
          <source>In: CEUR Workshop Proceedings</source>
          . vol.
          <volume>2150</volume>
          , pp.
          <volume>74</volume>
          {
          <issue>96</issue>
          (
          <year>2018</year>
          ), https://pan.webis.de/clef18/pan18-web/index.html
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Ambartsoumian</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Popowich</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>Self-attention: A better building block for sentiment analysis neural network classi ers</article-title>
          . CoRR abs/
          <year>1812</year>
          .07860 (
          <year>2018</year>
          ), http://arxiv.org/abs/
          <year>1812</year>
          .07860
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Aragon</surname>
            ,
            <given-names>M.E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Alvarez-Carmona</surname>
            ,
            <given-names>M.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Montes-y Gomez</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Escalante</surname>
            ,
            <given-names>H.J.</given-names>
          </string-name>
          ,
          <article-title>Villasen~or-</article-title>
          <string-name>
            <surname>Pineda</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Moctezuma</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Overview of mex-a3t at iberlef 2019: Authorship and aggressiveness analysis in mexican spanish tweets</article-title>
          .
          <source>In: Notebook Papers of 1st SEPLN Workshop on Iberian Languages Evaluation Forum (IberLEF)</source>
          , Bilbao, Spain, September (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Dey</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Machine Learning Algorithms:</article-title>
          A Review.
          <source>Tech. rep., www.ijcsit.com</source>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Ibrohim</surname>
            ,
            <given-names>M.O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Budi</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          :
          <article-title>A Dataset and Preliminaries Study for Abusive Language Detection in Indonesian Social Media</article-title>
          .
          <source>Procedia Computer Science</source>
          <volume>135</volume>
          ,
          <issue>222</issue>
          {
          <fpage>229</fpage>
          (
          <year>2018</year>
          ). https://doi.org/10.1016/j.procs.
          <year>2018</year>
          .
          <volume>08</volume>
          .169, https://linkinghub.elsevier.com/retrieve/pii/S1877050918314583
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Jacovi</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Shalom</surname>
            ,
            <given-names>O.S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Goldberg</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          :
          <article-title>Understanding convolutional neural networks for text classi cation</article-title>
          . CoRR abs/
          <year>1809</year>
          .08037 (
          <year>2018</year>
          ), http://arxiv.org/abs/
          <year>1809</year>
          .08037
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Letarte</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Paradis</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gigu</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Laviolette</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>Importance of Self-Attention for Sentiment Analysis</article-title>
          .
          <source>Tech. rep. (</source>
          <year>2018</year>
          ), https://www.aclweb.org/anthology/W18- 5429
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Lu</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Salem</surname>
            ,
            <given-names>F.M.:</given-names>
          </string-name>
          <article-title>Simpli ed gating in long short-term memory (LSTM) recurrent neural networks</article-title>
          .
          <source>CoRR abs/1701</source>
          .03441 (
          <year>2017</year>
          ), http://arxiv.org/abs/1701.03441
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Mathur</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ratn</surname>
            <given-names>Shah</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            ,
            <surname>Sawhney</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            ,
            <surname>Mahata</surname>
          </string-name>
          ,
          <string-name>
            <surname>D.</surname>
          </string-name>
          :
          <article-title>Detecting O ensive Tweets in Hindi-English Code-Switched Language</article-title>
          .
          <source>Tech. rep. (</source>
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <article-title>MEX-A3T: MEX-A3T: Authorship and aggressiveness analysis in Twitter case study in Mexican Spanish 2019 (</article-title>
          <year>2019</year>
          ), https://sites.google.com/view/mexa3t/home
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Vaswani</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Shazeer</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Parmar</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Uszkoreit</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jones</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gomez</surname>
            ,
            <given-names>A.N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kaiser</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Polosukhin</surname>
            ,
            <given-names>I.: Attention</given-names>
          </string-name>
          <string-name>
            <surname>Is All You Need</surname>
          </string-name>
          (
          <year>2017</year>
          ), https://arxiv.org/pdf/1706.03762.pdf http://arxiv.org/abs/1706.03762
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Zhang</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jin</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhou</surname>
            ,
            <given-names>Z.H.</given-names>
          </string-name>
          :
          <article-title>Understanding bag-of-words model: A statistical framework</article-title>
          .
          <source>International Journal of Machine Learning and Cybernetics</source>
          <volume>1</volume>
          (
          <issue>1-4</issue>
          ),
          <volume>43</volume>
          {52 (dec
          <year>2010</year>
          ). https://doi.org/10.1007/s13042-010-0001-0, http://link.springer.
          <source>com/10.1007/s13042-010-0001-0</source>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>