Skip to main content
QUICK REVIEW

[Paper Review] Unsupervised and Distributional Detection of Machine-Generated Text

Matthias Gallé, Jos Rozen|arXiv (Cornell University)|Nov 4, 2021
Topic ModelingComputer Science10 citations
TL;DR

This paper proposes an unsupervised, distributional method to detect machine-generated text by identifying overrepresented higher-order n-grams—specifically super-maximal repeats—in large text collections. Leveraging these repeated phrases as a weak signal, the approach uses self-training with an ensemble of classifiers to rank suspicious documents, achieving over 90% precision at 5,000 for top-k sampling and over 80% for nucleus sampling with GPT2-large.

ABSTRACT

The power of natural language generation models has provoked a flurry of interest in automatic methods to detect if a piece of text is human or machine-authored. The problem so far has been framed in a standard supervised way and consists in training a classifier on annotated data to predict the origin of one given new document. In this paper, we frame the problem in an unsupervised and distributional way: we assume that we have access to a large collection of unannotated documents, a big fraction of which is machine-generated. We propose a method to detect those machine-generated documents leveraging repeated higher-order n-grams, which we show over-appear in machine-generated text as compared to human ones. That weak signal is the starting point of a self-training setting where pseudo-labelled documents are used to train an ensemble of classifiers. Our experiments show that leveraging that signal allows us to rank suspicious documents accurately. Precision at 5000 is over 90% for top-k sampling strategies, and over 80% for nucleus sampling for the largest model we used (GPT2-large). The drop with increased size of model is small, which could indicate that the results hold for other current and future large language models.

Motivation & Objective

  • Address the limitations of supervised detection methods that rely on labeled data and are sensitive to distribution shifts.
  • Detect machine-generated text in a corpus where a large fraction is suspected to be synthetic, without requiring prior annotations.
  • Identify distributional patterns—specifically repeated higher-order n-grams—that distinguish machine-generated from human-written text.
  • Develop a scalable, self-training framework that uses pseudo-labeled data to improve detection performance without human-annotated training sets.
  • Evaluate the method across different decoding strategies (top-k and nucleus) and model sizes to assess robustness and generalization.

Proposed method

  • Detect super-maximal repeats—longest repeated substrings that are not contained within longer repeats—across a large, unannotated corpus of documents.
  • Use the presence of such repeats as a weak signal to identify potentially machine-generated documents, assuming they appear more frequently in model-generated text.
  • Apply a self-training pipeline: label documents with significant repeats as machine-generated (pseudo-labeling), then train an ensemble of classifiers on this pseudo-labeled data.
  • Train a binary classifier (fine-tuned distilled BERT) on the pseudo-labeled data, using gold human-generated texts as positive examples and repeat-rich documents as negative examples.
  • Use majority voting across multiple classifiers to improve robustness and ranking performance.
  • Evaluate performance using precision at m (prec@m), measuring how many of the top-m ranked documents are truly machine-generated.

Experimental results

Research questions

  • RQ1Can overrepresented higher-order n-grams serve as a reliable, unsupervised signal to detect machine-generated text in large, unannotated corpora?
  • RQ2How effective is a self-training approach that uses pseudo-labeled documents based on repeat frequency to improve detection performance?
  • RQ3Does the method generalize across different decoding strategies (top-k vs. nucleus) and model sizes (small, medium, large GPT2)?
  • RQ4To what extent does the performance degrade when the generator model or decoding strategy changes, compared to supervised baselines?
  • RQ5Can the method detect machine-generated content even when unigram-level statistics are indistinguishable from human text?

Key findings

  • Super-maximal repeats are significantly more frequent in machine-generated text than in human-written text, forming a reliable weak signal for detection.
  • Using this signal for pseudo-labeling enables a self-training pipeline that achieves over 90% precision at 5,000 for top-k sampling with GPT2-large.
  • For nucleus sampling, the method achieves over 80% precision at 5,000 with the same model, indicating strong robustness across decoding strategies.
  • The performance gap between supervised and semi-supervised settings is substantial, showing that the method effectively leverages weak signals to approximate supervised performance.
  • The method remains effective even when the generator model or decoding strategy changes, suggesting generalization across current and future LLMs.
  • The detection accuracy correlates with the diversity of generated text: top-k sampling, which produces more diverse outputs, yields higher detection performance than nucleus sampling.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.