---
title: Authorship Attribution Methods
url: https://www.emergentmind.com/topics/authorship-attribution
type: topic
---

# Authorship Attribution Methods

Authorship attribution is the task of determining the true author of a piece of text among a set of candidates, based on quantifiable features of written language. This problem has deep roots in stylometry and has advanced significantly with the development of probabilistic, neural, and network‐based models. The goal is to exploit distinctive idiosyncrasies—lexical, syntactic, or statistical—that are characteristic of an individual's writing style, while controlling for confounds such as topic or content.

## 1. Core Methodologies for Authorship Attribution

Approaches to authorship attribution span a range of supervised and unsupervised paradigms, varying in their representational focus and inference mechanism.

**A. Neural Network Language Models (NNLMs):**  
NNLM-based approaches, as exemplified by the feed-forward 4-gram language model paradigm, construct a separate neural language model for each author. The model’s context window is typically N–1 previous words, each mapped via a shared embedding, then concatenated and processed through a sigmoid hidden layer and a softmax output over the vocabulary. The network minimizes the cross-entropy between the model’s word prediction and the actual next word:

\[
C = -\sum_{j=1}^{V} t_j \log y_j
\]

where $t_j$ is the one-hot true label and $y_j$ the softmax output. Attribution is performed by assigning the test text to the author whose NNLM yields the lowest perplexity on that text. Structurally, NNLMs operate with context size $N=4$, embedding dimension $D$ (commonly 50–200), and hidden units $H$ (100–300), tuned per author [1602.05292].

**B. Function Word Adjacency Networks (WANs):**  
WAN models treat function words as stylometric markers and model their adjacency in text as directed graphs. Each author’s texts are used to build a Markov chain over function words, parameterized by a window size $D$ and discount factor $\alpha$. The transition matrix $P_a$ is normalized to be row-stochastic, and authors are compared using Kullback–Leibler divergence:

\[
D(P_1\parallel P_2) = \sum_{i,j}\pi_1(f_i) P_1(f_j|f_i)\log\frac{P_1(f_j|f_i)}{P_2(f_j|f_i)}
\]

This approach is robust to content variation and captures higher-order grammar-structural preferences [1406.4469].

**C. Advanced Perplexity-Based Language Models (ALMs):**  
Perplexity-based attribution schemes fine-tune a transformer (e.g., GPT-2) separately for each candidate author. Each model is trained on the candidate’s corpus for a fixed number of epochs, assigning perplexity scores to test documents. The author whose model yields lowest perplexity is predicted as the source. The main metric is:

\[
\text{PPL}(T|M) = \exp\left( -\frac{1}{N}\sum_{t=1}^N \log P(x_t|x_{<t};M) \right)
\]

ALMs achieve high macro-average accuracy, particularly on free-form prose domains [2401.12005].

**D. Topic-Aware and Unsupervised Approaches:**  
Unsupervised segmentation via multiple clustering runs with shifting windows produces fine-grained probabilistic attributions. Feature vectors are derived from stylometric and compression distances, with label alignment via weighted matching or MAX-CUT relaxations for multiple clusterings. This approach highlights changes in style without requiring prior author samples [1503.07613].

## 2. Evaluation Metrics and Empirical Performance

Authorship attribution systems are evaluated by perplexity reduction, classification accuracy, and robustness under minimal test data conditions.

| Approach                | Accuracy (test size) | Perplexity Reduction | Note                        |
|-------------------------|---------------------|---------------------|-----------------------------|
| Feed-forward NNLM       | 78.5% (5 sentences) | 2.5% rel.           | Outperforms 4-gram baseline |
| 4-gram+Kneser–Ney N-gram| 75% (5 sentences)   | —                   | Baseline                    |
| WAN (n=10 authors)      | 91.7% (10k words)   | —                   | Robust to content variation |
| ALMs (Blogs50)          | 83.6% (avg ~122 tok)| —                   | SOTA, 50-author             |
| ALMs (CCAT50)           | 74.9% (avg ~506 tok)| —                   | Matches prior state-of-art  |

