JUAGE at SemEval-2023 Task 10: Parameter Efficient Classification
Year: 2023

Abstract:
Using pre-trained language models to implement classifiers from small to modest amounts of training data is an area of active research. The ability of large language models to generalize from few-shot examples and to produce strong classifiers is extended using the engineering approach of parameter-efficient tuning. Using the Explainable Detection of Online Sexism (EDOS) training data and a small number of trainable weights to create a tuned prompt vector, a competitive model for this task was built, which was top-ranked in Subtask B.

heading: 1 Introduction
text: Misogyny is a growing problem online: inflicting harm on the women who are targeted, making online spaces inaccessible and unwelcoming, and perpetuating social asymmetries and injustices. Automated tools are now widely deployed to find, and assess sexist content at scale but most only give classifications for generic, high-level categories, with no further explanation. The Explainable Detection of Online Sexism (EDOS) SemEval Task 10 was introduced to address this problem (Kirk et al., 2023), challenging English-language systems to flag what is more generally sexist content and also explaining why it is sexist.
The JUAGE team participated by building one ensemble with BERT models for the most general subtask (A) and for the more detailed subtasks with taxonomies for sexism (B and C) submissions were made by tuning a PaLM derived model (Chung et al., 2022a), a 62-billion parameter large Pre-trained Language Models (PLM). The PaLM model variant was instruction-tuned (Chung et al., 2022b) and optimized for inference using quantization (Prato et al., 2020).
While it is possible to fine-tune these large language models directly on user tasks, parameterefficient tuning techniques keep the large language
model weights fixed and enable sharing of resources across tasks and massively reduce the number of parameters to be updated and stored. The smaller number of parameters that are updated also enable the rest of the model to act as a regularizer, allowing the model to learn from much smaller datasets (Mozes et al., 2023).
Prompt engineering (Brown et al., 2020) is another popular way to use PLMs. However, given the constraints of the model input buffer, only a few training examples may be used (i.e., few-shot prompts for in-context learning). A recently proposed parameter-efficient alternative is to prepend pseudo-tokens to the input and then adjust the embedding weights of these tokens (“soft prompt learning”). This combines the resource sharing of a large, frozen model with a procedure for optimizing weights over a training set. This technique has come to be known as prompt-tuning (Lester et al., 2021). We opted for prompt-tuning in our submissions, except for Subtask A, where we opted for fine-tuning BERT. Follow-up experiments showed, however, that prompt tuning would also have been better for this subtask.

heading: 2 Background
text: Hateful language, such as hate speech and misogyny, is very present nowadays also due to its propagation through social media. Its subjective nature makes hateful language detection a multi-faceted task. Therefore, most existing datasets are taskspecific while the lack of common benchmarks leads the researchers to compile their own datasets (Schmidt and Wiegand, 2017). Detection models, however, trained on these datasets, do not generalize well (Ludwig et al., 2022), and unintended biases can impair the models’ performance (Waseem, 2016; Wiegand et al., 2019; Al Kuwatly et al., 2020). In this paper, we discuss these aspects with regard to misogyny.
1195

heading: 2.1 Misogynistic language detection
text: Misogynistic (and more broadly sexist) comments are very common in social media and their automatic detection can be a challenging task as they can appear in various forms (Schütz et al., 2022). Sexism and misogyny detection in written language has been the focus of many shared tasks; in the EVALITA edition of the Automatic Misogyny (AMI) shared task (Fersini et al., 2018) participants had to classify misogynistic comments in English and Italian for Subtask A, and further classify them into seven discreet categories for Subtask B: discredit, stereotype, objectification, sexual harassment, threats of violence, dominance, and derailing. In the IberEval version of AMI (Anzovino et al., 2018) the focus was on English and Spanish comments. Similarly, the sEXism Identification in Social neTworks (EXIST) shared task (Rodríguez-Sánchez et al., 2021-09, 2022-09), focused on English and Spanish comments from Twitter and Gab.com and involved two main subtasks: sexism identification and sexism categorization, in which participants had to categorize the sexist comments into the following categories: ideological and inequality, stereotyping and dominance, objectification, sexual violence, and misogyny and nonsexual violence. Finally, misogyny in multimodal settings was explored with the Multimedia Automatic Misogyny Identification (MAMI) shared task (Fersini et al., 2022), which attempted the automatic detection of misogynous memes online. The categories used for the second task of the challenge were s stereotype, shaming, objectification, and violence.

heading: 2.2 The Task
text: The SemEval-2023 Task 10: Explainable Detection of Online Sexism (Kirk et al., 2023) defined sexism as “any abuse or negative sentiment that is directed towards women based on their gender, or based on their gender combined with one or more other identity attributes (e.g. Black women, Muslim women, Trans women)”. The task introduced three hierarchical subtasks: sexism detection (A), sexism classification (B), and fine-grained sexism classification (C). Subtask A was binary concerning whether a post is sexist or not. Subtasks B and C were multi-class, the former with four and the latter with eleven classes, summarised in Table 1.
The shared dataset consisted of one training, one development, and one unlabeled test set, all with
posts in English.

