Abstract
Detecting hate speech in multimodal formats, such as memes, presents a significant challenge due to the complex interplay between visual and textual information. Traditional supervised learning approaches are often hampered by data scarcity and the legal complexities of collecting multimodal content. This paper explores a novel approach using Few-Shot In-Context Learning (ICL) to leverage abundant text-only hate speech data to improve the detection of vision-language hate speech. By providing Large Language Models (LLMs) with text-based examples and generated rationales, researchers achieved significant performance gains, demonstrating that cross-modality transfer is a viable and effective strategy for content moderation.
Introduction
As online discourse evolves, hate speech has increasingly shifted from pure text to multimodal formats. Memes, which combine images and captions, are particularly difficult to moderate because their harmful nature often emerges only when both modalities are considered together. A benign image paired with a specific caption can create a hateful message that traditional text-based filters miss.
Two primary obstacles hinder the development of robust multimodal detection models: the scarcity of high-quality, legally accessible multimodal datasets and the tendency of models to overfit to specific distributions. To address these issues, researchers at the Singapore University of Technology and Design investigated whether the wealth of existing text-based hate speech data could be used to "teach" models how to identify multimodal hate speech through Few-Shot In-Context Learning.
Methodology
Few-Shot In-Context Learning (ICL)
Rather than employing computationally expensive fine-tuning, the study utilized ICL. In this setup, the model is provided with a "support set" of labeled examples within the prompt. These examples serve as a guide for the model to classify a new, unseen test case.
Cross-Modality Transfer and Image Captioning
The core innovation lies in using text-only datasets (such as Latent Hatred) as the support set for multimodal test cases. To bridge the gap between the visual components of memes and text-centric LLMs, the researchers used the One-for-All (OFA) model to generate descriptive text captions for the meme images. This allowed the LLM to process the meme as a purely textual prompt containing both the original caption and the generated image description.
Rationale Generation
To deepen the model's understanding, the researchers used Mistral-7B to generate "rationales"—detailed explanations of why a specific post is considered hateful. Including these rationales in the few-shot examples helps the model move beyond simple keyword matching, allowing it to grasp underlying derogatory intent and harmful stereotypes.
Advanced Retrieval
The effectiveness of ICL often depends on the relevance of the support examples. The study compared random sampling against information retrieval algorithms like TF-IDF and BM-25. By using BM-25 to select examples semantically similar to the target meme, the researchers significantly enhanced the model's contextual awareness.
Experimental Setup
The study evaluated several LLMs, including Mistral-7B, Qwen2-7B, LLaVA-7B, and Llama3-8B, across three key datasets:
- Latent Hatred: A text-based dataset of tweets used as the primary cross-modality support set.
- Facebook Hateful Memes (FHM): A benchmark multimodal dataset used for testing.
- Multimedia Automatic Misogyny Identification (MAMI): A real-world dataset of misogynistic memes used to evaluate performance on out-of-distribution data.
Key Results and Discussion
The Superiority of Text-Based Teaching
A significant finding of the research was that text-based demonstrations often outperformed vision-language demonstrations. This suggests that mature text datasets capture the nuances of hate speech more effectively than current, smaller multimodal datasets. Using the Latent Hatred support set, the Mistral-7B model achieved F1 score improvements of 0.64 on the FHM dataset and 1.23 on the MAMI dataset compared to zero-shot baselines.
Scaling and Rationales
Performance generally scaled with the number of examples provided, with a 16-shot prompt configuration consistently emerging as the "sweet spot" for accuracy. Furthermore, the inclusion of rationales proved to be a force multiplier, providing the necessary context for the model to identify implicit hate that lacks explicit slurs.
Limitations and Future Work
Despite the performance gains, the researchers identified several limitations:
- Captioning Loss: Converting images to text via OFA can result in the loss of visual nuances, such as sarcasm or symbolic imagery.
- Sensitivity Issues: Exposure to multiple hateful examples in a prompt can lead to "oversensitivity," where the model incorrectly flags neutral content as hateful (false positives).
- Model Scale: The study focused on 7B and 8B parameter models; future work will explore whether these benefits scale to frontier models like GPT-4.
Conclusion
This research demonstrates that cross-modality in-context learning is a powerful tool for hate speech detection. By leveraging abundant text-based data and providing logical rationales, LLMs can effectively bridge the gap between modalities, offering a scalable and efficient solution for moderating complex multimodal content.
Summary updated