Towards A Friendly Online Community: An Unsupervised Style Transfer Framework for Profanity Redaction (2020)

Abstract: Offensive and abusive language is a pressing problem on social media platforms. In this work, we propose a method for transforming offensive comments, statements containing profanity or offensive language, into non-offensive ones. We design a Retrieve, Generate and Edit unsupervised style transfer pipeline to redact the offensive comments in a word-restricted manner while maintaining a high level of fluency and preserving the content of the original text. We extensively evaluate our method’s performance and compare it to previous style transfer models using both automatic metrics and human evaluations. Experimental results show that our method outperforms other models on human evaluations and is the only approach that consistently performs well on all automatic evaluation metrics.

## introduction despite the undeniably positive impact social media has on facilitating communication, it is also a medium that can be used for abusive behavior. many social media platforms do not restrict the language users use, leading to an overflow of strong language that might not be appropriate for children @xcite . verbal abuse and cyber-bullying is also a common problem on social media. such phenomena are harmful to the victims, the online community, and in particular adolescents who are more susceptible and vulnerable in such situations @xcite . to mitigate such problems, recent studies have focused on developing machine learning models for detecting hate speech @xcite @xcite @xcite @xcite . however, little progress has been made regarding the task of transforming hateful sentences into non-hateful ones, a potential next-step after detecting the hateful content. dos @xcite propose an extension of a basic encoderdecoder architecture by including a collaborative classifier. to the best of our knowledge, this is the only approach dealing with abusive language redaction. unsupervised text style transfer is an important area in text generation that has recently received a lot of attention. generally speaking, text style transfer is the task of rewriting sentences in a source style to a target style while preserving the original sentences as much as possible. in the context of the paper, we define a corpus to be stylistic if every sample in the corpus shares a common style. most style transfer approaches are developed and validated on bi-stylistic datasets @xcite @xcite @xcite @xcite , which require stylistic features on both source and target samples. some common bi-stylistic datasets for text style transfer are the (negative-positive) yelp restaurant reviews @xcite & amazon product reviews @xcite , (democratic-republican) political slant @xcite , (male-female) gender @xcite and (factual-romantic-humorous) caption @xcite . models training on these datasets are not normally suitable for being trained and validated on uni-stylistic datasets, where only the source or the target set is stylistic (e.g., offensive to normal text). recently, @xcite introduce a uni-stylistic politeness dataset along with a tag-andgenerate approach, in which a generator model learns style phrases from the target samples to fill in tagged positions (cannot be generalized to our case where the target sentences are not stylistic). in this work, we propose a novel retrieve, generate and edit framework to solve the task of transferring offensive sentences into non-offensive ones. for validation, we use three criteria for assessing the performance of our model, namely, content preservation, style transfer accuracy and fluency. we perform an extensive comparison with prior style transfer work on both objective and subjective ratings. ## conclusion in this paper, we propose a novel retrieve, generate and edit text style transfer framework that redacts offensive comments on social media in a word-restricted manner. the experimental results on both automatic metrics and manual evaluations demonstrate the strong performance of our method over prior models for the given task. for future work, we envision the possibility of extending the framework by automatically detecting the restricted vocabulary set v r . such ability would enable the framework to be a robust style transfer method that is applicable to both uni-stylistic and bi-stylistic datasets. model generated output original reap what you sow a*s clowns. dls except what you believe us. mlm this is what you sow and amazing amazing. r+g+s reap what you sow clowns. r+g+e+s reap what you sow. original the benghazi b*tch is going down. dls the president cruz is going down. mlm the benghazi wall is going down. r+g+s the benghazi is down going down. r+g+e+s the benghazi girl is going down. original put your head back up your a*s and stfu. dls put your head back up your own and then. mlm stuff your smart back up your a*s and amazing great. r+g+s put your head back up your back, and stfu. r+g+e+s stfu and put your head back up. original the w*ore of babylon speaks. dls the state of least run. mlm the house of babylon speaks. r+g+s babylon speaks the woman of babylon speaks. r+g+e+s the babylon speaks of it. original you obviously talking through your b*tt because you lack all sense of having a brain. dls you obviously talking on your own words because you want a lot of free. mlm you keep talking through your teeth because you lost all sense of having a brain. r+g+s you're obviously talking all sense having through you lack all sense of a brain. r+g+e+s you obviously lack all sense of having a brain through your mouth when talking. original no one gives a d*mn about what your platform is because it has no merit. dls no one gives a about what your country is because it is no longer. mlm no one gives a flip about what your platform is because it has no merit. r+g+s one cares about what one is doing because it has no merit. r+g+e+s no one cares about what he is doing because it has no merit for. original i have no sympathy for that b*tch and i never will. dls i have no idea for that it would never will be. mlm i have tremendous sympathy for that b*tch and i always will. r+g+s i have no sympathy for i will and never. r+g+e+s i have no sympathy for you and will never. original war is h*ll and he deserves it. dls war is cruz and he did it. mlm war is real and he knows it. r+g+s it is and he deserves it. r+g+e+s it is war and he deserves it.