<!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>Comparative study of neural models for the COSET shared task at IberEval 2017</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Luca Ambrosini</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Giancarlo Nicolo</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>@inf.upv.es</string-name>
        </contrib>
      </contrib-group>
      <pub-date>
        <year>2017</year>
      </pub-date>
      <fpage>20</fpage>
      <lpage>27</lpage>
      <abstract>
        <p>This paper describes our participation in the Classi cation Of Spanish Election Tweets (COSET) task at IberEval 2017. During the searching process for the best classi cation system, we developed a comparative study over possible combinations of corpus preprocessing, text representations and classi cation models. After an initial models exploration, we focus our attention over speci c neural models. Interesting insight can be drawn from the comparative study helping future practitioners tackling tweets classi cation problems to create system baseline for their work.</p>
      </abstract>
      <kwd-group>
        <kwd />
        <kwd>Neural Networks</kwd>
        <kwd>Natural Language Processing</kwd>
        <kwd>Text Classi cation</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>Nowadays the pervasive use of social media as a mean of communication helps researchers to
found useful insight over open problems in the eld of Natural Language Processing. In this
context, the Twitter social network has a huge role in text classi cation problems, because
thanks to its API is possible to retrieve speci c formatted text (i.e., a sentence of maximum 140
characters called tweet) from a huge real-time text database, where di erent users publish their
daily statements.</p>
      <p>This huge availability of data gives raise to the investigation of new text classi cation
problems, with special interest in prediction problems related to temporal events that can in uence
statements published by social network users. An example of this problem category is the text
classi cation related to general election, where the Classi cation Of Spanish Election Tweets
(COSET) task at IberEval 2017 is a concrete example.</p>
      <p>In COSET, the aim is to classify a corpus of political tweets in ve categories related to
speci c political topics. This task can be analysed as a domain-dependent (i.e., political domain)
constrained-text (i.e., tweet sentence) classi cation problem.</p>
      <p>To tackle the above problem we built a classi cation system that can be decomposed in
three main modules, each representing a speci c approach widely used in the Natural Language
Processing literature: text pre-processing, text representation and classi cation model. During
the modules design, we explore di erent design combinations leading the system development
to a comparative study over the possible modules interactions. Analysing the produced study
interesting insight can be drawn to create a system baseline for the tweet classi cation problem.</p>
      <p>In the following sections we rstly describe the COSET task (Section 2), then we report
the development process of the classi cation system and its module design (Section 3), after
that, the evaluation of deployed systems over the provided corpus is analysed (Section 4), nally,
conclusion over the whole work are outlined (Section 5).
2</p>
    </sec>
    <sec id="sec-2">
      <title>Task de nition</title>
      <p>
        The COSET shared task's [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] aim was to classify Spanish written tweets talking about the
2015 Spanish General Election, where each tweet had to be classi ed into one of ve di erent
categories: (i) political issues, related to the most abstract electoral confrontation; (ii) policy
issues, about sectorial policies; (iii) personal issues, on the life and activities of the candidates;
(iv) campaign issues, related with the evolution of the campaign; (v) and other issues.
      </p>
      <p>Participants had access to a labelled corpus composed of training set (2242 tweets) and
development set (250 tweets) for system benchmarking. We analysed it and nd the following
statistical information presented in table 1.
In this section we describe the tweet classi cation systems we built. From a module perspective we
can describe our systems as composed of three main blocks: text pre-preprocessing (Section 3.2),
text representation (Section 3.3) and classi cation model (Section 3.4).
3.1</p>
      <sec id="sec-2-1">
        <title>Initial investigation</title>
        <p>
          To address the tweets classi cation problem we began our investigation analysing some of the
most widely used text representations and classi ers. In the analysing for possible text
representations we began focusing our attention on lexical features based on: Bag Of Words [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ],Bag
Of N-Grams (bigrams and trigrams), both with and without term frequency-inverse document
frequency normalization (i.e., TF-IDF norm). In relation to the classi cation models that can
exploit the above representations, we analysed Random Forest, Decision Trees, Support Vector
Machines and Multi Layer Perceptron. Since the results obtained with the combination of those
model + representation were outperformed by neural network based models, due to space
limitations their analysis is not reported in this paper, but rather we will focus on the module
description of the neural models.
3.2
        </p>
      </sec>
      <sec id="sec-2-2">
        <title>Text pre-processing</title>
        <p>
          Regarding the text pre-preprocessing, it has to be mentioned that the corpus under
