RIT Boston at S em E val-2022 Task 5: Multimedia Misogyny Detection By Using Coherent Visual and Language Features from CLIP Model and Data-centric AI Principle (2022)

Abstract: Detecting MEME images to be misogynous or not is an application useful on curbing online hateful information against women. In the SemEval-2022 Multimedia Automatic Misogyny Identification (MAMI) challenge, we designed a system using two simple but effective principles. First, we leverage on recently emerging Transformer models pre-trained (mostly in a self-supervised learning way) on massive data sets to obtain very effective visual (V) and language (L) features. In particular, we used the CLIP model provided by OpenAI to obtain coherent V and L features and then simply used a logistic regression model to make binary predictions. Second, we emphasized more on data rather than tweaking models by following the data-centric AI principle. These principles were proven to be useful and our final macro-F1 is 0.778 for the MAMI task A and ranked the third place among participant teams.

## introduction systematic inequality and discrimination to women does not appear offline but also in online communication. meme is an image characterized by a visual content with an overlaying text added meme creators. although most of memes are created with the intention of making funny jokes, some of memes are created as a form against women. therefore, identifying misogynous memes is important for curbing such misuse. in the semeval-2022, the task 5, multimedia automatic misogyny identification (mami) @xcite , was organized for this purpose. the challenge consists of two sub-tasks, including the task a, which is determining a meme be misogynous or not, and the task b which distinguishes non-misogynous and 4 overlapped misogyny subtypes. ## related work automatic misogyny identification (ami) has become an active research topic in natural language processing (nlp). for example, in the ibereval-2018, the ami task was introduced as a new task @xcite . the task consists of the three sub-tasks, i.e., misogyny identification, misogynistic behavior categorization, and target classification. the misogyny related annotations are made on both spanish and english tweets. among 11 different teams from 5 countries, @xcite ranked first in the misogyny identification task on both languages. it proposed an svm-based architecture and explored several sets of features, including lexical features relying on the lexicon of abusive words. another ami challenge @xcite ) was organized at the evalita-2020 evaluation campaign and used italian tweets. its sub-task a is about misogyny and aggressiveness identification (4 class labels). a total 8 teams from 6 different countries participated in the challenge. though a few teams used traditional word embedding to be textual features, most of the participants explored richer sentence embedding such as bert @xcite or roberta. regarding modeling, the used methods are diverse, ranging from simple lo-gistic regression (lr), to convolutional neural network (cnn), even to fine-tuning pre-trained models. data plays an important role on ami research development. how to organize misogyny labels is an important research question. @xcite created a new dataset for tackling online misogyny. its dataset consists of 6, 567 labels for reddit posts and comments. a new hierarchical taxonomy has been proposed and a careful training was provided to annotators for obtain high-quality labels. in the misogyny detection works described above, only textual clues are utilized. in a related topic, detecting hateful speech, image clues have been widely used to better reflect the fact that human communication is naturally multimodal. a hateful memes challenge competition was held at neurips 2020 @xcite . the task is to classify a meme (i.e., an image and associated texts) to be hateful or not. in the challenge, a set of language-visual pre-trained models, such as uniter, villa, and ernie-vil, have been widely used for extracting semantically coupled textual and visual features. for example, the winning solution utilized four types of vl transformers @xcite . the multimodal hateful meme detection prompts more follow-up research. for example, @xcite proposes using a triplet-relation network to improve encoding on texts, images, and captions generated on images. the improved encoding helps final prediction performance. @xcite propose momenta (multimodal framework for detecting harmful memes and their targets) that uses both global and local perspective to detect all kind of hateful memes. in addition, this framework can be easily explainable and can generalize to unseen contexts. ## task and data the mami challenge consists of the two sub-tasks. the task a is a binary classification task on identifying a meme to be misogynous (labeled as 1) or not (labeled as 0). the task b is a multi-label classification task on identifying a meme to be non-misogynous or misogyny sub-types that can be overlapped, i.e., shaming, stereotype, objectification, and violence. ## methods regarding extracting features from meme posts' text and image parts, we chose using pre-trained transformer models to utilize their highly effective feature representations. on texts, we considered two ways, including fine-tuning bert @xcite model and using sentence representations based on bert, such as universal sentence encoding (use) embedding @xcite and sbert @xcite . a major difference between these two ways is that pretrained bert model weights are updated in the fine-tuning process. in a contrast, when using use or sbert embedding features, these pre-trained models are kept intact. regarding the visual encoder processing meme images to visual representations, we chose a newly emerging transformer model similar to the bert model on texts. in recent years, transformer based visual models have become popular @xcite . among the many visual transformer models, we selected the vit model @xcite , which is a pure transformer that is applied directly on an image's p × p patch sequence. in the implementation, it follows the original transformer's design as much as possible. vit utilizes the standard transformer's encoder part as an image classification feature extractor and adds a mlp head to determine the image labels. the vit model is pre-trained using a supervised learning task on a massive image data set. the size of the supervised training data set impacts vit performance significantly. when using google's in-house jft 300m image set, vit can reach a performance superior to other competitive resnet @xcite clip model @xcite is a seminal work from openai. as shown in figure 1 , on a massive set of image-text pairs, about 350 million, clip can pre-train a quite powerful visionlanguage (vl) joint model by using a simple crossmodal contrastive learning. the trained model shows many impressive applications, like superior performance on many zero-shot image classification tasks. note that the advantage of using the clip model is that the extracted visual and language features have been mapped into a unified embedding space. this will facilitate the next step that combines the two types of features (v for visual features and l for language features) and then uses a simple lr model for predicting misogyny. after obtaining visual (v) and language (l) features, one solution could be using sophisticated multimodal fusion methods as shown in @xcite to consider inter-actions between the two types of features. however, after our pilot experiments, we did not find noticeable gains by using such advanced fusion methods compared to the simple early fusion, i.e., simply concatenating both v and l features. therefore, we focused on utilizing the early fusion method in this challenge. figure 2 depicts our proposed model. the image and text part of a meme post are sent into the clip model to extract both v and l features. then, the v and l features are combined and fed into a lr model to make a binary prediction on misogyny. besides the lr model, we also considered another novel way, deepinsight @xcite that is suggested recently. people were impressed by convolution neural network (cnn) on its universal ability on extracting useful image features. therefore, deepinsight was proposed for converting a tabular feature vector into a 2d image and using a cnn model to do classification. on some tasks, such method shows its effectiveness on extracting features from complicate tabular data. in addition, a set of techniques that have shown to be useful for improving image classification performance, such as data augmentation in the training stage, i.e., mix-up @xcite , or in inference stage, testing time augmentation (tta), are already developed on the image classification task and can be easily applied. in recent years, a new trend in ai research has emerged and it emphasizes the power brought by data sets @xcite . on some ai tasks, the performance increase can be achieved by adding a set of labeled samples and sometimes such new data set could be small. in a contrast, performance increases could be hard to achieve when trying different models. for example, in the challenge @xcite , all participants were required to solve the problem by only using data-related methods while keeping using one identical model. we also explored this new approach. in this challenge, we explored the data-centric ai approach by manually annotating more samples in the evaluation set. although we don't have an access to the coding manual used in the mami challenge, we checked the training and trial data that were provided with manual labels. after learning the how-to, we annotated a subset of testing samples and then added these labeled samples into our model's training. ## results when using bert fine-tuning, i.e., adding a fullyconnected layer on the [cls] token after bert model's output layer and fine-tuning two models together by using the cross-entropy (ce) loss, the macro-f1 is 0.608. a different way is obtaining sentence level representations and then feeding these dense features into a lr model implemented in the scikit-learn python package. we tried both sbert and use sentence level representations. this way of using sentence level representations in fact shows improved performance. the macro-f1 can be improved to 0.605 for using the sbert features and 0.671 for using the use features. on image features, we explored vit model finetuning and observed that images play an important role on the misogyny detection. the performance simply using images is 0.633, which is higher than using texts by fine-tuning a bert model. regarding fusing both textual and image features for making a multimodal classification, we tried two methods. the first is fine-tuning a joint visual-language (vl) model, visualbert @xcite . however, the performance is not very impressive. its performance is 0.642, only a slight gain on top of either of uni-modal's performance. the second method is using an early fusion by concatenating textual (use embedding) and image features (vit embedding) and then fed into a logistic regression (lr) for predicting misogyny. by doing so, the performance can be improved to 0.720. however, the use and vit embeddings are learned from separate models and may not exist in a unified space. to address this issue, we tried the clip model for the two attractions, i.e., (1) having coherent textual and visual features in an unified space and (2) image encoder training is on a massive image set with about 350 million images. consistent to our prediction, after switching to clip features, the misogyny prediction's macro-f1 value immediately increased to 0.765. to explore other possible sophisticated models besides using an lr model, we explored the deepinsight @xcite . after converting the dense vl features output from the clip model into 2d images, we use a resnet34 cnn model pre-trained on the imagenet dataset and converted the misogyny detection into a cnn-based image classification. however, as shown in lr model directly. when using the mix-up augmentation, we observed a further performance gain to 0.728. surprisingly, the tta method did not show any help. one possible explanation is that we used dense vectors rather than regular tabular data whose feature columns represent some real physical values. ## discussions multimedia misogyny detection is an important natural language processing application. it uses powerful ai technologies to against misinformation or even harmful information appearing in online communication. for a world emphasizing equal roles between genders, finding misogyny information and removing them is critical for a healthy online communication platform. in this challenge, our methods have been focusing on (a) relying on various pre-trained transformer models to provide high quality multimodal features and (b) applying the data-centric ai principle to rapidly improve model performances with controllable human efforts. regarding text encoding, we found that running a simple lr model on top of sentence level representations works consistently better than fine-tuning bert models. joint vl model, e.g., visualbert, does not work quite well in this challenge. however, clip, which is trained on a large-sized textimage pair data set in a self-supervised learning approach, can provide high-quality multimodal features and these features can be conveniently used in down-stream classification tasks. on top of highly effective multimodal features, utilizing sophisticated models becomes secondary. in our experiments, simply using an lr model gave us better result than using other complicate models, e.g., deepinsight. at last, the data-centric ai principle is worth noting. by focusing on our efforts on expanding labeled training data, we can consistently improve our misogyny prediction performance.