Parameter-Efficient Detoxification with Contrastive Decoding
Not on the map. Why?
Abstract (arXiv)
The field of natural language generation has witnessed significant advancements in recent years, including the development of controllable text generation techniques. However, controlling the attributes of the generated text remains a challenge, especially when aiming to avoid undesirable behavior such as toxicity. In this work, we introduce Detoxification Generator (DETOXIGEN), an inference-time algorithm that steers the generation away from unwanted styles. DETOXIGEN is an ensemble of a pre-trained language model (generator) and a detoxifier. The detoxifier is trained intentionally on the toxic data representative of the undesirable attribute, encouraging it to generate text in that style exclusively. During the actual generation, we use the trained detoxifier to produce undesirable tokens for the generator to contrast against at each decoding step. This approach directly informs the generator to avoid generating tokens that the detoxifier considers highly likely. We evaluate DETOXIGEN on the commonly used REALTOXICITYPROMPTS benchmark (Gehman et al., 2020) with various language models as generators. We find that it significantly outperforms previous approaches in detoxification metrics while not compromising on the generation quality. Moreover, the detoxifier is obtained by soft prompt-tuning using the same backbone language model as the generator. Hence, DETOXIGEN requires only a tiny amount of extra weights from the virtual tokens of the detoxifier to be loaded into GPU memory while decoding, making it a promising lightweight, practical, and parameter-efficient detoxification strategy.
Key facts. Cited by 18 papers in the map (data through 14 Oct 2026). Builds on 30 of its 46 references that are in the map. First posted on arXiv 13 Jan 2024.
Builds on
30 of 46 references.
References · 30
- 2017Attention Is All You Needcited by 60,361
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
- 2021Prefix-Tuning: Optimizing Continuous Prompts for Generationcited by 3,915
- 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,795
- 2019The Curious Case of Neural Text Degenerationcited by 2,916
- 2020Don't Stop Pretraining: Adapt Language Models to Domains and Taskscited by 1,565
- 2020RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language Modelscited by 1,255
- 2015A Diversity-Promoting Objective Function for Neural Conversation Modelscited by 1,077
- 2022Few-Shot Parameter-Efficient Fine-Tuning is Better and Cheaper than In-Context Learningcited by 896
- 2019Plug and Play Language Models: A Simple Approach to Controlled Text Generationcited by 799
- 2019CTRL: A Conditional Transformer Language Model for Controllable Generationcited by 762
- 2019Universal Adversarial Triggers for Attacking and Analyzing NLPcited by 722
18 more
- 2021GPT Understands, Toocited by 716
- 2021Cross-Task Generalization via Natural Language Crowdsourcing Instructionscited by 699
- 2022Contrastive Decoding: Open-ended Text Generation as Optimizationcited by 609
- 2019The Woman Worked as a Babysitter: On Biases in Language Generationcited by 541
- 2019Neural Text Generation with Unlikelihood Trainingcited by 503
- 2021DExperts: Decoding-Time Controlled Text Generation with Experts and Anti-Expertscited by 441
- 2019On Measuring Social Biases in Sentence Encoderscited by 398
- 2020GeDi: Generative Discriminator Guided Sequence Generationcited by 378
- 2021Do Prompt-Based Models Really Understand the Meaning of their Prompts?cited by 326
- 2019Measuring Bias in Contextualized Word Representationscited by 276
- 2019Gender Bias in Contextualized Word Embeddingscited by 203
- 2021A Token-level Reference-free Hallucination Detection Benchmark for Free-form Text Generationcited by 138
- 2013A Computational Approach to Politeness with Application to Social Factorscited by 106
- 2019Evaluating the Underlying Gender Bias in Contextualized Word Embeddingscited by 94
- 2019Transforming Delete, Retrieve, Generate Approach for Controlled Text Style Transfercited by 81
- 2022Exploring the Limits of Domain-Adaptive Training for Detoxifying Large-Scale Language Modelscited by 68
- 2018Polite Dialogue Generation Without Parallel Datacited by 59
- 2023Inference-Time Policy Adapters (IPA): Tailoring Extreme-Scale LMs without Fine-tuningcited by 33
Built on by
Citing papers per year: 2024: 7; 2025: 7; 2026: 4.
18 papers.
Sort:
By area:
- 2024Merge, Ensemble, and Cooperate! A Survey on Collaborative Strategies in the Era of Large Language Modelscited by 44
- 2024Linear Alignment: A Closed-form Solution for Aligning Human Preferences without Tuning and Feedbackcited by 25
- 2024Model Surgery: Modulating LLM's Behavior Via Simple Parameter Editingcited by 23
- 2024Towards Inference-time Category-wise Safety Steering for Large Language Modelscited by 18
- 2024Walking in Others' Shoes: How Perspective-Taking Guides Large Language Models in Reducing Toxicity and Biascited by 17
- 2025On Almost Surely Safe Alignment of Large Language Models at Inference-Timecited by 14
- 2025SafeSteer: Interpretable Safety Steering with Refusal-Evasion in LLMscited by 10
- 2024Unlocking Decoding-time Controllability: Gradient-Free Multi-Objective Alignment with Contrastive Promptscited by 9
- 2025UniDetox: Universal Detoxification of Large Language Models via Dataset Distillationcited by 8
- 2025Toxicity in Online Platforms and AI Systems: A Survey of Needs, Challenges, Mitigations, and Future Directionscited by 3
- 2026Test-Time Detoxification without Training or Learning Anythingcited by 2
- 2025IRepair: An Intent-Aware Approach to Repair Data-Driven Errors in Large Language Modelscited by 1
6 more
- 2025Detoxification of Large Language Models through Output-layer Fusion with a Calibration Modelcited by 1
- 2026Cleansing the Artificial Mind: A Self-Reflective Detoxification Framework for Large Language Modelscited by 1
- 2024Fine-Grained Detoxification via Instance-Level Prefixes for Large Language Modelscited by 0
- 2025Can LLMs Rank the Harmfulness of Smaller LLMs? We are Not There Yetcited by 0
- 2026Detoxification for LLM: From Dataset Itselfcited by 0
- 2026Beyond Tokens: A Survey on Decoding Methods for Large Language and Vision-Language Modelscited by 0
- 2026Beyond Tokens: A Survey on Decoding Methods for Large Language and Vision-Language Models14 Aug 2026
- 2026Detoxification for LLM: From Dataset Itself21 Apr 2026
- 2026Cleansing the Artificial Mind: A Self-Reflective Detoxification Framework for Large Language Models16 Jan 2026
- 2026Test-Time Detoxification without Training or Learning Anything14 Jan 2026
- 2025Toxicity in Online Platforms and AI Systems: A Survey of Needs, Challenges, Mitigations, and Future Directions29 Sep 2025
- 2025Detoxification of Large Language Models through Output-layer Fusion with a Calibration Model2 Jun 2025
- 2025SafeSteer: Interpretable Safety Steering with Refusal-Evasion in LLMs1 Jun 2025
- 2025UniDetox: Universal Detoxification of Large Language Models via Dataset Distillation29 Apr 2025
- 2025IRepair: An Intent-Aware Approach to Repair Data-Driven Errors in Large Language Models10 Feb 2025
- 2025Can LLMs Rank the Harmfulness of Smaller LLMs? We are Not There Yet7 Feb 2025
- 2025On Almost Surely Safe Alignment of Large Language Models at Inference-Time3 Feb 2025
- 2024Towards Inference-time Category-wise Safety Steering for Large Language Models2 Oct 2024
6 more
- 2024Unlocking Decoding-time Controllability: Gradient-Free Multi-Objective Alignment with Contrastive Prompts9 Aug 2024
- 2024Walking in Others' Shoes: How Perspective-Taking Guides Large Language Models in Reducing Toxicity and Bias22 Jul 2024
- 2024Model Surgery: Modulating LLM's Behavior Via Simple Parameter Editing11 Jul 2024
- 2024Merge, Ensemble, and Cooperate! A Survey on Collaborative Strategies in the Era of Large Language Models8 Jul 2024
- 2024Fine-Grained Detoxification via Instance-Level Prefixes for Large Language Models23 Feb 2024
- 2024Linear Alignment: A Closed-form Solution for Aligning Human Preferences without Tuning and Feedback21 Jan 2024
- 2024Linear Alignment: A Closed-form Solution for Aligning Human Preferences without Tuning and Feedbackcited by 25
- 2024Model Surgery: Modulating LLM's Behavior Via Simple Parameter Editingcited by 23
- 2024Towards Inference-time Category-wise Safety Steering for Large Language Modelscited by 18
- 2025On Almost Surely Safe Alignment of Large Language Models at Inference-Timecited by 14
- 2024Unlocking Decoding-time Controllability: Gradient-Free Multi-Objective Alignment with Contrastive Promptscited by 9
- 2025On Almost Surely Safe Alignment of Large Language Models at Inference-Time3 Feb 2025
- 2024Towards Inference-time Category-wise Safety Steering for Large Language Models2 Oct 2024
- 2024Unlocking Decoding-time Controllability: Gradient-Free Multi-Objective Alignment with Contrastive Prompts9 Aug 2024
- 2024Model Surgery: Modulating LLM's Behavior Via Simple Parameter Editing11 Jul 2024
- 2024Linear Alignment: A Closed-form Solution for Aligning Human Preferences without Tuning and Feedback21 Jan 2024
- 2024Merge, Ensemble, and Cooperate! A Survey on Collaborative Strategies in the Era of Large Language Modelscited by 44
- 2024Walking in Others' Shoes: How Perspective-Taking Guides Large Language Models in Reducing Toxicity and Biascited by 17
- 2025UniDetox: Universal Detoxification of Large Language Models via Dataset Distillationcited by 8
- 2025Toxicity in Online Platforms and AI Systems: A Survey of Needs, Challenges, Mitigations, and Future Directionscited by 3
- 2026Test-Time Detoxification without Training or Learning Anythingcited by 2
- 2025IRepair: An Intent-Aware Approach to Repair Data-Driven Errors in Large Language Modelscited by 1
- 2025Detoxification of Large Language Models through Output-layer Fusion with a Calibration Modelcited by 1
- 2024Fine-Grained Detoxification via Instance-Level Prefixes for Large Language Modelscited by 0
- 2026Detoxification for LLM: From Dataset Itselfcited by 0
- 2026Detoxification for LLM: From Dataset Itself21 Apr 2026
- 2026Test-Time Detoxification without Training or Learning Anything14 Jan 2026
- 2025Toxicity in Online Platforms and AI Systems: A Survey of Needs, Challenges, Mitigations, and Future Directions29 Sep 2025
- 2025Detoxification of Large Language Models through Output-layer Fusion with a Calibration Model2 Jun 2025
- 2025UniDetox: Universal Detoxification of Large Language Models via Dataset Distillation29 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
- 2024Merge, Ensemble, and Cooperate! A Survey on Collaborative Strategies in the Era of Large Language Models8 Jul 2024
- 2024Fine-Grained Detoxification via Instance-Level Prefixes for Large Language Models23 Feb 2024