Authorship Attribution through Function Word Adjacency Networks

Santiago Segarra, Mark Eisen, Alejandro Ribeiro · DOI

Abstract

A method for authorship attribution based on function word adjacency networks (WANs) is introduced. Function words are parts of speech that express grammatical relationships between other words but do not carry lexical meaning on their own. In the WANs in this paper, nodes are function words and directed edges stand in for the likelihood of finding the sink word in the ordered vicinity of the source word. WANs of different authors can be interpreted as transition probabilities of a Markov chain and are therefore compared in terms of their relative entropies. Optimal selection of WAN parameters is studied and attribution accuracy is benchmarked across a diverse pool of authors and varying text lengths. This analysis shows that, since function words are independent of content, their use tends to be specific to an author and that the relational data captured by function WANs is a good summary of stylometric fingerprints. Attribution accuracy is observed to exceed the one achieved by methods that rely on word frequencies alone. Further combining WANs with methods that rely on word frequencies alone, results in larger attribution accuracy, indicating that both sources of information encode different aspects of authorial styles.

Introduction

Authorship attribution—the task of identifying the author of an anonymous or disputed text—has traditionally relied on "bag-of-words" models. These models count the frequency of specific words (like "the," "and," or "of") but ignore the order and relational structure between them. The authors argue that frequency alone misses a crucial dimension of literary style: syntax and local grammar. While "content words" (nouns, verbs) change based on the topic, "function words" (prepositions, conjunctions, pronouns) are content-independent and reflect an author’s subconscious structural habits. The challenge is to capture these habits mathematically in a way that is robust across different genres and time periods.

Methodology: Function Word Adjacency Networks (WANs)

The core innovation presented is the Function Word Adjacency Network (WAN). Nodes in the network are a set of common function words. A directed, weighted edge is created between two function words if they appear within the same sentence. The weight of an edge is determined by a discount factor ($\alpha$) and a window length ($D$). If word $B$ follows word $A$ closely, the edge weight is higher.

By normalizing the outgoing edges of each node to sum to one, the WAN is transformed into a transition matrix for a Markov chain. This represents the probability that an author will use function word $j$ given that they just used function word $i$. To compare an unknown text to an author's known profile, the authors use Relative Entropy (Kullback-Leibler divergence).

Attribution accuracy as a function of the number of function words (left) and the discount factor alpha (right).

The authors propose an adaptive strategy using cross-validation to select the optimal set of function words (typically between 40 and 70) and the discount factor $\alpha$ (typically around 0.7) for a specific attribution problem, as illustrated in the parameter sensitivity analysis.

Experimental Evaluation

The study utilizes two primary corpora: a 19th-Century Corpus featuring 21 American and British authors and a 17th-Century Playwrights corpus including Shakespeare, Marlowe, and Jonson. The method was benchmarked against standard classifiers like Naive Bayes, Support Vector Machines (SVM), and k-Nearest Neighbors (k-NN).

In a 10-author attribution task, WANs achieved an error rate of 8.3%, significantly outperforming SVM (11.5%) and Naive Bayes (10.8%). A "Voting" ensemble (combining WAN, Naive Bayes, and SVM) reduced the error rate even further to 6.0%.

Results and Stylometric Insights

The relational structure captured by WANs encodes different authorial information than simple word frequencies. This is evidenced by the clear separation of author profiles in low-dimensional space.

MDS representation showing the clustering of texts by author for two (left) and three (right) authors.

WANs are sensitive enough to distinguish between an author’s genres and can accurately cluster authors by their historical time period. Furthermore, the paper demonstrates that WANs can identify collaborative works. For example, the play Two Noble Kinsmen showed high similarity to both Shakespeare and Fletcher, its known co-authors.

Conclusion

While the method requires a substantial corpus of known text (ideally >60,000 words) to build a stable fingerprint, it offers a robust relational approach to stylometry. Future directions include integrating WANs with other stylometric markers, such as vocabulary richness or part-of-speech taggers, to create an even more robust "multi-modal" authorial profile.

Summary updated

BibTeX
@article{segarra2014authorship,
  author = {Santiago Segarra and Mark Eisen and Alejandro Ribeiro},
  title = {{Authorship Attribution through Function Word Adjacency Networks}},
  journal = {IEEE Trans. Signal Process.},
  year = {2014},
  doi = {10.1109/tsp.2015.2451111},
}
Figure