Prompting for Multimodal Hateful Meme Classification (2022)

Abstract: Hateful meme classification is a challenging multimodal task that requires complex reasoning and contextual background knowledge. Ideally, we could leverage an explicit external knowledge base to supplement contextual and cultural information in hateful memes. However, there is no known explicit external knowledge base that could provide such hate speech contextual information. To address this gap, we propose PromptHate, a simple yet effective prompt-based model that prompts pre-trained language models (PLMs) for hateful meme classification. Specifically, we construct simple prompts and provide a few in-context examples to exploit the implicit knowledge in the pre-trained RoBERTa language model for hateful meme classification. We conduct extensive experiments on two publicly available hateful and offensive meme datasets. Our experiment results show that PromptHate is able to achieve a high AUC of 90.96, outperforming state-of-the-art baselines on the hateful meme classification task. We also perform fine-grain analyses and case studies on various prompt settings and demonstrate the effectiveness of the prompts on hateful meme classification.

## introduction internet memes have evolved into one of social media's most popular forms of communication. memes are presented as images with accompanying text, which are usually intended to be funny or satirical in nature. however, malicious online users generate and share hateful memes under the guise of humor @xcite @xcite . many hateful memes had been created to attack and ridicule people based on specific characteristics such as race, ethnicity, and religion. the hateful memes could also threaten society more than text-based online hate speech due to their viral nature; users could re-post or share these hateful memes in multiple conversations and contexts. to combat the spread of hateful memes, social media platforms such as facebook have recently released a large hateful meme dataset as part of a challenge to encourage researchers to develop automated solutions to perform hateful memes classification @xcite . however, classifying hateful memes turns out to be a very challenging task as the solution would need to comprehend and reason across both the visual and textual modalities. the reasoning of the modalities will also require contextual background knowledge. recent research works have proposed multimodal hateful meme classification approaches. for instance, some studies have adopted pre-trained visual language models such as vilbert @xcite and @xcite and finetune these models with the hateful meme classification task @xcite @xcite @xcite (as illustrated in figure 1(a) ). nevertheless, existing approaches still have limitations as understanding hateful memes may require additional contextual background knowledge. consider the hateful meme example in figure 1 . the background knowledge that the pig is considered unclean by muslims and is a sin to consume, is required to infer that the meme is hateful. recent studies have attempted to prompt pretrained language models (plm) and yield good performance for uni-modal nlp @xcite @xcite . nevertheless, few works have attempted to prompt plms for multimodal tasks @xcite @xcite . @xcite has explored prompting gpt-3 model @xcite for the visual question & answering task. however, the approach has limitations as large models such as gpt-3 are expensive to tune. this study addresses the research gaps and proposes a novel framework to leverage the implicit and unstructured knowledge in plms @xcite to improve hateful meme classification. figure 1 illustrates the comparison between the existing multimodal hateful meme classification approach and our proposed prompt-based approach. specifically, in our prompt-based approach, we first convert images into textual descriptions that a plm can understand and design specific prompts to adapt and leverage the implicit knowledge in the plm. subsequently, given a meme and a prompt, the prompt-tuned plm generates a textual output, indicating the predicted label of the input meme. the underlying intuition for the prompt-based approach is that plms will tap into the implicit and unstructured knowledge in their large-scale pretraining data to generate the continuation of the prompt, i.e., from "this is _" to "this is hateful.". we summarize this paper's contribution as follows: (i) we propose a multimodal prompt-based framework called prompthate, which prompts and leverages the implicit knowledge in the plm to perform hateful meme classification. (ii) we conduct extensive experiments on two publicly available datasets. our experiment results show that prompthate outperforms state-of-the-art methods for the hateful meme classification task. (iii) we perform fine-grained analyses and case studies on various settings to examine the prompts' effective-ness in classifying hateful meme. to the best of our knowledge, this is the first paper that explore prompting plm for hateful meme classification. foot_0 2 related work ## methodology figure 2 illustrates the architectural framework of our proposed prompthate model. a key step in the prompthate is the construction of a prompt, which consists of a positive demonstration (i.e., normal meme), a negative demonstration (i.e., hateful meme), and an inference instance (i.e., meme to be predicted). we first convert the three memes into meme texts and image descriptions using the data pre-processing steps described in section 3.2. subsequently, we construct templates, which are natural sentences that include label words for the meme text: my black boyfriend image caption: a woman and a monkey template: it was [mask] meme text: a fast sandwich maker image caption: putting cheese on bread template: it was good meme text: best holiday gift for muslims image caption: pig on a white background template: it was bad demonstration: normal demonstration: hateful inference instance roberta input good: 0.05 bad: 0.95 generated output clipcap prompt figure 2: overview of prompthate framework. ## conclusion we have proposed prompthate, a simple yet effective multimodal prompt-based framework that prompts pre-trained language models for hateful meme classification. our evaluations on two publicly available datasets have shown prompthate to outperform state-of-the-art baselines. we have conducted fine-grained analyses and case studies on various prompt settings and demonstrated the effectiveness of the prompts on hateful meme classification. we have also performed error analysis and discussed some limitations of the prompthate model. for future work, we will explore strategies for selecting better demonstrations for prompthate and add in reasoning modules to improve prompthate's utilization of the implicit knowledge in the plms.