mlsanityData to 14 Oct 2026

Parameter-Efficient Detoxification with Contrastive Decoding

arXiv 2401.06947 ↗First posted 13 Jan 2024cs.CL cs.AIcited by 18

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

  1. 2017Attention Is All You Needcited by 60,361
  2. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
  3. 2021Prefix-Tuning: Optimizing Continuous Prompts for Generationcited by 3,915
  4. 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,795
  5. 2019The Curious Case of Neural Text Degenerationcited by 2,916
  6. 2020Don't Stop Pretraining: Adapt Language Models to Domains and Taskscited by 1,565
  7. 2020RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language Modelscited by 1,255
  8. 2015A Diversity-Promoting Objective Function for Neural Conversation Modelscited by 1,077
  9. 2022Few-Shot Parameter-Efficient Fine-Tuning is Better and Cheaper than In-Context Learningcited by 896
  10. 2019Plug and Play Language Models: A Simple Approach to Controlled Text Generationcited by 799
  11. 2019CTRL: A Conditional Transformer Language Model for Controllable Generationcited by 762
  12. 2019Universal Adversarial Triggers for Attacking and Analyzing NLPcited by 722
18 more
  1. 2021GPT Understands, Toocited by 716
  2. 2021Cross-Task Generalization via Natural Language Crowdsourcing Instructionscited by 699
  3. 2022Contrastive Decoding: Open-ended Text Generation as Optimizationcited by 609
  4. 2019The Woman Worked as a Babysitter: On Biases in Language Generationcited by 541
  5. 2019Neural Text Generation with Unlikelihood Trainingcited by 503
  6. 2021DExperts: Decoding-Time Controlled Text Generation with Experts and Anti-Expertscited by 441
  7. 2019On Measuring Social Biases in Sentence Encoderscited by 398
  8. 2020GeDi: Generative Discriminator Guided Sequence Generationcited by 378
  9. 2021Do Prompt-Based Models Really Understand the Meaning of their Prompts?cited by 326
  10. 2019Measuring Bias in Contextualized Word Representationscited by 276
  11. 2019Gender Bias in Contextualized Word Embeddingscited by 203
  12. 2021A Token-level Reference-free Hallucination Detection Benchmark for Free-form Text Generationcited by 138
  13. 2013A Computational Approach to Politeness with Application to Social Factorscited by 106
  14. 2019Evaluating the Underlying Gender Bias in Contextualized Word Embeddingscited by 94
  15. 2019Transforming Delete, Retrieve, Generate Approach for Controlled Text Style Transfercited by 81
  16. 2022Exploring the Limits of Domain-Adaptive Training for Detoxifying Large-Scale Language Modelscited by 68
  17. 2018Polite Dialogue Generation Without Parallel Datacited by 59
  18. 2023Inference-Time Policy Adapters (IPA): Tailoring Extreme-Scale LMs without Fine-tuningcited by 33

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2024: 7; 2025: 7; 2026: 4.

18 papers.

Sort:

By area:

  1. 2024Merge, Ensemble, and Cooperate! A Survey on Collaborative Strategies in the Era of Large Language Modelscited by 44
  2. 2024Linear Alignment: A Closed-form Solution for Aligning Human Preferences without Tuning and Feedbackcited by 25
  3. 2024Model Surgery: Modulating LLM's Behavior Via Simple Parameter Editingcited by 23
  4. 2024Towards Inference-time Category-wise Safety Steering for Large Language Modelscited by 18
  5. 2024Walking in Others' Shoes: How Perspective-Taking Guides Large Language Models in Reducing Toxicity and Biascited by 17
  6. 2025On Almost Surely Safe Alignment of Large Language Models at Inference-Timecited by 14
  7. 2025SafeSteer: Interpretable Safety Steering with Refusal-Evasion in LLMscited by 10
  8. 2024Unlocking Decoding-time Controllability: Gradient-Free Multi-Objective Alignment with Contrastive Promptscited by 9
  9. 2025UniDetox: Universal Detoxification of Large Language Models via Dataset Distillationcited by 8
  10. 2025Toxicity in Online Platforms and AI Systems: A Survey of Needs, Challenges, Mitigations, and Future Directionscited by 3
  11. 2026Test-Time Detoxification without Training or Learning Anythingcited by 2
  12. 2025IRepair: An Intent-Aware Approach to Repair Data-Driven Errors in Large Language Modelscited by 1
6 more
  1. 2025Detoxification of Large Language Models through Output-layer Fusion with a Calibration Modelcited by 1
  2. 2026Cleansing the Artificial Mind: A Self-Reflective Detoxification Framework for Large Language Modelscited by 1
  3. 2024Fine-Grained Detoxification via Instance-Level Prefixes for Large Language Modelscited by 0
  4. 2025Can LLMs Rank the Harmfulness of Smaller LLMs? We are Not There Yetcited by 0
  5. 2026Detoxification for LLM: From Dataset Itselfcited by 0
  6. 2026Beyond Tokens: A Survey on Decoding Methods for Large Language and Vision-Language Modelscited by 0