Language models (LMs) can reproduce (or amplify) toxic language seen during training, which poses a risk to their practical application. In this paper, we conduct extensive experiments to study this phenomenon. We analyze the impact of prompts, decoding strategies and training corpora on the output toxicity. Based on our findings, we propose a simple yet effective method for language models to "detoxify" themselves without an additional large corpus or external discriminator. Compared to a supervised baseline, our proposed method shows better toxicity reduction with good generation quality in the generated content under multiple settings. Warning: some examples shown in the paper may contain uncensored offensive content.
DSCD: Large Language Model Detoxification with Self-Constrained Decoding
Hubei Provincial Key Laboratory of Artificial Intelligence and Smart Learning(湖北人工智能与智能学习省级重点实验室);National Language Resources Monitoring and Research Center for Network Media(网络媒体语言资源监测与研究国家中心);Central China Normal University(中央财经大学);Wuhan University of Technology(武汉理工大学)
Text Detoxification as Style Transfer in English and Hindi
Charles University, Faculty of Mathematics and Physics(查理大学数学与物理学院);Panlingua Language Processing LLP(Panlingua语言处理有限责任合伙公司);Insight SFI Centre for Data Analytics, DSI, University of Galway(爱尔兰高威大学Insight SFI数据分析中心)
Breaking Bad Molecules: Are MLLMs Ready for Structure-Level Molecular Detoxification?
Department of Engineering Science, Macau University of Science and Technology, Macau, China(澳门科学技术大学工程科学系);School of Computer Science, Shanghai Jiao Tong University, Shanghai, China(上海交通大学计算机科学学院);Institute of Automation, Chinese Academy of Sciences, Beijing, China(中国科学院自动化研究所);School of Pharmacy, Macau University of Science and Technology, Macau, China(澳门科学技术大学药学院);Faculty of Electrical Engineering and Computer Science, Ningbo University, Ningbo, China(宁波大学电气与计算机科学学院);State Key Laboratory of Biopharmaceutical Preparation and Delivery, Institute of Process Engineering, Chinese Academy of Sciences, Beijing, China(中国科学院生物制药制备与递送国家重点实验室);School of Automation and Intelligent Sensing, Shanghai Jiao Tong University, Shanghai, China(上海交通大学自动化与智能感知学院);Shanghai Artificial Intelligence Laboratory, Shanghai, China(上海人工智能实验室)
Detoxifying Text with MaRCo: Controllable Revision with Experts and Anti-Experts
Paul G. Allen School of Computer Science & Engineering, University of Washington(华盛顿大学保罗·G·艾伦计算机科学与工程学院);Allen Institute for AI(艾伦人工智能研究所);Language Technologies Institute, Carnegie Mellon University(卡内基梅隆大学语言技术研究所)
MaRCo 结合可控生成与专家乘积,利用无毒和有毒语言模型似然识别并替换候选词,在微妙毒性去毒任务上自动指标优于基线且人类评估偏好达 2.1 倍。
Detoxifying Large Language Models via Autoregressive Reward Guided Representation Editing
SKLCCSE, Beihang University(北航智能计算与复杂系统研究院);National University of Singapore(新加坡国立大学);Zhongguancun Laboratory, Beijing(中关村实验室);Institute of Dataspace, Hefei(合肥数据空间研究院);Nanyang Technological University(南洋理工大学)
Self-Control of LLM Behaviors by Compressing Suffix Gradient into Prefix Controller
Shenzhen University(深圳大学);Rensselaer Polytechnic Institute(伦斯勒理工学院);University of California, Los Angeles(加利福尼亚大学洛杉矶分校);Tsinghua University(清华大学);The University of Hong Kong(香港大学);California Institute of Technology(加州理工学院)