Skip to main content
QUICK REVIEW

[Paper Review] Stochastic Parrots Looking for Stochastic Parrots: LLMs are Easy to Fine-Tune and Hard to Detect with other LLMs

Da Silva Gameiro Henrique, Andrei Kucharavy|arXiv (Cornell University)|Apr 18, 2023
Topic ModelingComputer Science3 citations
TL;DR

This paper demonstrates that Large Language Models (LLMs) can be effectively fine-tuned to evade detection by other LLM-based detectors, even when the detectors are trained on human-annotated data. By using a reinforcement-from-critic loss and AdamW optimization, attackers can generate text that fools detection models with high success, rendering current detection methods ineffective under realistic adversarial conditions.

ABSTRACT

The self-attention revolution allowed generative language models to scale and achieve increasingly impressive abilities. Such models - commonly referred to as Large Language Models (LLMs) - have recently gained prominence with the general public, thanks to conversational fine-tuning, putting their behavior in line with public expectations regarding AI. This prominence amplified prior concerns regarding the misuse of LLMs and led to the emergence of numerous tools to detect LLMs in the wild. Unfortunately, most such tools are critically flawed. While major publications in the LLM detectability field suggested that LLMs were easy to detect with fine-tuned autoencoders, the limitations of their results are easy to overlook. Specifically, they assumed publicly available generative models without fine-tunes or non-trivial prompts. While the importance of these assumptions has been demonstrated, until now, it remained unclear how well such detection could be countered. Here, we show that an attacker with access to such detectors' reference human texts and output not only evades detection but can fully frustrate the detector training - with a reasonable budget and all its outputs labeled as such. Achieving it required combining common "reinforcement from critic" loss function modification and AdamW optimizer, which led to surprisingly good fine-tuning generalization. Finally, we warn against the temptation to transpose the conclusions obtained in RNN-driven text GANs to LLMs due to their better representative ability. These results have critical implications for the detection and prevention of malicious use of generative language models, and we hope they will aid the designers of generative models and detectors.

Motivation & Objective

  • To investigate the vulnerability of LLM-based detectors to adversarial fine-tuning of generative models.
  • To assess whether LLMs can be trained to generate text that evades detection by other LLMs, even when the detector is trained on human-annotated data.
  • To evaluate the effectiveness of common fine-tuning techniques—specifically reinforcement-from-critic loss and AdamW—in enabling evasion of detection.
  • To challenge the assumption that LLM-based detectors are robust, especially under realistic attack scenarios involving fine-tuned models and non-trivial prompts.
  • To warn against overgeneralizing findings from RNN-based GANs to modern LLMs due to their superior representational capacity.

Proposed method

  • Fine-tuned a generative LLM (GPT-2) using a critic model (fine-tuned BERT) to provide reward signals based on how closely generated samples resembled real human data.
  • Applied a reinforcement-from-critic loss function to optimize the generator (GPT-2) by maximizing the probability that the detector classifies its outputs as real.
  • Used the AdamW optimizer to improve training stability and generalization during adversarial fine-tuning.
  • Trained the detector (BERT) on a combination of real human-generated data (e.g., MS COCO, EMNLP news) and generated samples from the base GPT-2 model.
  • Evaluated detection performance using accuracy metrics on validation sets, comparing results before and after adversarial fine-tuning.
  • Conducted ablation studies by varying prompt complexity, output length, and fine-tuning scope to isolate the impact of each factor on evasion success.

Experimental results

Research questions

  • RQ1Can a generative LLM be fine-tuned to evade detection by another LLM-based detector, even when the detector is trained on human-annotated data?
  • RQ2How effective is the combination of reinforcement-from-critic loss and AdamW in enabling fine-tuning generalization for evasion purposes?
  • RQ3To what extent do assumptions about model behavior—such as fixed prompt structure or lack of fine-tuning—undermine the robustness of existing detection methods?
  • RQ4Why do current LLM-based detectors fail when faced with adversarially fine-tuned generators, despite high accuracy on baseline data?
  • RQ5What are the implications of transferring insights from RNN-based text GANs to modern LLMs, given their enhanced representational power?

Key findings

  • An attacker can fully frustrate detector training by fine-tuning a generative LLM using only reference human texts and detector outputs, achieving high evasion success with a reasonable budget.
  • The combination of reinforcement-from-critic loss and AdamW optimizer enabled surprisingly strong generalization during fine-tuning, significantly improving evasion performance.
  • When GPT-2 was fine-tuned on MS COCO data, detector accuracy dropped from ~90% to ~88% on average, but after adversarial training, 40% of generated samples were classified as real by the detector.
  • Even in the white-box setting, where the attacker has access to the detector’s training data and output labels, evasion remains highly effective.
  • Detectors trained on non-fine-tuned models or simple prompts fail to generalize when confronted with fine-tuned generators, highlighting a critical flaw in current detection assumptions.
  • The study warns that results from RNN-based text GANs do not reliably transfer to LLMs due to their superior representational capacity, undermining prior optimism about detection robustness.

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.