A Machine Learning Framework for Authorship Identification From Texts

Rahul Radhakrishnan Iyer, Carolyn Penstein RoséarXiv 2019

Abstract

This paper presents a supervised machine learning framework for authorship identification, treating it as a multi-class classification problem across 50 different authors. By combining traditional text features with "stylometric" markers—such as Part-of-Speech (POS) bigrams and punctuation patterns—the research demonstrates that an author’s unconscious syntactic "fingerprint" is often more telling than the words they choose. The proposed model achieves significant accuracy improvements by capturing the unique "idiolect" of individual writers.

Introduction

In the digital age, the absence of physical handwriting necessitates new methods for identifying the creators of anonymous or disputed texts. Whether for resolving literary disputes, forensic analysis, or identifying anonymous manuscripts, authorship identification must rely solely on digital content. The primary challenge lies in the fact that authors often share similar vocabularies when writing on the same topics. Simple keyword analysis frequently fails because it captures the subject matter rather than the writer's style. This work aims to build a robust framework capable of distinguishing between dozens of writers by capturing their "idiolect"—the unique, often unconscious, linguistic and syntactic patterns specific to an individual.

Methodology

The task is formulated as a single-label multi-class text categorization problem. Initial experimentation involved several algorithms, including Naïve Bayes and Decision Trees. LibLINEAR SVM was ultimately selected as the primary model due to the high-dimensional and largely linearly separable nature of the dataset.

Table 1: Comparison of classification algorithms based on accuracy and Kappa statistics.

Feature Engineering

The core innovation of this framework lies in its feature engineering phase. Beyond simple word unigrams, the model incorporates three categories of stylometric features:

  1. Phraseology Analysis: Metrics such as lexical diversity, mean word/sentence length, and document length.
  2. Punctuation Analysis: Frequency counts of commas, semicolons, and quotation marks.
  3. Lexical Usage: Tracking specific "function words" (e.g., but, however, that, very).
  4. Syntactic Patterns: The use of Part-of-Speech (POS) tags and POS bigrams to capture the structural rhythm of a writer.

To manage the high dimensionality of the feature space (exceeding 82,000 attributes), Chi-squared feature selection was employed. Optimization experiments indicated that the top 60,000 most predictive attributes provided the best balance of performance and complexity.

Figure 1: Accuracy on the development set as a function of the number of features selected.

Experimental Setup

The study utilized the Reuter-50-50 dataset, a subset of the Reuters Corpus Volume 1 (RCV1). The dataset consists of 5,000 news stories from 50 different authors, with each author contributing exactly 100 texts. To ensure robust evaluation and generalizability, the data was partitioned into a Development set (1,000 instances), a Cross-validation set (3,500 instances), and a final Holdout test set (500 instances).

Results and Discussion

The experimental results highlight the importance of unconscious linguistic habits. While writers can consciously control their subject matter, their grammatical and syntactic habits—their "syntactic fingerprints"—remain highly reliable for identification.

  • Baseline Performance: Using only word unigrams, the model achieved an accuracy of 88.83% on the cross-validation set.
  • Stylometric Enhancement: The addition of linguistic stylometric features (POS bigrams, punctuation, etc.) increased accuracy to 91.29%. A paired t-test confirmed this improvement as statistically significant (p < 0.01).
  • Generalization: On the final holdout test set, the optimized model achieved 81.6% accuracy. This strong performance across 50 distinct classes demonstrates the model's ability to generalize to unseen data.

Error analysis revealed that context is crucial for resolving ambiguity. For instance, the word "official" might be used in different contexts (e.g., "government official" vs. "official business") by different authors. The inclusion of bigrams and POS tags provides the necessary context to distinguish these stylistic nuances.

Conclusion and Future Work

This research demonstrates that linear models like SVM and Logistic Regression are highly effective for authorship identification when paired with a rich set of stylometric features. However, several limitations remain:

  • Domain and Language: The model is currently optimized for English news text; its performance on creative writing or other languages requires further investigation.
  • Text Length: Stylistic patterns may not fully emerge in very short texts, such as social media posts.
  • Metrics: Future evaluations should incorporate a broader range of metrics, including precision, recall, and F-measure, to provide a more granular view of performance across different authors.

Summary updated

BibTeX
@misc{iyer2019machine,
  author = {Rahul Radhakrishnan Iyer and Carolyn Penstein Rosé},
  title = {{A Machine Learning Framework for Authorship Identification From Texts}},
  year = {2019},
  eprint = {1912.10204},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1912.10204},
}
Figure