Few-Shot Detection of Machine-Generated Text using Style Representations

Rafael Rivera Soto, Kailin Koch, Aleem Khan, Barry Chen, Marcus Bishop +1 more
1/12/2024
cs.CLcs.LG

Official code: LLNL/LUAR (48 stars, Apache-2.0, last commit 2024-08-12). 1 more implementation below.

Abstract

The advent of instruction-tuned language models that convincingly mimic human writing poses a significant risk of abuse. However, such abuse may be counteracted with the ability to detect whether a piece of text was composed by a language model rather than a human author. Some previous approaches to this problem have relied on supervised methods by training on corpora of confirmed human- and machine- written documents. Unfortunately, model under-specification poses an unavoidable challenge for neural network-based detectors, making them brittle in the face of data shifts, such as the release of newer language models producing still more fluent text than the models used to train the detectors. Other approaches require access to the models that may have generated a document in question, which is often impractical. In light of these challenges, we pursue a fundamentally different approach not relying on samples from language models of concern at training time. Instead, we propose to leverage representations of writing style estimated from human-authored text. Indeed, we find that features effective at distinguishing among human authors are also effective at distinguishing human from machine authors, including state-of-the-art large language models like Llama-2, ChatGPT, and GPT-4. Furthermore, given a handful of examples composed by each of several specific language models of interest, our approach affords the ability to predict which model generated a given document. The code and data to reproduce our experiments are available at https://github.com/LLNL/LUAR/tree/main/fewshot_iclr2024.

View on arXivView PDF

Code Implementations(2)

LLNL/LUAROfficial100%
Apache-2.0

Transformer-based model for learning authorship representations.

488Shell, PythonFeb 16, 20232 years agoApache-2.0
llnl/LUARCommunity100%
Apache-2.0

Transformer-based model for learning authorship representations.

488Shell, PythonFeb 16, 20232 years agoApache-2.0

Similar Papers

Cite this paper

@article{soto2024fewshot,
  title  = {Few-Shot Detection of Machine-Generated Text using Style Representations},
  author = {Rafael Rivera Soto and Kailin Koch and Aleem Khan and Barry Chen and Marcus Bishop and Nicholas Andrews},
  year   = {2024},
  eprint = {2401.06712},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2401.06712v3},
  journal = {ICLR 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2401.06712.svg)](https://codeofpaper.com/paper/2401.06712)

Discussion