NNLMs yield higher accuracy and lower perplexity than N-gram baselines, even with as few as 5–10 sentences per test sample. WANs demonstrate superior performance relative to frequency-based function word models, especially with larger author sets and longer texts. Perplexity-based transformer models (ALMs) achieve state-of-the-art macro-average accuracy in multi-author attribution tasks with relatively short test texts [1602.05292, 1406.4469, 2401.12005].

## 3. Feature Representation and the Role of Topic

Authorship signals are often confounded with topical content. The reviewed NNLMs and WANs are sensitive to topic when the training/test split aligns with subject matter. NNLM confusion matrices indicate increased error rates among authors covering similar domains, although distributed representations in NNLMs show some bias towards authorial style over coarse topical differences [1602.05292].

Function word adjacency and WAN approaches are, by construction, less vulnerable to topic confounds—since high-frequency closed-class words are not content-dependent. However, careful curation (e.g., cross-topic splits), topic masking, and multi-feature fusion (combining stylometric and n-gram features) can further mitigate topical leakage, as indicated by improved cross-topic and topic-confusion scores in hybrid models.

## 4. Practical Considerations: Data, Tuning, and Efficiency

Most performant models require some form of preprocessing:

- **Text normalization:** Whitespace and punctuation tokenization; stemming (e.g., Porter), frequency-based vocabulary pruning.
- **Context size and regularization:** For feed-forward NNLMs, $N=4$ (trigram context), embedding and hidden-layer dimensions individually tuned per author.
- **Training/evaluation splits:** Standard practice employs stratified train/validation/test partitioning, cycled with multiple random seeds (e.g., 10) to estimate mean and variance.
- **Efficiency:** Short-text NNLMs remain computationally manageable compared to per-author transformers, which incur significant computational and storage costs for large author sets (e.g., 50 separate transformer models).
- **Data regimes:** NNLMs continue to outperform N-gram models even in relatively small-data scenarios ($<$10k sentences or $<$2k vocabulary); however, transformer-based ALMs scale best on medium-size, multi-author corpora [1602.05292, 2401.12005].

## 5. Comparative Analysis and Extensions

Compared to traditional stylometric and topic models:

- Feed-forward NNLMs match the accuracy of prior feature-rich systems while dramatically reducing manual feature engineering (Coyotl-Gallardo et al.: $>95\%$ accuracy with extensive POS and lexical features; Seroussi et al.: $\sim80\%$ with Dirichlet-topic models) [1602.05292].
- WANs outperform frequency-based function word methods (e.g., SVM, NB, k-NN) and complement them when used in ensemble configurations, reducing error rates by 30% in multi-author tasks [1406.4469].
- Perplexity-based ALMs operate at token-level granularity with minimal feature curation, efficiently handling larger author pools. However, their effectiveness on short texts varies sharply with domain: high accuracy with 40 tokens on blogs, but up to 400 tokens required for comparable newswire results [2401.12005].

Recommended extensions include the move to longer-context models (RNNLMs, transformers), hybrid probability–n-gram fusion, in-context and few-shot techniques to minimize computational requirements, and the inclusion of syntax or character-level signals for increased robustness. In cross-topic or domain adaptation scenarios, topical de-biasing strategies are necessary, and ensemble approaches (WAN+frequency) remain beneficial.

## 6. Impact, Limitations, and Future Directions

NNLM and WAN approaches represent significant progress in reducing the dependency on extensive feature engineering and delivering robust attributions with constrained test data. Nevertheless, topic confounding, computational cost for large candidate pools (especially in ALMs), and fixed context limitations remain open challenges.

Future directions include:

- Incorporation of topical de-biasing or adversarial objectives to disentangle style from content.
- Efficient parameter-sharing or adapter layers to reduce the per-author resource footprint in transformer-based systems.
- Expansion to open attribution, authorship verification, and bilingual/multilingual domains.
- Further exploration of authorial style representations via hybrid graph-neural or contrastive learning models.

The code and datasets supporting leading NNLM results are publicly available [1602.05292], enabling reproducibility and benchmarking across future work. Overall, parametric distributed models have established a new baseline for reliable, scalable authorship attribution with reduced manual intervention.

Source: https://www.emergentmind.com/topics/authorship-attribution