LISAC FSDM USMBA at S em E val-2021 Task 5: Tackling Toxic Spans Detection Challenge with Supervised S pan BERT -based Model and Unsupervised LIME -based Model (2021)

Abstract: Toxic spans detection is an emerging challenge that aims to find toxic spans within a toxic text. In this paper, we describe our solutions to tackle toxic spans detection. The first solution, which follows a supervised approach, is based on SpanBERT model. This latter is intended to better embed and predict spans of text. The second solution, which adopts an unsupervised approach, combines linear support vector machine with the Local Interpretable Model-Agnostic Explanations (LIME). This last is used to interpret predictions of learning-based models. Our supervised model outperformed the unsupervised model and achieved the f-score of 67,84% (ranked 22/85) in Task 5 at SemEval-2021: Toxic Spans Detection.

## introduction by dint of the massive production of user-generated content in social media, moderation becomes crucial to promote healthy online discussions by removing toxic posts and contents. however, it is nearly impossible for a human to keep tracking user-generated content. thus, the need for the right tools and technologies to help in such a task becomes a necessity. the toxic spans detection task aims to detect the spans that make a text toxic. while several toxicity detection datasets @xcite and models @xcite @xcite @xcite have been released. however, these works estimate the likelihood of a document being toxic with weak interpretability. in fact, highlighting toxic spans can assist human moderators who often deal with lengthy comments, and who prefer attribution instead of just a system-generated unexplained toxicity score per post. ## methods in this section, we describe the proposed solutions including spanbert-based method which is based on supervised approach, and svm and lime-based method that is based on unsupervised approach. ## experimental results we experimented our models on the semeval 2021 task 5: toxic spans detection dataset. the training set and test set contain 7939 and 2000 toxic comments labeled with their toxic spans. all our experiments have been conducted in google colab environment foot_1 , the following libraries: hugging face foot_2 , lime foot_3 , scikit-learn foot_4 , and pytorch foot_5 were used to train and to asses the performance of our models. ## conclusion in this paper, we described our models for tackling semeval 2021 task 5: toxic spans detection. two approaches have been employed. a supervised approach based on transformers technique, where toxic sequences are tokenized and embedded using pre-trained models. we optimize the likelihood of a token to be toxic by minimizing the cross-entropy loss. spanbert scored the best results by achieving about 0.6783 f1 score. an unsupervised approach based on shallow machine learning and lime, which is an explanation technique that explains the prediction of any classifier in an interpretable and faithful manner. since the top-ranked score was about 0.7083 f1 score, future studies and works will focus on improving the performance of toxic spans detection task.