<!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>Convolutional Neural Networks for Sentiment Analysis on Italian Tweets</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Giuseppe Attardi</string-name>
          <email>attardi@di.unipi.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Daniele Sartiano</string-name>
          <email>sartiano@di.unipi.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Chiara Alzetta</string-name>
          <email>c.alzetta@studenti.unipi.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Federica Semplici Dipartimento di Informatica</string-name>
          <email>f.semplici@studenti.unipi.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Università di Pisa Largo B. Pontecorvo</institution>
          ,
          <addr-line>3 I-56127 Pisa</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>English. The paper describes our submission to the task 2 of SENTIment POLarity Classification in Italian Tweets at Evalita 2016. Our approach is based on a convolutional neural network that exploits both word embeddings and Sentiment Specific word embeddings. We also experimented a model trained with a distant supervised corpus. Our submission with Sentiment Specific word embeddings achieved the first official score.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>Italiano. L’articolo descrive la nostra
partecipazione al task 2 di SENTIment
POLarity Classification in Italian Tweets
a Evalita 2016. Il nostro approccio si
basa su una rete neurale convoluzionale
che sfrutta sia word embeddings
tradizionali che sentiment specific word
embeddings. Abbiamo inoltre sperimentato
un modello allenato su un corpus
costruito mediante tecnica distant supervised. Il
nostro sistema, che utilizza Specific
Sentiment word embeddings, ha ottenuto il
primo punteggio officiale.
 Task 3: Irony Detection: identify if is
present the irony in a tweet.</p>
      <p>
        The state of the art on the polarity
classification of tweets is the application of Deep Learning
methods
        <xref ref-type="bibr" rid="ref9">(Nakov et al., 2016)</xref>
        , like convolutional
neural network or recurrent neural networks, in
particular long short-term memory networks
        <xref ref-type="bibr" rid="ref6">(Hochreiter, and Schmidhuber, 1997)</xref>
        .
      </p>
      <p>We explored Deep Learning techniques for the
sentiment analysis of English tweets at Semeval
2016 with good results, where we noticed that
use of convolutional neural network and
Sentiment Specific word embeddings was promising.</p>
      <p>We applied a similar approach for the Italian
language, building word embeddings from a big
corpus of Italian tweets, sentiment specific word
embeddings from positive and negative tweets,
using a convolutional neural network as
classifier. We also introduced a distant supervised
corpus as silver training set.</p>
      <p>We report the results of our experiments with
this approach on the task Evalita 2016 Sentipolc
Task 2 Polarity classification.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Description of the System</title>
      <p>The architecture of the system consists of the
following steps:
Oggi
non
mi
sento
molto
bene
EMO_SAD
embeddings
for each word
convolutional layer</p>
      <p>with
multiple filters
max over time
pooling</p>
      <p>Multilayer
percep</p>
      <p>
        tron
with dropout
 build word embeddings from a collection
of 167 million tweets collected with the
Twitter API over a period of May to
September 2016, preprocessed as described
later.
 build Sentiment Specific word
embeddings using a portion of these tweets split
into positive/negative by distant
supervision.
 train a convolutional neural network
classifier using one of the above word
embeddings
The convolutional neural network classifier
exploits pre-trained word embeddings as only
features in various configurations as described
below. The architecture of the classifier consists of
the following layers described in Figure 1: a
lookup layer for word embeddings, a
convolutional layer with a ReLU activation function, a
maxpooling layer, a dropout layer, a linear layer
with tanh activation and a softmax layer. This is
the same classifier described in
        <xref ref-type="bibr" rid="ref3">(Attardi and
Sartiano, 2016)</xref>
        , that achieved good results at the
SemEval 2016 task 4 on Sentiment Analysis in
Twitter
        <xref ref-type="bibr" rid="ref9">(Nakov et al., 2016)</xref>
        . Here we test it on a
similar task for Italian tweets.
2.1
      </p>
    </sec>
    <sec id="sec-3">
      <title>Data Preprocessing</title>
      <p>
        In order to build the word embeddings we
preprocessed the tweets using tools from the Tanl
pipeline
        <xref ref-type="bibr" rid="ref1">(Attardi et al., 2010)</xref>
        : the sentence
splitter and the specialized tweet tokenizer for the
tokenization and the normalization of tweets.
Normalization involved replacing the mentions
with the string “@mention”, emoticons with their
name (e.g. “EMO_SMILE”) and URLs with
“URL_NORM”.
2.2
      </p>
      <p>
        Word Embeddings and Sentiment
Specific Word Embeddings
We experimented with standard word
embeddings, in particular building them with the tool
word2vec1
        <xref ref-type="bibr" rid="ref8">(Mikolov, 2013)</xref>
        , using the skip-gram
