<!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 Masking Directed by Author's Style</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Mostafa Rahgouy</string-name>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Hamed Babaei Giglou</string-name>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Taher Rahgooy</string-name>
          <email>trahgooy@tulane.edu</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Hasan Zeynali</string-name>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Salar Khayat Mirza Rasouli</string-name>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>MostafaRahgouy</institution>
          ,
          <addr-line>hamedbabaeigiglou, hasanzeynalimc</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Tulane University, Computer Science Department</institution>
          ,
          <addr-line>New Orleans, LA</addr-line>
          ,
          <country country="US">USA</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>University of Mohaghegh Ardabili, Computer Science Department</institution>
          ,
          <addr-line>Ardabil</addr-line>
          ,
          <country country="IR">Iran</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2018</year>
      </pub-date>
      <abstract>
        <p>Author verification algorithms mainly rely on learning statistical fingerprints of authors. In the other hand, most of the previous algorithms in author masking try to apply changes to the original texts blindly without considering those finger-prints. In this paper, we propose an approach that learns author's finger-prints and uses them to apply directed transformations and distortions to the original text. We represent author finger-prints with different statistics such as word choice distribution, sentence length preference, etc. obtained from author's known texts. Automatic and manual evaluations of the obfuscated texts are very promising and show the effectiveness of our approach.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>The author masking task of PAN 2018 is to paraphrase a given document so that
authorship verification algorithms fail to detect it’s author . The problem consist of a set of
documents written by a specific author and another document of the same author named
"original". The challenge is to use the information in the provided set of documents in
order to obfuscate the "original" document.</p>
      <p>
        Statistical properties of words, phrases, and sentences in documents play a pivotal
role in identifying the author’s style and finger-prints. For example average sentence
length, text entropy, and word usage frequency alongside many other statistics is used
by [
        <xref ref-type="bibr" rid="ref1 ref2 ref8">8,1,2</xref>
        ] to learn the author finger-prints either directly or indirectly. However, they
apply their changes to the original texts irrespective of the author’s style. As a result,
some of those changes enforces the finger-prints of the author rather than diminish
them.
      </p>
      <p>
        Therefore, inspired by [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] work, we propose an approach that learns the author’s
finger-prints statistics(e.g. sentence length, word usage, etc.) from author’s known
documents and tries to distort those statistics in the target document using word replacement,
combining/splitting sentences, and contraction transformation. In the rest of this paper,
we explain the proposed approach and it’s steps in Section 2, automatic and manual
evaluations are covered in Section 3, and finally we summarize the paper findings in
Section 4.
      </p>
    </sec>
    <sec id="sec-2">
      <title>Proposed Approach</title>
      <p>First, we learn the author’s finger-prints by calculating several global statistics from
documents written by the author (same-author documents). Next, we obfuscate the
original text sentence by sentence considering the global statistics in the whole document
and author’s finger-prints. After splitting the text to sentences, we try to distort the text
using word/phrase transformations, splitting and combining sentences, and word/phrase
replacements in such a way that the resulting document has different statistics compared
to the statistics obtained from other documents of the same author.
2.1</p>
      <sec id="sec-2-1">
        <title>Preprocessing</title>
        <p>
          The first step in the proposed algorithm is to prepare the examples for obfuscation. In
this step we split the original text to sentences using NLTK 3.0 Toolkit [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ]. Next, using a
pre-defined lexicon we split each sentence to phrase chunks and tokens. In other words,
if we encounter a phrase from the lexicon we consider it as a chunk otherwise we use
the tokens obtained from the tokenizer. The phrase lexicon is manually crafted from
important phrases used in the same-author documents in the train-set.
2.2
        </p>
      </sec>
      <sec id="sec-2-2">
        <title>Author word usage distribution</title>
        <p>Word choice and usage is one of the important components of every author’s
fingerprints. In order to capture this important component we use a maximum likelihood
estimate of the word lemma frequencies in the same-author documents excluding stop
words and auxiliary verbs. We denote the probability of choosing word w by P (w).
2.3</p>
      </sec>
      <sec id="sec-2-3">
        <title>Word/Phrase Replacement</title>
        <p>
          In this section we explain the process we used to replace words in the original document.
