F i RC at S em E val-2023 Task 10: Fine-grained Classification of Online Sexism Content Using D e BERT a (2023)

Abstract: The SemEval 2023 shared task 10 “Explainable Detection of Online Sexism” focuses on detecting and identifying comments and tweets containing sexist expressions and also explaining why it is sexist. This paper describes our system that we used to participate in this shared task. Our model is an ensemble of different variants of fine tuned DeBERTa models that employs a k-fold cross-validation. We have participated in the three tasks A, B and C. Our model ranked 2 nd position in tasks A, 7 th in task B and 4 th in task C.

## introduction social media platforms have been facing an increase in the number of hate speech targeting an individual or group, most often on the ground of religion, race, sexual orientation and gender, which makes these platforms hostile and toxic. sexism is a form of discrimination that can be directed toward women. sexism identification has been gaining attention recently among nlp community, mainly through shared tasks. the exist 2021 challenge @xcite is the first shared task aimed to attract and motivate research efforts in building sexism detection models for english and spanish languages. the proposed systems in exist 2021 challenge were mainly based on transformers (monolingual or multilingual). hence, the best model in sub-task 1 (for spanish language) @xcite is obtained by applying specific pre-processing techniques and by using bert model with data augmentation. the new training data was created by translating the comments into german language and then back-translated into spanish and english. in @xcite , †. these authors contributed equally to this work the authors explore how transferred knowledge from tasks related to toxicity language may help in sexism tasks. therefore, the proposed system follows a multitask learning approach where multiple tasks related to toxic comment identification are learned in parallel while using a shared representation. the model achieves convincing performance in both subtasks, 1 st place in sub-task 1 english and 2 nd place in sub-task 2 spanish. the second edition of exist was organized in 2022 @xcite . similar to the first edition, exist 2022 focused on "sexism identification and sexism categorization", both in spanish and english. exist 2021 data sets are used as training data and a new data set consisting of 1058 tweets is used as a test set. unsurprisingly, all participating teams used some sort of transformer architecture : bert @xcite , roberta @xcite , deberta @xcite and beto * @xcite . @xcite obtained powerful models for both tasks using different transformerbased language models with roberta-large, bertweet-large @xcite and de-berta v3-large for english and robertuito ** @xcite for spanish. the training was done in three steps. first, the hyper-parameters were optimized for every single model. second, these optimized hyper-parameters were used to train models with more data. thirdly, a simple ensembling strategy for combining models is applied. in @xcite , 20 models are trained, 10 robertuito and 10 bert models. each one of them is trained individually using different seeds. finally, voting strategy is used to perform the final decision. deberta encoder [cls] as roosh said having discussions with woman is a waste of time anyway [sep] embeddings encoder layer classification head not c1.1 c4.2 c1.2 c2.1 c2.2 c2.3 c3.1 c3.2 c3.3 c3.4 c4.1 encoder layer encoder layer .... .... average pooling the current task, semeval 2023 task 10 (kirk et al., 2023), focuses on developing englishlanguage models for sexism detection that are more accurate as well as explainable, with finegrained classifications for sexist content from gab and reddit. the organizers propose three hierarchical subtasks : -task a (binary sexism detection) : the post should be classified as sexist or not sexist. -task b (category of sexism) : the aim is to assign one of four sub-categories to the post that has been identified as sexist. -task c (fine-grained vector of sexism) : the aim is to assign one of 11 subcategories to the post that has been identified as sexist. in the rest of the paper is organized as follows : section 2 describes our proposed system. the experimental setup is described in section 3, including the description of the data. results and their analysis are given in section 4. finally, a conclu-sion is given with a discussion of future work in section 5. ## system description one of the main challenges in this work was to apply a state-of-the-art model to a small dataset without getting an over-fitted model. first, we used deberta (decoding-enhanced bert with disentangled attention) model. deberta was proposed by @xcite , and it improves upon the bert and roberta models using two novel techniques. the first technique is the disentangled attention mechanism, where each word is represented by two vectors that encode its semantic and positional information, respectively, and the attention scores among words are computed by using separate matrices for their semantic and relative positional features. the second technique is the enhanced mask decoder, which incorporates absolute positional embeddings in the decoding layer to predict the masked tokens during model pre-training. to overcome the data scarcity problem. we addressed this issue by using k-fold cross-validation. we divided the train data into k different subsets. therefore, k deberta models were individually fine-tuned using nine subsets and one subset was reserved for validation. the final system was a combination of 10 models. to aggregate the output of the ten models, we used a soft voting approach all women benefit from the actions of violent men. c4 prejudiced discussions c4.1 supporting mistreatment of individual women one thing i learned is to tell the judge she stayed the night. no woman who was raped would willing stay in a bed with a rapist c4.2 supporting systemic discrimination against women as a group there is no way to do so without enslaving yourself to a woman and the state. the proposed system serves multiple purposes and can be applied to all three tasks. firstly, in task a, the system functions as a one-vs-all solution, distinguishing the negative class "not sexist" from the positive class "sexist", which could be any of the 11 sexist classes. secondly, in task c, the proposed system can be utilized as a standalone model capable of predicting both the negative and positive classes or as a secondary system by suppressing the score of the negative class, thereby applying it exclusively to positive samples extracted by another binary classifier. lastly, the proposed system can tackle task b in the same manner as task c, but an additional post-processing step is necessary to deduce one of the four sexist classes from the 11 fine-grained sexist classes. not sexist sexist class 0 2000 4000 6000 8000 10000 # samples sexist label usage train dev test 3 experimental setup 3.1 data we had two approaches for our system in this competition. the first one was a top-down approach, where we would build a system consisting of three sub-models : 1) task a model, a binary classifier to detect sexist samples, 2) task b model, a multi-class classifier to assign one of four categories to the extracted sexist samples, and 3) a multi-class classifier to assign one of 11 subcategories to the extracted sexist samples. the second one was a bottom-up approach, where we would build a single model that could predict all 12 classes, including the 'not sexist' class. in this approach, we aimed to solve all three tasks simultaneously using a single model. we used the second approach, which is less complex than the first option and to avoid error propagation among the models. the architecture of our system is illustrated in figure 1 . it consists of a pre-trained deberta model and a multi-class classification head. the output of the deberta model is passed to an average pooling layer that aggregates all the generated embedding for each token and computes their mean to obtain a single vector representation. the vector obtained from the average pooling layer is fed into the classification head, where a softmax layer is applied to produce the predicted class probabilities. finally, the predicted class is determined by selecting the class with the highest probability. the organizers of se-meval 2023 task 10 (kirk et al., 2023) provided two types of data : labeled and unlabeled data. our models were trained solely on the labeled data, which was available only in english. due to time constraints, we were unable to explore the potential of the unlabeled data. the training data for task a consists of 14k samples, the development set is 2k samples and the test set is 4k samples as shown in figure 2 . for this task, the "sexist" label count is 3398 samples (i.e. 24.27%) and the "not sexist" label count is 10602 samples (i.e. 75.72%). this shows that the class distribution is imbalanced, which can impact the model performance trained on this data as it may be biased towards the "not sexist" class and have lower accuracy on the "sexist" class. we had the same observation looking into task b and c training data. c1 c2 c3 c4 class 0 200 400 600 800 1000 1200 1400 1600 # samples category label usage train dev test figure 4 -task c data sets c1.1 c1.2 c2.1 c2.2 c2.3 c3.1 c3.2 c3.3 c3.4 c4.1 c4.2 class 0 100 200 300 400 500 600 700 # samples vector label usage train dev test since the training data of tasks b and c (see figure 3 and figure 4 ) is much less as they concern only the positive samples labeled "sexist" (i.e. 3398 samples), we decided to use the whole data including task a data to train a multi-task model. this model was trained on the whole 14k labeled samples for task c (including non-sexist samples). task b result was extracted from task c results. task b labels were not used for training but only during the extraction of task b categories from task c vectors. ## results and analysis we initiated our model development process with the creation of a strong baseline model that served as a benchmark for evaluating the performance of our subsequent models. tables 3 , 4 , and 5 present the results of our developed models compared to the baseline for tasks a, b, and c, respectively. precision, recall, and f1-score were used to evaluate the models' performance on both the dev and test sets, with f1-score serving as the official evaluation metric for the shared task. our submitted model achieved an f1-score of 87.4%, 70.58%, and 54.04% on the test sets for tasks a, b, and c, respectively. in the subsequent sections, we delve into the various experiments we conducted to select the optimal pre-trained model or improve the model's performance on the target task. we experiment using monolingual and multilingual pre-trained models. as all tasks contained only english language data, monolingual pretrained models consistently outperformed crosslingual models. additionally, deberta demonstrated the best performance for all tasks vs. other transformer models like bert/roberta-large. ## conclusion in this paper, we described our system for se-meval 2023 shared task 10, "explainable detection of online sexism", which ranked 2 nd , 7 th and 4 th in task a, b and c, respectively. our system is an ensemble of different variations of fine-tuned deberta models that employs the k-fold crossvalidation. since this task supports the development of english-language models for sexism detection, we showed that the choice of the monolingual pretrained model has better performance than the multi-lingual pre-trained model. we also showed that the k-fold cross-validation allowed our model to get the best from the training data, especially for classes with a low number of training samples. we also presented the impact of the size of the pretrained model. we think that all these techniques made our model more robust and well generalized with the good results on the test set that our system achieved. for future work, we would improve our model by using monolingual data and data augmentation techniques to overcome the limited training data for some classes.