model. These word embeddings though do not
take into account semantic differences between
words expressing opposite polarity, since they
basically encode co-occurrence information as
shown by
        <xref ref-type="bibr" rid="ref7">(Levy and Goldberg, 2014)</xref>
        . For
encodes sentiment information in the continuous
representation of words, we use the technique of
Tang et al. (2014) as implemented in the
DeepNL2 library
        <xref ref-type="bibr" rid="ref2">(Attardi, 2015)</xref>
        . A neural
network with a suitable loss function provides the
supervision for transferring the sentiment
polarity of texts into the embeddings from generic
tweets.
2.3
      </p>
    </sec>
    <sec id="sec-4">
      <title>Distant supervision</title>
      <p>
        The frequency distribution of classes in the
dataset, as shown in Table 1, seems skewed and not
fully representative of the distribution in a
statistical sample of tweets: negative tweets are
normally much less frequent than positive or neutral
ones
        <xref ref-type="bibr" rid="ref5">(Bravo-Marquez, 2015)</xref>
        . To reduce this bias
and to increase the size of the training set, we
selected additional tweets from our corpus of
Italian tweets by means distant supervision. In
the first step we selected the tweets belonging to
a class (positive, negative, neutral, mixed) via
regular expressions. In the second step, the
selected tweets are classified by the classifier
trained using the task trainset. The silver corpus
is built taking the tweets with the matched class
between the regular expression system and the
classifier.
1 https://code.google.com/archive/p/word2vec/
2 https://github.com/attardi/deepnl
      </p>
    </sec>
    <sec id="sec-5">
      <title>Experiments</title>
      <p>The plain word embeddings were built applying
vord2vec to a collection of 167 million Italian
unlabeled tweets, using the the skip gram model,
and the following parameters: embeddings size
300, window dimension 5, discarding word that
appear less than 5 times. We obtained about
450k word embeddings.</p>
      <p>The sentiment specific word embeddings
(SWE) were built with DeepNL, starting from
the word embeddings built at the previous step
and tuning them with a supervised set of positive
or negative tweets, obtained as follows from 2.3
million tweets selected randomly from our
corpus of collected tweets:
 Positive tweet: one that contains only
emoticons from a set of positive
emoticons (e.g. smiles, hearts, laughs,
expressions of surprise, angels and high fives).
</p>
      <p>Negative tweet: one that contains only
emoticons from a set of negative emotions
(e.g. tears, angry and sad).</p>
      <p>Integris srl cooperated to the task providing a set
of 1.3 million tweets, selected by relying on a
lexicon of handcrafted polarized words. This
resource is also added to the corpus.</p>
      <p>We split the training set provided for the
Evalita 2016 SentiPolc Task into a train set
(5335 tweets), a validation set (592 tweets) and a
test set (1482 tweets). This dataset was tokenized
and normalized as described in Section 2.1.</p>
      <p>For the take of participating to subtask 2,
polarity classification, the 13-value annotations
present in the datasets were converted into four
values: “neutral”, “positive”, “negative” and
“mixed” depending on the values of the fields
“opos” and “oneg”, which express the tweet
polarity, according to the task guidelines3. We did
not take into account the values for “lpos” and
“lneg”.</p>
      <p>The frequency distribution of these classes
turns out to be quite unbalanced, as shown in
Table 1.
3
http://www.di.unito.it/~tutreeb/sentipolcevalita16/sentipolcguidelines2016UPDATED130916.pdf
The training set is still fairly small, compared for
example to the size of the corpus used in
SemEval 2106. The “mixed” class in particular is
small in absolute numbers, even though not in
percentage value, which makes hard to properly
train a ML classifier.</p>
      <p>Therefore we tried to increase the training set
by means of the distant supervision as described
above: we selected a maximum of 10,000 tweets
for class via regular expressions, then we
classified them with the classifier trained with the gold
training set. We chose for addition into a silver
training set, the tweets which were assigned by
the classifier the same class of the regular
expression. As reported in Table 2, the silver dataset
remains unbalanced; in particular, no “mixed”
example was added to the original train set.</p>
      <p>Class Train set Dev set
Neutral 8505 554
Negative 5987 513
Positive 6813 312
Mixed 337 103</p>
      <p>Table 2. Distant supervised dataset distribution.</p>
      <p>Table 3 shows the common settings used for
training the classifier. We used the same parameters
as SemEval-2016.</p>
      <p>Word Embeddings Size
