GPT Paternity Test: GPT Generated Text Detection with GPT Genetic Inheritance

Xiao Yu, Yuang Qi, Kejiang Chen, Guoqiang Chen, Xi Yang, Pengyuan Zhu, Weiming Zhang, Nenghai Yu · OpenReview

Abstract

Large language models (LLMs) can generate texts that carry the risk of various misuses, including plagiarism, planting fake reviews on e-commerce platforms, or creating inflammatory false tweets. Detecting whether a text is machine-generated has thus become increasingly important. While existing detection methods exhibit superior performance, they often lack generalizability due to their heavy dependence on training data. To alleviate this problem, we propose a model-related generated text detection method, the LLM Paternity Test (LLM-Pat), also referred to as DPIC (Decoupling Prompt and Intrinsic Characteristics). Specifically, given any candidate text (child), the framework employs an intermediary LLM (parent) to reconstruct a sibling text corresponding to the given text and then measures the similarity between candidate texts and their sibling texts. High similarity indicates that the candidate text is machine-generated, akin to genetic traits. The experiments show that this method outperforms existing detection methods and is more robust against paraphrasing and re-translating attacks.

Introduction

As Large Language Models (LLMs) become more sophisticated, they are increasingly used for malicious purposes like plagiarism, fake review generation, and spreading misinformation. Detecting this AI-generated text is a high-stakes game of cat-and-mouse. Existing detectors generally fall into two camps: supervised classifiers, which often fail when encountering new domains, and zero-shot detectors, which typically require "white-box" access to a model's internal workings.

The real-world challenge is Black-Box Detection. We often lack access to the internals of proprietary models like GPT-4. The authors argue that LLM text is a "coupled" product of the prompt (the topic) and intrinsic characteristics (the model's style). To catch the AI, we need to strip away the prompt's influence to see the model's true signature.

Methodology: The DPIC Framework

The authors propose a three-step pipeline called DPIC (Decoupling Prompt and Intrinsic Characteristics):

  1. Decoupling (Prompt Reconstruction): Given a suspicious candidate text, DPIC uses an auxiliary LLM (like ChatGPT or Vicuna) to perform "Question Generation." It essentially asks the auxiliary model: "What prompt would have produced this text?"
  2. Regeneration: The auxiliary LLM then uses that reconstructed prompt to generate its own version of the text. This creates a "regenerated text" that is semantically aligned with the candidate text.
  3. Feature Extraction & Classification: Both the candidate and regenerated texts are fed into a Siamese Network (a dual-encoder architecture with shared weights). The system uses a high-performance encoder (gte-Qwen1.5-7B-instruct) to turn the texts into embeddings. By concatenating these embeddings and passing them through a classifier, the model focuses on the difference in intrinsic characteristics rather than the topic of the text.
The DPIC pipeline: Decoupling the prompt, regenerating text via an auxiliary LLM, and performing classification using a Siamese Network.

If the candidate text was human-written, the similarity to the AI-regenerated version will be low. If the candidate was AI-written, the similarity will be much higher because they share "AI-ness," even if they came from different models.

Experimental Setup

The model was trained on the HC3 (Human-ChatGPT Comparison Corpus). To test generalizability, the authors used three out-of-domain datasets:

  • Xsum: News article summaries.
  • WritingPrompts: Creative story writing.
  • PubMedQA: Biomedical research questions.

Additional benchmarks including Wiki, CovidQA, and SUMMAC Abstract datasets were used to further verify that the model wasn't just memorizing specific topics.

Results and Discussion

DPIC demonstrated superior performance across the board, especially against the most advanced commercial models. Standard detectors often get distracted by the topic of the text. By regenerating text from a reconstructed prompt, DPIC ensures that both the "suspect" and the "reference" are talking about the exact same thing, allowing the classifier to focus purely on stylistic nuances.

Detection accuracy (AUROC) of DPIC compared to DNA-GPT baselines across three datasets (Xsum, Writing, PubMed) for ChatGPT, GPT-4, and Claude 3.

Key performance highlights include:

  • Performance Boost: DPIC achieved an average AUROC improvement of 6.76% for GPT-4 and 2.91% for Claude 3 compared to state-of-the-art baselines like Fast-DetectGPT.
  • Cross-Domain Mastery: While traditional supervised models saw their accuracy plummet on the PubMed (medical) dataset, DPIC maintained high performance (often >0.90 AUROC), proving resistance to "domain shift."
  • Robustness to Attacks: The system remained highly effective even when the AI text was "scrubbed" using paraphrasing tools (DIPPER) or back-translation.

Limitations and Future Work

While effective, DPIC is more computationally expensive and slower than simple statistical "zero-shot" methods because it requires an auxiliary LLM for reconstruction and regeneration. Furthermore, the system's success relies on the auxiliary LLM's ability to guess the prompt correctly; short or vague candidate texts may lead to off-target reconstructions. Future research will explore more efficient prompt reconstruction and testing against a wider variety of human writing styles to further reduce false positives.

Summary updated

Abstract

Large language models (LLMs) can generate texts that carry the risk of various misuses, including plagiarism, planting fake reviews on e-commerce platforms, or creating inflammatory false tweets. Detecting whether a text is machine-generated has thus become increasingly important. While existing detection methods exhibit superior performance, they often lack generalizability due to their heavy dependence on training data. To alleviate this problem, we propose a model-related generated text detection method, the LLM Paternity Test (LLM-Pat). Specifically, given any candidate text (\textit{child}), LLM-Pat employs an intermediary LLM (\textit{parent}) to reconstruct a \textit{sibling} text corresponding to the given text and then measures the similarity between candidate texts and their sibling texts. High similarity indicates that the candidate text is machine-generated, akin to genetic traits. We have constructed datasets encompassing four scenarios: student responses in educational settings, news creation, academic paper writing, and social media bots to assess the performance of LLM-Pat. The experiments show that LLM-Pat outperforms the existing detection methods and is more robust against paraphrasing attacks and re-translating attacks. Besides, LLM-Pat can also be used to trace which large language model the text was generated by. The constructed dataset and code will be released to benefit the community.
BibTeX
@inproceedings{yu2024gpt,
  author = {Xiao Yu and Yuang Qi and Kejiang Chen and Guoqiang Chen and Xi Yang and Pengyuan Zhu and Weiming Zhang and Nenghai Yu},
  title = {{GPT Paternity Test: GPT Generated Text Detection with GPT Genetic Inheritance}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=BZh05P2EoN},
}
Figure