Simple Text Detoxification by Identifying a Linear Toxic Subspace in Language Model Embeddings
Not on the map. Why?
Abstract (arXiv)
Large pre-trained language models are often trained on large volumes of internet data, some of which may contain toxic or abusive language. Consequently, language models encode toxic information, which makes the real-world usage of these language models limited. Current methods aim to prevent toxic features from appearing generated text. We hypothesize the existence of a low-dimensional toxic subspace in the latent space of pre-trained language models, the existence of which suggests that toxic features follow some underlying pattern and are thus removable. To construct this toxic subspace, we propose a method to generalize toxic directions in the latent space. We also provide a methodology for constructing parallel datasets using a context based word masking system. Through our experiments, we show that when the toxic subspace is removed from a set of sentence representations, almost no toxic representations remain in the result. We demonstrate empirically that the subspace found using our method generalizes to multiple toxicity corpora, indicating the existence of a low-dimensional toxic subspace.
Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 13 of its 18 references that are in the map. First posted on arXiv 15 Dec 2021.
Builds on
13 of 18 references.
References · 13
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2016Man is to Computer Programmer as Woman is to Homemaker? Debiasing Word Embeddingscited by 1,304
- 2020RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language Modelscited by 1,235
- 2019Plug and Play Language Models: A Simple Approach to Controlled Text Generationcited by 793
- 2020Recipes for building an open-domain chatbotcited by 593
- 2019Nuanced Metrics for Measuring Unintended Bias with Real Data for Text Classificationcited by 396
- 2019Identifying and Reducing Gender Bias in Word-Level Language Modelscited by 214
- 2016Ex Machina: Personal Attacks Seen at Scalecited by 208
- 2020Towards Debiasing Sentence Representationscited by 170
- 2018Reducing Gender Bias in Abusive Language Detectioncited by 152
- 2019Black is to Criminal as Caucasian is to Police: Detecting and Removing Multiclass Bias in Word Embeddingscited by 146
- 2021Challenges in Automated Debiasing for Toxic Language Detectioncited by 95
1 more
Built on by
Citing papers per year: 2023: 1; 2024: 0; 2025: 0; 2026: 1.
2 papers.