Lune

EMNLP2023顶会

Self-Detoxifying Language Models via Toxification Reversal

Chak Tou Leong, Yi Cheng, Jiashuo Wang, Jian Wang, Wenjie Li

摘要

Language model detoxification aims to minimize the risk of generating offensive or harmful content in pretrained language models (PLMs) for safer deployment. Existing methods can be roughly categorized as finetuning-based and decoding-based. However, the former is often resource-intensive, while the latter relies on additional components and potentially compromises the generation fluency. In this paper, we propose a more lightweight approach that enables the PLM itself to achieve "selfdetoxification". Our method is built upon the observation that prepending a negative steering prompt can effectively induce PLMs to generate toxic content. At the same time, we are inspired by the recent research in the interpretability field, which formulates the evolving contextualized representations within the PLM as an information stream facilitated by the attention layers. Drawing on this idea, we devise a method to identify the toxification direction from the normal generation process to the one prompted with the negative prefix, and then steer the generation to the reversed direction by manipulating the information movement within the attention layers. Experimental results show that our approach, without any fine-tuning or extra components, can achieve comparable performance with state-of-the-art methods. 1 1 Code is available at https://github.com/ cooperleong00/ToxificationReversal Toxic Non-Toxic Context Embeddings Toxification Process Generation Space MHSA MHSA MHSA MHSA MHSA MHSA Toxification Direction Toxification Reversal Direction

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 26 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Plug and Play Language Models: A Simple Approach to Controlled Text Generation 引用了 The Curious Case of Neural Text Degeneration
  • Fundamental Limitations of Alignment in Large Language Models 引用了 Training language models to follow instructions with human feedback
  • Steering When Necessary: Flexible Steering Large Language Models with Backtracking 引用了 In-context Vectors: Making In Context Learning More Effective and Controllable Through Latent Space Steering
  • Steering When Necessary: Flexible Steering Large Language Models with Backtracking 引用了 Finetuned Language Models are Zero-Shot Learners
  • Detoxifying Large Language Models via Autoregressive Reward Guided Representation Editing 引用了 Plug and Play Language Models: A Simple Approach to Controlled Text Generation
  • Detoxifying Large Language Models via Autoregressive Reward Guided Representation Editing 引用了 In-context Vectors: Making In Context Learning More Effective and Controllable Through Latent Space Steering
  • Detoxifying Large Language Models via Autoregressive Reward Guided Representation Editing 引用了 Training language models to follow instructions with human feedback
  • Spherical Steering: Geometry-Aware Activation Rotation for Language Models 引用了 Steering When Necessary: Flexible Steering Large Language Models with Backtracking
  • Spherical Steering: Geometry-Aware Activation Rotation for Language Models 引用了 In-context Vectors: Making In Context Learning More Effective and Controllable Through Latent Space Steering
  • Spherical Steering: Geometry-Aware Activation Rotation for Language Models 引用了 Finetuned Language Models are Zero-Shot Learners
  • Finetuned Language Models are Zero-Shot Learners 引用了 Training language models to follow instructions with human feedback
  • Training language models to follow instructions with human feedback 引用了 Finetuned Language Models are Zero-Shot Learners
  • Training language models to follow instructions with human feedback 引用了 Plug and Play Language Models: A Simple Approach to Controlled Text Generation
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper26

  1. In-context Vectors: Making In Context Learning More Effective and Controllable Through Latent Space SteeringSheng Liu, Haotian Ye, Lei Xing, James Y. ZouICML 2024 · 244 次引用
  2. Fundamental Limitations of Alignment in Large Language ModelsYotam Wolf, Noam Wies, Oshri Avnery, Yoav Levine 等ICML 2024 · 186 次引用
  3. Detoxifying Large Language Models via Autoregressive Reward Guided Representation EditingYisong Xiao, Aishan Liu, Siyuan Liang, Zonghao Ying 等NeurIPS 2025 · 12 次引用
  4. Spherical Steering: Geometry-Aware Activation Rotation for Language ModelsZejia You, Chunyuan Deng, Hanjie ChenICML 2026 · 12 次引用
  5. Steering When Necessary: Flexible Steering Large Language Models with BacktrackingZifeng Cheng, Jinwei Gan, Zhiwei Jiang, Cong Wang 等NeurIPS 2025 · 9 次引用

它引用的 Paper18

  1. Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida 等NeurIPS 2022 · 24,707 次引用
  2. Finetuned Language Models are Zero-Shot LearnersJason Wei, Maarten Bosma, Vincent Y. Zhao, Kelvin Guu 等ICLR 2022 · 4,966 次引用
  3. The Curious Case of Neural Text DegenerationAri Holtzman, Jan Buys, Li Du, Maxwell Forbes 等ICLR 2020 · 4,112 次引用
  4. Plug and Play Language Models: A Simple Approach to Controlled Text GenerationSumanth Dathathri, Andrea Madotto, Janice Lan, Jane Hung 等ICLR 2020 · 1,166 次引用
  5. Fine-Tuning can Distort Pretrained Features and Underperform Out-of-DistributionAnanya Kumar, Aditi Raghunathan, Robbie Matthew Jones, Tengyu Ma 等ICLR 2022 · 911 次引用

相关 Paper

  1. Leashing the Inner Demons: Self-Detoxification for Language ModelsCanwen Xu, Zexue He, Zhankui He, Julian J. McAuleyAAAI 2022 · 30 次引用
  2. Language Model Detoxification in Dialogue with Contextualized Stance ControlJing Qian, Xifeng YanEMNLP Findings 2022
  3. DSCD: Large Language Model Detoxification with Self-Constrained DecodingMing Dong, Jinkui Zhang, Bolong Zheng, Xinhui Tu 等EMNLP 2025 · 1 次引用
  4. Large Language Models can Become Strong Self-DetoxifiersChing-Yun Ko, Pin-Yu Chen, Payel Das, Youssef Mroueh 等ICLR 2025
  5. Detoxification for LLM: From Dataset ItselfWei Shao, Yihang Wang, Gao yu Zhu, Ziqiang Cheng 等ACL 2026
黄昏的海面,两侧是细线勾勒的悬崖