heading: 3 System overview
text: Our method is primarily based on agile classification via prompt tuning on large PLMs. We did not use any misogyny-specific resources beyond those provided by the task organizers.

heading: 3.1 Subtask A
text: For Subtask A, we used KTRAIN,1 a lightweight Keras wrapper that can be used to fine-tune models such as BERT.

heading: 3.2 Subtasks B & C
text: When using large PLMs, we were concerned that the existence of multi-word category labels might create a potential bias against the categories that required a few tokens. As such, we summarized the multi-word categories using single-word appropriate names. For example, instead of Casual use of gendered slurs, profanities & insults, we used “insult”. All the names we used for the categories and subcategories are shown in Table 1, but we note that this change did not produce measurable differences in practice. While Gu et al. (2022) found that the choices of verbalizers mattered when training prompt-tuning on sentiment analysis with few-shot examples, the particular choice of SemEval-2023 Task 10 categories was probably not a factor, as we observed little performance difference when some of the category names were misspelled.
1https://github.com/amaiya/ktrain
Our final submissions for subtasks B and C were ensembles of six prompt-tuned models, whose parameters only differ at the level of the soft-learned prompts. Pseudoprompt tokens are a sequence of “words” that have randomly assigned initial embeddings, and it is these embeddings alone that are adjusted via gradient back-propagation. In addition to the 5-token pseudoprompt that was used during tuning, we prepended to the input both natural language instructions and few-shot prompting, specifically using the examples provided on the competition website, but neither of these demonstrated improvement over using just the pseudoprompt tokens.
For the models where we used instructions, the following prompt was inserted before the few shot examples:
Label the following examples of sexist language according to the following categories and labeled subcategories threats (harm or incitement), derogation (attacks, aggression, or dehumanization), animosity (insult, stereotypes, belittling or patronizing), or prejudice (mistreatment or discrimination).
And the few shot examples were chosen based on the annotated examples provided by the task hosts.

heading: 4 Experimental setup

heading: 4.1 Subtask A
text: We fine-tuned BERT for 7 epochs, using patience of 5, and a max-length of 50 tokens. We trained 3 different models by changing the random state value during the train, validation, and test split, and built an ensemble by majority voting.

heading: 4.2 Subtasks B & C
text: For soft prompt-tuning, we set the tuneable prompt token length to 5. The embeddings of the soft prompt tokens have the dimensionality of the underlying PaLM model, leading to 8,192-dimensional vectors. Each prompt was initialized with a random sample of vocabulary token embeddings from the model’s 5,000 most frequent tokens. Tuning of the prompt was held based on the accuracy achieved on the development set that was provided by the organizers.
The ensemble for Subtask C was based on four models (i.e., M3 to M6). The predicted class of M3, M4, and M5 was defined to be the one with the maximum probability (i.e., using argmax). For M6, we also tuned a threshold per class, employing the class with the maximum probability score when several classes were returned. For Subtask B, we combined the labels returned by M1 and M2 with ones returned by models M3 to M6 (e.g., from class 2.1 predicted for C, we infer class 2 for B). The final label was defined using majority voting.

heading: 5 Results

heading: 5.1 Ranking
text: The macro F1 of our BERT-based ensemble was 0.817, ranking our team at the 58th place out of the 84 teams of Subtask A. This rank can be explained by the fact that BERT-based models are well-established and commonly adopted by participants. Therefore, our choice to not undertake extensive hyperparameter searching experiments probably kept our team from a better score. Noticeable is the standard deviation of the results, with those above our rank being 0.017 while those below us being 0.095, more than five times higher.
Our prompt-tuning-based ensemble was ranked 7th for Subtask C and 1st for Subtask B. Figure 3 shows the confusion matrix for Subtask B. Although false classifications exist, the diagonal holds higher counts. The classifier confuses more the categories of derogation and animosity, more often predicting as derogation what was animosity. The confusion between the two classes can be further studied in Figure 4. The ‘attacks’ class (2.1) is confused with that of ‘stereotypes’ (3.2) while ‘aggression’ (2.2) is confused with ‘insult’ (3.1).

heading: 5.2 Decomposing the ensemble
text: The ensemble achieved the highest macro average F1 in both subtasks when compared to the individual member models. The F1 score per model is shown in Figure 1, where it is shown that the ensemble doesn’t necessarily outperform all the members. For example, M4 scores higher for threats (a; class 1) and specifically for incitement (b; class 1.2). When focusing on the classification threshold tuning for the ensemble (Section 4.2), we can see that M6_tuned is better for some (e.g., 1.2) and worse for others (e.g., 4.1). In Subtask B, models with “_C” in the name infer their decision from the prediction for Subtask C (Section 4.2), a technique
that led to slightly better results compared to M3 and M5.
Figure 2 presents model performance aggregated per class. In Subtask B (a), the class of threats was easier to detect across models, followed by derogation. In Subtask C (b), the most difficult class was 3.4, followed by 3.3. This is surprising because the models handle equally well animosity and prejudice, but when focusing on specific subtypes of the two, prejudice is easier to capture.

