Abstract
Authorship verification (AV) models often rely on topical cues and named entities rather than genuine stylistic features. This research introduces a more rigorous evaluation framework comprising five new dataset splits and a novel transfer dataset, DarkReddit. By employing Explainable AI (XAI) and data masking techniques, the study demonstrates that removing named entities forces models to learn robust stylometric features, significantly improving their ability to generalize across disparate domains.
Introduction
Authorship verification (AV)—the task of determining if two separate texts were written by the same individual—is a critical component of digital forensics and plagiarism detection. While Transformer-based models like BERT have achieved state-of-the-art results, recent findings suggest these models may be "cheating." Instead of identifying a unique "linguistic fingerprint," models often over-fit to specific topics or rely on character names (named entities) that appear across training and test sets. This paper addresses these "information leaks" by proposing more granular evaluation splits and testing model robustness on out-of-distribution data.
Experimental Framework and Datasets
To isolate biases related to topic and author familiarity, the researchers expanded the PAN 2020/2021 fanfiction datasets into five distinct splits. These splits range from "Closed" (where authors and topics are seen during training) to "Open All" (where both authors and topics in the test set are entirely new).
In addition to these splits, the authors introduced DarkReddit, a dataset of 1,026 samples from the /r/darknet subreddit. DarkReddit serves as a "stress test" for cross-domain generalization, as the technical, cybersecurity-focused language of the subreddit differs vastly from the creative prose of fanfiction.
Unmasking the "Named Entity Trap"
Using Integrated Gradients (IG), an Explainable AI technique, the researchers visualized the specific words driving BERT's decisions. The analysis confirmed that models focus heavily on named entities. For instance, if a specific character name like "Serena" appears in two different texts, the model is highly likely to attribute them to the same author regardless of the actual writing style.
To combat this, the authors implemented a data-centric regularizer: replacing named entities with generic type tags (e.g., replacing "Wolverine" with [PERSON]). This masking forces the model to ignore character-specific cues and instead focus on syntax, punctuation, and functional word choice.
Key Results and Generalization
The study found that BERT-based models are highly competitive, matching specialized authorship systems. However, their true robustness was revealed through the masking process:
- Performance Gains: On the most challenging "Open All" split, masking named entities improved BERT's overall metric from 81.7 to 83.1.
- Cross-Corpus Robustness: Models trained on masked data generalized significantly better to the DarkReddit dataset. The model trained without named entities saw a 5.6% performance jump over the baseline when transferred to the new domain.
- Style vs. Topic: As the splits became "cleaner" (removing overlapping fandoms), standard models saw a performance drop, proving that baseline models were previously relying on topic-specific vocabulary rather than true stylometry.
Conclusion
This research highlights a significant pitfall in current authorship verification benchmarks: the reliance on named entities and topical overlap. By introducing more rigorous dataset splits and demonstrating the efficacy of entity masking, the authors provide a path toward more reliable and generalizable AV systems. Future work will look toward handling longer sequence lengths and addressing the inherent noise in real-world datasets like Reddit, where pseudonyms and shared accounts can complicate ground-truth labeling.
Summary updated