Dataset Condensation Atlas

Trustworthy DD

UniDetox

UniDetox: Universal Detoxification of Large Language Models via Dataset Distillation

Huimin Lu, Masaru Isonuma, Junichiro Mori, Ichiro Sakata

ICLR 2025 · first public 2025-04-29 · arXiv 2504.20500

paper ↗code ↗notable✓ abstract read

In one paragraph

UniDetox distills a small synthetic text dataset that carries detoxifying signal, generated from one source model (GPT-2) via contrastive decoding, and fine-tunes any target LLM on it to reduce toxicity without per-model hyperparameter tuning. The paper reports that text distilled from GPT-2 successfully detoxifies larger, unrelated models (OPT, Falcon, LLaMA-2) with a single shared hyperparameter configuration, and that the distilled text also reduces politically biased content.

Where it sits

Abstract (verbatim from arXiv)

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 models or model families, and require careful hyperparameter tuning due to the trade-off between detoxification efficacy and language modeling performance. In contrast, UniDetox provides a detoxification technique that can be universally applied to a wide range of LLMs without the need for separate model-specific tuning. Specifically, we propose a novel and efficient dataset distillation technique for detoxification using contrastive decoding. This approach distills detoxifying representations in the form of synthetic text data, enabling universal detoxification of any LLM through fine-tuning with the distilled text. Our experiments demonstrate that the detoxifying text distilled from GPT-2 can effectively detoxify larger models, including OPT, Falcon, and LLaMA-2. Furthermore, UniDetox eliminates the need for separate hyperparameter tuning for each model, as a single hyperparameter configuration can be seamlessly applied across different models. Additionally, analysis of the detoxifying text reveals a reduction in politically biased content, providing insights into the attributes necessary for effective detoxification of LLMs.

BibTeX (generated; prefer the venue's official entry)
@article{lu2025unidetox,
  title   = {UniDetox: Universal Detoxification of Large Language Models via Dataset Distillation},
  author  = {Huimin Lu and Masaru Isonuma and Junichiro Mori and Ichiro Sakata},
  journal = {ICLR 2025},
  year    = {2025}
}