<!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>Author profiling using stylometric and structural feature groupings</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Andreas Grivas</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Anastasia Krithara</string-name>
          <email>akrithara@iit.demokritos.gr</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>George Giannakopoulos</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Institute of Informatics and Telecommunications, NCSR Demokritos</institution>
          ,
          <addr-line>Athens</addr-line>
          ,
          <country country="GR">Greece</country>
        </aff>
      </contrib-group>
      <fpage>2</fpage>
      <lpage>8</lpage>
      <abstract>
        <p>In this paper we present an approach for the task of author profiling. We propose a coherent grouping of features combined with appropriate preprocessing steps for each group. The groups we used were stylometric and structural, featuring among others, trigrams and counts of twitter specific characteristics. We address gender and age prediction as a classification task and personality prediction as a regression problem using Support Vector Machines and Support Vector Machine Regression respectively on documents created by joining each user's tweets.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1 Introduction</title>
      <p>PAN, held as part of the CLEF conference is an evaluation lab on uncovering
plagiarism, authorship, and social software misuse. In 2015, PAN featured 3 tasks, plagiarism
detection, author identification and author profiling.</p>
      <p>The 2015 Author Profiling task challenged participants to predict gender, age, and
5 personality traits (extroversion, stability, openness, agreeableness, conscientiousness)
in 4 languages (English, Spanish, Italian and Dutch).</p>
      <p>It featured quite a few novelties compared to the 2014 task. The addition of 5
personality traits to be estimated for the task, a change from 5 to 4 classes in the age
estimation task, as well as a reduction in the size of the training dataset from 306 instances
to 152 instances - user profiles.</p>
      <p>In this paper we present an approach for tackling the author profiling task. In the
next section the different steps of our approach are presented in details, while in section
3 the evaluation of the method is discussed.
For the author profiling task we proposed a coherent grouping of features combined
with appropriate preprocessing steps for each group. The idea was to create an easily
comprehensible, extensible and parameterizable framework for testing many different
feature and preprocessing combinations.</p>
      <p>We mainly focused on the gender and age subtasks as can be seen from the general
approach taken towards personality traits, were we used the same features for all 5
different cases.</p>
      <p>The architecture of the system we developed is portrayed in Figure 1. We will only
sketch the outline of the system here, we will go into more details in the next sections.</p>
      <p>The layers that can be seen correspond to the data structuring, preprocessing, feature
extraction and classification steps that are carried out for the training and test cases. We
follow a different preprocessing pipeline depending on the group of features we want to
extract. We then combine the two groups, apply normalization and feature scaling and
move on to the classification step where we train our model.</p>
      <p>In the data structuring part of system we create a document for each user by joining
all his tweets from the dataset.</p>
      <p>This document is then preprocessed in the case of stylometric feature extraction.
We initially remove all HTML tags found in the document and then we clear all twitter
specific characteristics and tokens, such as hashtags, @replies as well as urls from the
text. Using this cleaned form we then check for exact duplicate tweets and discard any
if found.</p>
      <p>We then extract structural features from the unprocessed document and stylometric
features from the processed edition of the document. After concatenating these features
together we normalize and scale their values, in order to avoid complications that can
arise in the classification stage due to features with numeric values that differ a lot.</p>
      <p>The last step, is the classification stage, where we train a Support Vector Machine
or a Support Vector Machine Regression model depending on the subtask.
2.1</p>
      <sec id="sec-1-1">
        <title>Features</title>
        <p>
          In the tasks of Author Profiling and Author Identification many different types of
features have been deemed important discriminative factors. In the same spirit as [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ], we
tried to group together features in a coherent way, such that we could perform suitable
preprocessing steps for each group. Also, by grouping together features in such a way,
it would be easier later on to split the task into separate classification subtasks and use
a voting schema to obtain a final result.
        </p>
        <p>In this work, we created two groups of features, namely the stylometric and
structural features. The structural group of features aimed to trace characteristics of the text
that were interdependent with the use of the twitter platform. Features such as counts
of @mentions, hashtags and URLs in a user’s tweets.</p>
        <p>
          The stylometric group of features tried to capture characteristics of context that a
