Improving Authorship Verification using Linguistic Divergence

Yifan Zhang, Dainis Boumber, Marjan Hosseinia, Fan Yang, Arjun Mukherjee · DOI

Abstract: We propose an unsupervised solution to the Authorship Verification task that utilizes pre-trained deep language models to compute a new metric called DV-Distance. The proposed metric is a measure of the difference between the two authors comparing against pre-trained language models. Our design addresses the problem of non-comparability in authorship verification, frequently encountered in small or cross-domain corpora. To the best of our knowledge, this paper is the first one to introduce a method designed with non-comparability in mind from the ground up, rather than indirectly. It is also one of the first to use Deep Language Models in this setting. The approach is intuitive, and it is easy to understand and interpret through visualization. Experiments on four datasets show our methods matching or surpassing current state-of-the-art and strong baselines in most tasks.

Introduction

Authorship Verification (AV)—determining if two documents were written by the same person—is notoriously difficult when documents are short or belong to different genres. Traditional methods often rely on n-gram frequencies, which struggle with "non-comparability": an author might use different vocabulary in a formal essay versus a casual tweet. This paper introduces DV-Distance, a novel metric that measures how much an author's writing deviates from a "Normal Writing Style" (NWS) modeled by pre-trained language models.

Methodology: The Deviation Vector

The core innovation is the Deviation Vector (DV). We define Normal Writing Style (NWS) as the statistical average of how people write in a given language, represented by pre-trained models like AWD-LSTM and RoBERTa.

  1. Calculating Deviation: For every word in a document, the language model predicts the expected word based on context. The DV is the vector difference between the embedding of the actual word used and the embedding of the predicted "average" word.
  2. DV-Distance (Unsupervised): To compare two documents, the system calculates the average DV for each. If the "direction" of deviation is similar (measured via cosine similarity), it is likely the same author.
  3. DV-Projection (Supervised): For cases where training data is available, a neural network projects these DVs into a specialized hyperspace, filtering out irrelevant noise to focus on authorship-defining features.
Conceptual visualization of how specific words deviate from the 'average' predicted by a language model along semantic axes like gender.

Experimental Evaluation

The proposed methods were evaluated on four benchmark datasets from the PAN competitions:

  • PAN 2013: Computer Science textbook segments.
  • PAN 2014 (Novels): English novel problems.
  • PAN 2014 (Essays): English essay problems.
  • PAN 2015: A cross-topic, cross-genre dataset containing snippets of novels and poems.

Results and Key Insights

The proposed models matched or surpassed State-of-the-Art (SOTA) results in most tasks, particularly in the difficult novel and cross-domain categories.

Summary of results across PAN datasets, highlighting the performance of DV-Dist and DV-Proj.

Several key insights emerged from the experiments:

  • Consistency in Deviation: While an author's vocabulary might change across genres, their direction of deviation from the norm remains remarkably consistent.
  • The "Too Accurate" LM Trap: Surprisingly, the simpler AWD-LSTM often outperformed the more powerful RoBERTa. If a language model is too good at predicting a specific author's style, the deviation vector shrinks toward zero, losing the signal. A model representing a true "average" writer is more useful.
  • Predictability vs. Authorship: The method works best on "unpredictable" texts like novels. In formal essays, where writing is more standardized, the deviation vectors are less distinct.

Conclusion

DV-Distance offers a robust, unsupervised solution for authorship verification that excels in challenging cross-domain scenarios. By leveraging the internal knowledge of large language models to identify an author's unique linguistic fingerprint, this approach provides a significant step forward in forensic linguistics. Future work will focus on fine-tuning language models to represent specific "average" styles and refining thresholding for real-world applications.

Summary updated

BibTeX
@misc{zhang2021improving,
  author = {Yifan Zhang and Dainis Boumber and Marjan Hosseinia and Fan Yang and Arjun Mukherjee},
  title = {{Improving Authorship Verification using Linguistic Divergence}},
  year = {2021},
  eprint = {2103.07052},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2103.07052},
}
Figure