<!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 Wikipedia Vandalism using Machine Learning</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>Cristian-Alexandru Dr</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>UAIC: Faculty of Computer Science, “Alexandru Ioan Cuza” University</institution>
          ,
          <addr-line>General Berthelot, 16, 700483, Iasi</addr-line>
          ,
          <country country="RO">Romania</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2011</year>
      </pub-date>
      <abstract>
        <p>Wikipedia vandalism identification is a very complex issue, which is now mostly solved manually by volunteers. This paper presents the main components of a system built by our group in order to automatically identify vandalized Wikipedia articles. The main component of our system is a machine learning component that uses three types of features grouped in 3 classes: Metadata, Text and Language. Additional to previous approaches we consider 4 new features related to vulgar, biased, sexual and miscellaneous bad words. The obtained results showed an area of 0.42464 under the PR-AUC curve and an area of 0.82963 under the ROC-AUC curve.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1 Introduction</title>
      <p>Wikipedia is the largest online encyclopedia. It is free to access by anyone and its
main advantage is that it can also be edited by any user, at any time. This caused a
rapid growth to its number of available articles and languages. At the moment of this
writing, Wikipedia is available in 281 languages. Top 3 Wikipedias are, in order,
English, German and French, each having over 1.000.000 articles. The English
Wikipedia has over 3.600.000 articles constantly updated and maintained by over
140.000 active users and over 1.500 administrators.</p>
      <p>
        The advantage of being a free encyclopedia which anyone can edit is also a
significant problem, because, at any given time, any old or new article, in any
language, is prone to being vandalized. PAN 20111 has a task called “Wikipedia
Vandalism Detection”, which targets the development of systems capable of detecting
Wikipedia vandalism. According to the PAN 2010 Wikipedia Vandalism Detection
training corpus [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], about 7% of all revisions were vandalized. This is a significant
problem for Wikipedia, because the readers can never be sure of the quality of
available information, unless they verify it from other sources. While some vandalism
cases can be spotted very easily (such as improper language and massive text
deletion), other times finding it is more difficult (such as fake information inserted in
articles).
      </p>
      <sec id="sec-1-1">
        <title>1 PAN 2011: http://pan.webis.de/</title>
        <p>
          Research studies in the field were made only in recent years and concluded that
detection of vandalism is related to artificial intelligence. The best method, which is
heading towards current research directions are focused on machine learning
techniques [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ] and the statistical analysis in natural language processing [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ]. Also a
good method of detection is based on spatial and temporal analysis of revisions made
to the Wikipedia articles [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ]. Other related articles treating automatic Wikipedia
vandalism detection include [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ], [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ] and [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ].
        </p>
        <p>Since 2006 they created a series of automated tools to detect vandalism. These
tools, called anti-vandalism bots, are programs that are designed to automatically
detect and remove vandalism actions. What is the easiest method of disposal is to
bring the document to the previous version identified by bots as act of vandalism.</p>
        <p>Currently the most important bots are ClueBot2 and VoABot II3. These tools use
regular expressions and lists of database users or IP addresses blocked to prevent
vandalism of articles. However these bots detect only about 30% of the total number
of acts of vandalism, so it is necessary to improve methods of detection and correction
of existing techniques.</p>
        <p>The most notable results are currently achieved by combining the detection rules of
STiki4, Cluebot NG5, WikiTrust6 as well as an URL spam detection system.</p>
        <p>In the following, we present the approach our group in an attempt to identify acts
of vandalism in existing edits on Wikipedia. These edits were made available by the
organizers of PAN 2011, part of CLEF 20117.</p>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>2 Edit Features and Classification</title>
      <p>
        Our approach is based on the best performing detector at the time of this study [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]
