Reflect, Reason, Rephrase (R³-Detox): An In-Context Learning Approach to Text Detoxification

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

1 Downloads (Pure)

Abstract

Traditional content moderation, while effective in reducing toxicity through content removal or censoring, can discourage user participation by making them feel restricted or unfairly targeted, especially in nuanced discussions. Text detoxification offers a more constructive alternative by rephrasing offensive language into respectful forms. We propose R3-Detox, a Reflect-Reason-Rephrase framework that structures detoxification into three steps within a single prompt. The model identifies potentially toxic elements guided by Shapley values to reduce fabricated predictions, evaluates overall toxicity, and then revises the text to eliminate toxicity while retaining meaning. We augment three offensive text paraphrasing datasets (ParaDetox, Parallel Detoxification, APPDIA) with explicit detoxification reasoning. Evaluated with in-context learning, R3-Detox outperforms state-of-the-art methods, including instruction following models.

Original languageEnglish
Title of host publicationBDCAT 2025 - IEEE/ACM International Conference on Big Data Computing, Applications and Technologies, Co Located Conference UCC 2025
PublisherAssociation for Computing Machinery, Inc
ISBN (Electronic)9798400722868
DOIs
Publication statusPublished - 24 Dec 2025
Event12th IEEE/ACM International Conference on Big Data Computing, Applications and Technologies, BDCAT 2025 - Nantes, France
Duration: 1 Dec 20254 Dec 2025

Publication series

NameBDCAT 2025 - IEEE/ACM International Conference on Big Data Computing, Applications and Technologies, Co Located Conference UCC 2025

Conference

Conference12th IEEE/ACM International Conference on Big Data Computing, Applications and Technologies, BDCAT 2025
Country/TerritoryFrance
CityNantes
Period1/12/254/12/25

Keywords

  • LLM
  • Reasoning
  • Self-Reflection
  • Text Detoxification

Fingerprint

Dive into the research topics of 'Reflect, Reason, Rephrase (R³-Detox): An In-Context Learning Approach to Text Detoxification'. Together they form a unique fingerprint.

Cite this