Researchers have developed a new method for authorship verification that uses contrastive learning to achieve 98.4% accuracy on the PAN21 benchmark task. The approach, described in a paper posted to arXiv, employs a ModernBERT Bi-Encoder model. This technique marks an improvement over traditional classification-based methods for determining authorship.

The study identifies several factors critical to the model's success. These include the choice of loss function, batch size, training duration, the use of pre-trained models, input context length, and data augmentation techniques. By optimizing these elements, the researchers were able to create a highly accurate system for identifying the author of a given text.

Contrastive learning, a machine learning technique, aims to learn representations by contrasting positive pairs (similar data points) against negative pairs (dissimilar data points). In the context of authorship verification, this means training the model to recognize similarities between texts from the same author while distinguishing them from texts written by different authors. This differs from classification, which typically assigns a label to each data point.

Previous work in authorship attribution, a related task, has explored contrastive learning to learn author-specific representations. One study demonstrated that a contrastive objective could lead to more separable clusters of author representations, improving state-of-the-art performance on several benchmarks. Another paper introduced a contrastive authorship verification setup, exploring variations that included content control.

The effectiveness of contrastive learning in distinguishing authorship has also been explored in the context of AI-generated text. One framework, WhosAI, uses a triplet-network contrastive learning approach for both detecting AI-generated text and attributing authorship. Further research has focused on isolating authorship from content by using contrastive learning with additional hard negatives, aiming to create embeddings that are more informed by style.

The development of these advanced authorship verification techniques is timely, given the increasing sophistication of AI text generation. Accurate authorship attribution is crucial for applications ranging from identifying the authors of anonymous threats to detecting sophisticated forms of misinformation.