HackerPapers

arXiv:2203.09509cs.CL

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

Thomas Hartvigsen, Saadia Gabriel, Hamid Palangi, Maarten Sap, Dipankar Ray, Ece Kamar

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.

arXiv comments
Published as a long paper at ACL 2022. Code: https://github.com/microsoft/TOXIGEN
Journal reference
DOI
Subjects
cs.CLComputation and Language

On Hacker News

Linked by 2 identifiable commenters in 4 comments across 4 threads, from Apr 2025 to Sep 2026.

Comments linking this paper, per year.

Discussed in comments4 threads

    • Quote from the paper itself, https://arxiv.org/pdf/2302.07459, page 3: In the discrimination experiment, the 175B parameter model discriminates against Black versus white [sic] students by 3% in the Q condition, and discriminates in favor of Black students by 7% in the Q+IF+CoT…

      like_any_otherView on HNParent context

    • Unsurprising result - here's Microsoft (in collaboration with MIT, Carnegie Mellon, and University of Washington) on how they measure & censor hate speech in their AIs [0]: Our ultimate aim is to shift power dynamics to targets of oppression. Therefore, we do not consider…

      like_any_otherView on HNParent context

    • People fall for trick questions too especially when related to their biases. It must just be how neural networks are. We're optimized for instinctive but fast judgement, and trick questions exploit that by requiring us to engage logical reasoning in an unexpected situation. Same…

      mike_hearnView on HNParent context

    • Microsoft (in collaboration with MIT, Carnegie Mellon, and University of Washington) on how they measure & censor hate speech in their AIs [0]: Our ultimate aim is to shift power dynamics to targets of oppression. Therefore, we do not consider identity dimensions that are…

      like_any_otherView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.