Source-linked AI summary

Prompting for Multimodal Hateful Meme Classification

Rui Cao, Roy Ka-Wei Lee, Wen-Haw Chong, Jing Jiang

arXiv:2302.04156v1cs.CLcs.IRcs.MM

TL;DR

Hateful meme classification requires multimodal reasoning and contextual knowledge that lacks a known explicit external knowledge base. PromptHate addresses this gap by prompting a pretrained language model with demonstrations and masked label words, outperforming state-of-the-art baselines in experiments on two datasets. Its analyses support the effectiveness of prompt settings while identifying limitations in accessing implicit knowledge.

  • Problem

    Hateful meme classification requires visual-textual reasoning and contextual background knowledge, but no known explicit external knowledge base provides this hate-speech context.

  • Method

    PromptHate uses multimodal prompts with in-context demonstrations and masked label words to leverage implicit knowledge in a pretrained language model.

  • Results

    PromptHate outperforms state-of-the-art baselines on hateful meme classification across evaluations on two publicly available datasets.

  • Takeaways & Limitations

    Prompting provides an effective alternative to standard pretrained-model fine-tuning for hateful meme classification and can better leverage implicit language-model knowledge.

  • Takeaways & Limitations

    Supplementary image-derived information can omit cultural knowledge needed for interpretation, such as Muslims’ avoidance of pork.

Abstract

from arXiv · show

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 experimental 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-grained analyses and case studies on various prompt settings and demonstrate the effectiveness of the prompts on hateful meme classification.

1 Introduction

Hateful memes pose a challenging and socially consequential multimodal classification problem because their meaning can depend on visual-textual reasoning and cultural knowledge. PromptHate addresses this gap by prompting a pretrained language model with demonstrations and implicit knowledge.

  • Hateful memes can spread more widely than text-based hate speech because users can repost them across conversations and contexts.
  • Classification requires reasoning across visual and textual modalities, while hateful interpretations may also depend on contextual background knowledge.For example, recognizing why a pig-related meme targets Muslims requires knowledge that pork is considered unclean and sinful to consume in Islam.
  • PromptHate prompts a pretrained language model to leverage implicit knowledge for multimodal hateful meme classification.
  • Experiments on two publicly available datasets report that PromptHate outperforms state-of-the-art methods.
  • Fine-grained analyses and case studies examine prompt settings and demonstrate their effectiveness for hateful meme classification.

2 Related Work

Prior hateful meme classifiers use multimodal fusion or fine-tuned pretrained models, while prompt-based learning has been used mainly for unimodal tasks. Prompting multimodal models remains less explored and can be costly with large models.

  • Hateful meme datasets are designed so unimodal methods cannot achieve good performance, motivating multimodal classification.
  • Existing approaches include two-stream models that fuse text and visual features and fine-tuning large pretrained multimodal models.
  • Prompt-based learning treats pretrained language models as implicit, unstructured knowledge bases and has achieved strong results on several NLP tasks.
  • Most prompt-based studies address unimodal tasks, leaving fewer multimodal applications, while large models such as GPT-3 are expensive to tune.

3 Preliminaries

The task predicts whether a meme is hateful from its image and text, but PromptHate reformulates classification as masked language modeling. Image captions, extracted entities, and demographic information provide textual inputs, though some cultural knowledge remains absent.

  • 3.1 Problem Definition: Multimodal hateful meme classification predicts a hateful or non-hateful label from an image and accompanying text.The model represents the two class probabilities as y0 for non-hateful and y1 for hateful.
  • 3.1 Problem Definition: PromptHate transforms binary classification into masked language modeling by asking a pretrained language model to fill a [MASK] token with the meme label.
  • The image is converted into textual input through OCR, text removal, and pretrained image captioning.
  • Entity detection and demographic classification supplement image captions with entities and person-related demographic information.
  • Supplementary extraction can omit cultural knowledge needed for interpretation, such as the fact that Muslims do not eat pork.

4 Methodology

PromptHate constructs multimodal prompts from demonstrations and an inference meme, then uses RoBERTa to predict a masked label word. Manual templates, label words, and multi-query demonstrations define the prompting procedure without adding a task-specific classification head.

  • 4 Methodology: PromptHate combines a positive demonstration, a negative demonstration, and an inference instance after converting each meme into text and image descriptions.
  • 4 Methodology: The inference template replaces its label word with [MASK], which RoBERTa completes as “good” or “bad” to classify the meme.
  • 4 Methodology: The prompt concatenates demonstration and inference sequences using separator, start, and end tokens.
  • PromptHate manually maps non-hateful and hateful classes to the label words “good” and “bad,” respectively, and uses a template that turns each word into a sentence.
  • Training minimizes cross-entropy over masked-word probabilities, updating the language-model parameters without adding a task-specific classification head.
  • Prediction compares the masked-word scores, while multi-query prompting averages scores across demonstration pairs.

