Abstract
Detecting text that has been revised, polished, or expanded by AI is significantly more challenging than identifying purely machine-generated content. This difficulty arises because the human-authored core masks the typical statistical signatures of Large Language Models (LLMs). This paper introduces Imitate Before Detect (ImBD), a novel framework that aligns a scoring model with machine stylistic preferences using Direct Preference Optimization (DPO). By calculating a Style-Conditional Probability Curvature (Style-CPC), ImBD identifies subtle AI-style phrasing that standard detectors miss. Experimental results demonstrate that ImBD outperforms state-of-the-art methods like GPTZero and Fast-DetectGPT, showing a 13% increase in AUC for open-source LLM revisions and a 19% improvement for GPT-4o.
1. Introduction: The Challenge of Machine-Revised Text
As Large Language Models (LLMs) become integrated into daily workflows, the boundary between human and machine writing blurs. While "pure" machine-generated text is relatively easy to detect due to its predictable statistical signatures, "machine-revised" text—where an AI polishes, rewrites, or expands human-authored content—remains elusive.
As illustrated in Figure 1, standard detection methods rely on the "curvature" of log-probabilities, which flattens when the underlying structure is human-driven. This makes machine-revised text look indistinguishable from human writing to standard detectors like Fast-DetectGPT, which see a significant performance drop across various datasets (Figure 1d). The authors identify that the key to catching these revisions isn't looking at the content, but at the style—the specific "flavor" of words (like "delve," "stunning," or "intricate") that LLMs prefer to use when they edit (Figure 1c).
2. Methodology: The ImBD Framework
The core insight of ImBD is that while machine-revised text maintains human logic, it adopts a machine "style." The ImBD framework operates in two stages:
2.1 Style Preference Optimization (SPO)
In the "Imitate" phase, a scoring LLM (such as GPT-Neo 2.7B) is fine-tuned using Direct Preference Optimization (DPO). The model is trained on pairs of human-written text and its machine-polished counterpart. This alignment process forces the scoring model to "prefer" (assign higher probability to) the specific stylistic choices that LLMs typically favor. Unlike many deep-learning approaches that require massive datasets, SPO only needs 1,000 samples and about five minutes of training to significantly outperform commercial tools.
2.2 Style-Conditional Probability Curvature (Style-CPC)
In the "Detect" phase, the aligned model calculates a discrepancy metric. By comparing the log-probability of the target text against alternative versions sampled from the style-sensitized model, a clear statistical signature emerges.
Standard curvature metrics (CPC), as shown in Figure 6, often fail to separate human and revised text because the distributions overlap significantly when the text is not purely machine-generated. ImBD's style-alignment creates a much larger discrepancy, providing a clear gap for classification by sensitizing the model to machine-preferred phrasing.
3. Evaluation and Results
The researchers benchmarked ImBD across four diverse domains: XSum (news), SQuAD (Wikipedia), WritingPrompts (fiction), and PubMedQA (biomedical). They tested revisions from six different LLMs, including GPT-4o, Llama-3, and Qwen2.
3.1 Key Findings
- Superior Accuracy: ImBD achieved a 13% increase in AUC for revisions by open-source models and a remarkable 19% improvement for GPT-4o revisions. As shown in Figure 1e, the average accuracy improves from 0.73 for baseline methods to 0.96 for ImBD.
- Efficiency and Generalization: Despite being trained on GPT-3.5 polished text, the model successfully detects revisions from other LLMs and maintains robustness across languages like Spanish, Portuguese, and Chinese. This suggests that most modern LLMs share a "machine-style" core that can be captured and used for detection.
4. Conclusion
ImBD shifts the focus of AI detection from logical structure to stylistic preference. By aligning detectors with AI stylistic preferences before attempting detection, the framework provides a robust and efficient solution for identifying collaborative human-AI writing. Future work will focus on multi-class authorship identification and the evolution of detection methods as LLMs learn to mimic specific human styles more effectively.
Summary updated