observation can not be treated as proper written language, because computer-mediated communication
(CMC) is highly informal, a ecting diamesic3 variation with creation of new items supposed to
pertain lexicon and graphematic domains [
          <xref ref-type="bibr" rid="ref7 ref8">7,8</xref>
          ]. Therefore, in addition to well know pre-processing
3 The variation in a language across medium of communication (e.g. Spanish over the phone versus
Spanish over email)
approach, as stemming (i.e., ST), removal of stopwords (i.e., SW) , removal of punctuation (i.e.,
PR), speci c tweets pre-processing techniques have to be taken in consideration.
        </p>
        <p>From the previous consideration, we de ne a set of speci c tweet pre-processing approach
that take into consideration the following items: (i) mentions (i.e., MT), (ii) smiley (i.e., SM),
(iii) emoji (i.e., EM), (iv) hashtags (i.e., HT), (v) numbers (i.e., NUM), (vi) URL (i.e., URL)
(vii) and Tweeter reserve-word as RT and FAV (i.e., RW).</p>
        <p>For each of these items we left the possibility to be removed or substituted by constant
string (e.g. (i) @ierrejon preparados para salir #PodemosRemontada substitutio!n $MENTION
preparados para salir $HASHTAG, (ii) @ierrejon preparados para salir #PodemosRemontada
removin!g preparados para salir ).</p>
        <p>
          To implement above pre-processing technique we took advantage of the following tools:
(i) NLTK [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ] and (ii) Preprocessor4.
3.3
        </p>
      </sec>
      <sec id="sec-2-3">
        <title>Text representation</title>
        <p>
          The use of neural modelS suggest us to exploit recent trend over text representation, in particular
we decided to use embedding vectors as representation following the approach described by [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ],
where tweet elements like words and word n-grams are represented as vectors of real number
with xed dimension jvj. In this way a whole sentence s, with length jsj its number of word, is
represented as a sentence-matrix M of dimension jM j = jsj jvj. jM j has to be xed a priori,
therefore jsj and jvj have to be estimated. jvj was xed to 300 following [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ]. jsj was left as a
system parameter that after optimization (via grid search) was xed to jsj = 30, with this choice
input sentences longer than jsj are truncated, while shorter ones are padded with null vectors
(i.e., a vector of all zeros). Depending of chosen tweets elements a di erent embedding function
has to be estimated (i.e., learnt), following we are going to analyse the possible choices.
Word embedding. Choosing words as elements to be mapped by the embedding function,
raise some challenge over the function estimation related to data availability. In our case the
available corpus is very small and estimated embeddings could lead to low performance. To
solve this problem, we decided to use a pre-trained embeddings estimated over Wikipedia using
a particular approach called fastText [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ], this choice was made after previous tries over other
embeddings estimated from other corpus that lead to poor performance.
        </p>
        <p>
          Using this approach, after the sentence-matrix embeddings are calculated, following [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ]
terminologies, matrix's weights can be set to static or non-static. In the latter case, backward
propagation will be able to adjust its values otherwise they will stay xed as initially calculated
by the embedding function.
        </p>
        <p>In this way four possible combinations of sentence-matrix embeddings can be formulated:
(i) the use of a pre-trained embedding function (i.e., FastText from Wikipedia) and (ii) static
or non-static weights. From this combination the one composed of static weight without
pretrained embeddings won't be take in consideration for obvious reasons, meaning that the cases
in consideration will be three: (i) ES static, (ii) ES non-static, (iii) (no pre-trained embeddings)
non-static.</p>
        <p>N-gram embedding. Choosing n-grams as elements to be mapped by the embedding function,
raises more challenges respect simple words, because no pre-trained embeddings are available and
4 Preprocessor is a preprocessing
https://github.com/s/preprocessor
library
for
tweet
data
written
in</p>
        <p>Python,
in this case the corpus has to be signi cantly big, otherwise n-gram frequencies will be really low
and the estimation algorithm is not able to learn a valid embedding. Our insight was empirically
validated by a very low performance. Nevertheless, as explained in the following, this embedding
will be used in a particular model that won't rely its performance just over n-gram embeddings.
3.4</p>
      </sec>
      <sec id="sec-2-4">
        <title>Classi cation models</title>
        <p>
          Following, we describe the neural models used for the classi cation module, where for each of
them the input layer uses text representations described in Section 3.3 (i.e., sentence-matrix).
Fast text. This model was introduced in [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ], where its main di erence from our neural model
is the use of a particular input layer. In details, rather than using only words or only n-gram
as element for the embedding, both elements are embedded with the aim of capturing partial
information about words order. The architecture's idea is illustrated in Figure 1. Here the input
layer is directly fed into a Global Average Pooling layer, that transforms the sentence-matrix in a
single vector, which is projected into two dense layers. Regarding the architectural references in
[
          <xref ref-type="bibr" rid="ref3">3</xref>
          ], they used a number of hidden layers xed to ten, but we measured better performance using
