Lune

ACL2023Top-tier venue

Language Detoxification with Attribute-Discriminative Latent Space

Jin Myung Kwak, Minseon Kim, Sung Ju Hwang

Abstract

Transformer-based Language Models (LMs) have achieved impressive results on natural language understanding tasks, but they can also generate toxic text such as insults, threats, and profanity, limiting their real-world applications. To overcome this issue, a few text generation approaches aim to detoxify toxic texts using additional LMs or perturbations. However, previous methods require excessive memory, computations, and time which are serious bottlenecks in their real-world application. To address such limitations, we propose an effective yet efficient method for language detoxification using an attribute-discriminative latent space. Specifically, we project the latent space of an original Transformer LM onto a discriminative latent space that well-separates texts by their attributes using a projection block and an attribute discriminator. This allows the LM to control the text generation to be non-toxic with minimal memory and computation overhead. We validate our model, Attribute-Discriminative Language Model (ADLM) on detoxified language and dialogue generation tasks, on which our method significantly outperforms baselines both in performance and efficiency.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

7 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Large Language Models can Become Strong Self-Detoxifiers cites Plug and Play Language Models: A Simple Approach to Controlled Text Generation
  • Large Language Models can Become Strong Self-Detoxifiers cites Self-Detoxifying Language Models via Toxification Reversal
  • Large Language Models can Become Strong Self-Detoxifiers cites RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language Models
  • Large Language Models can Become Strong Self-Detoxifiers cites Language Models are Few-Shot Learners
  • Test-Time Detoxification without Training or Learning Anything cites Plug and Play Language Models: A Simple Approach to Controlled Text Generation
  • Test-Time Detoxification without Training or Learning Anything cites Large Language Models can Become Strong Self-Detoxifiers
  • Test-Time Detoxification without Training or Learning Anything cites Self-Detoxifying Language Models via Toxification Reversal
  • Test-Time Detoxification without Training or Learning Anything cites RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language Models
  • Self-Detoxifying Language Models via Toxification Reversal cites Plug and Play Language Models: A Simple Approach to Controlled Text Generation
  • Self-Detoxifying Language Models via Toxification Reversal cites RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language Models
  • RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language Models cites Plug and Play Language Models: A Simple Approach to Controlled Text Generation
  • Walking in Others' Shoes: How Perspective-Taking Guides Large Language Models in Reducing Toxicity and Bias cites Self-Detoxifying Language Models via Toxification Reversal
  • Walking in Others' Shoes: How Perspective-Taking Guides Large Language Models in Reducing Toxicity and Bias cites RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language Models
  • Walking in Others' Shoes: How Perspective-Taking Guides Large Language Models in Reducing Toxicity and Bias cites Language Models are Few-Shot Learners
  • IF-Guide: Influence Function-Guided Detoxification of LLMs cites Plug and Play Language Models: A Simple Approach to Controlled Text Generation
  • IF-Guide: Influence Function-Guided Detoxification of LLMs cites Large Language Models can Become Strong Self-Detoxifiers
  • IF-Guide: Influence Function-Guided Detoxification of LLMs cites Self-Detoxifying Language Models via Toxification Reversal
  • IF-Guide: Influence Function-Guided Detoxification of LLMs cites RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language Models
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers7

  1. Self-Detoxifying Language Models via Toxification ReversalChak Tou Leong, Yi Cheng, Jiashuo Wang, Jian Wang et al.EMNLP 2023 · 12 citations
  2. IF-Guide: Influence Function-Guided Detoxification of LLMsZachary Coalson, Juhan Bae, Nicholas Carlini, Sanghyun HongNeurIPS 2025 · 9 citations
  3. Test-Time Detoxification without Training or Learning AnythingBaturay Saglam, Dionysios KalogeriasICML 2026 · 2 citations
  4. Walking in Others' Shoes: How Perspective-Taking Guides Large Language Models in Reducing Toxicity and BiasRongwu Xu, Zi'an Zhou, Tianwei Zhang, Zehan Qi et al.EMNLP 2024 · 2 citations
  5. Large Language Models can Become Strong Self-DetoxifiersChing-Yun Ko, Pin-Yu Chen, Payel Das, Youssef Mroueh et al.ICLR 2025

Builds on14

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. ALBERT: A Lite BERT for Self-supervised Learning of Language RepresentationsZhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel et al.ICLR 2020 · 7,418 citations
  3. Reformer: The Efficient TransformerNikita Kitaev, Lukasz Kaiser, Anselm LevskayaICLR 2020 · 2,878 citations
  4. Plug and Play Language Models: A Simple Approach to Controlled Text GenerationSumanth Dathathri, Andrea Madotto, Janice Lan, Jane Hung et al.ICLR 2020 · 1,166 citations
  5. RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language ModelsSamuel Gehman, Suchin Gururangan, Maarten Sap, Yejin Choi et al.EMNLP Findings 2020 · 692 citations

Related papers

  1. Leashing the Inner Demons: Self-Detoxification for Language ModelsCanwen Xu, Zexue He, Zhankui He, Julian J. McAuleyAAAI 2022 · 30 citations
  2. CFL: Causally Fair Language Models Through Token-level Attribute Controlled GenerationRahul Madhavan, Rishabh Garg, Kahini Wadhawan, Sameep MehtaACL Findings 2023
  3. Controlled Text Generation with Hidden Representation TransformationsVaibhav Kumar, Hana Koorehdavoudi, Masud Moshtaghi, Amita Misra et al.ACL Findings 2023 · 1 citation
  4. Exploring the Limits of Domain-Adaptive Training for Detoxifying Large-Scale Language ModelsBoxin Wang, Wei Ping, Chaowei Xiao, Peng Xu et al.NeurIPS 2022 · 89 citations
  5. Language Model Detoxification in Dialogue with Contextualized Stance ControlJing Qian, Xifeng YanEMNLP Findings 2022
Dusk over the sea between two cliffs drawn in fine vertical lines