5 Experiments

PromptHate is evaluated on two multimodal meme datasets using AUROC and accuracy across repeated random seeds, and it outperforms state-of-the-art baselines. Analyses show that performance depends on model scale, the masked-language-modeling objective, prompt wording, and the availability of contextual information.

  • 5.1 Evaluation Settings: The evaluation uses FHM and HarM, reporting AUROC and accuracy averaged over ten random seeds against unimodal and multimodal baselines.FHM uses its dev-seen split as test, while HarM combines very harmful and partially harmful memes into the hateful class.
  • 5.2 Experiment Results: PromptHate outperforms state-of-the-art baselines on both FHM and HarM, with statistically significant improvements over the strongest baseline on each dataset.The strongest baselines are DisMultiHate on FHM and FT-RoBERTa on HarM; improvements have p-value < 0.05.
  • 5.2 Experiment Results: PromptHate performs better on HarM than FHM, consistent with FHM’s broader topics requiring stronger generalization than HarM’s mainly COVID-19-related memes.FT-RoBERTa also shows high standard deviation on FHM, suggesting instability and difficulty generalizing there.
  • 5.2 Experiment Results: Replacing RoBERTa-large with RoBERTa-base worsens PromptHate, while a larger text encoder in DisMultiHate does not surpass PromptHate across both datasets.PromptHate-RB still beats DisMultiHate on HarM and is slightly worse on FHM while showing higher stability.
  • 5.3 Ablation Study: Removing the masked-language-modeling objective significantly reduces performance, whereas PromptHate can perform well without demonstrations.The MLM objective aligns with PLM training and helps exploit implicit knowledge in the pretrained language model.
  • 5.4 Prompt Analysis: Prompt performance varies substantially by wording: label words aligned with semantic classes outperform reverse mappings, especially in few-shot settings.Target information yields only marginal performance differences and may add auxiliary burden, requiring a more sophisticated strategy.
  • 5.5 Error Analysis: Error cases show that image captions may omit essential hateful context, while some memes require bias-resistant, deep multimodal reasoning beyond target comprehension.Additional image descriptions do not always correct errors involving implicit actions, learned biases, or culturally specific interpretations.

6 Conclusion

PromptHate is presented as a simple, effective multimodal prompt-based framework for hateful meme classification. Evaluations, analyses, and case studies support its reported effectiveness while motivating improved demonstrations and reasoning modules.

  • PromptHate prompts pre-trained language models to classify hateful memes using their implicit knowledge.
  • PromptHate outperforms state-of-the-art baselines on hateful meme classification across evaluations on two publicly available datasets.The paper also reports fine-grained analyses and case studies of prompt settings.
  • Future work will investigate better demonstration selection and reasoning modules to improve PromptHate’s use of implicit PLM knowledge.

7 Limitations

PromptHate can exploit implicit PLM knowledge but remains limited in advanced contextual reasoning and may inherit training-data biases. The section also documents prediction errors and a questionable ground-truth example.

  • The error analysis includes wrongly predicted memes, including a rightmost example whose ground truth is described as questionable.
  • PromptHate still lacks advanced reasoning over contextual information in some cases, preventing correct predictions.
  • PromptHate may learn biases from training data, so debiasing techniques may be needed to improve performance.

A Experiment Settings

The experiments train all models with PyTorch on an NVIDIA Tesla V100 GPU using specified transformer implementations and empirically selected optimization settings. PromptHate uses multi-query ensembling and the same ten-epoch training schedule as the baselines.

  • All models are trained in PyTorch on an NVIDIA Tesla V100 GPU with 32 GB memory, using Hugging Face Transformers 4.19.2 for specified pretrained models.Table 11 lists parameter counts for the models.
  • PromptHate and RoBERTa-large models use learning rates selected from 10^-5 to 1.5 × 10^-5, with dataset-specific reported choices.
  • AdamW, mini-batches of 16, four queries for multi-query ensembling, and ten training epochs are used for PromptHate and baselines.PromptHate takes six minutes per epoch and 19 GB of dedicated memory during training.

B Analysis for Image Captions

PromptHate converts meme images into textual captions for PLM prompting, making caption quality relevant to classification. Captions generated with ClipCap trained on Conceptual Captions perform better than those trained on COCO, partly because they provide more detailed meme-like descriptions.

  • PromptHate preprocesses each meme by converting its image into a textual caption that becomes PLM input, so caption quality can affect classification.
  • ClipCap trained on Conceptual Captions performs better than ClipCap trained on MS COCO for PromptHate image captions.Table 12 compares PromptHate using ClipCap+COCO and ClipCap+CC.
  • Conceptual Captions can yield more detailed descriptions of meme relationships and signs than COCO captions.With uncleaned meme images, ClipCap+CC can also generate comments rather than image descriptions because web captions may include comments.
Loading 2302.04156v1…