just two layers, moreover we integrate both dropout, gaussian noise and batch normalization.
        </p>
        <p>
          Convolutional Neural Network. Convolutional Neural Networks (CNN) are considered state
of the art in many text classi cation problem. Therefore, we decide to use them in a simple
architecture composed by a convolutional layer, followed by a Global Max Pooling layer and two
dense layers. Between the two dense layers we used dropout(0.2) to avoid over tting.
KIM. This model was introduced in [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ]. It can be seen as a particular CNN where the
convolutional layer has multiple kernels' size and feature maps. The complete architecture is illustrated
in Figure 2, here the input layer (i.e., sentence-matrix) is processed in a convolutional layer of
multiple lters with di erent sizes, each of these results are fed into Max Pooling layers and
nally the concatenation of them (previously atten to be dimensional coherent) is projected into a
dense layer. The intuition behind this model is that smaller lter should be able to capture short
sentence patterns similar to n-grams, while bigger ones should capture sentence level features.
Regarding the architectural references in [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ], the number lter jf j and their size was optimized (via
grid search) leading to the following results: jf j = 4; f1 = 2 2; f2 = 3 3; f3 = 5 5; f4 = 7 7.
Long short-term memory. LSTM is a type of Recurrent Neural Network (RNN) that is
relatively insensitive to gap length. Thanks to this behavior, they are considered state of the art
in some NLP problems. Our architecture was made of an embedded input layer followed by an
LSTM layer of 128 units, terminated by a dense layer. Moreover, to avoid over tting we used
dropout (0.25) and recurrent dropout (0.25).
        </p>
        <p>Bidirectional LSTM. Similar to the previous model, bidirectional LSTM is a variation of
LSTM where the two RNN receive di erent inputs, the original and its reverse order, and their
results are connected through the recurrent layers. Our architecture follows the previous one with
an LSTM layer of 128 units terminating with two dense layers, where all layers used dropout
(0.25) and recurrent dropout(0.25).
4</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Evaluation</title>
      <p>In this section we are going to illustrate results from the comparative study elaborated during the
system development. First we illustrate the metric used to evaluate the system (Section 4.1) and
then we report results produced by a 10-fold cross validation over the given data set (Section 4.2),
nally we report our performance at the shared task (Section 4.3).
4.1</p>
      <sec id="sec-3-1">
        <title>Metrics</title>
        <p>System evaluation metrics were given by the organizers and reported here in the following
equations (1) to (4). Their choice was to use an F1 macro measure due to class unbalance in the
corpus.</p>
        <p>F1 macro =
1</p>
        <p>X F1(yl; y^l)