(according to the main Wikipedia Vandalism Detection page8). We removed some of
the features and added a few others. All our features are grouped in 3 classes:
Metadata, Text and Language. Our main target was to see how well a detector could
work based solely on the information found in the training corpus, without using any
additional information (such as external services like WikiTrust, or querying
Wikipedia for detailed information about the author of the revisions or the history of
the article). As a result, we didn’t implement any reputation features (proposed in
[
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]), or features such as: TIME_SINCE_PAGE, TIME_SINCE_REG or
TIME_SINCE_VAND. We did, however, try to use the Google SafeBrowsing
service9 to detect any possible malicious links that were inserted in new revisions. But
this attempt was unsuccessful, because of two reasons:
2 ClueBot: http://en.Wikipedia.org/wiki/User:ClueBot/Source
3 VoABot: http://en.wikipedia.org/wiki/User:VoABot_II
4 STiki: http://en.wikipedia.org/wiki/Wikipedia:STiki
5 Cluebot NG: http://en.wikipedia.org/wiki/User:ClueBot_NG
6 WikiTrust: http://en.wikipedia.org/wiki/WikiTrust
7 CLEF 2011: http://clef2011.org/
8 Wikipedia Vandalism Detection: http://www.uni-weimar.de/medien/webis/research/events/
pan-11/wikipedia-vandalism-detection.html
9 Google Safe Browsing API: http://code.google.com/apis/safebrowsing/
1. the training corpus didn’t contain relevant information of this kind (there
weren’t sufficiently many cases in which vandalized revisions contained
links marked by Google SafeBrowsing as malware/phishing);
2. the huge time difference between the date of the revisions, dated 2009, and
the current Google SafeBrowsing results (there were a few cases where some
URLs are currently considered dangerous, but 2 years ago they were OK).
The same situation can be found while trying to use the Wikipedia URL
blacklist10, which now contains a few domains that, in the past, were
perfectly OK.
      </p>
      <p>So we didn’t use the Google SafeBrowsing results in the final detection process. Of
course, using such services for real-time, current revisions which take place on
Wikipedia could provide very good results. But the use for detecting old vandalized
revisions is very limited.</p>
      <p>The complete list of used features follows below.</p>
      <p>•
•
•
•
•
•
•
•
•</p>
      <sec id="sec-2-1">
        <title>2.1 Features used by participants in PAN 2010</title>
        <sec id="sec-2-1-1">
          <title>These features are explained in detail in [8].</title>
          <p>Metadata features – generated based on general revision information:
• IS_REGISTERED: marks if the author of the edit has a Wikipedia
account. This feature is not computed by querying Wikipedia for this
information, but instead the editor name is checked to see if it represents a
valid IP (anonymous edit) or not (registered user);</p>
        </sec>
        <sec id="sec-2-1-2">
          <title>COMMENT_LENGTH: the length of the edit revision;</title>
          <p>SIZE_CHANGE: length difference between the new and old revisions;
SIZE_RATIO: ration between the new and old revisions text length;
PREV_SAME_AUTH: if the old revision has the same author as the new
one.</p>
        </sec>
        <sec id="sec-2-1-3">
          <title>Text features – based on basic analysis on text characters:</title>
          <p>• DIGIT_RATIO: the frequency of digits in the new revision;
ALPHANUM_RATIO: the frequency of alpha-numeric characters in the
new revision;
UPPER_RATIO: the frequency of upper case characters in the new
revision;
UPPER_LOWER_ RATIO: ratio between the upper case and lower case
characters in the new revision;
LONG_CHAR_SEQ: longest single character sequence length;</p>
        </sec>
        <sec id="sec-2-1-4">
          <title>LONG_WORD: longest word length;</title>
          <p>10 Wikipedia Spam Blacklist: http://en.wikipedia.org/wiki/Wikipedia:Spam_blacklist
COMPRESS_LZW: compression ratio of added words (using the LZW
algorithm);</p>
        </sec>
        <sec id="sec-2-1-5">
          <title>PREV_LENGTH: the text length of the previous revision.</title>
          <p>Language features – based on more advanced analysis over the text content;
multiple word dictionaries were used to search the text for different words, belonging
to different categories:
• VULGARITY: the frequency of vulgar words;
•</p>
          <p>PRONOUNS: the frequency of first and second person pronouns;</p>
        </sec>
        <sec id="sec-2-1-6">
          <title>BIASED_WORDS: the frequency of high bias words;</title>
          <p>SEXUAL_WORDS: the frequency of non-vulgar sexual words;
MISC_BAD_WORDS: the frequency of any other words with negative
meaning (or not suitable for an encyclopedia);
ALL_BAD_WORDS: the frequency of all bad words (vulgar, pronouns,
biased, sexual and miscellaneous);</p>
        </sec>
        <sec id="sec-2-1-7">
          <title>GOOD_WORDS: the frequency of words that are not bad;</title>
          <p>COMM_REVERT: if the new revision comment marks that previous
changes were reverted to an earlier state.</p>
        </sec>
      </sec>
      <sec id="sec-2-2">
        <title>2.2 Customized Features</title>
        <p>
          We customized a few features from [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ], [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ] and used them in the Language class:
