<!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>Predicting Emoji Exploiting Multimodal Data: FBK Participation in ITAmoji Task</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Andrei Catalin Coman</string-name>
          <email>coman@fbk.eu</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Yaroslav Nechaev</string-name>
          <email>nechaev@fbk.eu</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Giacomo Zara</string-name>
          <email>gzara@fbk.eu</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Fondazione Bruno Kessler</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>English. In this paper, we present our approach that has won the ITAmoji task of the 2018 edition of the EVALITA evaluation campaign1. ITAmoji is a classification task for predicting the most probable emoji (a total of 25 classes) to go along with the target tweet written by a given person in Italian. We demonstrate that using only textual features is insufficient to achieve reasonable performance levels on this task and propose a system that is able to benefit from the multimodal information contained in the training set, enabling significant F1 gains and earning us the first place in the final ranking.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>Italiano. In questo articolo presentiamo
l’approccio con cui abbiamo vinto la
competizione ITAmoji dell’edizione 2018 di
EVALITA1. ITAmoji e` un task di
classificazione per predire l’emoji piu`
probabile (tra un totale di 25 classi) che possa
essere associato ad un dato tweet scritto
in italiano da uno specifico utente.
Dimostriamo che utilizzare esclusivamente
dati testuali non e` sufficiente per ottenere
un ragionevole livello di performance su
questo task, e proponiamo un sistema in
grado di beneficiare dalle informazioni
multimodali contenute nel training set,
aumentando significativamente lo score F1
e guadagnando la prima posizione nella
classifica finale.</p>
    </sec>
    <sec id="sec-2">
      <title>1 Introduction</title>
      <p>Particularly over the last few years, with the
increasing presence of social networks and instant
1EVALITA: http://evalita.it/2018
messaging services in our lives, we have been
witnessing how common it has become for average
users to enrich natural language by means of
emojis. An emoji is essentially a symbol placed
directly into the text, which is meant to convey a
simple concept or more specifically, as the name
says, an emotion.</p>
      <p>
        The emoji phenomenon has attracted
considerable research interest. In particular, recent works
have studied the connection between the natural
language and the emojis used in a specific piece
of text. The 2018 edition of EVALITA ITAmoji
competition
        <xref ref-type="bibr" rid="ref2 ref8">(Ronzano et al., 2018)</xref>
        is a prime
example of such interest. In this competition,
participants were asked to predict one of the 25
emojis to be used in a given Italian tweet based on a
text, the date and the user that has written it.
Differently from the similar SemEval
        <xref ref-type="bibr" rid="ref2 ref8">(Barbieri et al.,
2018)</xref>
        challenge, the addition of the user
information significantly expanded the scope of potential
solutions that could be devised.
      </p>
      <p>In this paper, we describe our neural
networkbased system that exhibited the best performance
among the submitted approaches in this task. Our
approach is able to successfully exploit user
information, such as the prior emoji usage history
of a user, in conjunction with the textual features
that are customary for this task. In our
experiments, we have found that the usage of just the
textual information from the tweet provides
limited results: none of our text-based models were
able to outperform a simple rule-based baseline
based on prior emoji history of a target user.
However, by considering all the modalities of the input
data that were made available to us, we were able
to improve our results significantly. Specifically,
we combine into a single efficient neural network
the typical Bi-LSTM-based recurrent architecture,
that has shown excellent performance previously
in this task, with the multilayer perceptron applied
to user-based features.
ITAmoji task is a classification task of predicting
one of the 25 emojis to go along with the tweet.
The training set provided by the organizers of the
competition consists of 250 000 Italian tweets,
including for each tweet the text (without the target
emoji), the user ID and the timestamp as features.
Participants were explicitly forbidden to expand
the training set. Figure 1 provides an overview of
our approach. In this section, we provide detailed
descriptions of the methods we employed to solve
the proposed task.
2.1</p>
      <sec id="sec-2-1">
        <title>Textual features</title>
        <p>
          In order to embed the textual content of the tweet,
we have decided to apply a vectorization based on
fastText
          <xref ref-type="bibr" rid="ref3">(Bojanowski et al., 2017)</xref>
          , a recent
approach for learning unsupervised low-dimensional
word representations. fastText sees the words
as a collection of character n-grams, learning a
representation for each n-gram. fastText
follows the famous distributional semantics
hypothesis utilized in other approaches, such as LSA,
word2vec and GloVe. In this work, we exploit the
Italian embeddings trained on text from Wikipedia
and Common Crawl2 and made available by the
fastText authors3. Such embeddings include
300-dimensional vectors for each of 2M words in
the vocabulary. Additionally, we have trained our
own4 embeddings using the corpus of 48M
Italian tweets that were acquired from Twitter
Streaming API. This yielded 1.1M 100-dimensional word
vectors. Finally, we have also conducted
experiments with word vectors suggested by the task
organizers
          <xref ref-type="bibr" rid="ref1">(Barbieri et al., 2016)</xref>
          .
        </p>
        <p>2http://commoncrawl.org/
3https://github.com/facebookresearch/
fastText/blob/master/docs/crawl-vectors.
md</p>
        <sec id="sec-2-1-1">
          <title>4https://doi.org/10.5281/zenodo.</title>
          <p>1467220
2.2</p>
        </sec>
      </sec>
      <sec id="sec-2-2">
        <title>User-based features</title>
        <p>Rather than relying solely on a text of the target
tweet, we exploit additional user-based features
to improve performance. The task features many
variations of the smiling face and three different
heart emojis, making it impossible even for a
human to determine the most suitable one just based
on a tweet. One of the features we considered
was the prior emoji distribution for a target author.
The hypothesis was that the choice of a particular
emoji is driven mainly by the personal user
preferences exemplified by the previous emoji choices.</p>
        <p>To this end, we have collected two different
types of emoji history for each user. Firstly, we
use labels in the training set to compute emoji
distributions for each user yielding vectors of size 25.
Users from the test set that were not present in
the training set were initialized with zeroes.
Secondly, we have gathered the last 200 tweets for
each user using Twitter API5, and then extracted
and counted all emojis that were present in those
tweets. This yielded a sparse vector of size 1284.
At this step we took extra care to prevent data
leaks: if a tweet from the test set ended up in the
collected 200 tweets, it wasn’t considered in the
user history. The runs that used the former,
training set-based approach had a ” tr” suffix in its
name. The ones that used the full user
historybased approach had a ” ud” suffix.</p>
        <p>
          In addition to prior emoji distribution, we did
preliminary experiments with user’s social graph.
Social graph, which is a graph of connections
between the users, is shown to be an important
feature for many tasks on social media, for example,
user profiling. We followed the recently proposed
approach
          <xref ref-type="bibr" rid="ref5 ref6 ref7">(Nechaev et al., 2018a)</xref>
          to acquire
300dimensional dense user representations based on a
social graph. This feature, however, did not
improve the performance of our approach and was
excluded.
        </p>
        <sec id="sec-2-2-1">
          <title>5https://developer.twitter.com</title>
        </sec>
      </sec>
      <sec id="sec-2-3">
        <title>RNN exploiting textual features</title>
        <p>The Recurrent Neural Networks have turned out
to be a powerful architecture when it comes to
analyzing and performing prediction on sequential
data. In particular, over the last few years,
different variations of the RNN has shown to be the top
performing approaches for a wide variety of tasks,
including tasks in Natural Language Processing
(NLP). RNN consumes the input sequence one
element at the time, modifying the internal state
along the way to capture relevant information from
the sequence. When used for NLP tasks, RNN is
able to consider the entirety of the target sentence,
capturing even the longest dependencies within
the text. In our system, we use the bi-directional
long short-term memory (Bi-LSTM) variation of
the RNN. This variation uses two separate RNNs
to traverse the input sequence in both directions
(hence bi-directional) and employs LSTM cells.</p>
        <p>Input text provided by the organizers is split into
tokens using a modified version of the Keras
tokenizer (can be found in our repository). Then, the
input tokens are turned into word vectors of fixed
dimensionality using the embedding matrix of one
of the approaches listed in Section 2.1. The
resulting sequence is padded with zeroes to a constant
length, in our case 48, and fed into the neural
network.
2.4</p>
      </sec>
      <sec id="sec-2-4">
        <title>Overall implementation</title>
        <p>In order to accommodate both textual and
userbased features, we devise a joint architecture that
takes both types of features as input and produces
probability distribution for the target 25 classes.
The general logic of our approach is shown in
Figure 1. The core consists of two main components:
Bi-LSTM. The recurrent unit consumes the
input sequence one vector at a time,
modifying the hidden state (i.e., memory). After the
whole sequence is consumed in both
directions, the internal states of the two RNNs are
concatenated and used as a tweet embedding.
Additionally, we perform l2-regularization of
the input embedding matrix and the dropout
to prevent overfitting and fine-tune the
performance. Table 1a details the hyperparameters
we used for a textual part of our approach.
User-based features. The emoji distribution
we collected (as described in Section 2.2)
was fed as input to a multilayer perceptron:
two densely-connected layers with tanh as
activation and l2-regularization to prevent
overfitting. Table 1b showcases the chosen
hyperparameters for this component using
the full user history as input.</p>
        <p>The outputs of the two components are then
concatenated and a final layer with the sof tmax
activation is applied to acquire the probability
distribution of the 25 emoji labels. The network is
then optimized jointly with cross entropy as the
objective function using Adam optimizer. Table 1c
includes all relevant hyperparameters we used for
this step.</p>
        <p>Since the runs are evaluated based on macro-F1,
in order to optimize our approach for this metric,
we have introduced class weights into the
objective function. Each class i is associated with the
weight equal to:
wi =
maxi(N )</p>
        <p>Ni
(1)
where Ni is the amount of samples in a particular
class and = 1:1 is a hyperparameter we tuned
for this task. This way the optimizer is assigning
a greater penalty for mistakes in rare classes, thus
optimising for the target metric.</p>
        <p>During the training of our approach, we employ
an early stopping criteria to halt the training once
the performance on the validation set stops
improving. In order to properly evaluate our system,
we employ 10-fold cross-validation, additionally
extracting a small validation set from the
training set for that fold to perform the early stopping.
For the final submission we use a simple ensemble
mechanism, where predictions are acquired
independently from each fold and then averaged out to
produce the final submission. Additionally, one of
the runs was submitted using predictions from the
random fold. Runs exploiting the ensemble
approach have the ” 10f” suffix, while runs using
just one fold have the ” 1f” suffix.</p>
        <p>The code used to preprocess data, train and
evaluate our approach is available on GitHub6.
3</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Evaluation setting</title>
      <p>In this section, we provide details on some of the
approaches we have tested during the development
of our system, as well as the models we submitted
for the official evaluation. In this paper, we report
results for the following models:</p>
      <p>MF HISTORY. A rule-based baseline that
always outputs the most frequent emoji from
the user history based on a training set.</p>
      <p>BASE CNN. A basic Convolutional Neural
Network (CNN) taking word embeddings as
input without any user-based features.</p>
      <p>BASE LSTM. A Bi-LSTM model described
in Section 2.3 used with textual features only.
BASE LSTM TR. The complete approach
including both feature families with emoji
distribution coming from the training set.</p>
      <p>BASE LSTM UD. The complete approach
with emoji distribution coming from the most
recent 200 tweets for each user.</p>
      <p>For the other models tested during our local
evaluation and complete experimental results, please
refer to our GitHub repository.</p>
      <p>Additionally, for the BASE LSTM approach we
report performance variations due to a choice</p>
      <sec id="sec-3-1">
        <title>6GitHub repository:</title>
        <p>Remper/emojinet
https://github.com/
of a particular word embedding approach. In
particular, provided refers to the ones that
were suggested by organisers, custom-100d
indicates our fastText-based embeddings and
common-300d refers to the ones available on
fastText website. Table 2 details the
performances of the mentioned models.</p>
        <p>Finally, we submitted three of our best
models for the official evaluation. All of the
submitted runs use the Bi-LSTM approach with
our custom-100d word embeddings along with
some variation of user emoji distribution as
detailed in Section 2.2. Two of the runs use the
ensembling trick using all available cross-validation
folds, while the remaining one we submitted
(” 1f”) uses predictions from just one fold.
4</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Results</title>
      <p>Here we report performances of the models
benchmarked both during our local evaluation (Table 2)
and the official results (Table 3). We started
experiments with just the textual models testing
different architectures and embedding
combinations. Among those, the Bi-LSTM architecture
was a clear choice, providing 1-2% F1 over CNN,
which led to us abandoning the CNN-based
models. Among the three word embedding
models we evaluated, our custom-100d
embedding exhibited the best performance on Bi-LSTM,
while common-300d showed the best
performance using the CNN architecture.</p>
      <p>After we have acquired the user emoji
distributions, we have devised a simple baseline
(MF HISTORY), which, to our surprise,
outperformed all the text-based models we’ve tested so
far: 3% F1 improvement compared to the best
BiLSTM model. When we introduced the user emoji
histories in our approach, we have gained a
significant performance gain: 4% when using the scarce
training set data and 12% when using the complete
user history of 1284 emojis from recent tweets.
During the final days of the competition, we have
tried to exploit other user-based features to further
bolster our results, for example, the social graph
of a user. Unfortunately, such experiments did not
yield performance gains before the deadline.</p>
      <p>During the official evaluation, complete user
history-based runs exhibited top performance with
ensembling trick actually decreasing the final F1.
As we expected from our experiments, training
set-based emoji distribution was much less
perApproach
MF HISTORY
BASE CNN
BASE LSTM
BASE LSTM
BASE LSTM
BASE LSTM TR
BASE LSTM UD</p>
      <p>Embedding</p>
      <p>–
common-300d
common-300d</p>
      <p>provided
custom-100d
custom-100d
custom-100d
Run
BASE UD 1F
BASE UD 10F
BASE TR 10F
gw2017 p.list
F1 macro
formant but still offered significant improvement
over the runner-up team (gw2017 p.list) as
shown in Table 3. Additionally, we detail the
performance of our best submission (BASE UD 1F)
for each individual emoji in Table 4 and Figure 2.
5</p>
    </sec>
    <sec id="sec-5">
      <title>Discussion and Conclusions</title>
      <p>Our findings suggest that emojis are currently used
mostly based on user preferences: the more prior
user history we added, the more significant
performance boost we have observed. Therefore, the
emojis in a text cannot be considered
independently from the person that has used them and
textual features alone can not yield a sufficiently
performant approach for predicting emojis.
Additionally, we have shown that the task was sensitive
to the choice of a particular neural architecture as
well as to the choice of the word embeddings used
to represent text.</p>
      <p>
        An analogous task was proposed to the
participants of the SemEval 2018 competition. The
winners of that edition applied an SVM-based
approach for the classification
        <xref ref-type="bibr" rid="ref4 ref6 ref7">(C¸ o¨ ltekin and Rama,
2018)</xref>
        . Instead, we have opted for a neural
network-based architecture that allowed us greater
flexibility to experiment with various features
coming from different modalities: the text of the
tweet represented using word embeddings and the
sparse user-based history. During our experiments
with the SemEval 2018 task as part of the NL4AI
workshop
        <xref ref-type="bibr" rid="ref5">(Coman et al., 2018)</xref>
        , we have found the
CNN-based architecture to perform better, while
here the RNN was a clear winner. Such
discrepancy might suggest that even within the emoji
prediction task the effectiveness of different
approaches may significantly vary based either on
a language of the tweets or based on a way the
dataset was constructed.
      </p>
      <p>
        In the future, we would like to investigate this
topic further by trying to study differences in
emoji usage between languages and communities.
Additionally, we aim to further improve our
approach by identifying more user-based features,
for example, by taking into account the feature
families suggested by Nechaev et al.
        <xref ref-type="bibr" rid="ref5 ref6 ref7">(Nechaev et
al., 2018b)</xref>
        .
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <string-name>
            <given-names>Francesco</given-names>
            <surname>Barbieri</surname>
          </string-name>
          , German Kruszewski, Francesco Ronzano, and
          <string-name>
            <given-names>Horacio</given-names>
            <surname>Saggion</surname>
          </string-name>
          .
          <year>2016</year>
          .
          <article-title>How cosmopolitan are emojis?: Exploring emojis usage and meaning over different languages with distributional semantics</article-title>
          .
          <source>In Proceedings of the 2016 ACM on Multimedia Conference</source>
          , pages
          <fpage>531</fpage>
          -
          <lpage>535</lpage>
          . ACM.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          <string-name>
            <given-names>Francesco</given-names>
            <surname>Barbieri</surname>
          </string-name>
          , Jose Camacho-Collados, Francesco Ronzano, Luis Espinosa-Anke, Miguel Ballesteros, Valerio Basile, Viviana Patti, and
          <string-name>
            <given-names>Horacio</given-names>
            <surname>Saggion</surname>
          </string-name>
          .
          <year>2018</year>
          . SemEval
          <article-title>-2018 Task 2: Multilingual Emoji Prediction</article-title>
          .
          <source>In Proc. of the 12th Int. Workshop on Semantic Evaluation (SemEval-2018)</source>
          , New Orleans, LA,
          <string-name>
            <given-names>United</given-names>
            <surname>States</surname>
          </string-name>
          .
          <article-title>Association for Computational Linguistics</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <string-name>
            <given-names>Piotr</given-names>
            <surname>Bojanowski</surname>
          </string-name>
          , Edouard Grave, Armand Joulin, and
          <string-name>
            <given-names>Tomas</given-names>
            <surname>Mikolov</surname>
          </string-name>
          .
          <year>2017</year>
          .
          <article-title>Enriching word vectors with subword information</article-title>
          .
          <source>Transactions of the Association for Computational Linguistics</source>
          ,
          <volume>5</volume>
          :
          <fpage>135</fpage>
          -
          <lpage>146</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          <string-name>
            <surname>C¸agri C¸</surname>
          </string-name>
          <article-title>o¨ltekin and</article-title>
          <string-name>
            <given-names>Taraka</given-names>
            <surname>Rama</surname>
          </string-name>
          .
          <year>2018</year>
          .
          <article-title>Tu¨bingenoslo at semeval-2018 task 2: Svms perform better than rnns in emoji prediction</article-title>
          .
          <source>In Proc. of The 12th Int. Workshop on Semantic Evaluation</source>
          , SemEval@NAACL-HLT, New Orleans, Louisiana, pages
          <fpage>34</fpage>
          -
          <lpage>38</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          <string-name>
            <given-names>Andrei</given-names>
            <surname>Catalin</surname>
          </string-name>
          <string-name>
            <surname>Coman</surname>
          </string-name>
          , Giacomo Zara, Yaroslav Nechaev, Gianni Barlacchi, and
          <string-name>
            <given-names>Alessandro</given-names>
            <surname>Moschitti</surname>
          </string-name>
          .
          <year>2018</year>
          .
          <article-title>Exploiting deep neural networks for tweet-based emoji prediction</article-title>
          .
          <source>In Proc. of the 2nd Workshop on Natural Language for Artificial Intelligence co-located with 17th Int. Conf. of the Italian Association for Artificial Intelligence (AI*IA</source>
          <year>2018</year>
          ), Trento, Italy.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          <string-name>
            <given-names>Yaroslav</given-names>
            <surname>Nechaev</surname>
          </string-name>
          , Francesco Corcoglioniti, and
          <string-name>
            <given-names>Claudio</given-names>
            <surname>Giuliano</surname>
          </string-name>
          . 2018a.
          <article-title>Sociallink: Exploiting graph embeddings to link dbpedia entities to twitter profiles</article-title>
          .
          <source>Progress in AI</source>
          ,
          <volume>7</volume>
          (
          <issue>4</issue>
          ):
          <fpage>251</fpage>
          -
          <lpage>272</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          <string-name>
            <given-names>Yaroslav</given-names>
            <surname>Nechaev</surname>
          </string-name>
          , Francesco Corcoglioniti, and
          <string-name>
            <given-names>Claudio</given-names>
            <surname>Giuliano</surname>
          </string-name>
          . 2018b.
          <article-title>Type prediction combining linked open data and social media</article-title>
          .
          <source>In Proc. of the 27th ACM Int. Conf. on Information and Knowledge Management</source>
          ,
          <string-name>
            <surname>CIKM</surname>
          </string-name>
          <year>2018</year>
          , Torino, Italy, pages
          <fpage>1033</fpage>
          -
          <lpage>1042</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          <string-name>
            <given-names>Francesco</given-names>
            <surname>Ronzano</surname>
          </string-name>
          , Francesco Barbieri, Endang Wahyu Pamungkas, Viviana Patti, and
          <string-name>
            <given-names>Francesca</given-names>
            <surname>Chiusaroli</surname>
          </string-name>
          .
          <year>2018</year>
          .
          <article-title>Overview of the evalita 2018 italian emoji prediction (itamoji) task</article-title>
          . In Tommaso Caselli, Nicole Novielli, Viviana Patti, and Paolo Rosso, editors,
          <source>Proceedings of the 6th evaluation campaign of Natural Language Processing and Speech tools for Italian (EVALITA'18)</source>
          , Turin, Italy. CEUR.org.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>