M ed AI at S em E val-2021 Task 5: Start-to-end Tagging Framework for Toxic Spans Detection (2021)

Abstract: This paper describes the system submitted to SemEval 2021 Task 5: Toxic Spans Detection. The task concerns evaluating systems that detect the spans that make a text toxic when detecting such spans are possible. To address the possibly multi-span detection problem, we develop a start-to-end tagging framework on top of RoBERTa based language model. Besides, we design a custom loss function that takes distance into account. In comparison to other participating teams, our system has achieved 69.03% F1 score, which is slightly lower (-1.8 and -1.73) than the top 1(70.83%) and top 2 (70.77%), respectively.

## introduction in recent years, social networks and microblogging sites' popularity have increased, attracting more users. with a huge user base, social media will continue to publish a large amount of usergenerated content. as the use of social media increased, other undesirable phenomena and behaviors emerged. social media users often abuse this freedom to spread abusive or hateful posts or comments. in many cases, the user-generated content is offensive or proactive, and users may have to deal with threats such as cyberattacks or cyberbullying, and other undesirable @xcite . therefore, the issue of detecting and possibly limiting the spread of toxic post has become increasingly important. although several toxicity or abusive language detection datasets @xcite and models @xcite @xcite have been released, most of them classify whole comments or documents, and do not identify the spans that make a text toxic. but highlighting such toxic spans can * corresponding author. assist human moderators (e.g., news portals moderators) who often deal with lengthy comments, and who prefer attribution instead of just a systemgenerated unexplained toxicity score per post. the evaluation of systems that could accurately locate toxic spans within a text is thus a crucial step towards successful semi-automated moderation. for this reason, semeval 2021 set up the task toxic spans detection to detect and extract the spans that make a text toxic, when detecting such spans is possible @xcite . to address the possibly multi-span extraction problem, we develop a start-to-end tagging framework with custom distance loss, which can tag the start and end position of a toxic span. based on this scheme, we can effectively deal with the multi-span extraction problem. the rest of the paper is organized as follows: section 2 provides system overview. section 3 describes our approach in detail. our experiment is discussed in section 4. we conclude our work in section 5. ## model description our model has two steps as follows: 1. concatenate the "negative" word at end of each post. 2. obtain the word embedding of each token in the post to form the final representation and predict the start and end probabilities for each token as output. figure 1 shows the general structure of the system. more details for the systems components are shown in the following subsections. ## conclusion and future work in this paper, we propose a start-to-end tagging framework with custom distance loss function for semeval-2021 task 5. the performance of our model which is equipped with distance loss and voting mechanism better than its variants. but the distance loss target is assigned manually, which may have low generalization ability to different data set and task. we will try to improve its performance and apply this tagging scheme to other task in future work.