<!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>Detecting a Change of Style Using Text Statistics?</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>Antiplagiat Company Moscow Institute of Physics and Technology Higher School of Economics</institution>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2018</year>
      </pub-date>
      <abstract>
        <p>In this paper we address style change detection problem at PAN'18 author identification task. For this task one should determine whether text is written by the same author or not. We consider supervised problem statement with the whole text as a training object. The roposed approach is based on three types of features: text statistics, hashing and high dimensional text vectors. The final algorithm is the ensemble of classifiers that were independently trained on each feature group.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1 Introduction</title>
      <p>
        Authorship detection is a class of open problems in natural language processing. This
class contains a bunch of the tasks that were featured in previous PAN competitions,
namely:
1. Author clustering [
        <xref ref-type="bibr" rid="ref6">6,15</xref>
        ] – provided with a collection of text documents one should
label each document, where label corresponds to one of n predefined authors.
2. Author diarization [
        <xref ref-type="bibr" rid="ref5">17,5</xref>
        ] – provided with a document written by n authors one
should link text fragment with its author.
3. Intrinsic plagiarism detection [
        <xref ref-type="bibr" rid="ref11 ref8">11,18,8,13</xref>
        ] – provided with a document one should
determine reused passages without a reference collection [19].
4. Style breach detection [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] – segmentation problem where text should be divided
into style consistent passages.
      </p>
      <p>
        PAN’18 consists of the following tasks: author identification task [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], author
