Leashing the Inner Demons: Self-Detoxification for Language Models
Not on the map. Why?
Abstract (arXiv)
Language models (LMs) can reproduce (or amplify) toxic language seen during training, which poses a risk to their practical application. In this paper, we conduct extensive experiments to study this phenomenon. We analyze the impact of prompts, decoding strategies and training corpora on the output toxicity. Based on our findings, we propose a simple yet effective method for language models to "detoxify" themselves without an additional large corpus or external discriminator. Compared to a supervised baseline, our proposed method shows better toxicity reduction with good generation quality in the generated content under multiple settings. Warning: some examples shown in the paper may contain uncensored offensive content.
Key facts. Cited by 19 papers in the map (data through 7 Oct 2026). Builds on 24 of its 30 references that are in the map. First posted on arXiv 6 Mar 2022.
Builds on
24 of 30 references.
References · 24
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2014Sequence to Sequence Learning with Neural Networkscited by 2,974
- 2019The Curious Case of Neural Text Degenerationcited by 2,881
- 2020Don't Stop Pretraining: Adapt Language Models to Domains and Taskscited by 1,548
- 2020RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language Modelscited by 1,235
- 2018Hierarchical Neural Story Generationcited by 1,182
- 2015A Diversity-Promoting Objective Function for Neural Conversation Modelscited by 1,068
- 2018The Secret Sharer: Evaluating and Testing Unintended Memorization in Neural Networkscited by 847
- 2019Plug and Play Language Models: A Simple Approach to Controlled Text Generationcited by 793
- 2019CTRL: A Conditional Transformer Language Model for Controllable Generationcited by 754
- 2019Universal Adversarial Triggers for Attacking and Analyzing NLPcited by 709
12 more
- 2019Is BERT Really Robust? A Strong Baseline for Natural Language Attack on Text Classification and Entailmentcited by 663
- 2019The Woman Worked as a Babysitter: On Biases in Language Generationcited by 540
- 2019Be Your Own Teacher: Improve the Performance of Convolutional Neural Networks via Self Distillationcited by 491
- 2020BERT-ATTACK: Adversarial Attack Against BERT Using BERTcited by 488
- 2021DExperts: Decoding-Time Controlled Text Generation with Experts and Anti-Expertscited by 434
- 2020GeDi: Generative Discriminator Guided Sequence Generationcited by 377
- 2015A Neural Conversational Modelcited by 195
- 2021Detoxifying Language Models Risks Marginalizing Minority Voicescited by 106
- 2018Learning a Deep Listwise Context Model for Ranking Refinementcited by 62
- 2018Feature-Wise Bias Amplificationcited by 31
- 2019Pre-train and Plug-in: Flexible Conditional Text Generation with Variational Auto-Encoderscited by 27
- 2018Bias Amplification in Artificial Intelligence Systemscited by 15
Built on by
Citing papers per year: 2022: 3; 2023: 7; 2024: 4; 2025: 4; 2026: 1.
19 papers.
Sort:
By area:
- 2023Toxicity in ChatGPT: Analyzing Persona-assigned Language Modelscited by 356
- 2023Large Language Model Alignment: A Surveycited by 241
- 2023Attack Prompt Generation for Red Teaming and Defending Large Language Modelscited by 73
- 2023Self-Detoxifying Language Models via Toxification Reversalcited by 45
- 2022Why So Toxic? Measuring and Triggering Toxic Behavior in Open-Domain Chatbotscited by 31
- 2023MedEval: A Multi-Level, Multi-Task, and Multi-Domain Medical Benchmark for Language Model Evaluationcited by 19
- 2022Controlling Bias Exposure for Fair Interpretable Predictionscited by 18
- 2024LLM-Personalize: Aligning LLM Planners with Human Preferences via Reinforced Self-Training for Housekeeping Robotscited by 18
- 2024Walking in Others' Shoes: How Perspective-Taking Guides Large Language Models in Reducing Toxicity and Biascited by 17
- 2022Synthetic Pre-Training Tasks for Neural Machine Translationcited by 8
- 2025UniDetox: Universal Detoxification of Large Language Models via Dataset Distillationcited by 8
- 2025IF-GUIDE: Influence Function-Guided Detoxification of LLMscited by 7
7 more
- 2023CMD: a framework for Context-aware Model self-Detoxificationcited by 6
- 2024Tiny Refinements Elicit Resilience: Toward Efficient Prefix-Model Against LLM Red-Teamingcited by 6
- 2024FrenchToxicityPrompts: a Large Benchmark for Evaluating and Mitigating Toxicity in French Textscited by 5
- 2023Interactive Text Generationcited by 2
- 2025IRepair: An Intent-Aware Approach to Repair Data-Driven Errors in Large Language Modelscited by 1
- 2025Combating Toxic Language: A Review of LLM-Based Strategies for Software Engineeringcited by 1
- 2026Detoxification for LLM: From Dataset Itselfcited by 0
- 2026Detoxification for LLM: From Dataset Itself21 Apr 2026
- 2025IF-GUIDE: Influence Function-Guided Detoxification of LLMs2 Jun 2025
- 2025UniDetox: Universal Detoxification of Large Language Models via Dataset Distillation29 Apr 2025
- 2025Combating Toxic Language: A Review of LLM-Based Strategies for Software Engineering21 Apr 2025
- 2025IRepair: An Intent-Aware Approach to Repair Data-Driven Errors in Large Language Models10 Feb 2025
- 2024Walking in Others' Shoes: How Perspective-Taking Guides Large Language Models in Reducing Toxicity and Bias22 Jul 2024
- 2024FrenchToxicityPrompts: a Large Benchmark for Evaluating and Mitigating Toxicity in French Texts25 Jun 2024
- 2024Tiny Refinements Elicit Resilience: Toward Efficient Prefix-Model Against LLM Red-Teaming21 May 2024
- 2024LLM-Personalize: Aligning LLM Planners with Human Preferences via Reinforced Self-Training for Housekeeping Robots22 Apr 2024
- 2023MedEval: A Multi-Level, Multi-Task, and Multi-Domain Medical Benchmark for Language Model Evaluation21 Oct 2023
- 2023Attack Prompt Generation for Red Teaming and Defending Large Language Models19 Oct 2023
- 2023Self-Detoxifying Language Models via Toxification Reversal14 Oct 2023
7 more
- 2023Large Language Model Alignment: A Survey26 Sep 2023
- 2023CMD: a framework for Context-aware Model self-Detoxification16 Aug 2023
- 2023Toxicity in ChatGPT: Analyzing Persona-assigned Language Models11 Apr 2023
- 2023Interactive Text Generation2 Mar 2023
- 2022Synthetic Pre-Training Tasks for Neural Machine Translation19 Dec 2022
- 2022Controlling Bias Exposure for Fair Interpretable Predictions14 Oct 2022
- 2022Why So Toxic? Measuring and Triggering Toxic Behavior in Open-Domain Chatbots7 Sep 2022
- 2023Toxicity in ChatGPT: Analyzing Persona-assigned Language Modelscited by 356
- 2022Why So Toxic? Measuring and Triggering Toxic Behavior in Open-Domain Chatbotscited by 31
- 2023MedEval: A Multi-Level, Multi-Task, and Multi-Domain Medical Benchmark for Language Model Evaluationcited by 19
- 2022Controlling Bias Exposure for Fair Interpretable Predictionscited by 18
- 2024Walking in Others' Shoes: How Perspective-Taking Guides Large Language Models in Reducing Toxicity and Biascited by 17
- 2022Synthetic Pre-Training Tasks for Neural Machine Translationcited by 8
- 2025UniDetox: Universal Detoxification of Large Language Models via Dataset Distillationcited by 8
- 2025IF-GUIDE: Influence Function-Guided Detoxification of LLMscited by 7
- 2023CMD: a framework for Context-aware Model self-Detoxificationcited by 6
- 2024FrenchToxicityPrompts: a Large Benchmark for Evaluating and Mitigating Toxicity in French Textscited by 5
- 2023Interactive Text Generationcited by 2
- 2025IRepair: An Intent-Aware Approach to Repair Data-Driven Errors in Large Language Modelscited by 1
12 most cited of 14 All 14 (JSON)
- 2026Detoxification for LLM: From Dataset Itself21 Apr 2026
- 2025IF-GUIDE: Influence Function-Guided Detoxification of LLMs2 Jun 2025
- 2025UniDetox: Universal Detoxification of Large Language Models via Dataset Distillation29 Apr 2025
- 2025Combating Toxic Language: A Review of LLM-Based Strategies for Software Engineering21 Apr 2025
- 2025IRepair: An Intent-Aware Approach to Repair Data-Driven Errors in Large Language Models10 Feb 2025
- 2024Walking in Others' Shoes: How Perspective-Taking Guides Large Language Models in Reducing Toxicity and Bias22 Jul 2024
- 2024FrenchToxicityPrompts: a Large Benchmark for Evaluating and Mitigating Toxicity in French Texts25 Jun 2024
- 2023MedEval: A Multi-Level, Multi-Task, and Multi-Domain Medical Benchmark for Language Model Evaluation21 Oct 2023
- 2023CMD: a framework for Context-aware Model self-Detoxification16 Aug 2023
- 2023Toxicity in ChatGPT: Analyzing Persona-assigned Language Models11 Apr 2023
- 2023Interactive Text Generation2 Mar 2023
- 2022Synthetic Pre-Training Tasks for Neural Machine Translation19 Dec 2022
12 newest of 14 All 14 (JSON)