Lexicools at S em E val-2023 Task 10: Sexism Lexicon Construction via XAI (2023)

Abstract: This paper presents our work on the SemEval-2023 Task 10 Explainable Detection of Online Sexism (EDOS) using lexicon-based models. Our approach consists of three main steps: lexicon construction based on Pointwise Mutual Information (PMI) and Shapley value, lexicon augmentation using an unannotated corpus and Large Language Models (LLMs), and, lastly, lexical incorporation for Bag-of-Word (BoW) logistic regression and fine-tuning LLMs. Our results demonstrate that our Shapley approach effectively produces a high-quality lexicon. We also show that by simply counting the presence of certain words in our lexicons and comparing the count can outperform a BoW logistic regression in task B/C and fine-tuning BERT in task C. In the end, our classifier achieved F1-scores of 53.34\% and 27.31\% on the official blind test sets for tasks B and C, respectively. We, additionally, provide in-depth analysis highlighting model limitation and bias. We also present our attempts to understand the model’s behaviour based on our constructed lexicons. Our code and the resulting lexicons are open-sourced in our GitHub repository https://github.com/SirBadr/SemEval2022-Task10 .

## introduction social media has become an integral part of people's lives, providing a platform for communication, expression, and sharing of information. however, it has also become a breeding ground for toxic and dangerous behaviour, including the spread of sexist attitudes and discrimination. european institute for gender equality (2023) defines sexism as the manifestation of gender stereotypes and assumptions that rank one gender as superior to another, which can either be in the form of hostile attitudes or benevolent biases but actually harmful @xcite . studies have shown that individuals who engage in online sexist behaviour are likely to exhibit sexist attitudes in their offline lives @xcite , resulting in negative effects on society and potentially causing significant psychological harm to those who are subjected to sexist comments @xcite @xcite . despite efforts to regulate content and enforce policies against sexist behaviour, controlling and preventing such behaviour on social media platforms is still a major challenge due to the high volume and velocity of user-generated content, which is impossible for human moderators to keep up. the development of automated methods for detecting sexism on social media has become increasingly important, providing a scalable and efficient solution to this persistent problem. semeval-2023 task 10 explainable detection of online sexism (edos) represents a recent endeavour to develop automated tools to detect and explain sexism text empowering users and moderators to keep healthy and welcoming environments for everybody @xcite . the shared task consists of three hierarchical subtasks. in this paper, we describe our contribution to the edos shared task. we conducted in-depth experiments on lexicon-based models. this type of method was selected because it could provide more transparency and interpretability in how it makes decisions. unlike black-box models, which can produce accurate results, they are often difficult to understand how they arrived at those results. this explainability is crucial for improving trustability, transparency, and reducing bias @xcite , which is a key factor for successfully adopting a model in practice. to tackle the task, our strategy consists of three parts. the first part is lexicon construction, in which we experimented with two methods; using pmi and shapley. we then applied augmentation techniques to increase the lexicon vocabulary size using unannotated corpus provided by the task organizer and two generated corpus from bertweet @xcite and gpt-j @xcite . examples of our lexicon are presented in we make the following observations based on our experiments: in addition, our analysis indicates that the model may be affected by the imbalancerepresentation of each vulnerable group in the training data, such as lgbtq+, which raises concerns about potential ignorance towards those people. ## system overview in this work, our investigation is directed towards task b and c due to the relatively limited number of data available per class in these tasks. task a, on the other hand, has been approached briefly and serves as a base model for tasks b and c for our lexicon resource. ## data and evaluation methodology we only used the labelled and unlabeled corpus provided by the task organizer for all experiments. all labelled data are used to fine-tune bert for task a. for tasks b and c, the corpus is split into train, validation, and test set. we followed the best practice of data modelling; a lexicon is constructed using only train data; thresholds and other hyperparameters are selected based on validation data; and finally, evaluated on test data. we repeated the split 5 times and reported averaging macro-average f1, precision, and recall. ## analysis on model predictions in this section, we analyze the fine-tuned bert from task a and discuss its limitations and biases in the model's predictions. we also manually investigate the resulting lexicons as an explanation for the model's behaviour. please refer to appendix c for a more detailed analysis. ## conclusion in this paper, we present our experiments on lexicons for sexism classification. the sexism lexicons are constructed using pmi and shapley values which we, later, show that the shapley approach can yield higher quantitative and qualitative results compared to pmi. in the augmentation step, we investigated 3 approaches to expand the lexicon's vocabulary size including the use of an unannotated corpus, gpt-j, and bertweet. our results indicate that using fill-in-the-blank methods from bertweet is the most effective method for reducing the missing rate to 0% while also increasing f1 by 17.8% and 19.5% in tasks b and c respectively. moreover, we also show that by using only lexicons we can outperform bow logistic regression (in tasks b and c) and fine-tuned bert (in task c). the lexicons can also be effectively used as feature selection but there is no improvement when it is incorporated into the pre-trained bert. our study highlights two crucial use cases of xai techniques. the first is to identify potential limitations and biases in the model's predictions. we used adversarial examples to demonstrate that the fine-tuned bert model has limitations in handling negation. moreover, our analysis revealed that different groups of people, including women of color, asian, muslim, and lgbtq+ individuals, are associated differently with various forms of sexism. however, we found that the training data may under-represent some of these vulnerable groups, such as lgbtq+, which raises concerns about potential ignorance towards them. the second use case of xai is to identify and quantify the features that contribute most to the model's predictions and use them as a guideline for better model design. we found that urban slangs are the most significant contributor to the model's predictions, emphasizing the importance of the continuous increase in the new vocabulary and the shifts in meaning. lastly, it's important to note that the lexiconbased model we used has some limitations. our approach heavily relies on the lexicons extracted from the training data, which might pick up on dataset artifacts rather than general indicators. therefore, the findings from our analysis should be interpreted with caution and validated on other datasets to ensure their generalizability.