user generates in a non automatic way. Different features were tested, such as tf-idf of
ngrams, bag of ngrams, ngram graphs [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ], bag of words, tf-idf of words, bag of smileys
(emoticons), counts of words that were all in capital letters and counts of words of size
1 20.
        </p>
        <p>Table 1 summarizes which of the features mentioned above were used for each
subtask.</p>
        <p>We based the stylometric aspect of our approach on trigrams since they capture
stylometric features well and are more extensible to unknown text when a small training
set has been used, comparing to a bag of words approach.</p>
        <p>tweets</p>
        <p>raw tweets
raw tweets
structural features
clean html
detwittify
remove duplicates</p>
        <p>clean tweets
stylometric features
extracted
features
extracted
features
hX1|X2 . . . |Xni
concatenated features
normalization</p>
        <p>&amp; scaling
normalized features</p>
        <p>classification
Preprocessing is an important step which cannot be disregarded in this task. As texts
are tweets, they contain specific information entangled in the text (hashtags, @replies
and URL links). Therefore, an important decision involves deciding how to correctly
deal with this bias.</p>
        <p>Tweets also contain a large amount of quotations and repeated robot text, which
may be structurally important but should be stylometrically insignificant.</p>
        <p>In our approach, a different preprocessing pipeline was applied to each group of
features as described above. There was no preprocessing done for structural features.
Stylometric feature preprocessing encompassed removing any HTML found in the tweets,
removing twitter bias such as HTML tags, @mentions, hashtags and URLs and
removing exact duplicate tweets after removing twitter specific text. To elaborate a bit on
removing twitter bias, @username and URLs were deleted, while hashtags were stripped
of the hashtag character #.</p>
        <p>
          In some approaches [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ] that use tweets as a text source for classification, tweets are
joined in order to create larger documents of text. For this task we joined all tweets
for each user, however, it should make sense to try joining less texts and create more
personality traits
samples for each user, and then classify the user according to the label that has the
majority of the predictions.
2.3
        </p>
      </sec>
      <sec id="sec-1-2">
        <title>Classifiers</title>
        <p>
          Regarding classification and regression, we used a Support Vector Machine (SVM) with
a RBF kernel and a SVM with a linear kernel for the age and gender subtask
respectively. In the case of the age subtask, we also employed the use of class weights inversely
proportional to class frequencies since the distribution of instances in the classes was
skewed. We used the implementations of the scikit-learn library [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ] of the
aforementioned machine learning algorithms.
        </p>
        <p>Regarding the personality traits subtask, Support Vector Machine Regression (SVR)
with a linear kernel was used.</p>
        <p>For each subtask the features were concatenated and were then scaled and
normalized. Scaling was performed in the features such that the values were in the range [ 1; 1]
with 0 mean and unit variance. Normalization was performed along instances so that
each row had unit norm.</p>
        <p>The above classifiers and combination of features were used for all languages of the
challenge, namely English, Spanish, Dutch and Italian.
3
3.1</p>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>Evaluation</title>
      <sec id="sec-2-1">
        <title>Dataset</title>
        <p>The Pan 2015 dataset featured less instances for training (152 users) than the earlier
tasks in author profiling. The distribution of age and gender over the instances of the
training set can be seen in Figure 3.
count
80
70
60
50
40
30
20
10
0
60
50
40
30
20
10
0
Our approach was in the top two approaches based on accuracy, regarding the gender
classification subtask in all languages as can be seen in Figure 4. This fact hints that
trigrams can capture gender information regardless of language and generalize well for
datasets of this size.</p>
        <p>However, results in Figure 5 show that our system performed less optimally in the
case of age classification where more features that were considered helpful were used.</p>
        <p>
          Using the scoring procedure described in Equation 1, our system scored 3rd overall
