Token Prediction as Implicit Classification for Generative AI Authorship Verification

Zhanhong Ye, Yutong Zhong, Zhen Huang, Leilei KongCLEF (Working Notes) 2024

Introduction

As Large Language Models (LLMs) become increasingly sophisticated, the ability to distinguish between human-authored and machine-generated text has become a critical challenge. This task, known as Generative AI Authorship Verification, is essential for maintaining the integrity of digital information in domains ranging from academia to legal proceedings.

Traditional detection methods typically involve fine-tuning transformer-based models with an added classification head. However, this approach introduces a "task gap" between the model's original pre-training objective—predicting the next token in a sequence—and the downstream classification task. This paper explores a novel alternative: reformulating authorship verification as a next-token prediction task to better align with the LLM's native capabilities.

Methodology

The researchers utilize a longT5-base backbone, selected for its ability to process long sequences (up to 2048 tokens), which is often necessary for nuanced authorship analysis. Instead of a standard classification head, the model uses its existing next-token prediction layer to output "proxy labels"—specific tokens that represent classification categories.

Architecture of the proposed authorship verification methods using a LongT5 backbone.

Two distinct strategies were evaluated:

  1. Method 1 (Open Vocabulary): The model is trained to predict the natural language tokens "positive" (for human) and "negative" (for AI). If the model predicts any other token as the most likely next word, the instance is categorized as "undecidable."
  2. Method 2 (Filtered Special Tokens): This approach maps specific classes to special tokens (e.g., <extra_id_0> for human authorship and various other IDs for specific AI models). During inference, the output probability distribution is filtered to consider only these designated proxy tokens. A softmax is then applied over this restricted set to determine the final classification.

Experimental Setup and Datasets

The models were trained and evaluated using the Generative AI Authorship Verification dataset from the PAN Lab at CLEF 2024 (Voight-Kampff task). This dataset is particularly challenging as it includes various obfuscation techniques, such as translation, domain shifting, and manual human editing, designed to test the robustness of detection systems.

Results and Discussion

The experimental results demonstrate that aligning the classification task with the pre-training objective significantly enhances performance. Method 2 emerged as the vastly superior approach, achieving a mean ROC-AUC of 0.984 across ten test dataset variants.

Performance comparison of Method 1, Method 2, and established baselines on the PAN 2024 dataset.

As shown in the performance comparison, Method 2 not only eclipsed Method 1 (which struggled with a high rate of "undecidable" outputs, resulting in an ROC-AUC of 0.501) but also outperformed several established baselines. Notably, it surpassed Fast-DetectGPT (0.876) and PPMd (0.795), while slightly outperforming the highly competitive Binoculars baseline (0.972).

The success of Method 2 suggests that constrained vocabulary filtering is crucial. By forcing the model to choose between specific proxy tokens rather than the entire vocabulary, the system effectively leverages the model's internal representations for classification without the friction of a new task-specific head.

Conclusion and Future Work

This research confirms that framing authorship verification as an implicit next-token prediction task is a highly effective strategy for AI text detection. By minimizing the task gap, the longT5 model achieved state-of-the-art results on the PAN 2024 benchmark.

Future research directions include the integration of explicit instructional prompts to further unlock the LLM's reasoning capabilities and the implementation of data augmentation techniques to address potential imbalances between human and machine-generated training data. Additionally, exploring how this method scales with even larger model backbones remains a promising area of study.

Summary updated

BibTeX
@inproceedings{ye2024token,
  author = {Zhanhong Ye and Yutong Zhong and Zhen Huang and Leilei Kong},
  title = {{Token Prediction as Implicit Classification for Generative AI Authorship Verification}},
  booktitle = {CLEF (Working Notes)},
  year = {2024},
}
Figure