ToxiGen: A Large-Scale Machine-Generated Dataset for Adversarial and Implicit Hate Speech Detection
Authors: 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.
The papers around it, by date and closeness
Higher is closer to this paper; left is older. Lines join papers close to each other: groups of lines are sub-topics. Select a point to see why it is there. Back to the summary of this paper
Papers around this one
Ranked by how close their title and abstract are to this paper’s. Select some to read them together.
Closest papers
-
Toximatics: Towards Understanding Toxicity in Real-Life Social SituationsMayukh Das, Wolf-tilo Balke · 2024 · SIGDIAL Conferences · Not summarized yet
Toximatics studies how social context changes perceived toxicity and generates context–utterance pairs, whereas ToxiGen generates toxic and benign statements about minority groups.
Abstract
The proliferation of social media has increased the visibility and effects of hate speech. To address this, NLP solutions have been developed to identify both explicit and implicit forms of hate speech. Typically, these approaches evaluate the toxicity of utterances in isolation, ignoring the context. Drawing on pragmatics, our study examines how contextual factors can influence the perceived toxicity of utterances, thereby anchoring assessments in a more nuanced semantic framework. We present Toximatics, a dataset that includes context-dependent utterances and it’s toxicity score. We also introduce a novel synthetic data generation pipeline designed to create context-utterance pairs at scal…
-
ToxSyn-PT: A Synthetic Fine-Grained Dataset of Minority-Targeted Toxic Language in PortugueseI. A. Brito, J. S. Dollis, F. B. Färber et al. · 2025 · International Conference on Language Resources and Evaluation · cited 2 times · Not summarized yet
ToxSyn-PT generates synthetic minority-targeted toxic and benign examples for hate-speech detection, applying a related data-generation approach in Portuguese.
Abstract
The development of robust hate speech detection systems remains limited by the lack of large-scale, fine-grained training data, especially for languages beyond English. Existing corpora typically rely on simplistic toxic and non-toxic labels, and the few that capture hate directed at specific minority groups lack the positive counterexamples required to distinguish genuine hate from mere discussion. In this work, we introduce ToxSyn-PT, the first Portuguese large-scale corpus explicitly designed for multi-label hate speech detection across nine protected minority groups, including the non-toxic counterexamples absent in all other public datasets. Generated via a controllable four-stage pipel…
-
ToxDetect: Detecting Implicit Toxicity in Non-Profane LanguageTongyu Liang, Xinyi Zhang, Li-Zhou Lin · 2025 · International Conference on Computer Applications Technology · Not summarized yet
ToxDetect tackles implicit toxicity with adversarial augmentation and an intent-effect model, while ToxiGen generates training examples using prompted language models.
Abstract
The rapid expansion of user-generated content on social media has intensified the challenge of moderating harmful language, particularly implicit toxicity that manifests through sarcasm, microaggressions, and coded hate speech. Unlike explicit profanity, implicit toxicity requires deep contextual and cultural understanding, which makes traditional keyword-based moderation systems insufficient. To address this challenge, we propose ToxDetect, a comprehensive framework that integrates adversarial data augmentation with an intent-effect disentanglement architecture and adaptive multi-task learning. Built on RoBERTa-Large and optimized with focal loss and advanced training strategies, ToxDetect …
-
ToXCL: A Unified Framework for Toxic Speech Detection and ExplanationNhat M. Hoang, D. Long, Duc Anh Do et al. · 2024 · North American Chapter of the Association for Computational Linguistics · cited 22 times · Not summarized yet
ToXCL addresses detecting and explaining implicit toxic speech, while ToxiGen supplies data for detecting implicit toxicity.
Abstract
The proliferation of online toxic speech is a pertinent problem posing threats to demographic groups. While explicit toxic speech contains offensive lexical signals, implicit one consists of coded or indirect language. Therefore, it is crucial for models not only to detect implicit toxic speech but also to explain its toxicity. This draws a unique need for unified frameworks that can effectively detect and explain implicit toxic speech. Prior works mainly formulated the task of toxic speech detection and explanation as a text generation problem. Nonetheless, models trained using this strategy can be prone to suffer from the consequent error propagation problem. Moreover, our experiments reve…
-
Toxic Language and Threat Detection in Social MediaNafiseh Jabbari Tofighi, Hessam Kaveh, K. Sailunaz et al. · 2025 · International Conference on Systems and Informatics · cited 1 time · Not summarized yet
Toxic Language and Threat Detection trains classifiers on existing social-media toxicity datasets, rather than generating examples to improve detection.
Abstract
Detecting toxic language and threats in social media is a critical task for ensuring safer online interactions and preventing the spread of harmful content. This paper presents a comprehensive approach to toxic language and threat detection using both traditional machine learning and state-of-the-art deep learning models. The study leverages two widely used datasets: the Jigsaw Toxic Comment Classification Dataset, which contains over 150,000 labeled comments categorized as toxic, severe toxic, obscene, threats, insults, and identity hate, and the Hate Speech Dataset, which classifies tweets into hate speech, offensive language, and neutral speech. To develop an efficient detection system, w…
-
ModelCitizens: Representing Community Voices in Online SafetyAshima Suvarna, Christina Chance, K. Naranjo et al. · 2025 · Conference on Empirical Methods in Natural Language Processing · cited 2 times · Not summarized yet
ModelCitizens collects toxicity annotations across identity groups to represent differing community perspectives, while ToxiGen generates toxic and benign statements about minority groups.
Abstract
Automatic toxic language detection is critical for creating safe, inclusive online spaces. However, it is a highly subjective task, with perceptions of toxic language shaped by community norms and lived experience. Existing toxicity detection models are typically trained on annotations that collapse diverse annotator perspectives into a single ground truth, erasing important context-specific notions of toxicity such as reclaimed language. To address this, we introduce MODELCITIZENS, a dataset of 6.8K social media posts and 40K toxicity annotations across diverse identity groups. To capture the role of conversational context on toxicity, typical of social media posts, we augment MODELCITIZENS…
-
Toxinet: A Deep Learning Framework for Online Comment Toxicity DetectionB. Lakshmi, T. Shravya, Lakshmireddygari Yaswitha et al. · 2025 · International Congress on Information and Communication Technology · cited 1 time · Not summarized yet
Toxinet uses a BiLSTM to classify online comments across toxicity categories, while ToxiGen focuses on generating data to improve toxicity detection.
Abstract
The exponential growth of online interactions has brought unprecedented opportunities for global communication but has led to the proliferation of toxic content, including hate speech, harassment, and threats. This project leverages advancements in Deep Learning (DL) to develop a robust system for detecting and classifying toxic online comments. DL is used for nuanced text analysis, the system can identify toxicity level across multiple categories such as threats, insults, obscenity, and identify hate. The project utilizes Bidirectional LSTM-based multi-label classification model to process large-scale datasets like Kaggle's Wikipedia Talk Page edits. These models ensure accurate recognition…
-
Fortifying Toxic Speech Detectors against Disguised ToxicityXiaochuang Han, Yulia Tsvetkov · 2020 · Conference on Empirical Methods in Natural Language Processing · cited 21 times · Not summarized yet
Fortifying Toxic Speech Detectors discovers disguised offenses from a few probing examples, whereas ToxiGen generates a large synthetic dataset for implicit-toxicity training.
Abstract
Modern toxic speech detectors are incompetent in recognizing disguised offensive language, such as adversarial attacks that deliberately avoid known toxic lexicons, or manifestations of implicit bias. Building a large annotated dataset for such veiled toxicity can be very expensive. In this work, we propose a framework aimed at fortifying existing toxic speech detectors without a large labeled corpus of veiled toxicity. Just a handful of probing examples are used to surface orders of magnitude more disguised offenses. We augment the toxic speech detector's training data with these discovered offensive examples, thereby making it more robust to veiled toxicity while preserving its utility in …
Prior work it builds on
-
Challenges in Automated Debiasing for Toxic Language DetectionXuhui Zhou, Maarten Sap, Swabha Swayamdipta et al. · 2021 · Conference of the European Chapter of the Association for Computational Linguistics · cited 165 times · Not summarized yet
Challenges in Automated Debiasing tests methods for reducing lexical and dialectal bias in toxicity classifiers, addressing a bias problem also targeted by ToxiGen.
Abstract
Biased associations have been a challenge in the development of classifiers for detecting toxic language, hindering both fairness and accuracy. As potential solutions, we investigate recently introduced debiasing methods for text classification datasets and models, as applied to toxic language detection. Our focus is on lexical (e.g., swear words, slurs, identity mentions) and dialectal markers (specifically African American English). Our comprehensive experiments establish that existing methods are limited in their ability to prevent biased behavior in current toxicity detectors. We then propose an automatic, dialect-aware data correction method, as a proof-of-concept. Despite the use of sy…
-
Learning from the Worst: Dynamically Generated Datasets to Improve Online Hate DetectionBertie Vidgen, Tristan Thrush, Zeerak Talat et al. · 2021 · Annual Meeting of the Association for Computational Linguistics · cited 405 times · Not summarized yet
Learning from the Worst dynamically generates challenging hate examples with human and model input, while ToxiGen uses prompted language-model generation.
Abstract
We present a human-and-model-in-the-loop process for dynamically generating datasets and training better performing and more robust hate detection models. We provide a new dataset of 40,000 entries, generated and labelled by trained annotators over four rounds of dynamic data creation. It includes 15,000 challenging perturbations and each hateful entry has fine-grained labels for the type and target of hate. Hateful entries make up 54% of the dataset, which is substantially higher than comparable datasets. We show that model performance is substantially improved using this approach. Models trained on later rounds of data collection perform better on test sets and are harder for annotators to…
-
Latent Hatred: A Benchmark for Understanding Implicit Hate SpeechMai Elsherief, Caleb Ziems, D. Muchlinski et al. · 2021 · Conference on Empirical Methods in Natural Language Processing · cited 427 times · Not summarized yet
Latent Hatred benchmarks implicit hate speech with fine-grained labels, sharing ToxiGen's focus on detecting indirect hate.
Abstract
Hate speech has grown significantly on social media, causing serious consequences for victims of all demographics. Despite much attention being paid to characterize and detect discriminatory speech, most work has focused on explicit or overt hate speech, failing to address a more pervasive form based on coded or indirect language. To fill this gap, this work introduces a theoretically-justified taxonomy of implicit hate speech and a benchmark corpus with fine-grained labels for each message and its implication. We present systematic analyses of our dataset using contemporary baselines to detect and explain implicit hate speech, and we discuss key features that challenge existing models. This…
-
Annotators with Attitudes: How Annotator Beliefs And Identities Bias Toxic Language DetectionMaarten Sap, S. Swayamdipta, Laura Vianna et al. · 2021 · North American Chapter of the Association for Computational Linguistics · cited 465 times · Not summarized yet
Annotators with Attitudes studies how annotator identity and beliefs shape toxicity labels, a source of variation relevant to ToxiGen's human evaluation.
Abstract
The perceived toxicity of language can vary based on someone’s identity and beliefs, but this variation is often ignored when collecting toxic language datasets, resulting in dataset and model biases. We seek to understand the *who*, *why*, and *what* behind biases in toxicity annotations. In two online studies with demographically and politically diverse participants, we investigate the effect of annotator identities (*who*) and beliefs (*why*), drawing from social psychology research about hate speech, free speech, racist beliefs, political leaning, and more. We disentangle *what* is annotated as toxic by considering posts with three characteristics: anti-Black language, African American E…
-
HateBERT: Retraining BERT for Abusive Language Detection in EnglishTommaso Caselli, Valerio Basile, Jelena Mitrović et al. · 2020 · WOAH · cited 559 times · Not summarized yet
HateBERT retrains a language model on abusive Reddit comments for detection, whereas ToxiGen creates synthetic data to improve toxicity classifiers.
Abstract
We introduce HateBERT, a re-trained BERT model for abusive language detection in English. The model was trained on RAL-E, a large-scale dataset of Reddit comments in English from communities banned for being offensive, abusive, or hateful that we have curated and made available to the public. We present the results of a detailed comparison between a general pre-trained language model and the retrained version on three English datasets for offensive, abusive language and hate speech detection tasks. In all datasets, HateBERT outperforms the corresponding general BERT model. We also discuss a battery of experiments comparing the portability of the fine-tuned models across the datasets, suggest…
Papers that cite it
-
Something Just Like TRuST : Toxicity Recognition of Span and TargetB. Atil, Namrata Sureddy, R. Passonneau · 2025 · Annual Meeting of the Association for Computational Linguistics · cited 4 times · Not summarized yet
TRuST synthesizes a large toxicity dataset with human annotations for detection and related tasks, sharing ToxiGen's dataset-building focus.
Abstract
Toxic language includes content that is offensive, abusive, or that promotes harm. Progress in preventing toxic output from large language models (LLMs) is hampered by inconsistent definitions of toxicity. We introduce TRuST, a large-scale dataset that unifies and expands prior resources through a carefully synthesized definition of toxicity, and corresponding annotation scheme. It consists of ~300k annotations, with high-quality human annotation on ~11k. To ensure high-quality, we designed a rigorous, multi-stage human annotation process, and evaluated the diversity of the annotators. Then we benchmarked state-of-the-art LLMs and pre-trained models on three tasks: toxicity detection, identi…
-
HateFusion: Harnessing Attention-Based Techniques for Enhanced Filtering and Detection of Implicit Hate SpeechAshok Yadav, Vrijendra Singh · 2025 · IEEE Transactions on Computational Social Systems · cited 14 times · Not summarized yet
HateFusion fine-tunes BERT and DistilBERT using ToxiGen and other datasets for implicit-hate detection.
Abstract
Hate speech is a complex, multifaceted form of harmful material that targets individuals or groups. Detecting implicit hate speech poses a significant challenge due to its subtle expressions and the critical role of context in its identification. In response to this challenge, we have fine-tuned BERT and DistilBERT models on three publicly available datasets: Toxigen, Implicit Gab, and the Implicit Hate Corpus (IHC). Our approach involves meticulous data preprocessing, customized model configurations, and strategic hyperparameter optimization, all tailored to enhance the models’ performance in binary, 3-way, and 7-way implicit hate detection. We observed notable improvements in the detection…
-
K/DA: Automated Data Generation Pipeline for Detoxifying Implicitly Offensive Language in KoreanMinkyeong Jeon, Hyemin Jeong, Y. Kim et al. · 2025 · Annual Meeting of the Association for Computational Linguistics · cited 3 times · Not summarized yet
K/DA automatically generates implicitly offensive language for detoxification training, applying synthetic generation to a different task and language.
Abstract
Language detoxification involves removing toxicity from offensive language. While a neutral-toxic paired dataset provides a straightforward approach for training detoxification models, creating such datasets presents several challenges: i) the need for human annotation to build paired data, and ii) the rapid evolution of offensive terms, rendering static datasets quickly outdated. To tackle these challenges, we introduce an automated paired data generation pipeline, called K/DA. This pipeline is designed to generate offensive language with implicit offensiveness and trend-aligned slang, making the resulting dataset suitable for detoxification model training. We demonstrate that the dataset g…
-
Handling Bias in Toxic Speech Detection: A SurveyTanmay Garg, Sarah Masud, Tharun Suresh et al. · 2023 · ACM Computing Surveys · cited 86 times · Not summarized yet
Handling Bias in Toxic Speech Detection surveys research on unintended bias and mitigation in toxicity systems, a concern addressed by ToxiGen.
Abstract
Detecting online toxicity has always been a challenge due to its inherent subjectivity. Factors such as the context, geography, socio-political climate, and background of the producers and consumers of the posts play a crucial role in determining if the content can be flagged as toxic. Adoption of automated toxicity detection models in production can thus lead to a sidelining of the various groups they aim to help in the first place. It has piqued researchers’ interest in examining unintended biases and their mitigation. Due to the nascent and multi-faceted nature of the work, complete literature is chaotic in its terminologies, techniques, and findings. In this article, we put together a sy…
-
LLM in the Loop: Creating the ParaDeHate Dataset for Hate Speech DetoxificationShu-Zhou Yuan, Ercong Nie, L. Kouba et al. · 2025 · IJCNLP-AACL · cited 7 times · Not summarized yet
ParaDeHate uses an LLM-in-the-loop pipeline to create synthetic hate-related training data, but for detoxification rather than detection.
Abstract
Detoxification, the task of rewriting harmful language into non-toxic text, has become increasingly important amid the growing prevalence of toxic content online. However, high-quality parallel datasets for detoxification, especially for hate speech, remain scarce due to the cost and sensitivity of human annotation. In this paper, we propose a novel LLM-in-the-loop pipeline leveraging GPT-4o-mini for automated detoxification. We first replicate the ParaDetox pipeline by replacing human annotators with an LLM and show that the LLM performs comparably to human annotation. Building on this, we construct ParaDeHate, a large-scale parallel dataset specifically for hatespeech detoxification. We re…
Go further
How are these papers found?
We compare the title and abstract of this paper with those of every paper summarized on this site, and with the papers Semantic Scholar recommends, those it cites and those citing it (for a much-cited paper, its most recent citations and, from OpenAlex, the most cited ones). Among the prior work and the follow-ups, the papers that use each other in depth, a method it uses and the much-cited follow-ups come a little higher. The levels (very close, close, related) come from the similarity of the texts, not from a judgment of quality; * marks a paper without an abstract, compared by its title. The sentence under a paper is written by an AI from the two abstracts: check it in the papers. A paper marked not relevant by three readers leaves the list.
Updated on 5 November 2026.