in the over profiling task. An overview of the approaches and results for the author
profiling task can be found in [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ].
In the context of our approach we will further evaluate the features used for the age
classification subtask, in order to examine which of them are more useful and which
actually deteriorate the performance of the approach on the test set. We will also develop a
more sophisticated approach for personality trait identification, considering more
specific features and preprocessing for each personality trait separately. Finally we will
attempt to create more documents for each user by joining less tweets for each
document and then arrive at a conclusion by using the average decision for all of the user
documents. It will be interesting to see the impact of this approach on the results for
each user.
        </p>
        <sec id="sec-2-1-1">
          <title>Gender - English</title>
          <p>Gender - Spanish
0.2
0.4accuracy0.6
0.8
1.0
0.2
0.4accuracy0.6
0.8
1.0</p>
        </sec>
        <sec id="sec-2-1-2">
          <title>Gender - Dutch</title>
          <p>Gender - Italian
alvarezcarmona15
grivas15
gonzalesgallardo15
iittrcaanpp mteicisukssliipeucyrlieocrheav11115555
arroju15
weren15
maharjan15
0.0
grivas15
alvarezcarmona15
gonzalesgallardo15
iittrcaanpp mmciccokuolslliicucshliteceeharr11115555
maharjan15
bartoli15
teisseyre15
0.0
alvarezcarmona15
grivas15
miculicich15
t kiprov15
iitrcaanppgonzalesgablsalaurrtldeooali111555
cheema15
poulston15
weren15
0.0
gonzalesgallardo15
grivas15
kocher15
t poulston15
iitrcaanppalvaremzmciaacruhmlaicrojianchna111555
sulea15
ameer15
weren15
0.0
0.2
0.4accuracy0.6
0.8
1.0
0.2
0.4accuracy0.6
0.8
1.0</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>4 Acknowledgments</title>
      <p>This work was supported by REVEAL (http://revealproject.eu/) project, which has
received funding by the European Unions 7th Framework Program for research,
technology development and demonstration under the Grant Agreements No. FP7-610928.
alvarezcarmona15</p>
      <p>sulea15
gonzalesgallardo15
iittrcaanpp tpeoisbugsalresirvtytooarnelsi11115555
kiprov15
ameer15
mccollister15
0.0
0.2
0.8
1.0</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Giannakopoulos</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Karkaletsis</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vouros</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stamatopoulos</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Summarization system evaluation revisited: N-gram graphs</article-title>
          .
          <source>ACM Trans. Speech Lang. Process</source>
          .
          <volume>5</volume>
          (
          <issue>3</issue>
          ), 5:
          <fpage>1</fpage>
          -
          <lpage>5</lpage>
          :39 (Oct
          <year>2008</year>
          ), http://doi.acm.
          <source>org/10</source>
          .1145/1410358.1410359
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Mikros</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Perifanos</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          :
          <article-title>Authorship attribution in greek tweets using author's multilevel n-gram profiles (</article-title>
          <year>2013</year>
          ), https://www.aaai.org/ocs/index.php/SSS/SSS13/paper/view/5714
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <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="ref4">
        <mixed-citation>
          4.
          <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>Potthast</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stein</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Daelemans</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          :
          <article-title>Overview of the 3rd author profiling task at pan 2015</article-title>
          . In: Cappellato L.,
          <string-name>
            <surname>Ferro</surname>
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gareth</surname>
            <given-names>J.</given-names>
          </string-name>
          and San Juan E. (Eds). (Eds.)
          <article-title>CLEF 2015 Labs and Workshops, Notebook Papers</article-title>
          .
          <article-title>CEUR-WS.org (</article-title>
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Stamatatos</surname>
          </string-name>
          , E.:
          <article-title>A survey of modern authorship attribution methods</article-title>
          .
          <source>J. Am. Soc. Inf. Sci. Technol</source>
          .
          <volume>60</volume>
          (
          <issue>3</issue>
          ),
          <fpage>538</fpage>
          -
          <lpage>556</lpage>
          (
          <year>Mar 2009</year>
          ), http://dx.doi.org/10.1002/asi.v60:
          <fpage>3</fpage>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>