<!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>Stacked Bots and Gender Prediction from Twitter Feeds</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>Sofia University</institution>
          ,
          <addr-line>Sofia</addr-line>
          ,
          <country country="BG">Bulgaria</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2019</year>
      </pub-date>
      <abstract>
        <p>This paper describes an approach of predicting bots and gender from twitter feeds in English only. Given an author Twitter feed, the task is to identify whether it is a bot or human and in case of human to profile the gender of the author. The submitted system is a stack of two models. In the first model, the feeds are represented as TF-IDF vectors. The second model is based on Doc2Vec feeds representations. Both models use the same pre-processing pipeline and multilayer perceptron neural network in order to classify the tweets.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1 Introduction</title>
      <p>Over the last years bots have flooded social media, serving different purposes, such as
commercial and political. In order to achieve their goal, bots are spreading fake news.
Some bots promote specific products, while others could pose a thread for the security,
spreading news or opinions on political or ideological bases. Thus identification of bots
on social media is very important task nowadays.</p>
      <p>
        In the past years PAN have organized several tasks on author profiling. This year’s
Author Profiling task at PAN 2019 [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] is different from the previous years, since
classification is separated into two sub-tasks. The first sub-task is to identify whether the
author of a Twitter feed is a bot or a human. The second sub-task is continuation of the
first one, profiling the author in case of human. The performance of the submitted
solutions is ranked bu accuracy. The accuracy is calculated for both sub-tasks separately,
where the final accuracy result will be average per language. Further details about Bots
and Gender Profiling task can be found in [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
      </p>
      <p>This paper presents an approach of predicting bots and gender, only for English
language. The system predicts for both classification sub-tasks: (i) bot or human; (ii)
bot, male or female.</p>
      <p>The remaining of this paper is organized as follows: Section 2 gives a brief overview
of relevant previous work. Section 3 describes the dataset. Section 4 presents the core
system stack based on two models. Section 5 presents the experiments and discusses
the evaluation results. Finally, Section 6 concludes and points to possible directions for
future work.</p>
    </sec>
    <sec id="sec-2">
      <title>Related Work</title>
      <p>Author profiling has been explored in PAN lab for years. Wide range of machine
learning algorithms have been presented, including deep learning.</p>
      <p>
        Giovanni Ciccone et. al. [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] predict gender from tweet texts and images, using stack
composed of two main parts. The first one, predicts gender from texts, based on n-grams
and TF–IDF. The second part consists of different layers of classifiers, predicting gender
from images. Both predictions, from texts and images, feed into a classifier that outputs
the final prediction.
      </p>
      <p>
        Adam Poulston et. al. [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] present an approach of predicting gender from tweets,
based on stack of two classifiers: a logistic regression classifier trained on TF–IDF
transformed n-grams and a gaussian process classifier trained on word embedding
clusters.
3
      </p>
    </sec>
    <sec id="sec-3">
      <title>Dataset</title>
      <p>The English part of the training dataset of the Bots and Gender Profiling task consists of
4120 files. Every file contains 100 tweets from an unique author. The dataset is balanced
for both sub-tasks. The labeling of the two sub-tasks is as follows:(i) classification by
type: human or bot; (ii) classification by gender: bot, male or female.</p>
      <p>The training dataset is further separated into train and development parts, which are
balanced as well.
4</p>
    </sec>
    <sec id="sec-4">
      <title>Overview of the Proposed System</title>
      <p>This section describes the two parts of the stacked model. Both parts use the same
preprocessing pipeline and multilayer perceptron neural network, where outputs one-hot
vector. The output is bot, male or female which serves for both sub-tasks.</p>
      <p>In order to prevent over-fitting on the training dataset a dropout is used. The value
of the dropout d = 0:2 for both models of the stack was chosen empirically.
4.1</p>
      <sec id="sec-4-1">
        <title>Pre-processing</title>
        <p>
          The pre-processing step involves case-folding, parsing specific symbols to text and
punctuation removing. All tweet specific symbols are parsed to text. For instance the
sentence "Bots and Gender Prediction is #great competition :-) https://pan.webis.de" is
pre-processed to "bots and gender prediction is hashtag competition emoji url". After
cleaning the tweets they are tokenized using TweetTokenizer from the nltk library [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ],
using options of strip handles and reduce length.
4.2
        </p>
      </sec>
      <sec id="sec-4-2">
        <title>Prediction Based on TF–IDF Vector Representations</title>
        <p>
          The first part of the stack uses TF–IDF vector representations. In order to build the
representations, a TF–IDF vectorizer from [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ] is used. The vocabulary of the vectorizer
is built from the training dataset. The TF–IDF vectorizer outputs a vector with size of
20,000. A feed-forward neural network with 2 hidden layers is trained, using
hyperparameters shown in Table 1.
The second model of the stack is using Doc2Vec [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ] representations for each author
tweets. A Doc2Vec model is built using [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ] and trained on the training corpus. It
infers a 300-dimensional vector. Similarly to the preceding model, a feed-forward neural
network with 2 hidden layers is trained for prediction. The hyper-parameters of the
network are shown in Table 2.
5
        </p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Experiments and Results</title>
      <p>In order to tune the hyper-parameters of the models, several experiments were
conducted. Both models of the final stacked system were tuned individually. During the
experiments the hyper-parameters were obtained as shown in Tables 1 and 2. The
unofficial final results of the two models, tuned separately are shown in Table 3, where both
models are trained on the training part of the dataset, and evaluated on the development
part of the dataset. The accuracy is calculated for the gender classification sub-task (bot,
male or female).</p>
      <p>
        We can see that both models achieved similar results, which led to another
experiment with both models combined. The combination of TF–IDF and Doc2Vec
outperformed both models separately, so that it was the obvious choice for the final system at
PAN 2019 [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], Bots and Gender Profiling task [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
      </p>
      <p>
        Finally, both models of the submitted stacked system were trained on the whole
part of the training dataset and the stack was tested on the official test set on the TIRA
platform [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
6
      </p>
    </sec>
    <sec id="sec-6">
      <title>Conclusion and Future Work</title>
      <p>
        This paper has presented a system for predicting bots and gender from twitter feeds
for the Bots and Gender Profiling task [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] at PAN 2019 [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. The submitted system is
a stack of two models, where each model uses different vectorial representations for
the Twitter feeds; however, both models uses multilayer perceptron neural network. For
vector representations TF–IDF and Doc2Vec were used.
      </p>
      <p>The submitted system only works for English language. Therefore, for future
research the system should be improved so that it can work with another languages as
well.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Ciccone</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sultan</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Laporte</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Egyed-Zsigmond</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Alhamzeh</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Granitzer</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Stacked Gender Prediction from Tweet Texts and Images-Notebook for PAN at CLEF 2018</article-title>
          . In: Cappellato,
          <string-name>
            <given-names>L.</given-names>
            ,
            <surname>Ferro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            ,
            <surname>Nie</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.Y.</given-names>
            ,
            <surname>Soulier</surname>
          </string-name>
          ,
          <string-name>
            <surname>L</surname>
          </string-name>
          . (eds.)
          <article-title>CLEF 2018 Evaluation Labs</article-title>
          and Workshop - Working Notes Papers,
          <volume>10</volume>
          -
          <fpage>14</fpage>
          September, Avignon, France.
          <source>CEUR-WS.org (Sep</source>
          <year>2018</year>
          ), http://ceur-ws.
          <source>org/</source>
          Vol-
          <volume>2125</volume>
          /
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Daelemans</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kestemont</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Manjavancas</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Potthast</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rangel</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rosso</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Specht</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stamatatos</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stein</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tschuggnall</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wiegmann</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zangerle</surname>
          </string-name>
          , E.: Overview of PAN 2019:
          <article-title>Author Profiling, Celebrity Profiling, Cross-domain Authorship Attribution and Style Change Detection</article-title>
          . In: Crestani,
          <string-name>
            <given-names>F.</given-names>
            ,
            <surname>Braschler</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Savoy</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            ,
            <surname>Rauber</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Müller</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            ,
            <surname>Losada</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            ,
            <surname>Heinatz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            ,
            <surname>Cappellato</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            ,
            <surname>Ferro</surname>
          </string-name>
          , N. (eds.)
          <source>Proceedings of the Tenth International Conference of the CLEF Association (CLEF</source>
          <year>2019</year>
          ). Springer (Sep
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Le</surname>
            ,
            <given-names>Q.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mikolov</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>Distributed representations of sentences and documents</article-title>
          .
          <source>In: Proceedings of the 31st International Conference on International Conference on Machine Learning - Volume 32</source>
          . pp.
          <source>II-1188-II-1196. ICML'14</source>
          , JMLR.org (
          <year>2014</year>
          ), http://dl.acm.org/citation.cfm?id=
          <volume>3044805</volume>
          .
          <fpage>3045025</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Loper</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bird</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Nltk: The natural language toolkit</article-title>
          .
          <source>In: In Proceedings of the ACL Workshop on Effective Tools and Methodologies for Teaching Natural Language Processing and Computational Linguistics</source>
          . Philadelphia: Association for Computational Linguistics (
          <year>2002</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Pedregosa</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Varoquaux</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gramfort</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Michel</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Thirion</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Grisel</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Blondel</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Prettenhofer</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Weiss</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dubourg</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vanderplas</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Passos</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cournapeau</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Brucher</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Perrot</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Duchesnay</surname>
          </string-name>
          , E.:
          <article-title>Scikit-learn: Machine learning in Python</article-title>
          .
          <source>Journal of Machine Learning Research</source>
          <volume>12</volume>
          ,
          <fpage>2825</fpage>
          -
          <lpage>2830</lpage>
          (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Potthast</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gollub</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wiegmann</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stein</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>TIRA Integrated Research Architecture</article-title>
          . In: Ferro,
          <string-name>
            <given-names>N.</given-names>
            ,
            <surname>Peters</surname>
          </string-name>
          ,
          <string-name>
            <surname>C</surname>
          </string-name>
          . (eds.)
          <article-title>Information Retrieval Evaluation in a Changing World - Lessons Learned from 20 Years of</article-title>
          CLEF. Springer (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Poulston</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Waseem</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stevenson</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Using TF-IDF n-gram and Word Embedding Cluster Ensembles for Author Profiling-Notebook for PAN at CLEF 2017</article-title>
          . In: Cappellato,
          <string-name>
            <given-names>L.</given-names>
            ,
            <surname>Ferro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            ,
            <surname>Goeuriot</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            ,
            <surname>Mandl</surname>
          </string-name>
          , T. (eds.)
          <article-title>CLEF 2017 Evaluation Labs</article-title>
          and Workshop - Working Notes Papers,
          <volume>11</volume>
          -
          <fpage>14</fpage>
          September, Dublin, Ireland.
          <source>CEUR-WS.org (Sep</source>
          <year>2017</year>
          ), http://ceur-ws.
          <source>org/</source>
          Vol-1866/
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Rangel</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rosso</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Overview of the 7th Author Profiling Task at PAN 2019: Bots and Gender Profiling</article-title>
          . In: Cappellato,
          <string-name>
            <given-names>L.</given-names>
            ,
            <surname>Ferro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            ,
            <surname>Losada</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            ,
            <surname>Müller</surname>
          </string-name>
          , H. (eds.)
          <article-title>CLEF 2019 Labs and Workshops, Notebook Papers</article-title>
          .
          <source>CEUR-WS.org (Sep</source>
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9. Rˇehu˚rˇek,
          <string-name>
            <given-names>R.</given-names>
            ,
            <surname>Sojka</surname>
          </string-name>
          ,
          <string-name>
            <surname>P.</surname>
          </string-name>
          :
          <article-title>Software Framework for Topic Modelling with Large Corpora</article-title>
          .
          <source>In: Proceedings of the LREC 2010 Workshop on New Challenges for NLP Frameworks</source>
          . pp.
          <fpage>45</fpage>
          -
          <lpage>50</lpage>
          . ELRA, Valletta, Malta (May
          <year>2010</year>
          ), http://is.muni.cz/publication/884893/en
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>