Unified Detoxifying and Debiasing in Language Generation via Inference-time Adaptive Optimization
Zonghan Yang, Xiaoyuan Yi, Peng Li, Yang Liu, Xing Xie
Abstract
Warning: this paper contains model outputs exhibiting offensiveness and biases. Recently pre-trained language models (PLMs) have prospered in various natural language generation (NLG) tasks due to their ability to generate fairly fluent text. Nevertheless, these models are observed to capture and reproduce harmful contents in training corpora, typically toxic language and social biases, raising severe moral issues. Prior works on ethical NLG tackle detoxifying and debiasing separately, which is problematic since we find debiased models still exhibit toxicity while detoxified ones even exacerbate social biases. To address such a challenge, we propose the first unified framework of detoxifying and debiasing called UD-DIA, which jointly formalizes these two problems as rectifying the output space. We theoretically interpret our framework as learning a text distribution mixing weighted attributes. Besides, UDDIA conducts adaptive optimization of only a few parameters during decoding based on a parameter-efficient tuning schema without any training data. This leads to minimal generation quality loss and improved rectification performance with acceptable computational cost. Experimental results demonstrate that compared to several strong baselines, UDDIA achieves debiasing and detoxifying simultaneously and better balances efficiency and effectiveness, taking a further step towards practical ethical NLG.
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.
9 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Plug and Play Language Models: A Simple Approach to Controlled Text Generation cites The Curious Case of Neural Text Degeneration
- Neural Text Generation With Unlikelihood Training cites The Curious Case of Neural Text Degeneration
- The Curious Case of Neural Text Degeneration cites Neural Text Generation With Unlikelihood Training
- ToViLaG: Your Visual-Language Generative Model is Also An Evildoer cites Plug and Play Language Models: A Simple Approach to Controlled Text Generation
- ToViLaG: Your Visual-Language Generative Model is Also An Evildoer cites RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language Models
- Controlled Text Generation via Language Model Arithmetic cites Plug and Play Language Models: A Simple Approach to Controlled Text Generation
- Representation Surgery: Theory and Practice of Affine Steering 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
- RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language Models cites Neural Text Generation With Unlikelihood Training
- RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language Models cites The Curious Case of Neural Text Degeneration
- On the Challenges of Using Black-Box APIs for Toxicity Evaluation in Research cites Plug and Play Language Models: A Simple Approach to Controlled Text Generation
- On the Challenges of Using Black-Box APIs for Toxicity Evaluation in Research cites RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language Models
Cited by top-tier papers9
- Controlled Text Generation via Language Model ArithmeticJasper Dekoninck, Marc Fischer, Luca Beurer-Kellner, Martin T. VechevICLR 2024 · 58 citations
- Representation Surgery: Theory and Practice of Affine SteeringShashwat Singh, Shauli Ravfogel, Jonathan Herzig, Roee Aharoni et al.ICML 2024 · 36 citations
- On the Challenges of Using Black-Box APIs for Toxicity Evaluation in ResearchLuiza Pozzobon, Beyza Ermis, Patrick Lewis, Sara HookerEMNLP 2023 · 19 citations
- Association of Objects May Engender Stereotypes: Mitigating Association-Engendered Stereotypes in Text-to-Image GenerationJunlei Zhou, Jiashi Gao, Xiangyu Zhao, Xin Yao et al.NeurIPS 2024 · 5 citations
- ToViLaG: Your Visual-Language Generative Model is Also An EvildoerXinpeng Wang, Xiaoyuan Yi, Han Jiang, Shanlin Zhou et al.EMNLP 2023 · 3 citations
Builds on28
- The Curious Case of Neural Text DegenerationAri Holtzman, Jan Buys, Li Du, Maxwell Forbes et al.ICLR 2020 · 4,112 citations
- BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and ComprehensionMike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad et al.ACL 2020 · 1,224 citations
- 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
- RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language ModelsSamuel Gehman, Suchin Gururangan, Maarten Sap, Yejin Choi et al.EMNLP Findings 2020 · 692 citations
- Neural Text Generation With Unlikelihood TrainingSean Welleck, Ilia Kulikov, Stephen Roller, Emily Dinan et al.ICLR 2020 · 683 citations
Related papers
- Text Detoxification: Data Efficiency, Semantic Preservation and Model GeneralizationJing Yu, Yibo Zhao, Jiapeng Zhu, Wenming Shao et al.EMNLP 2025
- 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
- Language Detoxification with Attribute-Discriminative Latent SpaceJin Myung Kwak, Minseon Kim, Sung Ju HwangACL 2023 · 2 citations
- Leashing the Inner Demons: Self-Detoxification for Language ModelsCanwen Xu, Zexue He, Zhankui He, Julian J. McAuleyAAAI 2022 · 30 citations
- Self-Detoxifying Language Models via Toxification ReversalChak Tou Leong, Yi Cheng, Jiashuo Wang, Jian Wang et al.EMNLP 2023 · 12 citations