profiling task [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ], author obfuscation task [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. This year’s author identification task is
relaxation of style breach detection, i.e. binary classification task, where positive label
corresponds to the case when document has at least one style change. Therefore, we can
rely on developed solutions for these task [
        <xref ref-type="bibr" rid="ref4">4,14</xref>
        ]. General framework that was applied
for previous tasks frequently is following:
1. To obtain text parts using some segmentation scheme. For example, sentence
segmentation, n-grams with or without overlap.
2. To construct a mapping from text segment into feature space. [
        <xref ref-type="bibr" rid="ref2">2,16,14</xref>
        ]
? This research is supported by RFBR project 18-07-01441
3. Provided with segments features to train an algorithm to classify, cluster, or detect
outliers.
      </p>
      <p>However, in this paper we develop a framework that considers the whole text as
a training object without any segmentation. On the one hand, such problem statement
was inspired by the fact that we deal with binary classification, on the other hand we try
to contribute slightly different point of view on the problem.</p>
      <p>
        First, we perform preprocessing procedure that is different for each specific
classifier. Next, we extract three types of features: text statistics, hash code of a text, and
high-dimensional sparse representation of a text, obtained by simple counting of word
n-grams appearance in range 1-6. Such n-grams counting showed success in different
tasks from intrinsic plagiarism detection [16] to author profiling [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. We train three
independent classifiers on each type of features, make linear combination of probabilities
given by each classifier and, learn threshold for this linear combination.
All experiments were carried out on TIRA [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ].
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>Problem Statement</title>
      <p>In this section we state the problem formally. Consider text documents collection D of
size m and denote i-th document of collection by Di, where i 2 1; : : : m. Let f be the
mapping, such that each document of the collection is mapped to fixed-size vector:</p>
      <sec id="sec-2-1">
        <title>Consider labeling function h, such that:</title>
        <p>where class label 1 is for documents written by more than one author and 0 for
singleauthor documents. Let LD be a empirical risk defined by:
f : D</p>
        <p>! Rd:
h : Rd ! y 2 f0; 1g;
LD(h) = jfi : h(Di) 6= yigj ;</p>
        <p>m
h^ = arg min LD(h);</p>
        <p>h2H
where yi is class label for i-th document.</p>
        <p>We want to find h^ that minimizes LD on a given collection D:
where H is parametric family of functions.
3
3.1</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Experiment</title>
      <sec id="sec-3-1">
        <title>Data</title>
        <p>The data corpus consists of user posts from various sites of the StackExchange
network. Data is split into training and validation sets that contain 2980 and 1492 texts
respectively.
3.2</p>
      </sec>
      <sec id="sec-3-2">
        <title>Quality Criteria</title>
        <p>To evaluate the quality of proposed algorithm, the accuracy score was used. Accuracy
is the fraction of correct predictions. More formally, for binary classification accuracy
has the following definition:</p>
        <p>Accuracy =</p>
        <p>TP + TN
TP + TN + FP + FN
;
where TP = True Positives, TN = True Negatives, FP = False Positives, and FN = False
Negatives.
3.3</p>
      </sec>
      <sec id="sec-3-3">
        <title>Model</title>
        <p>Our model consists of three independent classifiers: Statistical, Hashing, and
Counting Classifier. Each classifier returns the probability of the fact that text contains style
changing. And the final probability is the weighted sum of three probabilities — ps; ph; pc
respectively.</p>
        <p>Statistical Classifier. Statistical classifier uses 19 statistical features for a text analysis.
The most important of them are:
– number of sentences;
– unique words fraction;
– text length;
– punctuation symbols fraction;
– letter symbols fraction.</p>
        <p>To produce final probability Random Forest Classifier was used.</p>
        <p>Hashing Classifier. This model uses hashing function to build term frequency counts
in a text. The hash function employed is the signed 32-bit version of Murmurhash31.
As a result, a text is maped into 3000-dimensional vector space. These vectors contains
information about occurrences of char n-grams in text. Text representation vector is
used to classify whether a text contains style changes or not. Random Forest Classifier
was used to produce probability.</p>
        <p>Counting Classifier. Counting Classifier uses high-dimensional (3 million)
representation of a text. Different dimensions were tried but they showed lower quality. It counts
word n-grams form 1 to 6 and turns it to a vector. Logistic Regression is then used to
get the probability.</p>
        <p>Statistical, Hashing, and Counting Classifiers were trained on the train set in order
to maximize performance measure — accuracy — independently from each other.
Resulting performances are shown in the table below.
1 http://scikit-learn.org/stable/modules/generated/sklearn.</p>
        <p>feature_extraction.text.HashingVectorizer.html
Model. The final score for text d is the weighted sum of probabilites:</p>
        <sec id="sec-3-3-1">
          <title>Statistical Classifier</title>
          <p>Hashing Classifier
Counting Classifier
where coefficients s; h; c are selected from (0; 1).</p>
          <p>If the score for a text exceeds the threshold , then this text is marked as text with
change of style:</p>
          <p>) d has change of style:
Coefficients s; h; c and threshold were tuned on the validation set by grid search
in order to maximize accuracy. Each of the coefficient s; h; c shows the importance
of corresponding classifier. Optimal parameters for the final model are:
s = 0:4; h = 0:2; c = 0:4:
We can see, that Statistical and Counting Classifiers are the most informative.
And the value of threshold is: = 0:55:
The relation between accuracy and value of threshold is shown on the figure below.
3.5</p>
        </sec>
      </sec>
      <sec id="sec-3-4">
        <title>Results</title>
        <p>The proposed model was tested on PAN’18 data set. The results of its performance are
shown below.</p>
        <sec id="sec-3-4-1">
          <title>Accuracy</title>
        </sec>
        <sec id="sec-3-4-2">
          <title>Validation Test 0.805 0.803</title>
        </sec>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Conclusion</title>
      <p>We proposed an algorithm for style change detection task. This algorithm uses three
independent classifiers: Statistical, Hashing, and Counting. Each classifier gives its
own probability that a text may contain a change of style. Final score is computed
as weighted sum of three probabilities. And if the score exceeds the threshold, a text
will be marked as it containing a change of style.</p>
      <p>The method was implemented for the PAN’18 style change detection task. The model
has achieved accuracy score 0.803 on the test dataset.
13. Safin, K., Kuznetsov, M., Kuznetsova, M.: Methods for intrinsic plagiarism detection.</p>
      <p>Informatics and Applications (2017)
14. Safin, K., Kuznetsova, R.: Style breach detection with neural sentence embeddings. In:</p>
      <p>CLEF (2017)
15. Samdani, R., Chang, K.W., Roth, D.: A discriminative latent variable model for online
clustering. In: Xing, E.P., Jebara, T. (eds.) Proceedings of the 31st International Conference
on Machine Learning. Proceedings of Machine Learning Research, vol. 32, pp. 1–9. PMLR,
Bejing, China (22–24 Jun 2014)
16. Stamatatos, E.: Intrinsic plagiarism detection using character n-gram profiles (2009)
17. Stamatatos, E., Tschuggnall, M., Verhoeven, B., Daelemans, W., Specht, G., Stein, B.,
Potthast, M.: Clustering by authorship within and across documents. CEUR Workshop
Proceedings (2016)
18. Stein, B., Barron, Cedeno, L., Eiselt, A., Potthast, M., Rosso, P.: Overview of the 3rd
international competition on plagiarism detection. CEUR Workshop Proceedings (2011)
19. Zechner, M., Muhr, M., Kern, R., Granitzer, M.: External and intrinsic plagiarism detection
using vector space models. Proc. SEPLN. vol. 32 (2009)</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <article-title>1. Overview of the Author Identification Task at PAN 2017: Style Breach Detection</article-title>
          and Author
          <string-name>
            <surname>Clustering</surname>
          </string-name>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Bensalem</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rosso</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chikhi</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Intrinsic plagiarism detection using n-gram classes</article-title>
          .
          <source>EMNLP</source>
          (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Kestemont</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tschugnall</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stamatatos</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Daelemans</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Specht</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stein</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Potthast</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Overview of the Author Identification Task at PAN-2018: Cross-domain Authorship Attribution and Style Change Detection</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 (Sep</source>
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Khan</surname>
            ,
            <given-names>J.A.</given-names>
          </string-name>
          :
          <article-title>Style breach detection: An unsupervised detection model</article-title>
          .
          <source>In: CLEF</source>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Kuznetsov</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Motrenko</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kuznetsova</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Strijov</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          :
          <article-title>Methods for intrinsic plagiarism detection and author diarization</article-title>
          .
          <source>Notebook for PAN at CLEF</source>
          <year>2016</year>
          (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Layton</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Watters</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dazeley</surname>
          </string-name>
          , R.:
          <article-title>Automated unsupervised authorship analysis using evidence accumulation clustering</article-title>
          .
          <source>Natural Language Engineering</source>
          <volume>19</volume>
          (
          <issue>1</issue>
          ),
          <fpage>95</fpage>
          -
          <lpage>120</lpage>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Ogaltsov</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Romanov</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Language variety and gender classification for author profiling in pan 2017</article-title>
          . In: CLEF (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <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>Hagen</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kiesel</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Michel</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Oberländer</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tippmann</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Barrón-Cedeño</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gupta</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rosso</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stein</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>Overview of the 4th international competition on plagiarism detection</article-title>
          .
          <source>CLEF</source>
          (Online Working Notes/Labs/Workshop).
          <source>Citeseer</source>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <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>Rangel</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rosso</surname>
            ,
            <given-names>P.</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>
          :
          <article-title>Improving the Reproducibility of PAN's Shared Tasks: Plagiarism Detection, Author Identification, and Author Profiling</article-title>
          . In: Kanoulas,
          <string-name>
            <given-names>E.</given-names>
            ,
            <surname>Lupu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Clough</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            ,
            <surname>Sanderson</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Hall</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Hanbury</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Toms</surname>
          </string-name>
          , E. (eds.)
          <article-title>Information Access Evaluation meets Multilinguality, Multimodality, and Visualization</article-title>
          .
          <source>5th International Conference of the CLEF Initiative (CLEF 14)</source>
          . pp.
          <fpage>268</fpage>
          -
          <lpage>299</lpage>
          . Springer, Berlin Heidelberg New York (
          <year>Sep 2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Potthast</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hagen</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schremmer</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stein</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>Overview of the Author Obfuscation Task at PAN 2018: A New Approach to Measuring Safety</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 (Sep</source>
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <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>Barrón-Cedeño</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rosso</surname>
            ,
            <given-names>P.:</given-names>
          </string-name>
          <article-title>An evaluation framework for plagiarism detection</article-title>
          .
          <source>Proceedings of the 23rd international conference on computational linguistics</source>
          (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <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 (Sep</source>
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>