Language of Vandalism: Improving Wikipedia Vandalism Detection via Stylometric Analysis

Manoj Harpalani, Michael Hart, Sandesh Signh, Rob Johnson, Yejin ChoiACL 2011

Abstract

Wikipedia's open-edit nature necessitates robust automated vandalism detection. While existing systems rely heavily on metadata and lexical cues, they often fail to capture sophisticated vandalism that avoids obvious profanity. This paper proposes a stylometric approach, treating vandalism as a distinct linguistic genre. By integrating Probabilistic Context-Free Grammars (PCFG) and Trigram Language Models (LM) into a LogitBoost classifier, we demonstrate significant improvements in detection performance. Our findings indicate that deep syntactic structures are highly indicative of vandalism, with PCFG features providing a substantial boost in recall on the PAN 2010 Wikipedia Vandalism Corpus.

Introduction

Wikipedia is a cornerstone of collective intelligence, yet its accessibility makes it vulnerable to malicious edits. Current automated defenses primarily utilize "shallow" features—metadata such as user anonymity or lexical filters for vulgarity. However, as vandals evolve, they increasingly employ subtle misinformation or "clean" nonsense that bypasses these simple filters. This research addresses the need for linguistically motivated tools that analyze how content is written, rather than just what words are used, to identify sophisticated vandalism.

Methods

The study frames vandalism detection as a stylometric analysis problem. The researchers proposed two primary linguistic enhancements to a baseline classifier:

  1. Trigram Language Models (LM): These models capture the statistical likelihood of word sequences, distinguishing the "flavor" of vandalism from standard Wikipedia prose.
  2. Probabilistic Context-Free Grammars (PCFG): This approach analyzes the hierarchical structure of sentences (e.g., noun and verb phrases). By comparing how well a "vandalism" grammar versus a "regular" grammar fits an edit, the system identifies structural anomalies typical of trolls.

These linguistic features were combined with traditional metadata features—such as author reputation and edit frequency—using a LogitBoost classifier. The relative importance of these features is summarized in the table below.

Feature importance scores for the top 10 features used in the classifier.

Dataset

The evaluation used the 2010 PAN Wikipedia Vandalism Corpus, containing 32,452 edits across 28,468 articles. The dataset is highly imbalanced, with vandalism comprising only 7% of the edits. The analysis focused specifically on the 17,145 edits involving text insertion or modification, where stylometric patterns are most prevalent and applicable.

Key Results

The researchers compared their linguistically-enhanced model against a strong baseline of metadata and lexical cues. As shown in the performance summary, the addition of PCFG features yielded the most substantial improvement, particularly in recall, which rose from 41.1% to 47.7%. This indicates that the system became much more effective at identifying previously missed vandalism without a significant increase in false positives.

Performance comparison of different feature sets on the PAN 2010 corpus.

Key Insights and Discussion

The most striking finding is that vandalism constitutes a unique linguistic genre. Just as legal or journalistic writing has recognizable patterns, vandalism exhibits shared behaviors among its practitioners. Deep syntactic structures (PCFG) proved significantly more effective than shallow n-grams, suggesting that the structural "tell" of a vandal's sentence is a more reliable indicator than specific word choices. For instance, the system successfully flagged edits that lacked vulgarity but had anomalous structural properties, such as misplaced parentheticals.

Limitations and Future Work

While stylometric analysis offers a powerful new tool for Wikipedia moderation, challenges remain regarding topic specificity and computational overhead. PCFG parsing is more resource-intensive than keyword matching, which may impact real-time deployment on Wikipedia's massive edit stream. Future work will explore training on broader "vandal-like" datasets and optimizing the use of PCFG outputs to further refine detection capabilities.

Summary updated

BibTeX
@inproceedings{harpalani2011language,
  author = {Manoj Harpalani and Michael Hart and Sandesh Signh and Rob Johnson and Yejin Choi},
  title = {{Language of Vandalism: Improving Wikipedia Vandalism Detection via Stylometric Analysis}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2011},
  url = {https://openreview.net/forum?id=kAw9cSMz3t},
}
Figure