<!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>Authorship identification using correlations of frequent features</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>Institute of Computer Science, University of Tartu</institution>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2013</year>
      </pub-date>
      <abstract>
        <p>In this work, we explore how well can we perform the PAN'13 authorship identification task by using correlation of frequent significant features found in documents written by a known author. We extract features from the context of four types of words: first words of sentences or lines, nouns, verbs, punctuation. We compute the Matthews Correlation Coefficient for all pairs of extracted features and by using principal component analysis, transform them into a form suitable for using simple Euclidian distance as a metric. By hypothesizing that the distances of different documents written by a same author belong to same distribution, we can provide educated guesses for the authorship identification. Our system achieves F1-score of 66.7% for English, 56.7% for Greek and 80% for Spanish texts with an overall F1-score of 67.1% on the PAN'13 dataset.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        A single subtask of the PAN‘13 authorship identification task contains up to ten
documents written by a known author and a single document, that needs to be classified as
either written by the same author or not. The dataset contains documents in English,
Greek and Spanish languages. Similar task was also presented at PAN‘11 [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], but with
a fixed set of authors.
      </p>
      <p>Our approach is to first extract all frequent and statistically significant features from
all given documents in a single subtask. Then, we use the correlation of the features to
compute the distances between all given documents. We use Student‘s t-test to
determine if the distances come from the same distribution, hence same author. On the
preliminary data, our approach achieved F1-score of 66.7% for English, 56.7% for Greek
and 80.0% for Spanish texts with an overall F1-score of 67.1%</p>
    </sec>
    <sec id="sec-2">
      <title>Feature extraction</title>
      <p>
        Given a single subtask, we started by extracting lexical and morphological features.
Lexical features are the original word, does the word start with an uppercase character,
are all characters uppercase, does contain punctuation, does contain digits, is first or
last word in a sentence or a line. Morphological features are the word lemma,
part-ofspeech, other language specific features such as the case, mood etc. Similar features
have traditionally been used in authorship identification tasks [
        <xref ref-type="bibr" rid="ref2 ref8">8,2</xref>
        ].
      </p>
      <p>
        For the feature extraction, we used NLTK toolkit for POS-tagging English [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ],
