Whodunit? Learning to Contrast for Authorship Attribution

Authorship attribution is the task of identifying the author of a given text. The task has extensive applications in machine-generated text detection, plagiarism detection, spam email detection, forensic investigation, literature study, and beyond. This project presents a simple-yet-effective, state-of-the-art, and scalable approach to the problem.

Poster image to be added

Description

Authorship attribution is the task of identifying the author of a given text. The key is finding representations that can differentiate between authors. Existing approaches typically use manually designed features that capture a dataset's content and style, but these approaches are dataset-dependent and yield inconsistent performance across corpora. In this work, we propose learning author-specific representations by fine-tuning pre-trained generic language representations with a contrastive objective (Contra-X). We show that Contra-X learns representations that form highly separable clusters for different authors. It advances the state-of-the-art on multiple human and machine authorship attribution benchmarks, enabling improvements of up to 6.8% over cross-entropy fine-tuning. However, we find that Contra-X improves overall accuracy at the cost of sacrificing performance for some authors. Resolving this tension will be an important direction for future work. To the best of our knowledge, we are the first to integrate contrastive learning with pre-trained language model fine-tuning for authorship attribution.

This project is an extension of our top-scoring project at NUS CS4248 Natural Language Processing. The paper has been accepted to a premier conference in NLP, AACL-IJCNLP 2022. More information: paper, one-min conference lightning talk, poster.

Welcome to cite our paper

@article{ai2022whodunit,
  title={Whodunit? Learning to Contrast for Authorship Attribution},
  author={Ai, Bo and Wang, Yuchen and Tan, Yugin and Tan, Samson},
  journal={arXiv preprint arXiv:2209.11887},
  year={2022}
}

Project Members