VULGARITY2, BIASED_WORDS2, SEXUAL_WORDS2 and
MISC_BAD_WORDS2. Their description is presented below:
• VULGARITY2: the ratio between the frequency of vulgar words in the
new revision and their frequency in the old revision;
BIASED_WORDS2: the ratio between the frequency of high bias words
in the new revision and their frequency in the old revision;
SEXUAL_WORDS2: the ratio between the frequency of non-vulgar
sexual words in the new revision and their frequency in the old revision;
MISC_BAD_WORDS2: the ratio between the frequency of
miscellaneous bad words in the new revision and their frequency in the
old revision.
        </p>
        <p>The purpose of these features is to distinguish articles which use the words from
the targeted categories in a legitimate way (vulgar, biased, sexual or miscellaneous
bad words). For instance, there might be non-vandalized articles which already have a
high frequency of words from the above categories. Inevitably, any new revisions to
those articles will still have a high frequency for those words, in which case, new
revisions might have features which resemble those of a vandalism, even though the
revisions might not be vandalism. Examples of such articles would be the articles
titled Profanity11, Seven Dirty Words12 and other.</p>
        <p>Basically, if a previous revision (considered non-vandalized) contains a high
frequency of words from the above categories, then it might be normal that new
revisions have a similar high frequency for those word categories. And the features
we added attempt to mark these special situations, by comparing the frequencies in
the old and new revisions. These features are meant to treat a few special cases that
were not correctly treated by the features from section 2.1.</p>
      </sec>
      <sec id="sec-2-3">
        <title>2.3 Classifier</title>
        <p>
          After all features have been computed for the training corpus, a classifier model has
been trained using a Support Vector Machine algorithm. We used the LibSVM
library13, using the C-Support Vector Classification SVM type and Radial Basis
Function (RBF) kernel type [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ]. All features were scaled in the [
          <xref ref-type="bibr" rid="ref2">0, 2</xref>
          ] interval and the
SVM algorithm has been set to train a model which can also output probability
estimates, which made it possible to show exact confidence values.
        </p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3 Evaluation</title>
      <p>We submitted one run to the PAN 2011 at Wikipedia Vandalism Detection task for
English language. The run was obtained using LibSVM with the features presented
above. Computing the features took around 9 hours for all training revisions and
about 24 hours for the test corpus. After all features were computed, training the SVM
model and classifying the test revisions was done a lot faster, in under 1 hour.</p>
      <p>Our tests also showed that most detection problems we had were with blanked
revisions. There were two situations when this occurred. Firstly, in cases when a
vandalism occurred by blanking an article, which lead to the new revision being
blank. And secondly, when such vandalism was reverted, in which case the old
revision was blank and the new one wasn’t.</p>
      <p>In both cases, the SVM algorithm had problems classifying the revisions correctly,
because the revision features had either very low values (0), or very high (infinite, in
cases where ratios were computed and the denominator was a feature which was 0).
We attempted to correct to some degree these situations by applying a few
postclassification rules and treat specifically the blank revisions classification, by
lowering (when a revision was reverted) or increasing (when the new revision was
blank) their final confidence level.
11 Profanity: http://en.wikipedia.org/wiki/Profanity
12 Seven Dirty Words: http://en.wikipedia.org/wiki/Seven_Dirty_Words
13 LibSVM library: http://www.csie.ntu.edu.tw/~cjlin/libsvm/
3.1</p>
      <sec id="sec-3-1">
        <title>Official results</title>
        <p>
          The official results14 published by the organizers are presented in Table 1 and in
Figures 1, 2. The results were obtained using PR-AUC and ROC-AUC measures
presented in [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ].
        </p>
        <p>Rank
1
2</p>
        <p>PR-AUC
0.82230</p>
        <p>
          From [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ] we have that plotting precision versus recall spans the precision-recall
space, and plotting the TP (the number of edits that are correctly identified as
vandalism, i.e. true positives) rate versus the FP (the number of edits that are untruly
identified as vandalism, i.e. false positives) rate spans the ROC space.
        </p>
        <p>From Table 1 we can see how the results of A.G. West group are better than our
results. According to the PR measure, their result is much better (see Figure 2), and
according to the ROC measure the results are closer (see Figure 1).</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4 Conclusions</title>
      <p>In this paper we presented our group’s participation in the PAN 2011 exercise in
Wikipedia Vandalism Detection task from CLEF 2011 labs.</p>
      <p>In the future we also intend to use a more advanced natural language processing
method (for instance, to extract and compare the main ideas from the old revision and
the new revision) because we believe that this area can bring significantly improved
results to our system. Natural language processing is the closest way of interpreting
the actual meaning of the text in the same manner as the human brain does, and so
determining the real meaning of the words could offer valuable information for
detecting article vandalism.</p>
      <p>Acknowledgements. The research presented in this paper was funded by the Sector