L
j j l2L
Following, we present a comparative study over possible combinations of pre-processing (Table 2)
and word embeddings (Table 3), in both cases results are calculated from averaging three runs
of a 10-fold cross validation over the complete data set. Notations used in Table 2 refer to the
one introduced in Section 3.2, where the listing of a notation means its use for the reported
result. Regarding the tweet speci c pre-processing, all the items have been substituted, with the
exception for URL and RW that have been removed. We report the contribution of each analysed
pre-processing alone. To not overwhelm reader with verbose data, reported results are focused
only over the two best performing model (Kim's model and FastText).</p>
        <p>From the analysis of Table 2 no absolute conclusion can be drawn, meaning that it wasn't
possible to nd a combination of pre-processing that gives the best performance for all the
models, meaning that each model is highly sensible to the performed combination. Nevertheless,
some relative observation can be made:
{ SW (i.e., removing Spanish stopwords) and NUM (i.e., substitute numbers with a constant
string) lead to performance improvement to all the model respect to no pre-processing at all,
{ ST (i.e., stemming) and HT (i.e., substitute hashtags with a constant string) decrease the
performance of both models respect to non-preprocessing at all.</p>
        <p>From above observations, to continue our study and x system's pre-processing pipeline, for
each classi cation model we decided to use the combination of pre-processings that singularly
applied give improvements to the system.</p>
        <p>Analysing results in Table 3, here the used notation refers to the one introduced in Section 3.3,
where the listing of a notation means its use as embedded input layer for the reported result.
From its analysis the following interpretation can be drawn:
For the system's submission, participants were allowed to send more than a model till a maximum
of 5 possible runs, table 5 reports our best performing systems at the COSET shared task.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Conclusions</title>
      <p>In this paper we have presented our participation in the IberEval2017 Classi cation Of Spanish
Election Tweets (COSET) shared task. Five distinct neural models were explored, in combination
with di erent types of preprocessing and text representation. From the systems evaluation it
wasn't possible to nd a combination of pre-processing that gives the best performance for all
the models, meaning that each model is highly sensible to the pipeline combination. Regarding
the analysed text representation, the setting of sentence matrix to non-static always leads to
good performance as a result of the speci c text under observation (i.e., a CMC corpus) and the
use of pre-trained word embedding is always suggested. Moreover, we outline a not so promising
performance of the recurrent model, meaning that for this task the word order (a feature well
captured by LSTM family model) seems not so prominent as in other tasks.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Gimenez</surname>
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Baviera</surname>
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Llorca</surname>
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gamir</surname>
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Calvo</surname>
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rosso</surname>
            <given-names>P.</given-names>
          </string-name>
          , Rangel F.
          <article-title>Overview of the 1st Classi cation of Spanish Election Tweets Task at IberEval 2017</article-title>
          .
          <article-title>In: Notebook Papers of 2nd SEPLN Workshop on Evaluation of Human Language Technologies for Iberian Languages (IBEREVAL), Murcia</article-title>
          , Spain,
          <source>September 19, CEUR Workshop Proceedings. CEUR-WS.org</source>
          ,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Kim</surname>
          </string-name>
          , Yoon.
          <article-title>"Convolutional neural networks for sentence classi cation</article-title>
          .
          <source>" arXiv preprint arXiv:1408.5882</source>
          (
          <year>2014</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Joulin</surname>
          </string-name>
          ,
          <string-name>
            <surname>Armand</surname>
          </string-name>
          , et al.
          <article-title>"Bag of tricks for e cient text classi cation</article-title>
          .
          <source>" arXiv preprint arXiv:1607.01759</source>
          (
          <year>2016</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>Edward</given-names>
            <surname>Loper</surname>
          </string-name>
          and
          <string-name>
            <given-names>Steven</given-names>
            <surname>Bird</surname>
          </string-name>
          .
          <year>2002</year>
          .
          <article-title>NLTK: the Natural Language Toolkit</article-title>
          .
          <source>In Proceedings of the ACL-02 Workshop on E ective tools and methodologies for teaching natural language processing and computational linguistics - Volume 1 (ETMTNLP '02)</source>
          , Vol.
          <volume>1</volume>
          . Association for Computational Linguistics, Stroudsburg, PA, USA,
          <fpage>63</fpage>
          -
          <lpage>70</lpage>
          . DOI=http://dx.doi.org/10.3115/1118108.1118117
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Bojanowski</surname>
          </string-name>
          , Piotr and Grave, Edouard and Joulin, Armand and Mikolov,
          <source>Tomas. "Enriching Word Vectors with Subword Information" arXiv preprint arXiv:1607.04606</source>
          (
          <year>2016</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Harris</surname>
          </string-name>
          ,
          <source>Zellig S. "Distributional structure." Word 10</source>
          .
          <fpage>2</fpage>
          -
          <lpage>3</lpage>
          (
          <year>1954</year>
          ):
          <fpage>146</fpage>
          -
          <lpage>162</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Bazzanella</surname>
            ,
            <given-names>Carla.</given-names>
          </string-name>
          <article-title>"Oscillazioni di informalita e formalita: scritto, parlato e rete." Formale e informale. La variazione di registro nella comunicazione elettronica</article-title>
          . Roma: Carocci (
          <year>2011</year>
          ):
          <fpage>68</fpage>
          -
          <lpage>83</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Cerruti</surname>
            , Massimo, and
            <given-names>Cristina</given-names>
          </string-name>
          <string-name>
            <surname>Onesti</surname>
          </string-name>
          .
          <article-title>"Netspeak: a language variety? Some remarks from an Italian sociolinguistic perspective." Languages go web: Standard and non-standard languages on the Internet (</article-title>
          <year>2013</year>
          ):
          <fpage>23</fpage>
          -
          <lpage>39</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9. Zhang, Ye, and
          <string-name>
            <given-names>Byron</given-names>
            <surname>Wallace</surname>
          </string-name>
          .
          <article-title>"A sensitivity analysis of (and practitioners' guide to) convolutional neural networks for sentence classi cation</article-title>
          .
          <source>" arXiv preprint arXiv:1510.03820</source>
          (
          <year>2015</year>
          ).
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>