Let dorig, dobf , w, and used be the original document, obfuscated document, current
word, and list of words that already used for replacement respectively. We initialize the
obfuscated document by the original document. Next, we iteratively choose words from
the obfuscated document and perform replacements using Algorithm 1. As illustrated in
Algorithm 1, we only consider adjectives, adverbs and verbs(excluding auxiliary verbs)
for replacement. The replacement candidates are obtained from either WordNet [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ] or
Word2Vec [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ]. Next, we choose the best scoring replacement from those that are less
likely to be chosen by the author(have smaller P ) and also not used before. We score
the appropriateness of a candidate replacement by averaging over three sub-scores:
1. Similarity to the original word: this score helps us to find meaningful
replacements. This score obtained from WordNet or Word2Vec depending on the model
that we evaluate.
2. Inverse of author’s word usage probability: we want to use replacement that are
less likely to be selected by the author.
3. Word mover’s distance(WMD)[
          <xref ref-type="bibr" rid="ref9">9</xref>
          ]: The WMD distance measures the dissimilarity
between two text documents as the minimum amount of distance that the embedded
words of one document need to "travel" to reach the embedded words of another
document. In other words the most efficient way to "move" the distribution of a
document to the distribution of another document. Using WMD we can progressively
measure the distance between the obfuscated document and the original document
and choose a replacement that increases this measure. The ReplaceAll method used
in the algorithm replaces all occurrences of word w in document d by replacement
word r. This method returns a document with replacements and doesn’t change the
input document.
        </p>
        <p>Algorithm 1: ReplaceWord (dobf ; dorig; w; used)
