Skip to main content
QUICK REVIEW

[Paper Review] ToxiGen: A Large-Scale Machine-Generated Dataset for Adversarial and Implicit Hate Speech Detection

Thomas Hartvigsen, Saadia Gabriel|arXiv (Cornell University)|Mar 17, 2022
Hate Speech and Cyberbullying DetectionComputer Science7 citations
TL;DR

ToxiGen introduces a large-scale, machine-generated dataset of 274,186 toxic and benign statements about 13 minority groups, using a demonstration-based prompting framework and an adversarial classifier-in-the-loop decoding method (Alice) to generate subtle, implicit hate speech. Fine-tuning on ToxiGen improves toxicity classifiers' performance by 7–19% on human-written implicit hate speech datasets.

ABSTRACT

Toxic language detection systems often falsely flag text that contains minority group mentions as toxic, as those groups are often the targets of online hate. Such over-reliance on spurious correlations also causes systems to struggle with detecting implicitly toxic language. To help mitigate these issues, we create ToxiGen, a new large-scale and machine-generated dataset of 274k toxic and benign statements about 13 minority groups. We develop a demonstration-based prompting framework and an adversarial classifier-in-the-loop decoding method to generate subtly toxic and benign text with a massive pretrained language model. Controlling machine generation in this way allows ToxiGen to cover implicitly toxic text at a larger scale, and about more demographic groups, than previous resources of human-written text. We conduct a human evaluation on a challenging subset of ToxiGen and find that annotators struggle to distinguish machine-generated text from human-written language. We also find that 94.5% of toxic examples are labeled as hate speech by human annotators. Using three publicly-available datasets, we show that finetuning a toxicity classifier on our data improves its performance on human-written data substantially. We also demonstrate that ToxiGen can be used to fight machine-generated toxicity as finetuning improves the classifier significantly on our evaluation subset. Our code and data can be found at https://github.com/microsoft/ToxiGen.

Motivation & Objective

  • To address the over-reliance of toxicity classifiers on minority group mentions, which leads to false positives and poor detection of implicit hate speech.
  • To generate a large-scale, balanced dataset covering underrepresented minority groups and implicit (non-swearword) toxic language.
  • To develop a method that produces machine-generated text indistinguishable from human-written text in human evaluations.
  • To improve existing toxicity classifiers through fine-tuning on the generated data, especially on implicit hate speech.

Proposed method

  • Leverage GPT-3 as a text generator with demonstration-based prompting to control generation of toxic and benign statements about 13 minority groups.
  • Implement Alice, an adversarial classifier-in-the-loop decoding algorithm, to steer text generation toward specific toxicity levels during beam search.
  • Use a pretrained toxicity classifier to guide generation, ensuring high-quality and targeted toxic content without explicit slurs.
  • Control generation to maintain equal numbers of toxic and benign examples per demographic group, reducing spurious correlations.
  • Generate statements that are 98.2% implicit (no slurs or profanity), focusing on subtle, systemic bias.
  • Conduct human evaluation on a 792-sample subset to validate realism and distinguishability of generated text.

Experimental results

Research questions

  • RQ1Can machine-generated text be made indistinguishable from human-written toxic and benign statements in human evaluation?
  • RQ2To what extent does fine-tuning on ToxiGen improve performance on existing human-annotated implicit hate speech datasets?
  • RQ3Can adversarial generation via Alice produce statements that fool multiple pre-existing toxicity classifiers?
  • RQ4How well does ToxiGen cover underrepresented minority groups and implicit forms of hate speech?
  • RQ5What is the impact of training on ToxiGen in reducing spurious correlations between minority mentions and toxicity predictions?

Key findings

  • 90.5% of the machine-generated examples in a human evaluation were mistaken for human-written text, indicating high realism.
  • 94.5% of the toxic examples in ToxiGen were labeled as hate speech by human annotators, confirming their perceived toxicity.
  • Fine-tuning existing toxicity classifiers on ToxiGen improved performance by 7–19% on three benchmark datasets: ImplicitHateCorpus, SocialBiasFrames, and DynaHate.
  • The dataset contains 98.2% implicit toxic statements, demonstrating effective generation of non-explicit but harmful language.
  • Alice successfully generated statements that fooled five publicly available toxicity classifiers, including Perspective API and OpenAI’s content filter.
  • The method successfully generated balanced, diverse, and contextually relevant toxic and benign statements across 13 minority identity groups.

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.