heading: 5.3 Prompt-tuning for Subtask A
text: During the final weeks of this evaluation we switched from the BERT system used in Subtask A to the soft-prompt based classifier. This approach has shown to be flexible and robust to classification
tasks (Mozes et al., 2023), especially in few-shot learning constraints. As this latter work mostly occurred after the Subtask A submission deadline, we followed prompt tuning also for this subtask, exactly as we did for subtasks B and C, but without building an ensemble. This resulted in an F1 macro score of 0.884 which would have been first place, since the first scored 0.8746, even without using any ensemble. The comparison with our submitted results is shown in Figure 5. Indeed, the parameter-efficient tuning-based classifiers, although resource-intensive by relying on larger PLMs, appear to provide similar benefits to the techniques of ensembles of models.

heading: 5.4 Error analysis
text: Annotator disagreement
Upon the completion of the challenge, the individual annotations were released by the organizers. An initial observation of these annotations, by an expert member of our team, revealed that the annotators very often confused animosity with derogation and vice versa, something that also occurred with our models. In addition, some of the main themes throughout the data include politics and feminism which are inherently controversial. There are also instances of language used by incels, short for involuntary celibates, namely men unsuccessful in finding a sexual partner or significant other (Nagle, 2017). Incel language comprises of its own lexicon and can in many cases stay undetected unless someone is familiar with the jargon. One example is the following: “Even femcels+the hambeats on IT admitt that they could easily get sex if they wanted. Theres nothing you have to do to get sex as female. You dont even have to be female, even transwomen are enough in 2k18.” Such discourses highlight the need for thorough annotation guidelines, as well as annotator training.
Per annotator assessment and model bias
Our ensemble’s F1 per annotator, shown in Table 2, reaches up to 0.78 for Subtask B and 0.57 for Subtask C, both concerning Annotator 14 (A14). To examine the possibility of bias in our models, we sampled 10 instances out of the test set where A14 disagrees with the rest of the annotators in Subtask B. Then we examined our ensemble’s responses and checked whether a specific class was preferred. As expected, most cases concerned the animosity and derogation labels. In 9 out of 10 cases, A14 assigned the wrong label (4 being falsely derogation, 5 falsely animosity), while 7 out of 10 times our ensemble agrees with A14 indicating that our model might be biased, containing beliefs that are closer to A14. For instance, the following example: “Feminine traits in men can be exploited for gain, comfort, being in control; what kind of sexual benefit (the kind that men are generally interested in) can be gained from an androgynous woman?" was labeled as animosity by A14 and the model, while the gold label was derogation. The specific example lies in the border of both those categories, since it conveys a negative generalization for women (derogation) but also implies essential differences between men and women (animosity),
yet the model leans towards animosity possibly giving more weight to the gender differences. There are also examples where all the annotators disagree and the model agrees with A14, such as: “Well no fucking shit because women dont want to be ugly, sweaty, or a fucking CEO. Hmm what the fuck did I just lose a brain cell", where A14 and the model assigned the label animosity while the other annotators chose derogation and prejudiced discussions, with the gold label being derogation. Finally, the example “It is not insulting, it’s **expressing love for your friends**... Unlike women that fake even the friendship towards other females... **We love our friends, they hate each other.**" was labeled as derogation by A14 and our model while the gold label was animosity, indicating that the negative generalization aspect of the sentence might be more important for the model and A14.

heading: 5.5 Limitations
text: While this SemEval task applies machine learning to the task of identifying content that is misogynistic in character, the authors have little grounding in this topic and are unable to judge the quality of task data provided, nor equipped to evaluate the taxonomy and annotation guidelines which were not provided at the time of the task. The underlying LLM likely has intrinsic biases that will affect the distribution of errors in ways that are not well captured by the aggregate performance statistics. Using the leaderboard results as an indication of fitness for tasks such as assisting in moderation would require extensive external verification, which is something the authors have not done.

heading: 6 Conclusions
text: The JUAGE team participated in the three subtasks of SemEval-2023 Task 10 regarding explainable detection of online sexism. Our submission was ranked first on the second subtask and 7th on the third. Our analysis shows that prompt-tuning would have won Subtask A also had it been submitted. We left for future work the investigations on the interpretability of the learned soft prompts. For each of their learned pseudo-token’s embeddings, Lester et al. (2021) retrieved the nearest neighbor frozen vocabulary token’s embdeddings. They suggest that prompt-tuning may learn natural language context specific to a task. We plan to use the same method to interpret our learned prompts as well as compare the learned prompts for each task.

heading: Future Work
text: We left for future work the investigations on the interpretability of the learned soft prompts. For each of their learned pseudo-token’s embeddings, Lester et al. (2021) retrieved the nearest neighbor frozen vocabulary token’s embdeddings. They suggest that prompt-tuning may learn natural language context specific to a task. We plan to use the same method to interpret our learned prompts as well as compare the learned prompts for each task