paper-with-me

홈 › Papers

Fine-Grained Detoxification via Instance-Level Prefixes for Large Language Models

2024-02-23 · Xin Yi, LinLin Wang, Xiaoling Wang, Liang He

Impressive results have been achieved in natural language processing (NLP) tasks through the training of large language models (LLMs). However, these models occasionally produce toxic content such as insults, threats, and profanity in response to certain prompts, thereby constraining their practical utility. To tackle this issue, various finetuning-based and decoding-based approaches have been utilized to mitigate toxicity. However, these methods typically necessitate additional costs such as high-quality training data or auxiliary models. In this paper, we propose fine-grained detoxification via instance-level prefixes (FGDILP) to mitigate toxic text without additional cost. Specifically, FGDILP contrasts the contextualized representation in attention space using a positive prefix-prepended prompt against multiple negative prefix-prepended prompts at the instance level. This allows for constructing fine-grained subtoxicity vectors, which enables collaborative detoxification by fusing them to correct the normal generation process when provided with a raw prompt. We validate that FGDILP enables controlled text generation with regard to toxicity at both the utterance and context levels. Our method surpasses prompt-based baselines in detoxification, although at a slight cost to generation fluency and diversity.

📄 PDF Abstract BibTeX arXiv:2402.15202

Code (1)

xinykou/FGDILP 공식 구현 pytorch

Tasks

DiversityText Generation

Similar Papers 제목 키워드 기반

Language Model Detoxification in Dialogue with Contextualized Stance Control

2023-01-25 · Jing Qian, Xifeng Yan

To reduce the toxic degeneration in a pretrained Language Model (LM), previous work on Language Model detoxification has focused on reducing the toxicity of the generation itself (self-toxicity) without consideration of …

Language ModelingLanguage ModellingResponse Generation

MolDeTox: Evaluating Language Model's Stepwise Fragment Editing for Molecular Detoxification

2026-05-12 · Jueon Park, Wonjune Jang, Jiwoo Lee, Yein Park 외 arxiv

Large Language Models (LLMs) and Vision Language Models (VLMs) have recently shown promising capabilities in various scientific domain. In particular, these advances have opened new opportunities in drug discovery, where…

Drug Discovery

Exploring Cross-lingual Text Detoxification with Large Multilingual Language Models.

2022-05-01 · ACL 2022 5 · Daniil Moskovskiy, Daryna Dementieva, Alexander Panchenko

Detoxification is a task of generating text in polite style while preserving meaning and fluency of the original toxic text. Existing detoxification methods are monolingual i.e. designed to work in one exact language. Th…

Style Transfer

Exploring Cross-lingual Textual Style Transfer with Large Multilingual Language Models

2022-06-05 · Daniil Moskovskiy, Daryna Dementieva, Alexander Panchenko

Detoxification is a task of generating text in polite style while preserving meaning and fluency of the original toxic text. Existing detoxification methods are designed to work in one exact language. This work investiga…

Style Transfer

Methods for Detoxification of Texts for the Russian Language

2021-05-19 · Daryna Dementieva, Daniil Moskovskiy, Varvara Logacheva, David Dale 외

We introduce the first study of automatic detoxification of Russian texts to combat offensive language. Such a kind of textual style transfer can be used, for instance, for processing toxic content in social media. While…

Style Transfer