Hidden Units
Dropout Rate
Batch size
Adadelta Decay
Epochs
We performed extensive experiments with the
classifier in various configurations, varying the
number of filters; the use of skip-gram word
embeddings or sentiment specific word
embeddings; different training sets, either the gold one
or the silver one. Results of the evaluation on the
validation set allowed us to choose the best
settings, as listed in the Table 4. Best Settings.</p>
      <p>Embeddings
Training set</p>
      <p>Filters
4</p>
    </sec>
    <sec id="sec-6">
      <title>Results</title>
      <p>Run1
WE skipgram
Gold Silver Gold
2,3,5 4,5,6,7 7,7,7,7,8,8,8,8</p>
      <p>Table 4. Best Settings</p>
      <p>Run2
SWE</p>
      <p>Silver
7,8,9,10
We submitted four runs for the subtask 2
“polarity classification”:



</p>
      <p>UniPI_1.c: gold training set, word
embeddings with skip-gram model, filters:
“2,3,5”.</p>
      <p>UniPI_1.u: silver corpus as training set,
word embeddings with skip-gram model,
filters: “4,5,6,7”.</p>
      <p>UniPI_2.c: gold training set, sentiment
specific word embeddings, filters:
“7,7,7,7,8,8,8,8”.</p>
      <p>UniPI_2.u: silver corpus as training set,
sentiment specific word embeddings,
filters: “7,8,9,10”.</p>
      <p>The following table reports the top official
results for the subtask 2:</p>
      <p>System
UniPI_2.c
team1_1.u
team1_2.u
team4_.c
team3_.1.c
team5_2.c
team3_.2.c
UniPI_1.u
UniPI_1.c</p>
      <p>Positive
F-score
0.685
0.6354
0.6312
0.644
0.6265
0.6426
0.6395
0.6699
0.6766</p>
      <p>Negative
F-score
0.6426
0.6885
0.6838
0.6605
0.6743
0.648
0.6469
0.6146
0.6002</p>
      <p>Combined</p>
      <p>F-score
0.6638
0.662
0.6575
0.6522
0.6504
0.6453
0.6432
0.6422
0.6384
UniPI_2.u 0.6586 0.5654 0.612</p>
      <p>Table 5. Top official results for SentiPolc subtask 2.
The run UniPI_2.c achieved the top overall score
among a total of 26 submissions to task 2. This
confirms the effectiveness of sentiment specific
word embeddings in sentiment polarity
classification also for Italian tweets.</p>
      <p>The use of an extended silver corpus did not
provide significant benefits, possibly because the
resulting corpus was still unbalanced.</p>
      <p>In addition to the subtask 2, we submitted one
run for the Task 1 “Subjectivity Classification”:
given a message, decide whether the message is
subjective or objective. We used the same
classifier for the subtask 2, using only two classes
(subjective, objective), with the same skip-gram
word embeddings used for the other task and the
configuration listed in Table 3, using the following
filters: “7,8,9,10”, without performing extensive
experiments. The following table reports the top
official results for the subtask 1:</p>
      <p>system
team1_1.u</p>
      <p>Objective
F-score
0.6784</p>
      <p>Subjective</p>
      <p>F-score
0.8105</p>
      <p>Combined</p>
      <p>F-score
0.7444
team1_2.u
team2_.1.c
team3_.2.c
team4_.c
team5_2.c
team6_.c
team1_.c
UniPI_1
team3_.1.c
team8_.c
We confirmed the validity of the convolutional
neural networks in the twitter sentiment
classification, also for the Italian language.</p>
      <p>The system achieved top score in the task 2 of
SENTiment POLarity Classification Task of
Evalita 2016.</p>
    </sec>
    <sec id="sec-7">
      <title>Acknowledgments</title>
      <p>We gratefully acknowledge the support of the
University of Pisa through project PRA and
NVIDIA Corporation for a donation of the Tesla
K40 GPU used in the experiments.</p>
      <p>Integris srl cooperated by providing a corpus
