Introduction
The rapid proliferation of Large Language Models (LLMs) has necessitated robust methods for AI text detection. However, state-of-the-art proprietary models like GPT-4 and Claude-3 operate as "black boxes," withholding the internal probability scores (logits) required by high-performance zero-shot detectors such as DetectGPT and Fast-DetectGPT. Existing workarounds often employ open-source "surrogate" models to approximate these logits, but performance degrades significantly when the surrogate's distribution diverges from the target model's. This paper introduces DALD (Distribution-Aligned LLM Detection) to address this gap.
The DALD Framework
DALD bridges the gap between black-box and white-box detection by aligning a small, open-source surrogate model with a target black-box LLM. The framework employs a two-step process:
- Alignment Data Collection: A minimal corpus (typically <5,000 samples) of the target model's outputs is gathered, often from public interaction logs.
- Distribution Alignment: The surrogate model (e.g., Llama-2 or GPT-2) is fine-tuned using Low-Rank Adaptation (LoRA) on this small corpus.
Unlike standard fine-tuning, the objective is not to improve the surrogate's reasoning but to synchronize its internal probability distributions with those of the target model. Once aligned, this surrogate serves as a plug-and-play enhancement for existing logit-based detection algorithms, effectively mimicking the target's internal behavior.
Experimental Evaluation
The efficacy of DALD was evaluated across four diverse text domains: news summarization (XSum), creative writing (WritingPrompts), biomedical research (PubMedQA), and translation (WMT-2016). Target models included the GPT-3.5 and GPT-4 families, as well as Claude-3.
Key Results and Discussion
Performance Gains
DALD consistently outperformed baseline zero-shot detectors, often reaching near-perfect scores. For instance, on the PubMed dataset against GPT-4, the AUROC improved from a baseline of 0.8179 to 0.9785. In domains like XSum and WritingPrompts, DALD achieved AUROC scores exceeding 0.99, effectively solving the detection problem for those specific versions.
Efficiency and Scaling
A primary advantage of DALD is its resource efficiency. High detection accuracy is achieved with remarkably small alignment datasets. As shown in the figure below, performance stabilizes with fewer than 2,000 training samples, requiring minimal computational time (under 10 minutes on a standard A6000 GPU).
Generalization and Robustness
Surrogates aligned with one model version demonstrated remarkable cross-model generalization. For example, a detector aligned with GPT-4-0613 was able to detect Claude-3 text with over 0.98 AUROC. This suggests that high-performing LLMs share underlying distribution characteristics. Furthermore, the framework proved robust against adversarial rewriting attacks and maintained high accuracy in multilingual settings, such as German text detection.
Conclusion
DALD provides a practical and efficient solution for detecting text from proprietary black-box LLMs. By focusing on distribution alignment rather than model capacity, it enables open-source surrogates to achieve detection performance comparable to full-access white-box methods, even as target models continue to evolve.
Summary updated