Introduction
The rapid evolution of Large Language Models (LLMs) has initiated a persistent "cat-and-mouse" game in AI-generated text detection. Most existing detectors rely on supervised learning, where models are trained on specific datasets from known generators (e.g., GPT-2). However, these detectors often suffer from significant performance degradation when encountering "unseen" domains—text produced by newer or different models like GPT-4 or Claude.
In real-world scenarios, collecting and labeling large-scale datasets for every new model release is impractical. This paper addresses the challenge of Domain Generalization (DG): developing a detector using data from known source models that remains robust against future, unknown generators.
Methodology: The EAGLE Framework
The authors introduce EAGLE, a framework designed to extract "LLM-invariant" features. Built upon a RoBERTa-base backbone, EAGLE employs two core strategies to achieve cross-domain robustness.
1. Domain Adversarial Training
To prevent the model from over-fitting to the specific "statistical signature" or "accent" of a particular LLM, EAGLE utilizes a Gradient Reversal Layer (GRL). During training, the model is optimized to distinguish between human and machine-generated text. Simultaneously, the GRL encourages the model to be unable to identify which specific LLM generated the text. This adversarial process forces the internal representations to ignore domain-specific artifacts and focus on universal characteristics of AI-generated text.
2. Contrastive Learning
To enhance robustness against minor textual variations, EAGLE incorporates a SimCLR-style contrastive loss ($\mathcal{L}_{ctr}$). For each input text, a "perturbed" version is created via synonym replacement. The model is trained to ensure that the latent representations ($z_i^m$ and $\tilde{z}_i^m$) of the original and perturbed versions are similar. This "in-domain invariance" prevents the classifier from being easily deceived by small word changes.
The final training objective combines standard cross-entropy loss ($\mathcal{L}_{CE}$), contrastive loss, and domain adversarial loss ($\mathcal{L}_{dom}$).
Experimental Setup
The framework was evaluated using several benchmarks:
- TuringBench: A dataset containing news articles from 19 generators. Primary experiments focused on six diverse models: CTRL, FAIR_wmt19, GPT2_xl, GPT-3, GROVER_mega, and XLM.
- Modern LLMs: Evaluation on text from GPT-3.5 and Claude to test generalization to state-of-the-art models.
- GPT-4 Dataset: A new dataset introduced by the authors, comprising 2,000 human-written news articles and 2,000 GPT-4 generated articles based on the same headlines.
Key Results and Insights
EAGLE demonstrates that invariance is the key to effective detection. By actively attempting to fail at source identification, the detector becomes significantly more proficient at general "AI-ness" detection.
- Generalization to GPT-4: EAGLE achieved a True Positive Rate (TPR) of up to 99% on the GPT-4 dataset, depending on the source domain mix. This significantly outperformed standard "Data Mix" baselines, which often collapsed to near-random performance on newer models.
- Closing the Gap: The framework reached detection scores within 4.7% of a fully supervised detector that had been explicitly trained on the target model's data.
- Cross-Generational Detection: A notable finding is that models trained on older, smaller generators (like GPT-2) can still effectively flag text from GPT-4, suggesting that fundamental structural traits of LLM-generated text persist across model generations.
Conclusion
EAGLE provides a robust path forward for AI detection in an era of rapid model iteration. By leveraging domain adversarial training and contrastive learning, it moves away from model-specific signatures toward universal AI-text features. Future work will focus on "multi-dimensional generalization," addressing scenarios where text may be a mixture of multiple generators or involve human-AI collaboration across various genres.
Summary updated