Preference Tuning For Toxicity Mitigation Generalizes Across Languages

Xiaochen Li, Zheng-Xin Yong, Stephen H. Bach
6/23/2024
cs.CLcs.AIcs.CR

No official code found. Best implementation: BatsResearch/cross-lingual-detox (18 stars, BSD-3-Clause, last commit 2025-03-25).

Abstract

Detoxifying multilingual Large Language Models (LLMs) has become crucial due to their increasing global use. In this work, we explore zero-shot cross-lingual generalization of preference tuning in detoxifying LLMs. Unlike previous studies that show limited cross-lingual generalization for other safety tasks, we demonstrate that Direct Preference Optimization (DPO) training with only English data can significantly reduce toxicity in multilingual open-ended generations. For example, the probability of mGPT-1.3B generating toxic continuations drops from 46.8% to 3.9% across 17 different languages after training. Our results also extend to other multilingual LLMs, such as BLOOM, Llama3, and Aya-23. Using mechanistic interpretability tools like causal intervention and activation analysis, we identified the dual multilinguality property of MLP layers in LLMs, which explains the cross-lingual generalization of DPO. Finally, we show that bilingual sentence retrieval can predict the cross-lingual transferability of DPO preference tuning.

View on arXivView PDF

Code Implementations(1)

BSD-3-Clause

Code for "Preference Tuning For Toxicity Mitigation Generalizes Across Languages." Paper accepted at Findings of EMNLP 2024

180Python, Jupyter NotebookJun 17, 20241 years agoBSD-3-Clause
ai-safetycross-lingual-transfergeneralizationmechanistic-interpretabilitymultilingual-nlp+1 more

Similar Papers

Cite this paper

@article{li2024preference,
  title  = {Preference Tuning For Toxicity Mitigation Generalizes Across Languages},
  author = {Xiaochen Li and Zheng-Xin Yong and Stephen H. Bach},
  year   = {2024},
  eprint = {2406.16235},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2406.16235v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2406.16235.svg)](https://codeofpaper.com/paper/2406.16235)

Discussion