Reproduce “DetoxLLM: A Framework for Detoxification with Explanations” on OpenResearch

Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Md Tawkat Islam Khondaker, Muhammad Abdul-Mageed, Laks V. S. Lakshmanan

A comprehensive DetoxLLM framework offers end-to-end text detoxification, including explanations for toxicity and handling of non-detoxifiable content, achieving superior cross-platform performance over prior models by utilizing a large, synthetically generated pseudo-parallel corpus.

Key insights

  • Explicitly modeling the reasoning behind toxicity through Chain-of-Thought (CoT-expl) fine-tuning improves detoxification performance, particularly for LLMs like LLaMA.
  • General instruction-tuned LLMs often refuse to detoxify toxic inputs, highlighting the need for specialized fine-tuning for this task.
  • High-quality synthetic data generated by LLMs can effectively train robust detoxification models, performing comparably or superior to models trained on human-annotated data, especially for cross-platform generalization.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.