Elamur Research⌕
☰
home / papers / 2018 / Fighting Offensive Language on Social Media with Unsupervised Text Style Transfer

Fighting Offensive Language on Social Media with Unsupervised Text Style Transfer

Summary

This short paper reframes offensive-language moderation as text style transfer. Instead of only detecting and deleting abusive posts, it rewrites an offensive sentence into a polite one that keeps the meaning. No parallel offensive/non-offensive corpus exists, so the authors train on non-parallel data. Their model is a GRU encoder-decoder with attention. A single CNN classifier supplies the style signal and works collaboratively rather than adversarially. A cycle consistency (back-transfer) loss, together with attention, helps keep the original content.

They build two benchmarks by labeling Twitter and Reddit Politics posts (from Henderson et al.'s preprocessing) with the Davidson et al. (2017) classifier. The same classifier is later used for evaluation. Compared with the Shen et al. (2017) system, the method scores higher on style accuracy (above 99.5% on both datasets) and on content preservation. It scores worse on perplexity, partly because it often swaps many different slurs for one repeated filler word. The work matters as an early attempt to offer users softened alternatives instead of outright blocking.

Key points

  • Architecture: one GRU encoder and one GRU decoder (200 hidden units, both conditioned on a style label) plus one CNN classifier with filter widths 1–4 and 128 filters.

  • Training objective: the sum of five losses:

    • autoencoder reconstruction;
    • back-transfer reconstruction;
    • classifier loss on original data;
    • classifier loss on transferred sentences;
    • classifier loss on back-transferred sentences.
  • Datasets: sentences of 2–15 words with duplicates removed.

    • Twitter: 58,642 offensive and 1,962,224 non-offensive training sentences; dev 7,842; test 7,734.
    • Reddit: 224,319 offensive and 7,096,473 non-offensive training sentences; dev 11,883; test 30,583.
  • Results vs. Shen et al. (2017), with content preservation (CP) measured via GloVe 300-d embeddings and perplexity (PPL) from an LSTM language model trained on non-offensive sentences:

    DatasetAccuracyCPPPL
    Reddit99.54 vs 87.660.933 vs 0.894115.75 vs 93.59
    Twitter99.63 vs 95.360.947 vs 0.891162.75 vs 90.97
  • Twitter ablation: dropping both attention and back-transfer pushes accuracy to 100 but collapses CP to 0.876 and inflates PPL to 751.56.

Interesting ideas

  • I1. Collaborative instead of adversarial classifier. The classifier also learns from generated sentences, so it is trained semi-supervised, and the authors report steadier training. One classifier could cover several attributes, whereas discriminator-based setups may need one per attribute. This is attractive for multi-attribute rewriting tasks.
  • I2. Back-transfer as a substitute for missing references. Mapping the output back to the source style and scoring the reconstruction gives a training signal without parallel data. The same trick could apply to low-resource normalization or register conversion, such as surzhyk to standard Ukrainian.
  • I3. One classifier for labeling and scoring. Using the same detector both to create the corpus labels and to judge transfer accuracy avoids inconsistencies when there is no ground truth. The paper treats this as a deliberate fairness choice worth copying.
  • I4. Three-way evaluation exposes trade-offs. Style accuracy, embedding-based content preservation and perplexity are reported together. The ablation shows that copying the input or emitting one keyword can each max out a single metric, so all three should be checked.
  • I5. Honest scope limit. The authors note that this approach only handles lexical offensiveness that can be fixed by swapping a few words. It does not address implicit bias expressed with ordinary words, which is a useful caveat when planning similar moderation tools.

Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.

Fields: Machine translation · Natural language processing

Cited by

90 papers of our library cite it (of the 140673 whose bibliographies we read); 6 of them have a page here, 84 not yet.

Cite

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/p18-2031

@inproceedings{santos2018fighting,
  title = {{Fighting Offensive Language on Social Media with Unsupervised Text Style Transfer}},
  author = {Santos, Cicero Nogueira dos and Melnyk, Igor and Padhi, Inkit},
  booktitle = {Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers)},
  year = {2018},
  doi = {10.18653/v1/p18-2031},
  url = {https://doi.org/10.18653/v1/p18-2031}
}

References

22 references, 8 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

  1. Mikel Artetxe, Gorka Labaka, Eneko Agirre, and Kyunghyun Cho. 2018. Unsupervised neural machine translation. In International Conference on Learning Representations. ↗ our card
  2. D. Bahdanau, K. Cho, and Y. Bengio. 2014. Neural machine translation by jointly learning to align and translate. In Proceedings of the International Conference on Learning Representations. ↗ our card
  3. Pete Burnap and Matthew L. Williams. 2015. Cyber hate speech on twitter: An application of machine classification and statistical modeling for policy and decision making. Policy & Internet 7(2):223–242. ↗
  4. Thomas Davidson, Dana Warmsley, Michael Macy, and Ingmar Weber. 2017. Automated hate speech detection and the problem of offensive language. In Proceedings of the 11th International AAAI Conference on Web and Social Media. pages 512–515. ↗ our card
  5. Jessica Ficler and Yoav Goldberg. 2017. Controlling linguistic style aspects in neural language generation. In Workshop on Stylistic Variation. find our card
  6. A.-M. Founta, D. Chatzakou, N. Kourtellis, J. Blackburn, A. Vakali, and I. Leontiadis. 2018. A unified deep learning architecture for abuse detection. ArXiv e-prints . find
  7. Zhenxin Fu, Xiaoye Tan, Nanyun Peng, Dongyan Zhao, and Rui Yan. 2018. Style transfer in text: Exploration and evaluation. In Proceedings of AAAI. find our card
  8. Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. 2014. Generative adversarial nets. In Advances in neural information processing systems. pages 2672–2680. find
  9. Peter Henderson, Koustuv Sinha, Nicolas Angelard-Gontier, Nan Rosemary Ke, Genevieve Fried, Ryan Lowe, and Joelle Pineau. 2018. Ethical challenges in data-driven dialogue systems. In Proceedings of the AAAI/ACM conference on Artificial Intelligence, Ethics, and Society. find
  10. Zhiting Hu, Zichao Yang, Xiaodan Liang, Ruslan Salakhutdinov, and Eric P. Xing. 2017. Toward controlled generation of text. In Proceedings of the 34th International Conference on Machine Learning. pages 1587–1596. ↗ our card
  11. Irene Kwok and Yuzhou Wang. 2013. Locate the hate: Detecting tweets against blacks. In Proceedings of the Twenty-Seventh AAAI Conference on Artificial Intelligence. pages 1621–1622. find
  12. Guillaume Lample, Alexis Conneau, Ludovic Denoyer, and Marc’Aurelio Ranzato. 2018. Unsupervised machine translation using monolingual corpora only. In International Conference on Learning Representations. ↗ our card
  13. Igor Melnyk, Cicero Nogueira dos Santos, Kahini Wadhawan, Inkit Padhi, and Abhishek Kumar. 2017. Improved neural text attribute transfer with non-parallel data. In NIPS Workshop on Learning Disentangled Representations: from Perception to Control. ↗
  14. Chikashi Nobata, Joel Tetreault, Achint Thomas, Yashar Mehdad, and Yi Chang. 2016. Abusive language detection in online user content. In Proceedings of the 25th International Conference on World Wide Web. pages 145–153. find
  15. Jeffrey Pennington, Richard Socher, and Christopher D. Manning. 2014. Glove: Global vectors for word representation. In Empirical Methods in Natural Language Processing (EMNLP). pages 1532–1543. http://www.aclweb.org/anthology/D14-1162. ↗
  16. Alan Ritter, Colin Cherry, and Bill Dolan. 2010. Unsupervised modeling of twitter conversations. In The 2010 Annual Conference of the NAACL. pages 172– 180. find
  17. Iulian Vlad Serban, Chinnadhurai Sankar, Mathieu Germain, Saizheng Zhang, Zhouhan Lin, Sandeep Subramanian, Taesup Kim, Michael Pieper, Sarath Chandar, Nan Rosemary Ke, Sai Mudumba, Alexandre de Brébisson, Jose Sotelo, Dendi Suhubdy, Vincent Michalski, Alexandre Nguyen, Joelle Pineau, and Yoshua Bengio. 2017. A deep reinforcement learning chatbot. CoRR . ↗
  18. T. Shen, T. Lei, R. Barzilay, and T. Jaakkola. 2017. Style transfer from non-parallel text by cross-alignment. In Advances in Neural Information Processing Systems. ↗ our card
  19. Wenbo Wang, Lu Chen, Krishnaprasad Thirunarayan, and Amit P. Sheth. 2014. Cursing in english on twitter. In Proceedings of the 17th ACM Conference on Computer Supported Cooperative Work and Social Computing. pages 415–425. ↗
  20. William Warner and Julia Hirschberg. 2012. Detecting hate speech on the world wide web. In Proceedings of the Second Workshop on Language in Social Media. pages 19–26. find
  21. Guang Xiang, Bin Fan, Ling Wang, Jason Hong, and Carolyn Rose. 2012. Detecting offensive tweets via topical feature discovery over a large scale twitter corpus. In Proceedings of the 21st ACM International Conference on Information and Knowledge Management. pages 1980–1984. find
  22. Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A Efros. 2017. Unpaired image-to-image translation using cycle-consistent adversarial networks. arXiv preprint arXiv:1703.10593 . ↗

↑ back to top

This page in Markdown → https://md.research.elamur.ai/free/papers/santos-2018-fighting-offensive-language-social-media/