Operational Program for Human Resources Development through the project
“Development of the innovation capacity and increasing of the research impact
through post-doctoral programs” POSDRU/89/1.5/S/49944.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Potthast</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Crowd sourcing a Wikipedia Vandalism Corpus</article-title>
          .
          <source>33rd Annual International ACM SIGIR Conference (SIGIR 10)</source>
          , Geneva, Switzerland,
          <source>ISBN 978-1-4503-0153-4</source>
          (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Smets</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Goethals</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Verdonk</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>Automatic Vandalism Detection in Wikipedia: Towards a Machine Learning Approach</article-title>
          .
          <source>Proceedings of the Association for the Advancement of Artificial Intelligence (AAAI) Workshop on Wikipedia and Artificial Intelligence: An Evolving Synergy (WikiAI08)</source>
          (
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Chin</surname>
            ,
            <given-names>S. C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Street</surname>
            ,
            <given-names>W. N.</given-names>
          </string-name>
          :
          <article-title>Detecting Wikipedia vandalism with active learning and statistical language models</article-title>
          .
          <source>WICOW'10</source>
          ,
          <string-name>
            <surname>North</surname>
            <given-names>Carolina</given-names>
          </string-name>
          , USA. (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>West</surname>
            ,
            <given-names>A. G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kannan</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lee</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          :
          <article-title>Detecting Wikipedia Vandalism via Spatio-Temporal Analysis of Revision Metadata</article-title>
          .
          <source>Technical Reports (CIS)</source>
          , University of Pensylvania, Department of Computer &amp; Information Science. (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Priedhorsky</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chen</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lam</surname>
            ,
            <given-names>S. K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Panciera</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Terveen</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Riedl</surname>
          </string-name>
          , J.: Creating, Destroying, and Restoring Value in Wikipedia. Group'
          <volume>07</volume>
          : Proceedings of the International Conference on Supporting Group Work, Sanibel Island, Florida, USA (
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Itakura</surname>
            ,
            <given-names>K. Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Clarke</surname>
            ,
            <given-names>C. L. A.</given-names>
          </string-name>
          :
          <article-title>Using Dynamic Markov Compression to Detect Vandalism in the Wikipedia</article-title>
          .
          <source>SIGIR'09: Proceedings of the 32nd International ACM SIGIR Conference on Research and Development in Information Retrieval</source>
          , New York, NY, USA (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Geiger</surname>
            ,
            <given-names>R. S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ribes</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>The Work of Sustaining Order in Wikipedia: The Banning of a Vandal</article-title>
          .
          <source>CSCW'10: Proceedings of the ACM Conference on Computer Supported Cooperative Work</source>
          , Savannah, Georgia, USA, (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Adler</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>de Alfaro</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mola-Velasco</surname>
            ,
            <given-names>S. M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rosso</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>West</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Wikipedia Vandalism Detection: Combining Natural Language</article-title>
          , Metadata, and
          <string-name>
            <given-names>Reputation</given-names>
            <surname>Features</surname>
          </string-name>
          .
          <source>Computational Linguistics and Intelligent Text Processing</source>
          , University of California, Santa Cruz, USA (
          <year>2011</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>Stein</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gerling</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          :
          <source>Automatic Vandalism Detection in Wikipedia. Advances in Information Retrieval: Proceedings of the 30th European Conference on IR Research (ECIR</source>
          <year>2008</year>
          ), Glasgow, UK,
          <volume>4956</volume>
          of Lecture Notes in Computer Science, Springer.
          <source>ISBN 978-3-540-78645-0</source>
          (
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Mola-Velasco</surname>
            ,
            <given-names>S. M.</given-names>
          </string-name>
          :
          <source>Wikipedia Vandalism Detection Through Machine Learning: Feature Review and New Proposals - Lab Report for PAN at CLEF</source>
          <year>2010</year>
          ,
          <article-title>Notebook Papers of CLEF 2010 LABs and Workshops</article-title>
          , Padua, Italy,
          <source>ISBN 978-88-904810-0-0</source>
          (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Chang</surname>
          </string-name>
          , C.-C.,
          <string-name>
            <surname>Lin</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          -J.:
          <article-title>LIBSVM: A library for support vector machines</article-title>
          .
          <source>ACM Transactions on Intelligent Systems and Technology</source>
          , New York, NY, USA (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <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>Holfeld</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>Overview of the 1st International Competition on Wikipedia Vandalism Detection, In CLEF 2010 LABs and Workshops</article-title>
          , Notebook Papers,
          <fpage>22</fpage>
          -
          <lpage>23</lpage>
          September 2010, Padua, Italy,
          <source>ISBN 978-88-904810-0-0</source>
          (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>