1 RE P L A C EWO R D(dobf ; dorig; w; used)
2 if POS(w) in fADJ; ADV; V ERBg then
3 (syns; similarities) GE TSY N O N Y M S (w)
4 (r; rscore) (null; 0)
5 for i 1 to len(syns) do
6 if syns[i] in used or P (w) P (syns[i]) then
7 continue
8
9
/* replace all w with syns[i] and put it in dtemp</p>
        <p>without changing dobf
dtemp RE P L A C EAL L(dobf ; w; syns[i])
s (similarities[i] + 1+P(s1yns[i]) + WMD(dtemp; dorig))=3
*/
if s &gt; rscore then
rscore s
r syns[i]
if rscore &gt; 0 then
// apply the best scoring replacement to dobf
dobf RE P L A C EAL L(dobf ; w; r)
used used [ frg
return dobf
2.4</p>
      </sec>
      <sec id="sec-2-4">
        <title>Contraction Transformation</title>
        <p>
          We follow the method used in [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ] to transform contractions to expanded form and vise
versa. In order to perform these transformations we use the average preference of the
author for using contractions in the same-author documents. If author prefers
contractions then we try to convert them to expanded form in the obfuscated document and
vise versa.
2.5
        </p>
      </sec>
      <sec id="sec-2-5">
        <title>Sentence Length Alteration</title>
        <p>
          According to [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ], sentence length is a deciding factor in authorship verification. As a
result we consider it as a component of author’s style and change the average sentence
length of the obfuscated text based on preference of the author for sentence length in
the same-author documents. If the author prefers short sentences, we try to combine
consecutive sentences using and connector to increase the average length in the
obfuscated text. In contrary, when author prefers long sentences, we search for connectors
(e.g. words with CC POS-tag) in each long sentence and split it to two sentences.
3
        </p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Experimental Evaluation</title>
      <p>
        Author obfuscation task is evaluated by three performance dimensions. Accordingly,
we call an obfuscation software [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]:
1. safe: if its obfuscated texts cannot be attributed to their original authors anymore
2. sound: if its obfuscated texts are textually entailed by their originals
3. sensible: if its obfuscated texts are well-formed and inconspicuous
From these criteria only safety criterion is evaluated automatically and the other two are
evaluated by human judgments. As discussed in Section 2.3 we rely on either WordNet
or Word2Vec to find best replacements for words. Thus, we submitted two version of
our algorithm for the task, one with Word-Net and another with Word2Vec. At the time
of writing this paper the test results were not published. Therefore, in the following,
we provide some examples and performance statistics of our proposed approach on
training data using Word2Vec. The proposed algorithm and automatic evaluation are
implemented in Python 3.6 and they are published on GitHub .
https://github.com/Rahgooy/author_masking
3.1
      </p>
      <sec id="sec-3-1">
        <title>Manually Evaluated Examples</title>
        <p>In this section we provide some manually evaluated examples. In the first example in
Table 1 the adverb very is replaced by a very good alternative, extremely. As you can see
in this example is is unchanged because it is an auxiliary verb. Second example shows a
successful replacement of an expanded form it is with it’s contraction it’s for an author
that prefers expanded forms over contractions. In addition, we have replacements for
verbs say and wants with believe and deserves respectively. Conversely, in the third
example, a contracted form phrase don’t is converted to its expanded form do not due
to the author preference for contractions.</p>
        <p>The original text in the example 4 contains a long sentence from an author that
prefers long sentences. We split this sentence by replacing conjunction word or with
punctuation. It is clear that the resulting sentences are not complete and meaningful in
this example.
3.2</p>
      </sec>
      <sec id="sec-3-2">
        <title>Automatic Evaluation</title>
        <p>
          To evaluate our approach automatically, we trained a long-short term memory network
(LSTM) [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ] on the same author documents. We separated the texts in the same-author
documents of each problem to train and evaluation sets. For training we randomly
sampled fixed-length text from the documents and labeled them as positive examples.
For negative examples we chose a number of documents from other problems randomly
and generated approximately the same number of examples as number of positives.
        </p>
        <p>We tested the model using the original document for each problem. The average
verification score obtained by this model for original texts was 75.61%. The average score
dropped dramatically to 51.71% when we applied the same model on the obfuscated
data. Table 2 shows the results for 20 examples from the dataset.
4</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Conclusion</title>
      <p>In this paper we proposed an algorithm for author masking task in PAN 2018. The
proposed algorithms learns the author’s finger-prints from known documents of the
author. Next, it uses those statistics to apply calculated changes to the text in order to
deform author’s finger-prints in the obfuscated text effectively. Manual and automatic
evaluation shows that our approach is very capable of diminishing author’s finger-prints.
In future works we try to add more components to the author’s finger-prints and find
clever ways to distort them in the obfuscated texts.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Bagnall</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Author identification using multi-headed recurrent neural networks</article-title>
          .
          <source>arXiv preprint arXiv:1506.04891</source>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Bartoli</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dagri</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>De Lorenzo</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Medvet</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tarlao</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>An author verification approach based on differential features</article-title>
          .
          <source>In: CEUR WORKSHOP PROCEEDINGS</source>
          . vol.
          <volume>1391</volume>
          .
          <string-name>
            <surname>CEUR</surname>
          </string-name>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Bird</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Klein</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Loper</surname>
          </string-name>
          , E.:
          <article-title>Natural language processing with Python: analyzing text with the natural language toolkit. "</article-title>
          <string-name>
            <surname>O'Reilly Media</surname>
          </string-name>
          ,
          <source>Inc."</source>
          (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Castro-Castro</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bueno</surname>
            ,
            <given-names>R.O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Muñoz</surname>
          </string-name>
          , R.:
          <article-title>Author masking by sentence transformation</article-title>
          .
          <source>In: CLEF (Working Notes)</source>
          .
          <source>CEUR Workshop Proceedings</source>
          , vol.
          <year>1866</year>
          .
          <article-title>CEUR-WS.org (</article-title>
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Fellbaum</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>WordNet: An Electronic Lexical Database</article-title>
          . Bradford
          <string-name>
            <surname>Books</surname>
          </string-name>
          (
          <year>1998</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Hagen</surname>
            ,
            <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 author obfuscation task at pan 2017: safety evaluation revisited</article-title>
          .
          <source>Working Notes Papers of the CLEF</source>
          pp.
          <fpage>33</fpage>
          -
          <lpage>64</lpage>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Hochreiter</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schmidhuber</surname>
            ,
            <given-names>J.:</given-names>
          </string-name>
          <article-title>Long short-term memory</article-title>
          .
          <source>Neural computation 9(8)</source>
          ,
          <fpage>1735</fpage>
          -
          <lpage>1780</lpage>
          (
          <year>1997</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Hürlimann</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Weck</surname>
          </string-name>
          , B., van den Berg, E.,
          <string-name>
            <surname>Suster</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nissim</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          : Glad:
          <article-title>Groningen lightweight authorship detection</article-title>
          .
          <source>In: CLEF (Working Notes)</source>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Kusner</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sun</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kolkin</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Weinberger</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          :
          <article-title>From word embeddings to document distances</article-title>
          .
          <source>In: International Conference on Machine Learning</source>
          . pp.
          <fpage>957</fpage>
          -
          <lpage>966</lpage>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Mansoorizadeh</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rahgooy</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Aminiyan</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Eskandari</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Author obfuscation using wordnet and language models-notebook for pan at clef 2016</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Mikolov</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chen</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Corrado</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dean</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          :
          <article-title>Efficient estimation of word representations in vector space</article-title>
          .
          <source>arXiv preprint arXiv:1301.3781</source>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>