paper-with-me

홈 › Papers

Parameter-Efficient Detoxification with Contrastive Decoding

2024-01-13 · Tong Niu, Caiming Xiong, Semih Yavuz, Yingbo Zhou

The field of natural language generation has witnessed significant advancements in recent years, including the development of controllable text generation techniques. However, controlling the attributes of the generated text remains a challenge, especially when aiming to avoid undesirable behavior such as toxicity. In this work, we introduce Detoxification Generator (DETOXIGEN), an inference-time algorithm that steers the generation away from unwanted styles. DETOXIGEN is an ensemble of a pre-trained language model (generator) and a detoxifier. The detoxifier is trained intentionally on the toxic data representative of the undesirable attribute, encouraging it to generate text in that style exclusively. During the actual generation, we use the trained detoxifier to produce undesirable tokens for the generator to contrast against at each decoding step. This approach directly informs the generator to avoid generating tokens that the detoxifier considers highly likely. We evaluate DETOXIGEN on the commonly used REALTOXICITYPROMPTS benchmark (Gehman et al., 2020) with various language models as generators. We find that it significantly outperforms previous approaches in detoxification metrics while not compromising on the generation quality. Moreover, the detoxifier is obtained by soft prompt-tuning using the same backbone language model as the generator. Hence, DETOXIGEN requires only a tiny amount of extra weights from the virtual tokens of the detoxifier to be loaded into GPU memory while decoding, making it a promising lightweight, practical, and parameter-efficient detoxification strategy.

📄 PDF Abstract BibTeX arXiv:2401.06947

Code (0)

등록된 구현이 없습니다.

Tasks

AttributeGPULanguage ModelingLanguage ModellingText Generation

Similar Papers 제목 키워드 기반

UniDetox: Universal Detoxification of Large Language Models via Dataset Distillation

2025-04-29 · Huimin Lu, Masaru Isonuma, Junichiro Mori, Ichiro Sakata

We present UniDetox, a universally applicable method designed to mitigate toxicity across various large language models (LLMs). Previous detoxification methods are typically model-specific, addressing only individual mod…

Dataset DistillationLanguage ModelingLanguage Modelling

DSCD: Large Language Model Detoxification with Self-Constrained Decoding

2025-10-15 · Ming Dong, Jinkui Zhang, Bolong Zheng, Xinhui Tu 외 arxiv

Detoxification in large language models (LLMs) remains a significant research challenge. Existing decoding detoxification methods are all based on external constraints, which require additional resource overhead and lose…

Detoxification for LLM: From Dataset Itself

2026-04-21 · Wei Shao, Yihang Wang, Gaoyu Zhu, Ziqiang Cheng 외 arxiv

Existing detoxification methods for large language models mainly focus on post-training stage or inference time, while few tackle the source of toxicity, namely, the dataset itself. Such training-based or controllable de…

CMD: a framework for Context-aware Model self-Detoxification

2023-08-16 · Zecheng Tang, Keyan Zhou, Juntao Li, Yuyang Ding 외

Text detoxification aims to minimize the risk of language models producing toxic content. Existing detoxification methods of directly constraining the model output or further training the model on the non-toxic corpus fa…

Language ModelingLanguage Modelling

Cleansing the Artificial Mind: A Self-Reflective Detoxification Framework for Large Language Models

2026-01-16 · Kaituo Zhang, Zhimeng Jiang, Na Zou arxiv

Recent breakthroughs in Large Language Models (LLMs) have revealed remarkable generative capabilities and emerging self-regulatory mechanisms, including self-correction and self-rewarding. However, current detoxification…

Text Generation