atlas

Research map / Large language models / Instruction and fine-tuning

UniDetox: Universal Detoxification of Large Language Models via Dataset Distillation

ICLR 2025 · Large language models › Instruction and fine-tuning · approach: Gradient-free adaptation and merging · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes UniDetox, which distills detoxifying text from GPT-2 XL via contrastive decoding between base and toxic models, then fine-tunes diverse LLMs on that text to reduce toxicity without per-model tuning.

Problem

Existing LLM detoxification methods are model-specific, require per-model toxic models and hyperparameter tuning, and trade off toxicity against language modeling quality.

Approach

Use contrastive decoding between a base model and a toxic fine-tuned version as an efficient dataset distillation procedure to produce discrete detoxifying text; fine-tuning any LLM on this text approximates moving opposite the toxic vector, so one distilled set and one hyperparameter config transfer across models.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use contrastively distilled detoxifying text rather than GPT-2 sampled text (ablation)GPT-2 XL · ToxiGen IDTP: 0.48\textsubscript{ 0.02} -> 0.40\textsubscript{ 0.00 }Helped
Use contrastively distilled detoxifying text rather than GPT-2 sampled text (ablation)GPT-2 XL · ToxiGen OODTP: 0.35\textsubscript{ 0.03} -> 0.25\textsubscript{ 0.02 }Helped
Set plausibility constraint alpha to 0.05 rather than 0.1 (ablation)UniDetox on GPT-2 XL · ToxiGen IDTP: 0.46\textsubscript{ 0.02 } -> 0.62\textsubscript{ 0.02 }Hurt
Use learning rate 5e-5 rather than 1e-5 (ablation)UniDetox on GPT-2 XL · ToxiGen IDTP: 0.46\textsubscript{ 0.02 } -> 0.40\textsubscript{ 0.00 }Helped
Apply GPT-2-distilled text without model-specific distillation or tuningUniDetox on OPT-6.7B · ToxiGen IDTP: 0.58\textsubscript{ 0.01} -> 0.28\textsubscript{ 0.00 }Helped
Apply GPT-2-distilled text without model-specific distillation or tuningUniDetox on Falcon-7B · ToxiGen IDTP: 0.30\textsubscript{ 0.01 } -> 0.33\textsubscript{ 0.00 }Mixed
Apply GPT-2-distilled text without model-specific distillation or tuningUniDetox on LLaMA2-7B · ToxiGen IDTP: 0.45\textsubscript{ 0.03} -> 0.29\textsubscript{ 0.01 }Helped
Use the long safety prepromptGPT-2 XL · ToxiGen IDTP: 0.53\textsubscript{ 0.01} -> 0.63\textsubscript{ 0.01}Hurt
Use contrastively distilled text rather than GPT-2 sampled text (ablation)OPT-6.7B · ToxiGen IDTP: 0.61\textsubscript{ 0.01} -> 0.28\textsubscript{ 0.00 }Helped

Surprising findings

Limitations

Experimental setup

Datasets: DGHS ToxiGen MMLU

Benchmarks: ToxiGen MMLU

Metrics: Toxicity Probability Expected Maximum Toxicity perplexity Dist-1/2/3 MMLU accuracy

Baselines: Safety Preprompt GPT-2 Samples LM-Steer DExperts Task Arithmetic

Builds on: dataset distillation DExperts Task Arithmetic contrastive decoding adaptive plausibility constraint

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy