CSECU - DSG at S em E val-2021 Task 5: Leveraging Ensemble of Sequence Tagging Models for Toxic Spans Detection (2021)

Abstract: The upsurge of prolific blogging and microblogging platforms enabled the abusers to spread negativity and threats greater than ever. Detecting the toxic portions substantially aids to moderate or exclude the abusive parts for maintaining sound online platforms. This paper describes our participation in the SemEval 2021 toxic span detection task. The task requires detecting spans that convey toxic remarks from the given text. We explore an ensemble of sequence labeling models including the BiLSTM-CRF, spaCy NER model with custom toxic tags, and fine-tuned BERT model to identify the toxic spans. Finally, a majority voting ensemble method is used to determine the unified toxic spans. Experimental results depict the competitive performance of our model among the participants.

## introduction social media being a key factor in the world dynamics and toxicity in user-generated contents is a real threat. threats and hatred instigated in posts and blogs implants fear in users' minds and prevents them from sharing their creative thoughts, valuable opinions to critical information. sometimes it leads to severe mental trauma and fatalities. hence, it is a formidable task to precisely detect toxicity in comments and posts to be able to moderate those portions and provide the users a safe online platform to express themselves. toxic span detection is a process where the specific toxic segment of a text is detected instead of detecting the whole text as toxic. the goal of this task is to eradicate the vagueness that is present in simple toxic text classification models and help the moderator to precisely moderate the toxic portions instead of the whole post. to elucidate the task, two examples are presented in the first four authors have equal contributions. text#1: how fucking stupid are you? span: @xcite @xcite @xcite @xcite @xcite @xcite @xcite text#2: what a sociopathic and parasitic leader we have. span: @xcite @xcite @xcite @xcite @xcite @xcite @xcite @xcite @xcite @xcite here, the "fucking stupid" portion of text#1 is toxic and is attacking the personality of the second person, so the indices of this portion are included in the toxic span. in text#2, the "sociopathic and parasitic" fragment is used as a toxic adjective to describe the leader in that context. consequently, the indices of this fragment are incorporated in the span. we need to detect such spans accurately to remove toxicity from user content and preserve the safe and sound flow of online information. toxic content detection on online platforms is a state-of-the-art notion. numerous works have been done on the binary and multi-label classification of toxic texts. for instance, georgakopoulos et al. @xcite investigated the impact of cnn in toxic comment classification against the traditional bag-of-words approaches. a multiple word embedding-based approach was adopted by carta et al. @xcite for multi-class multi-label toxic comment classification. besides, the effectiveness of feature extraction in hate speech detection was explored by @xcite . multitude of datasets on toxic comments such as dataset based on wikipedia discussion comments @xcite , comments on online forums @xcite , and offensive language identification dataset (olid) @xcite were also introduced. however, very few works detect the precise toxic span from text contents. katsiolis et al. @xcite pervised methods to address this challenge. the unsupervised methods include the input erasure method and the lime algorithm whereas the supervised method implements sequence labeling through a bert model. the unintended bias created in publicly used toxicity detection models due to many reasons such as the influence of regional culture was investigated by borkan et al. @xcite . john et al. @xcite surveyed the impact of user embeddings, user type embeddings, user biases, or user type biases on the rnn-based moderation method. in this paper, we portray our insights acquired from experimenting on this task. we propose an approach focusing on an ensemble of sequence labeling models including the bilstm-crf, spacy ner model with custom toxic tags, and fine-tuned bert model. we procure the spans from these models through a majority voting scheme to determine the final toxic spans. the organization of this paper is as follows: we elucidate our proposed framework in section 2. section 3 encompasses the experimental details and comparative performance analysis. finally, we conclude this paper with some future notions in section 5. ## proposed framework we cast the toxic span detection as a sequence tagging task and employ an ensemble of sequence tagging models. our proposed system comprises three individual models. the framework of our system is depicted in figure 1 . the first model is a bilstm-crf model with the bio tagging scheme. the second model is a custom spacy named entity recognition (ner) model. the third model is a finetuned bert model for token classification. we leverage these three models as sequence tagging models. these models generate tags in token level for a text. subsequently, we extract span based on the toxic tags. finally, we apply a majority voting based fusion scheme on these spans and determine the final toxic spans. ## discussion to estimate the impact of individual components on the overall system's performance, we examine the performance of individual models on the test set. to do this, we make use of the test set and the findings are presented in ## conclusion and future directions in this paper, we introduced an ensemble of three distinct models to detect the toxic spans. among these models, bilstm-crf and custom spacy ner models are implemented as ner type sequence and entity tagging models whereas finetuned bert model is exploited as a token classification model. we also leveraged a majority voting strategy to overcome the limitations of individual models. our model tackles the task challenge effectively and achieved a competitive performance compared to the participants' systems.