<!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>Combined CNN+RNN Bot and Gender Profiling</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>School of Arts, Sciences and Humanities, University of São Paulo Av. Arlindo Bettio</institution>
          ,
          <addr-line>1000. São Paulo</addr-line>
          ,
          <country country="BR">Brazil</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2019</year>
      </pub-date>
      <abstract>
        <p>This paper describes an approach to bot and gender author profiling that makes use of a weighted ensemble of convolution (CNN) and recurrent (RNN) neural networks based on char and word n-gram models alike. The proposed ensemble model is shown to outperform the use of its individual classifiers alone, and it was submitted for participation at the PAN-2019 author profiling shared task.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1 Introduction</title>
      <p>
        Author profiling is generally understood as the computational task of inferring an
individual’s demographics from the text that they have written. The present work addresses
two particular instances of author profiling - gender and bot versus human recognition
- as developed in the context of the PAN-2019 bot and gender profiling task [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
      </p>
      <p>The tasks proposed at PAN-2019 consist of determining (in supervised fashion)
whether the author of a given piece of text is a bot or a human and, in case of human
authorship, to determine their gender. To this end, two datasets were provided, containing
412.000 tweets in English and 300.000 tweets in Spanish, respectively. Both datasets
are labelled with author type (human or bot) and, in case of human authors, with gender
information (male or female).</p>
      <p>
        Central to our current work, we notice that deep learning methods, although
generally successful in many fields, have been applied to author profiling tasks with varying
degrees of success. In particular, we notice that the two best-performing systems at
PAN-2017 author profiling task [
        <xref ref-type="bibr" rid="ref1 ref5">1,5</xref>
        ] did not resort to methods of this kind.
      </p>
      <p>Based on these observations, the present work proposes a new take on deep learning
methods for author profiling by presenting a combined approach that makes use of a
weighted ensemble of convolution (CNN) and recurrent (RNN) neural networks based
on char and word n-gram models alike. In doing so, our goal is to assess whether the
combination of these resources may outperform the use of their individual classifier
components alone, and whether the ensemble method may produce competitive results
in bot and gender profiling as proposed at the PAN-2019 shared task.</p>
    </sec>
    <sec id="sec-2">
      <title>Related Work</title>
      <p>In this section we briefly review a number of recent studies that address popular author
profiling tasks such as age and gender recognition by making use of deep learning
methods.</p>
      <p>
        The work in [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] addresses the issue of age profiling using convolutional networks.
Unlike many similar tasks addressed at PAN-CLEF and elsewhere, however, age
classification is modelled as a binary classification task (young / adult). The proposed model
was evaluated using a Portuguese text corpus, and it was shown to outperform a number
of standard baseline alternatives.
      </p>
      <p>
        The use of deep learning methods is also the focus of the study in [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], which presents
a character-based Convolutional Bidirectional Long Short-Term Memory (LSTM) and
a word-based Bidirectional LSTM using Global Vectors (GloVe) for gender profiling
on Twitter. A stacked architecture combining both models outperforms the use of the
individual models alone, and also outperforms a number of bag of words and n-grams
baseline models.
      </p>
      <p>
        The work in [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] addresses gender, binary age bracket and user type (‘individual’,
‘organisation’ and ‘other’) profiling on Twitter data. All tasks were modelled as a graph
vertex classification task based on two strategies: Naive Recursive Neural Unit (NRNU)
and Long Short-Term Memory Unit (LSTMU). In both cases, the proposed models were
found to outperform a number of baseline systems base on lexical information, logistic
regression, label propagation, and others.
      </p>
      <p>
        Finally, the PAN-CLEF 2018 shared task in [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] introduced a gender profiling task
based on a combination of text and image data. Among the participant systems, the
work in [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] was the overall winner of the competition by presenting a neural network
model named ‘Text Image Fusion Neural Network’ (TIFNN) designed to leverage both
text and image data sources.
3
      </p>
    </sec>
    <sec id="sec-3">
      <title>Current Work</title>
      <p>Our current work is motivated by the assumption that different learning strategies and
text representations may provide multiple contributions to the tasks at hand, namely, bot
and gender author profiling. To this end, the proposed model - hereby called
CNN+RNNchar-word - combines four neural models into an ensemble setting: char- and word-level
convolutional networks (CNN), and char- and word-level recurrent networks (RNN).
To this end, both CNNs follow a multichannel architecture for variable-length n-gram
representations, and both RNNs follow a long short term (LSTM) architecture with
self-attention. The ensemble architecture is illustrated in Figure 1.</p>
      <p>
        The weights assigned to each of the individual classifiers are computed by searching
for an optimal confidence estimate for each model so that the combined output error
is minimised. Optimization proper is performed by making use of Simplex [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] using
training data according to equation 1.
      </p>
      <p>w~ = min X fi(x)
i
wi
(1)
one-hot
char
unigram
one-hot
word
unigram</p>
      <sec id="sec-3-1">
        <title>CNNchar</title>
      </sec>
      <sec id="sec-3-2">
        <title>RNNchar</title>
      </sec>
      <sec id="sec-3-3">
        <title>CNNword</title>
      </sec>
      <sec id="sec-3-4">
        <title>RNNword</title>
        <p>x
Pin=1 fi(x) w~i
y~</p>
        <p>In this equation, for each model i, we vary the voting weights w 2 R between 0
and 1 so as to minimise the error rate of the combined models f given by the factor w~,
which represents the relative weight of the model in the overall results.</p>
        <p>Input texts are individually transformed into one-hot character- and word-level
vectors as required by each model. Vectors are taken as initial weights for the input layers in
both CNN and RNN modules, and subsequently optimised through back-propagation.</p>
        <p>The CNN modules make use of 1D convolutional layers with max pooling, using
filters of size 3 and 4, both of which with mappings of size 64, and using ReLU as an
activation function, a 0:003 L2 regularization max pooling of size 2. This is followed
by a fully-connected layer containing 1024 neurons using ReLU and a 0.35 drop-out
regularization and a softmax output layer. Training was performed in mini batches of
size 32 with RMSProp optimization and using entropy loss as a cost function. Validation
was performed over a 20% portion of the data until convergence with Early Stopping.</p>
        <p>The RNN models make use of a self-attention mechanism and memory of size 64
with a 0:12 drop-out regularization. This is followed by a hidden layer conveying 1024
neurons using ReLU as an activation function, and a softmax output layer. Training
is performed with AdaDelta optimization and using entropy loss as a cost function.
Validation is performed over a 20% portion of the data until convergence with Early
Stopping.</p>
        <p>Results from the four models are combined using a weighted voting strategy based
on a confidence estimate for each individual model according to their results during the
training stage.
4</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Evaluation</title>
      <p>The combined CNN+RNN-char-word ensemble model described in the previous section
was tested against its individual components, namely, CNN-char, CNN-word, RNN-char
and RNN-word. In addition to that, a simple logistic regression baseline - hereby called
LogReg - using a bag-of-words model with LibLinear optimization, L2 regularization
and =100 was also implemented.</p>
      <p>
        The ensemble voting mechanism is based on the weights assigned to each individual
classifier during training by performing Simplex [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. The actual weights obtained from
the PAN-2019 corpus are summarised in Table 1 for the current tasks (bot and gender
profiling) and target languages (English and Spanish.)
      </p>
      <p>From these optimal weights we notice that the bot recognition problem is more
generally captured by the RNN-char model, whereas gender profiling seems to be best
captured by the RNN-word model.
5</p>
    </sec>
    <sec id="sec-5">
      <title>Results</title>
      <p>
        In this section we report results of the proposed Ensemble approach and baseline
systems applied to the bot and gender profiling tasks at PAN-2019, using the evaluation
tool provided [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ].
5.1
      </p>
      <p>Bot Recognition
This paper presented an approach to bot and gender profiling that makes use of a
weighted ensemble of convolution (CNN) and recurrent neural networks (RNN) based
on char and word n-gram models alike. The Ensemble approach outperformed a
number of baseline alternatives making use of single network and language models, but a
certain accuracy loss was observed in the final validation.</p>
      <p>As future work, we intend to investigate how the individual components of the
model interact, and extend the current architecture by making use of word and
character embeddings.
The authors acknowledge support by FAPESP grant 2016/14223-0 and from the
University of São Paulo.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Basile</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dwyer</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Medvedeva</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rawee</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Haagsma</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nissim</surname>
          </string-name>
          , M.:
          <string-name>
            <surname>N-GrAM</surname>
          </string-name>
          :
          <article-title>New groningen author-profiling model</article-title>
          .
          <source>In: Working Notes of CLEF 2017 - Conference and Labs of the Evaluation Forum</source>
          . Dublin (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Gopinathan</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Berg</surname>
          </string-name>
          , P.C.
          <article-title>: A deep learning ensemble approach to gender identification of tweet authors (</article-title>
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Guimaraes</surname>
            ,
            <given-names>R.G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rosa</surname>
          </string-name>
          , R.L.,
          <string-name>
            <surname>de Gaetano</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rodriguez</surname>
            ,
            <given-names>D.Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bressan</surname>
          </string-name>
          , G.:
          <article-title>Age groups classification in social network using deep learning</article-title>
          .
          <source>IEEE Access 5</source>
          ,
          <fpage>10805</fpage>
          -
          <lpage>10816</lpage>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Kim</surname>
            ,
            <given-names>S.M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Xu</surname>
            ,
            <given-names>Q.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Qu</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wan</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          , Paris, C.:
          <article-title>Demographic inference on Twitter using recursive neural networks</article-title>
          .
          <source>In: Proceedings of ACL-2017</source>
          . pp.
          <fpage>471</fpage>
          -
          <lpage>477</lpage>
          . Vancouver, Canada (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Martinc</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Skrjanec</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zupan</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pollak</surname>
            ,
            <given-names>S.: PAN</given-names>
          </string-name>
          <year>2017</year>
          :
          <article-title>Author profiling - gender and language variety prediction</article-title>
          .
          <source>In: Working Notes of CLEF 2017 - Conference and Labs of the Evaluation Forum</source>
          . Dublin (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Nelder</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mead</surname>
            ,
            <given-names>R.:</given-names>
          </string-name>
          <article-title>A simplex method for function minimization comput</article-title>
          .
          <source>The Computer Journal</source>
          <volume>7</volume>
          (
          <issue>01</issue>
          <year>1965</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <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="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.
          <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>Montes-</surname>
            y-Gómez,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Potthast</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stein</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>Overview of the 6th Author Profiling Task at PAN 2018: Multimodal Gender Identification in Twitter</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>Working Notes Papers of the CLEF 2018 Evaluation Labs</article-title>
          .
          <source>CEUR Workshop Proceedings, CLEF and CEUR-WS.org</source>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Takahashi</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tahara</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nagatani</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Miura</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Taniguchi</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ohkuma</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>Text and image synergy with feature cross technique for gender identification</article-title>
          .
          <source>In: Working Notes Papers of the Conference</source>
          and
          <article-title>Labs of the Evaluation Forum (CLEF-</article-title>
          <year>2018</year>
          ) vol.
          <volume>2125</volume>
          .
          <string-name>
            <surname>Avignon</surname>
          </string-name>
          , France (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>