Text Detoxification as Style Transfer in English and Hindi

Sourabrata Mukherjee, Akanksha Bansal, Atul Kr. Ojha, John P. McCrae, Ondřej Dušek
2/12/2024
cs.CL

No official code found. Best implementation: souro/multilingual_text_detoxification (0 stars, MIT, last commit 2024-09-27).

Abstract

This paper focuses on text detoxification, i.e., automatically converting toxic text into non-toxic text. This task contributes to safer and more respectful online communication and can be considered a Text Style Transfer (TST) task, where the text style changes while its content is preserved. We present three approaches: knowledge transfer from a similar task, multi-task learning approach, combining sequence-to-sequence modeling with various toxicity classification tasks, and delete and reconstruct approach. To support our research, we utilize a dataset provided by Dementieva et al.(2021), which contains multiple versions of detoxified texts corresponding to toxic texts. In our experiments, we selected the best variants through expert human annotators, creating a dataset where each toxic sentence is paired with a single, appropriate detoxified version. Additionally, we introduced a small Hindi parallel dataset, aligning with a part of the English dataset, suitable for evaluation purposes. Our results demonstrate that our approach effectively balances text detoxication while preserving the actual content and maintaining fluency.

View on arXivView PDF

Code Implementations(1)

MIT
00Python, Jupyter NotebookDec 7, 20232 years agoMIT

Similar Papers

Cite this paper

@article{mukherjee2024text,
  title  = {Text Detoxification as Style Transfer in English and Hindi},
  author = {Sourabrata Mukherjee and Akanksha Bansal and Atul Kr. Ojha and John P. McCrae and Ondřej Dušek},
  year   = {2024},
  eprint = {2402.07767},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2402.07767v2}
}

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/2402.07767.svg)](https://codeofpaper.com/paper/2402.07767)

Discussion