TreeTagger for Spanish [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] and AUEB Tagger for Greek [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. We encoded the features for
each word as lists of tuples
      </p>
      <p>(feature, offset, value) ,
where offset determines the feature/value combination of the word relative to the
position of current word. For instance, a feature (case, -1, nominative) would say that the
case of the previous word was nominative. We enumerated all possible features with
the offset ranging from -2 to 2. Additionally, we were interested in extracting
composite features that could express the co-occurrence of two or more simple features. For
example, a composite feature could be (pos-tag, 1, noun) &amp; (case, 0, partitive).
Frequent composite features. We a say a feature is frequent, if its support (number of
occurrences) is greater or equal to a predefined threshold. We set the treshold so that
every feature matching at least 5% of tokens would be frequent. Particularly, we are
interested in extracting frequent features for four different types of tokens: first words
of sentences or lines, nouns and adjectives, verbs, punctuation. The tresholds were set
respectively to the number of tokens in each particular group.</p>
      <p>
        Counting the support of simple features is straightforward. To obtain frequent
composite features, we can use the monotonicity property of support. Given two features A
and B, we can assure that
support(A&amp;B)
min(support(A); support(B)) ;
(1)
which means that if either of the features A and B are not frequent, then also their
conjunction A&amp;B is not frequent. The monotonicity property makes it possible to extract
all frequent composite features efficiently using the Apriori algorithm used in frequent
itemset mining [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Basic and composite features can be encoded as itemsets and tokens
as transactions.
      </p>
      <p>
        Statistical significance. Not all frequent features are relevant to authorship
identification due to common frequent words and language-specific grammatical and stylistic
patterns. For this purpose, we compiled a random subsets of documents from Brown
corpus [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], Spanish and Greek Wikipedia. Each subset contained 100 documents.
      </p>
      <p>For each frequent feature, we first compute the percentage of matched tokens on
every document in the reference corpus of the subtask language. Then, we estimate
the p-value as the fraction of documents with higher or equal percentage of matches
than was obtained on the documents in the subtask. Next, we filter out the features that
are not statistically significant (p-value 0.025). This will help to reduce the number of
irrelevant features.
2</p>
    </sec>
    <sec id="sec-3">
      <title>Feature correlation as a distance metric</title>
      <p>
        We use Matthews correlation coefficient (MCC) [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] to measure the similarity between
two different features in a single document as we represent each feature as a bitvector
of matched positions and MCC has proved to be more stable with binary vectors. We
compute MCC between all pairs of features of document and compile a vector length
m = k(k 1)=2, where k is the number of features. Given n documents, we
compile a n m matrix to store the correlation vectors. Each row represents the feature
correlations of a particular document.
      </p>
      <p>As we extracted features for four different groups of words: first words of a sentence
or a line, verbs, nouns, punctuation, we compile a total of four such matrices for each
subtask and by row-wise concatenation put them in a single matrix M containing all
the pair-wise correlations for features in every particular group of words.</p>
      <p>Next, we find n 1 principal components from matrix M and project the data as a
new matrix P . As a result, we can view each document as a point in (n 1)-dimensional
Euclidian space and use Euclidian distance to compute the distance between any two
documents. As an alternative, we also measured the distance between the documents
by a computing mean-squared errors (MSE) between respective correlations, but MSE
did not prove to be as discriminating as the approach using PCA.</p>
      <p>We hypothesize that if the unknown document is not written by the same author, its
mean distance to known documents should be significantly larger than the mean
similarity between known documents. If average mean distance of known vs unknown
document was less or equal to mean distance between known and known, we automatically
report the unknown document to written by the same author. Otherwise, we use
onetailed Student’s t-test to obtain the p-value, which describes the statistical significance
between the means. We use rather large threshold 0:5 to determine the authorship:
result =
(pvalue</p>
      <p>0:5
pvalue &lt; 0:5</p>
      <p>Y (same author)</p>
      <p>N (different author) :</p>
      <p>Some subtasks of PAN‘13 dataset only contained one known document from the
author. In such cases, we split the known document into two and compared the first and
second part of the document as our approach requires at least two known documents
from an author.
3</p>
    </sec>
    <sec id="sec-4">
      <title>Evaluation</title>
      <p>In Figure 1, we have depicted the distances our method for all three languages on
training subset of the data that was available during writing this notebook. We see that our
distance metric is quite discriminating for English and Spanish languages as documents
written by same authors are on average more similar than the documents written by
someone else. Our approach seems to have most difficulty with Greek language as the
distances do not reflect very well the authorship of the documents.</p>
      <p>On the full evaluation dataset, our approach achieved following F1-scores: English
- 66.7%, Greek - 56.7%, Spanish - 80.0% with overall F1-score of 67.1%. On Spanish
subset, our approach was ranked second. Overall, our solution shared fourth and fifth
ranking from a total of eighteen participants.
2
e
c
n
a
it
s
d
1
0</p>
      <p>N
●
known vs unknown
known vs known</p>
      <p>N</p>
      <p>Y</p>
    </sec>
    <sec id="sec-5">
      <title>Summary</title>
      <p>In this work, we have shown that the features we extract contain rather strong signal
relevant for authorship identification. At least our t-test based approach handles certain
cases correctly. However, we might improve the results by using more sophisticated
novelty detection algorithms instead. Also, we might get stronger features by
performing PCA separately on each of the four token groups. The next important step in our
future work is evaluating these options.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Agrawal</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Srikant</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          , et al.:
          <article-title>Fast algorithms for mining association rules</article-title>
          .
          <source>In: Proc. 20th Int. Conf. Very Large Data Bases, VLDB</source>
          . vol.
          <volume>1215</volume>
          , pp.
          <fpage>487</fpage>
          -
          <lpage>499</lpage>
          (
          <year>1994</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Argamon</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Juola</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Overview of the international authorship identification competition at pan-2011</article-title>
          . In: CLEF 2011:
          <article-title>Proceedings of the 2011 Conference on Multilingual and Multimodal Information Access Evaluation (Lab</article-title>
          and Workshop Notebook Papers), Amsterdam, The Netherlands (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Bird</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Nltk: the natural language toolkit</article-title>
          .
          <source>In: Proceedings of the COLING/ACL on Interactive presentation sessions</source>
          . pp.
          <fpage>69</fpage>
          -
          <lpage>72</lpage>
          . Association for Computational Linguistics (
          <year>2006</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Koleli</surname>
          </string-name>
          , E.:
          <article-title>A new Greek part-of-speech tagger, based on a maximum entropy classifier</article-title>
          .
          <source>Master's thesis</source>
          , Department of Informatics, Athens University of Economics and Business (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5. Kucˇera, H.,
          <string-name>
            <surname>Francis</surname>
            ,
            <given-names>W.N.</given-names>
          </string-name>
          :
          <article-title>Computational analysis of present-day American English</article-title>
          . Dartmouth Publishing Group (
          <year>1967</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Matthews</surname>
            ,
            <given-names>B.W.</given-names>
          </string-name>
          :
          <article-title>Comparison of the predicted and observed secondary structure of t4 phage lysozyme</article-title>
          .
          <source>Biochimica et Biophysica Acta (BBA)-Protein Structure</source>
          <volume>405</volume>
          (
          <issue>2</issue>
          ),
          <fpage>442</fpage>
          -
          <lpage>451</lpage>
          (
          <year>1975</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Schmid</surname>
          </string-name>
          , H.:
          <article-title>Treetagger. TC project at the Institute for Computational Linguistics of the University of Stuttgart (</article-title>
          <year>1994</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Stamatatos</surname>
          </string-name>
          , E.:
          <article-title>A survey of modern authorship attribution methods</article-title>
          .
          <source>Journal of the American Society for information Science and Technology</source>
          <volume>60</volume>
          (
          <issue>3</issue>
          ),
          <fpage>538</fpage>
          -
          <lpage>556</lpage>
          (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>