of sentiment annotated tweets.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <string-name>
            <given-names>Giuseppe</given-names>
            <surname>Attardi</surname>
          </string-name>
          , Stefano Dei Rossi, and
          <string-name>
            <given-names>Maria</given-names>
            <surname>Simi</surname>
          </string-name>
          .
          <year>2010</year>
          .
          <article-title>The Tanl Pipeline</article-title>
          .
          <source>In Proc. of LREC Workshop on WSPP, Malta.</source>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          <string-name>
            <given-names>Giuseppe</given-names>
            <surname>Attardi</surname>
          </string-name>
          .
          <year>2015</year>
          .
          <article-title>DeepNL: a Deep Learning NLP pipeline</article-title>
          .
          <source>Workshop on Vector Space Modeling for NLP. Proc. of NAACL HLT</source>
          <year>2015</year>
          , Denver, Colorado (June 5,
          <year>2015</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <string-name>
            <given-names>Giuseppe</given-names>
            <surname>Attardi</surname>
          </string-name>
          and
          <string-name>
            <given-names>Daniele</given-names>
            <surname>Sartiano</surname>
          </string-name>
          .
          <year>2016</year>
          .
          <article-title>UniPI at SemEval-2016 Task 4: Convolutional Neural Networks for Sentiment Classification</article-title>
          .
          <source>Proceedings of SemEval</source>
          ,
          <fpage>220</fpage>
          -
          <lpage>224</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          <string-name>
            <given-names>Francesco</given-names>
            <surname>Barbieri</surname>
          </string-name>
          , Valerio Basile, Danilo Croce, Malvina Nissim, Nicole Novielli, and
          <string-name>
            <given-names>Viviana</given-names>
            <surname>Patti</surname>
          </string-name>
          .
          <year>2016</year>
          .
          <article-title>Overview of the EVALITA 2016 SENTiment POLarity Classification Task</article-title>
          .
          <source>In Proceedings of Third Italian Conference on Computational Linguistics</source>
          (CLiC-it
          <year>2016</year>
          ) &amp;
          <article-title>Fifth Evaluation Campaign of Natural Language Processing and Speech Tools for Italian</article-title>
          .
          <source>Final Workshop (EVALITA</source>
          <year>2016</year>
          ).
          <article-title>Associazione Italiana di Linguistica Computazionale (AILC).</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          <string-name>
            <given-names>Felipe</given-names>
            <surname>Bravo-Marquez</surname>
          </string-name>
          , Eibe Frank, and
          <string-name>
            <given-names>Bernhard</given-names>
            <surname>Pfahringer</surname>
          </string-name>
          .
          <year>2015</year>
          .
          <article-title>Positive, negative, or neutral: Learning an expanded opinion lexicon from emoticon-annotated tweets</article-title>
          .
          <source>IJCAI</source>
          <year>2015</year>
          . AAAI Press.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          <string-name>
            <given-names>Sepp</given-names>
            <surname>Hochreiter</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Jürgen</given-names>
            <surname>Schmidhuber</surname>
          </string-name>
          .
          <article-title>(1997). Long short-term memory</article-title>
          .
          <source>Neural computation 9.</source>
          <volume>8</volume>
          <fpage>1735</fpage>
          -
          <lpage>1780</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          <string-name>
            <given-names>Omer</given-names>
            <surname>Levy</surname>
          </string-name>
          and
          <string-name>
            <given-names>Yoav</given-names>
            <surname>Goldberg</surname>
          </string-name>
          .
          <year>2014</year>
          .
          <article-title>Neural Word Embedding as Implicit Matrix Factorization</article-title>
          .
          <source>In Advances in neural information processing systems.</source>
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          <string-name>
            <given-names>Tomas</given-names>
            <surname>Mikolov</surname>
          </string-name>
          , Ilya Sutskever, Kai Chen, Greg S. Corrado, and
          <string-name>
            <given-names>Jeff</given-names>
            <surname>Dean</surname>
          </string-name>
          .
          <year>2013</year>
          .
          <article-title>Distributed representations of words and phrases and their compositionality</article-title>
          .
          <source>Advances in Neural Information Processing Systems</source>
          . arXiv:
          <volume>1310</volume>
          .
          <fpage>4546</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          <string-name>
            <given-names>Preslav</given-names>
            <surname>Nakov</surname>
          </string-name>
          , Alan Ritter, Sara Rosenthal, Fabrizio Sebastiani, and
          <string-name>
            <given-names>Veselin</given-names>
            <surname>Stoyanov</surname>
          </string-name>
          .
          <year>2016</year>
          .
          <article-title>SemEval2016 task 4: Sentiment analysis in Twitter</article-title>
          .
          <source>In Proceedings of the 10th international workshop on semantic evaluation (SemEval</source>
          <year>2016</year>
          ), San Diego, US (forthcoming).
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          <string-name>
            <given-names>Duyu</given-names>
            <surname>Tang</surname>
          </string-name>
          , Furu Wei, Nan Yang,
          <string-name>
            <surname>Ming Zhou</surname>
            , Ting Liu, and
            <given-names>Bing</given-names>
          </string-name>
          <string-name>
            <surname>Qin</surname>
          </string-name>
          .
          <year>2014</year>
          ,
          <article-title>June. Learning Sentiment-Specific Word Embedding for Twitter Sentiment Classification</article-title>
          .
          <source>In ACL (1)</source>
          (pp.
          <fpage>1555</fpage>
          -
          <lpage>1565</lpage>
          ).
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>