RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language Models

By Samuel Gehman, Suchin Gururangan, Maarten Sap, Yejin Choi, Noah A. Smith. 2020

1,775 citations recorded by the source corpus.

Pretrained neural language models (LMs) are prone to generating racist, sexist, or otherwise toxic language which hinders their safe deployment. We investigate the extent to which pretrained LMs can be prompted to generate toxic language, and the effectiveness of controllable text generation algorithms at preventing such toxic degeneration. We create and release RealToxicityPrompts, a dataset of 100K naturally occurring, sentence-level prompts derived from a large corpus of English web text, paired with toxicity scores from a widely-used toxicity classifier. Using RealToxicityPrompts, we find that pretrained LMs can degenerate into toxic text even from seemingly innocuous prompts. We empirically assess several controllable generation methods, and find that while data- or compute-intensive methods (e.g., adaptive pretraining on non-toxic data) are more effective at steering away from toxicity than simpler solutions (e.g., banning “bad” words), no current method is failsafe against neural toxic degeneration. To pinpoint the potential cause of such persistent toxic degeneration, we analyze two web text corpora used to pretrain several LMs (including GPT-2; Radford et. al, 2019), and find a significant amount of offensive, factually unreliable, and otherwise toxic content. Our work provides a test bed for evaluating toxic generations by LMs and stresses the need for better data selection processes for pretraining.

Subfields: Artificial Intelligence, Large Language Models, Safety, Robustness & Interpretability

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Artificial Intelligence

  1. Mohit Bansal
  2. Luke S. Zettlemoyer
  3. Yejin Choi
  4. Percy Liang
  5. Jianfeng Gao
  6. Noah A. Smith
  7. Graham Neubig
  8. Hannaneh Hajishirzi

In Large Language Models

  1. Luke S. Zettlemoyer
  2. Yejin Choi
  3. Hinrich Schütze
  4. Hannaneh Hajishirzi
  5. Noah A. Smith
  6. Mohit Bansal
  7. Timo Schick
  8. Michael Lewis

In Safety, Robustness & Interpretability

  1. Yulia Tsvetkov
  2. Adina Williams
  3. Yejin Choi
  4. Kai-Wei Chang
  5. Noah A. Smith
  6. Percy Liang
  7. Eric Michael Smith
  8. Dirk Hovy

Citations in the corpus