Skip to main content
QUICK REVIEW

[Paper Review] Fighting Offensive Language on Social Media with Unsupervised Text Style Transfer

Cícero Nogueira dos Santos, Igor Melnyk|arXiv (Cornell University)|May 20, 2018
Hate Speech and Cyberbullying Detection4 citations
TL;DR

This paper proposes an unsupervised text style transfer method to convert offensive social media posts into non-offensive versions without requiring parallel training data. By combining a collaborative classifier, attention mechanism, and cycle consistency loss, the model achieves state-of-the-art performance in style transfer, outperforming prior work on two major metrics while preserving content and generating fluent, non-offensive outputs on Twitter and Reddit data.

ABSTRACT

We introduce a new approach to tackle the problem of offensive language in online social media. Our approach uses unsupervised text style transfer to translate offensive sentences into non-offensive ones. We propose a new method for training encoder-decoders using non-parallel data that combines a collaborative classifier, attention and the cycle consistency loss. Experimental results on data from Twitter and Reddit show that our method outperforms a state-of-the-art text style transfer system in two out of three quantitative metrics and produces reliable non-offensive transferred sentences.

Motivation & Objective

  • To address offensive language on social media not by filtering entire posts, but by transforming offensive content into polite, non-offensive versions that preserve original meaning.
  • To develop an unsupervised text style transfer framework that works without parallel training data, which is unavailable for offensive-to-non-offensive language translation.
  • To improve content preservation and style transfer quality in the absence of ground-truth sentence pairs, using attention and cycle consistency.
  • To introduce two benchmark datasets for offensive-to-non-offensive text style transfer based on real Twitter and Reddit data.

Proposed method

  • Uses an encoder-decoder architecture with GRU-based RNNs for encoding input sentences and decoding them in a target style (offensive to non-offensive).
  • Introduces a collaborative classifier (CNN) to provide a training signal for style transfer, replacing adversarial discriminators to stabilize training.
  • Employs an attention mechanism to align hidden states during decoding, improving content retention and fluency of generated sentences.
  • Applies a cycle consistency loss by back-translating transferred sentences to reconstruct the original, enforcing content preservation.
  • Combines cross-entropy loss for autoencoding (same-style reconstruction) with cycle consistency and classification losses to train the model end-to-end.
  • Trains the model on non-parallel corpora of offensive and non-offensive sentences from Reddit and Twitter, using only style labels as supervision.

Experimental results

Research questions

  • RQ1Can unsupervised text style transfer effectively convert offensive social media language into non-offensive, fluent, and semantically preserved versions without parallel data?
  • RQ2How does the proposed method compare to state-of-the-art unsupervised style transfer in terms of style transfer accuracy, content preservation, and fluency?
  • RQ3To what extent do attention and cycle consistency loss contribute to preserving content while transferring style?
  • RQ4What types of errors are common in the model’s outputs, and how do they affect perplexity and semantic fidelity?

Key findings

  • On the Reddit dataset, the model achieved a classification accuracy of 99.54%, content preservation of 0.933, and perplexity of 115.75, outperforming Shen et al. (2017) on content preservation and accuracy.
  • On the Twitter dataset, the model achieved 99.63% accuracy, 0.947 content preservation, and 162.75 perplexity, showing superior performance in style transfer and content retention.
  • The ablation study revealed that removing both attention and back-transfer loss reduced content preservation to 0.876 and increased perplexity to 751.56, indicating their critical role in balancing fluency and fidelity.
  • Qualitative analysis showed that the model successfully replaced offensive words with non-offensive equivalents while preserving sentence structure, unlike prior models that often altered sentence content significantly.
  • Despite high accuracy and content preservation, the model exhibited higher perplexity due to overuse of generic non-offensive words (e.g., 'big' for 'f***ing'), leading to unnatural phrasing in some cases.

Better researchstarts right now

From reading papers to final review, dramatically reduce your research time.

No credit card · Free plan available

This review was created by AI and reviewed by human editors.