mlsanityData to 7 Oct 2026

CMD: a framework for Context-aware Model self-Detoxification

arXiv 2308.08295 ↗First posted 16 Aug 2023cs.CLcited by 6

Not on the map. Why?

Abstract (arXiv)

Text detoxification aims to minimize the risk of language models producing toxic content. Existing detoxification methods of directly constraining the model output or further training the model on the non-toxic corpus fail to achieve a decent balance between detoxification effectiveness and generation quality. This issue stems from the neglect of constrain imposed by the context since language models are designed to generate output that closely matches the context while detoxification methods endeavor to ensure the safety of the output even if it semantically deviates from the context. In view of this, we introduce a Context-aware Model self-Detoxification~(CMD) framework that pays attention to both the context and the detoxification process, i.e., first detoxifying the context and then making the language model generate along the safe context. Specifically, CMD framework involves two phases: utilizing language models to synthesize data and applying these data for training. We also introduce a toxic contrastive loss that encourages the model generation away from the negative toxic samples. Experiments on various LLMs have verified the effectiveness of our MSD framework, which can yield the best performance compared to baselines.

Key facts. Cited by 6 papers in the map (data through 7 Oct 2026). Builds on 39 of its 56 references that are in the map. First posted on arXiv 16 Aug 2023.

Builds on

39 of 56 references.

References · 39

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  2. 2020Language Models are Few-Shot Learnerscited by 32,199
  3. 2022Training language models to follow instructions with human feedbackcited by 15,712
  4. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
  5. 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,084
  6. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  7. 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,049
  8. 2019BERTScore: Evaluating Text Generation with BERTcited by 5,462
  9. 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,304
  10. 2022Large Language Models are Zero-Shot Reasonerscited by 4,323
  11. 2022Scaling Instruction-Finetuned Language Modelscited by 2,997
  12. 2019The Curious Case of Neural Text Degenerationcited by 2,881
27 more
  1. 2020RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language Modelscited by 1,235
  2. 2018Neural Network Acceptability Judgmentscited by 952
  3. 2023Reasoning with Language Model is Planning with World Modelcited by 846
  4. 2019Universal Adversarial Triggers for Attacking and Analyzing NLPcited by 709
  5. 2019The Woman Worked as a Babysitter: On Biases in Language Generationcited by 540
  6. 2021DExperts: Decoding-Time Controlled Text Generation with Experts and Anti-Expertscited by 434
  7. 2019On Measuring Social Biases in Sentence Encoderscited by 397
  8. 2020GeDi: Generative Discriminator Guided Sequence Generationcited by 377
  9. 2023Toxicity in ChatGPT: Analyzing Persona-assigned Language Modelscited by 356
  10. 2021Self-Diagnosis and Self-Debiasing: A Proposal for Reducing Corpus-Based Bias in NLPcited by 336
  11. 2023Text2Motion: From Natural Language Instructions to Feasible Planscited by 223
  12. 2019Gender Bias in Contextualized Word Embeddingscited by 203
  13. 2022On Second Thought, Let's Not Think Step by Step! Bias and Toxicity in Zero-Shot Reasoningcited by 191
  14. 2021Process for Adapting Language Models to Society (PALMS) with Values-Targeted Datasetscited by 179
  15. 2023Task and Motion Planning with Large Language Models for Object Rearrangementcited by 140
  16. 2021Detoxifying Language Models Risks Marginalizing Minority Voicescited by 106
  17. 2019Beyond BLEU: Training Neural Machine Translation with Semantic Similaritycited by 84
  18. 2022Exploring the Limits of Domain-Adaptive Training for Detoxifying Large-Scale Language Modelscited by 67
  19. 2021Text Detoxification using Large Pre-trained Neural Modelscited by 52
  20. 2022APPDIA: A Discourse-aware Transformer-based Style Transfer Model for Offensive Social Media Conversationscited by 23
  21. 2022Leashing the Inner Demons: Self-Detoxification for Language Modelscited by 19
  22. 2023Adding Instructions during Pretraining: Effective Way of Controlling Toxicity in Language Modelscited by 16
  23. 2022GENIUS: Sketch-based Language Model Pre-training via Extreme and Selective Masking for Text Generation and Augmentationcited by 11
  24. 2022Constructing Highly Inductive Contexts for Dialogue Safety through Controllable Reverse Generationcited by 8
  25. 2023DiffuDetox: A Mixed Diffusion Model for Text Detoxificationcited by 6
  26. 2022Detoxifying Language Models with a Toxic Corpuscited by 5
  27. 2021Lone Pine at SemEval-2021 Task 5: Fine-Grained Detection of Hate Speech Using BERToxiccited by 2

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2023: 1; 2024: 1; 2025: 2; 2026: 2.

6 papers.