<!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 LDA and Maximum Entropy</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>Aditya Pavan</institution>
          ,
          <addr-line>Aditya Mogadala, Vasudeva Varma</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Search and Information Extraction Lab, International Institute of Information Technology</institution>
          ,
          <addr-line>Hyderabad</addr-line>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2013</year>
      </pub-date>
      <abstract>
        <p>This paper describes the traditional authorship attribution subtask of the PAN/CLEF 2013 workshop. In our attempt to classify the documents based on gender and age of an author, we have applied a traditional approach of topic modeling using Latent Dirichlet Allocation[LDA]. We used the content based features like topics and style based features like preposition-frequencies, which act as the efficient markers to demarcate the authorship attributes based on age and gender. We demonstrated tenfold cross validation and observed that our classification approach using Maxent and LDA gave an accuracy of 53.3% for English language and 52% for Spanish Language.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1 Introduction</title>
      <p>
        Authorship Attribution or author profiling has been a standard problem addressed
in the areas of Information Retrieval, Statistical Natural Language Processing and
Machine Learning. With increase in the number of user blog-posts and micro-blogs
in the massive internet domain, author profiling task serves as a pre-processing step to
help augment the prospects in several areas of text processing like Opinion Mining,
mood mining and Polarity extraction. Every user comment or blog post is directly or
indirectly associated with several attributes of author like age, gender and other
demographic features. Extracting these features on a given document is of paramount
priority. As a part of PAN competition, we have applied a traditional approach for
extracting features of a document and predict the gender and age of an author. We
have considered the topics used by the authors in the article as standard features and
built a topic model from the corpus using unsupervised learning techniques like
[LDA] Latent Dirichlet Allocation [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. From the generated topic model, we trained a
discriminative model using Maxent classification to profile the documents based on
gender and age of the author. The same discriminative model was used for inferring
tenfold validation data set.
      </p>
      <p>The paper is organized as follows. Section 2, provides a brief explanation on
various features we have adopted to derive authorship attributes like age and gender.
Section 3, explains our approach. Section 4 concludes our work.</p>
    </sec>
    <sec id="sec-2">
      <title>2 Features</title>
      <sec id="sec-2-1">
        <title>2.1 Explaining the features</title>
        <p>
          Based on the variations in the expressions of authors, features used for author
profiling can be categorized into two types: Content-based features and Style-based
features [1]. In the earlier work, several markers like textual style, Vocabulary
complexity, Orthographic errors and morphological mapping were used for capturing
the authorship attributes. But, preponderance of evidence suggests that wide variety of
features were captured by simple markers like function-words [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ] and individual
parts-of-speech. However, in this paper we focus on extracting age and gender of an
author based on the topics used in the document and the distribution of the
corresponding topics with in the corpus. Since characteristics of an author are directly
dependent on the age [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ] and gender [
          <xref ref-type="bibr" rid="ref1 ref2 ref3">2,3</xref>
          ] of the author, which in turn are contingent
on the usage of the topics in the article, our work primarily is focused on building
essential topic model that naturally subsumes simple markers like Noun-phrases in
parts-of-speech and other complex markers.
        </p>
        <p>In addition to content-based features like topics, we also considered style-based
features like frequency of prepositions used by the author and the number of
superlative adjectives used within a document.</p>
      </sec>
      <sec id="sec-2-2">
        <title>2.2 Features for Age and gender</title>
        <p>
          As mentioned earlier, topics play a significant role in predicting the age of an
author. In our present work, we have observed that usage of the topics vary from one
age group to the other. The corpus of author documents used in this task provide a
substantial evidence that the articles of users ranking within the age groups of 10s
(13-17) comprise of topics related to adolescence, school activities and immature
crush. While users in an age group of 20s (23-27) write about their college life,
favorite heroines/ heroes, Pre-marital affairs, etc. Whereas, users belonging to age
group of 30s (33-47) post more about Corporate / Social activities, Post-marriage life,
etc [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ]. Similarly, male authors stress on topics related to sports, politics and
technology whereas the female authors post on topics like beauty, shopping, kitty
parties, etc. [
          <xref ref-type="bibr" rid="ref1 ref3">3</xref>
          ]
        </p>
        <p>
          But we have observed from the data that although the topic-set used by an author
abets in demarcating the age groups, there are considerable overlaps in the topics
among the age groups and genders. In order to resolve these overlaps, we considered
a topic distribution model rather than just a set of topics. We have used a generative
model called Latent Dirichlet Allocation (LDA) [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ] to get a probabilistic distribution
of the topics in the document. LDA is a three-level hierarchical Bayesian model, in
which each item of a collection is modeled as a finite mixture over an underlying set
of topics. Each topic is, in turn, modeled as an infinite mixture over an underlying set
of topic probabilities. Thus generating models using LDA has been an essential step
in extraction of features in our experiment.
        </p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3 Approach</title>
      <sec id="sec-3-1">
        <title>3.1 Processing of Corpus</title>
        <p>We have used the corpus available in PAN website. Since the data was in the form
of mark up, we generated a clean data by parsing the tags and eliminating the
unnecessary duplications. In order to discriminate train and test data, we created
tenfold cross validation sets and within training sets we generated datasets for individual
age groups and individual genders. Our working model is independent of the
language. So for both the Spanish and English data sets, we have employed similar
approach.</p>
      </sec>
      <sec id="sec-3-2">
        <title>3.2 Calculating frequencies</title>
        <p>
          Prior Works [
          <xref ref-type="bibr" rid="ref1 ref2 ref3">2, 3</xref>
          ] imply that male authors tend to use more prepositions in the
articles or blog posts than the female authors. As a part of our style-based features we
have generated the frequencies of prepositions of authors in each document and
generated the tf-score. We have not considered the anomalies and other dialectic
exceptions as it can lead to over fitting of the model. So we have used this generalized
observation to demarcate the gender based authorship attributes.
        </p>
      </sec>
      <sec id="sec-3-3">
        <title>3.3 Generating topic models</title>
        <p>
          In order to implement the concept of topic modeling, we used a java-based package
named Mallet [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ]. Since the topic distribution disregards the usage of function words
and stop words, we eliminate them from our individual data sets. We have also
precluded the preprocessing steps like stemming and lemmatization on the datasets in
order to retain the style based features of the authors. For example, an author posting
an article on cricket would allude the term ‘bowling’ in the context of the game. If we
run our preprocessing steps like lemmatization of stemming on this word, the result
would be ‘bowl’, which can have multiple contexts to kitchenware or cricket. Though
LDA takes care of these differences, in order to retain the author style and subsume
the noise in the corpus, we precluded these steps.
        </p>
        <p>The gender specific data sets and age specific data sets were subjected to topic
modeling and we have generated five corresponding topic models. Each topic model
was built with a distribution on 250 topics and 1000 iterations.
Earlier, linear classifier like Winnow, which overcomes differences between the
genres and dependencies between features or the generative model like Naïve Bayes,
which considers bag of words were used by several teams for author profiling. But we
chose to use a discriminative model like Maxent as it would suffice our goal of
classifying the document based on gender as well as age groups. Since the input for
the classification task is the distribution of topics, in order to improve the maximum
likelihood during estimation, the maximum entropy was used. The model essentially
eliminates the over fitting aspects as it can normalize the duplication and
cooccurrences of same features. During classification, we merged the features like
preposition frequencies with the topic vector and trained our Maxent Classifier. We
imported the Maxent classifier provided by mallet and ran our experiments with
default hyper parameters and nine-tenth of training portion.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4 Conclusion and Future work</title>
      <p>In this task of author profiling, we have applied an unsupervised learning method
to extract the distribution of topics. We used a topic size of 250 for 1000 iterations on
the dataset. We used a Maxent classifier to classify the documents based on gender
and age groups and observed that performance of these models are independent of the
language.</p>
      <p>In order to improve the performance of the system, one can use better stylometric
features concomitant to the content-based features. Better markers like POS tagging,
superlative adjective occurrence can be used to improve the performance of the
gender specific profiling task.</p>
    </sec>
    <sec id="sec-5">
      <title>5 References</title>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <article-title>3.4 Classification using Maxent 1</article-title>
          .
          <string-name>
            <given-names>S.</given-names>
            <surname>Argamon</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Koppel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Pennebaker</surname>
          </string-name>
          and J.
          <string-name>
            <surname>Schler</surname>
          </string-name>
          (
          <year>2009</year>
          ),
          <article-title>Automatically profiling the author of an anonymous text</article-title>
          ,
          <source>Communications of the ACM</source>
          <volume>52</volume>
          (
          <issue>2</issue>
          ):
          <fpage>119</fpage>
          -
          <lpage>123</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>J.</given-names>
            <surname>Schler</surname>
          </string-name>
          , Moshe Koppel,
          <string-name>
            <given-names>S.</given-names>
            <surname>Argamon</surname>
          </string-name>
          and J.
          <string-name>
            <surname>Pennebaker</surname>
          </string-name>
          (
          <year>2006</year>
          ),
          <article-title>Effects of Age and Gender on Blogging</article-title>
          ,
          <source>in Proc. of AAAI Spring Symposium on Computational Approaches for Analyzing Weblogs</source>
          ,
          <year>March 2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>M.</given-names>
            <surname>Koppel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Argamon</surname>
          </string-name>
          and
          <string-name>
            <given-names>A</given-names>
            .
            <surname>Shimoni</surname>
          </string-name>
          (
          <year>2003</year>
          ),
          <article-title>Automatically categorizing written texts by author gender</article-title>
          ,
          <source>Literary and Linguistic Computing</source>
          <volume>17</volume>
          (
          <issue>4</issue>
          ),
          <source>November</source>
          <year>2002</year>
          , pp.
          <fpage>401</fpage>
          -
          <lpage>412</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Blei</surname>
          </string-name>
          , David M.;
          <string-name>
            <surname>Ng</surname>
          </string-name>
          , Andrew Y.;
          <string-name>
            <surname>Jordan</surname>
            ,
            <given-names>Michael I</given-names>
          </string-name>
          (
          <year>January 2003</year>
          ).
          <article-title>"Latent Dirichlet allocation"</article-title>
          .
          <source>In Lafferty, John. Journal of Machine Learning Research</source>
          <volume>3</volume>
          (
          <issue>4</issue>
          - 5): pp.
          <fpage>993</fpage>
          -
          <lpage>1022</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>McCallum</surname>
            ,
            <given-names>Andrew</given-names>
          </string-name>
          <string-name>
            <surname>Kachites</surname>
          </string-name>
          .
          <article-title>"MALLET: A Machine Learning for Language Toolkit</article-title>
          ." http://mallet.cs.umass.edu.
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>