Skip to main content
QUICK REVIEW

[Paper Review] Smaller Language Models are Better Black-box Machine-Generated Text Detectors

Fatemehsadat Mireshghallah, Justus Mattern|arXiv (Cornell University)|May 17, 2023
Topic ModelingComputer Science5 citations
TL;DR

This paper investigates zero-shot detection of machine-generated text using smaller language models as universal detectors, leveraging curvature-based local optimality to distinguish between human-written and model-generated text. It finds that smaller, partially-trained models outperform larger ones in cross-detection, with OPT-125M achieving an AUC of 0.81 on ChatGPT outputs—significantly better than larger models like GPTJ-6B (AUC 0.45).

ABSTRACT

With the advent of fluent generative language models that can produce convincing utterances very similar to those written by humans, distinguishing whether a piece of text is machine-generated or human-written becomes more challenging and more important, as such models could be used to spread misinformation, fake news, fake reviews and to mimic certain authors and figures. To this end, there have been a slew of methods proposed to detect machine-generated text. Most of these methods need access to the logits of the target model or need the ability to sample from the target. One such black-box detection method relies on the observation that generated text is locally optimal under the likelihood function of the generator, while human-written text is not. We find that overall, smaller and partially-trained models are better universal text detectors: they can more precisely detect text generated from both small and larger models. Interestingly, we find that whether the detector and generator were trained on the same data is not critically important to the detection success. For instance the OPT-125M model has an AUC of 0.81 in detecting ChatGPT generations, whereas a larger model from the GPT family, GPTJ-6B, has AUC of 0.45.

Motivation & Objective

  • To investigate whether one language model can detect text generated by another, even with different architectures and training data.
  • To determine which language models serve as the most effective universal detectors for machine-generated text.
  • To evaluate the impact of model size, training stage, and pre-training data on detection performance.
  • To explore whether detector performance depends on alignment with the generator model in architecture or data distribution.

Proposed method

  • The study uses a curvature-based detection method that measures local optimality by comparing the likelihood of a target sequence to nearby perturbations under a detector model.
  • A target pool of 50% human-written and 50% machine-generated text is constructed across diverse models and sequence lengths.
  • Detector models are evaluated on their ability to distinguish between human and machine-generated text using the curvature metric, even without access to the generator’s likelihood function.
  • Experiments are conducted across models of varying sizes (125M to 6.7B parameters), architectures (GPT, OPT, Pythia), and pre-training data (WebText, The Pile), including partial training stages.
  • Detection performance is measured using AUC scores on ROC curves to assess distinguishability between human and machine-generated sequences.
  • The method enables black-box detection by using surrogate detector models whose likelihood functions are accessible, even when the generator is unknown or inaccessible.
Figure 1: We want to study how models can cross-detect , i.e. distinguish between human-written text and machine-generated text generated by another model. To this end, we create a target pool consisting of both human-written and machine-generated text. We then generate perturbations of each target
Figure 1: We want to study how models can cross-detect , i.e. distinguish between human-written text and machine-generated text generated by another model. To this end, we create a target pool consisting of both human-written and machine-generated text. We then generate perturbations of each target

Experimental results

Research questions

  • RQ1Can a smaller language model effectively detect machine-generated text produced by a different, larger model with a different architecture?
  • RQ2Does the performance of a detector model depend on whether it was trained on the same data or has similar parameter count as the generator?
  • RQ3Why do smaller and partially-trained models outperform larger, fully-trained models in cross-detection?
  • RQ4Is there a universal detector that performs well across diverse generator models regardless of architecture or training data?

Key findings

  • Smaller language models, such as OPT-125M, achieve significantly higher detection performance than larger models, with an AUC of 0.81 in detecting text from ChatGPT.
  • Larger models like GPTJ-6B perform poorly as detectors, achieving only an AUC of 0.45 on the same task.
  • Partially-trained models outperform fully-trained models, especially for larger architectures, indicating that overtraining reduces detection capability.
  • Smaller models assign higher curvature to generations from models of similar or larger size, making them more sensitive to machine-generated patterns.
  • Detector performance is not critically dependent on architectural similarity or shared pre-training data between generator and detector models.
  • The OPT-125M model comes within 0.07 AUC of self-detection performance on average, demonstrating strong universal detection capability.
Figure 2: AUC heatmap for cross-detection, where the rows are generator models and columns are the surrogate detector models, both sorted by model size. We can see that smaller models are better detectors and larger models are the worst models in terms of detection power.
Figure 2: AUC heatmap for cross-detection, where the rows are generator models and columns are the surrogate detector models, both sorted by model size. We can see that smaller models are better detectors and larger models are the worst models in terms of detection power.

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.