Breaking m Bad ! Supervised Fine-tuning for Cross-Lingual Detoxification WARNING: The content contains model outputs that are offensive and toxic.

Himanshu Beniwal, Youngwoo Kim, Maarten Sap, Soham Dan *, Thomas Hartvigsen * · 2025

Read Breaking m Bad ! Supervised Fine-tuning for Cross-Lingual Detoxification WARNING: The content contains model outputs that are offensive and toxic. by Himanshu Beniwal, Youngwoo Kim, Maarten Sap, Soham Dan *, Thomas Hartvigsen * (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2505-16722.txt.

Introduction

Himanshu Beniwal and co-authors ask whether the ability to clean up toxic text can cross languages, in a 2025 paper. A model taught to rewrite abusive English might protect users of low-resource languages too, if the skill transfers across scripts and tongues. Their study, playfully named after a television show, tests that transfer at scale.

Across 392 experimental settings, they measured how well detoxification learned in one language reduced toxicity in others, especially where training data was scarce. They also tracked the side effects on ordinary tasks, since scrubbing toxicity can damage a model's knowledge. The picture is a trade-off: transfer works, but safety gains must be weighed against what the model forgets. The code and dataset are public for follow-up work.

Catalog record

CREATORHimanshu Beniwal, Youngwoo Kim, Maarten Sap, Soham Dan *, Thomas Hartvigsen *
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE46 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2505-16722

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Breaking m Bad ! Supervised Fine-tuning for Cross-Lingual Detoxification WARNING: The content contains model outputs that are offensive and toxic. Himanshu Beniwal, Youngwoo Kim, Maarten Sap, Soham Dan *, Thomas Hartvigsen * Abstract As large language models (LLMs) become increasingly prevalent in global applications, ensuring that they are toxicity-free across diverse linguistic contexts remains a critical challenge. We explore “ Cross-lingual Detoxification ’’, a cross-lingual paradigm that mitigates toxicity, enabling detoxification capabilities to transfer between high and low-resource languages across different script families. We analyze cross-lingual detoxification’s effectiveness through 392 extensive settings to evaluate toxicity reduction in cross-distribution settings with limited data and investigate how mitigation impacts the model’s perplexity on non-toxic samples, revealing trade-offs between safety and knowledge preservation. Our code and dataset are publicly available. 1 1 1 https://github.com/himanshubeniwal/Breaking-mBad † † footnotetext: * These authors jointly supervised this work. 1 Introduction The global deployment of multilingual large language models (m-LLMs) has revolutionized cross-lingual natural language processing, enabling translation, comprehension, and generation capabilities across diverse languages ( Weidinger et al., 2021 ; Üstün et al., 2024 ; Morris et al., 2020 ; Khondaker et al., 2024 ; Costa-jussà et al., 2024 ) . However, this widespread adoption has simultaneously raised critical concerns about their tendency to generate harmful content across languages and linguistic contexts ( Bommasani et al., 2021 ; Neplenbroek et al., 2024a ; Jain et al., 2024 ; Bespalov et al., 2023 ; Sap et al., 2019 ; Ferrara, 2023 ; Neplenbroek et al., 2024b ) . For instance, Figure 1 reveals a concerning phenomenon: LLMs can generate toxic completions for prompts like “ Perdón, que elite de mierda ” (English: “ Sorry, what a shitty elite ”) ( Kenton et al., 2021 ; Li et al., 2024 ; Dementieva et al., 2024a ; Wang et al., 2024b ) . However, our work shows that if we detox the model in one language, the detoxification can be observed in another language (Spanish \rightarrow German). There are several challenges hindering multilingual detoxification, which presents complexities beyond monolingual approaches due to varying toxic expressions across languages, different syntactic structures, and data scarcity in low-resource languages ( Kirk et al., 2021 ; Beniwal et al., 2024 ; Xu et al., 2023 ; Dementieva et al., 2025b ; Villate-Castillo et al., 2024 ) . We investigate Cross-Lingual Detoxification ( X-DET ), a methodology to detoxify language models in a source language and to evaluate transfer effects across seven target languages. We utilize parallel toxic-neutral pairs to perform the detoxification. We showcase this technique that performs efficiently in cross-lingual settings. Our analysis encompasses 392 experimental configurations, comprising 7 languages (49 language pairs), 4 learning strategies, and 4 mLLMs (details in Section A.2 ). Key Findings : Our findings show that: (1) linguistic properties such as morphological complexity and syntactic structures may influence this cross-lingual toxicity transfer in languages with similar scripts and proportions, Figure 1 : An overview of Cross-lingual Detoxification. (Top) An example where model generates a toxic sentence, and (Bottom) shows the detoxification in German yields neutral generations. Takeaway : Detoxification works effectively in a cross-lingual setting . (2) Models like aya-expanse-8b ( Dang et al., 2024 ) and bloom-7b ( Scao et al., 2022 ) , trained on English instances (High-resource language), show poor generalization to structurally different languages such as Chinese and Hindi (Figure 2 ). Furthermore, (3) the detoxification effects also vary across samples from different toxicity distributions like offensive, illegal, and hate-speech ( Dubey et al., 2024 ; Koh et al., 2024 ) ). Contributions : We highlight the contributions as: • Our experiments across 392 configurations show that cross-lingual detoxification significantly outperforms multilingual and proportional fine-tuning approaches. • Cross-distribution detoxification proves effective even with limited parallel data (10%, 20%, and 30% of the entire data), achieving effective detoxification without requiring extensive datasets in similar scripts and pretraining language proportion. • Our empirical analysis reveals consistent detoxification patterns across linguistic families. Indo-European languages demonstrate more substantial detoxification transfer than Non-Indo-European languages, suggesting script similarity influences the cross-lingual transfer effectiveness . 2 Related Work Early work on identifying and mitigating toxicity in language models focused primarily on English ( Gehman et al., 2020 ; Xu et al., 2021 ; Leong et al., 2023 ; Lee et al., 2024 ) . Initial approaches employed supervised fine-tuning with annotated datasets and keyword-based filtering ( Pozzobon et al., 2024 ; Dementieva et al., 2025b ) , which often degraded model fluency. While subsequent research introduced preference optimization techniques to align models with safety principles ( Li et al., 2024 ) , these studies predominantly target high-resource languages, assuming universal transferability of toxicity pattern ( Moskovskiy et al., 2022 ; Mukherjee et al., 2023 ; Wang et al., 2024a ; Jain et al., 2024 ; Jiang & Zubiaga, 2024 ) . Research has revealed that toxicity is language-conditioned, differently across linguistic and cultural contexts ( Moskovskiy et al., 2022 ; Li et al., 2024 ; de Wynter et al., 2024 ) . Recent work like MinTox ( Costa-jussà et al., 2024 ) has reduced toxicity by 25-95% across 100+ languages, while retrieval-augmented methods ( Pozzobon et al., 2024 ) outperform fine-tuning approaches in mid-resource languages by leveraging external knowledge. However, models like mT5 continue to struggle with cross-lingual detoxification without direct fine-tuning in each target language ( Moskovskiy et al., 2022 ) . Lastly, Wang et al. (2024a) counts sheer refusal as successful detoxification. While many works like GeDi ( Krause et al., 2021 ) , PPLM ( Dathathri et al., ) , and DExperts ( Liu et al., 2021 ) have shown on-the-fly detoxification. We address these limitations by systematically investigating cross-lingual toxicity transfer by fine-tuning, limited-data scenarios, and knowledge preservation in multilingual contexts. am ar de en es hi ru AVG ZS 19.11 20.3 30.34 22.38 27.73 19.07 22.44 23.05 ar 2.35 1.71 -1.3 6.97 8.99 2.99 -5.36 2.34 de 7.4 2.74 12.84 8.36 17.19 5.29 11.35 9.31 en -2.25 -2.41 1.77 -1.41 3.32 0.08 -12.87 -1.97 es 10.83 7.12 16.82 8.39 16.17 5.66 7.85 10.41 hi 0.51 -8.29 -16.93 -8.11 -6.83 -12.69 -14.64 -9.57 ru 3.67 -1.89 -1.19 0.38 0.78 -0.92 2.36 0.46 zh -2 -8.08 -14.65 -4.97 -1.11 -11.31 -15.33 -8.21 X - FT ( \Delta ) AVG 2.93 -1.30 -0.38 1.37 5.50 -1.56 -3.81 Table 1 : Actual toxicity scores for Zero-Shot ( ZS ) vs \Delta -toxicity scores for Cross-lingual Fine-Tuning ( X - FT ) for aya-expanse-8B over the toxic-train evaluation set. Note that we illustrate the \Delta (change) values between the ZS and X - FT for clear understanding; thus, the higher score yields better detoxification. Rows represent the languages the model is trained on, while column denotes the evaluation languages. Takeaway : “es” and “de” demonstrate significant detoxification efficacy compared to languages utilizing distinct scripts and proportion of languages . Figure 2 : Toxicity scores for Zero-Shot ( ZS ), Percent-based Fine-Tuning ( P - FT ) (10%, 20%, and 30%), Multilingual Fine-Tuning ( M - FT or 100%) for aya-23-8B over the toxic-train , toxic-test , and neutral-test evaluation set. Takeaway : Indo-European languages tend to show higher toxicity mitigation than Non-Indo-European langauges . 3 Experiments Problem Setting Let \mathcal{L} be

Read the complete text