Text or Image? What is More Important in Cross-Domain Generalization Capabilities of Hate Meme Detection Models? (2024)

Abstract: This paper delves into the formidable challenge of cross-domain generalization in multimodal hate meme detection, presenting compelling findings. We provide evidence supporting the hypothesis that only the textual component of hateful memes enables the multimodal classifier to generalize across different domains, while the image component proves highly sensitive to a specific training dataset. The evidence includes demonstrations showing that hate-text classifiers perform similarly to hate-meme classifiers in a zero-shot setting. Simultaneously, the introduction of captions generated from images of memes to the hate-meme classifier worsens performance by an average F1 of 0.02. Through blackbox explanations, we identify a substantial contribution of the text modality (average of 83%), which diminishes with the introduction of meme’s image captions (52%). Additionally, our evaluation on a newly created confounder dataset reveals higher performance on text confounders as compared to image confounders with average ∆F1 of 0.18.

## introduction recently many hate-meme detection multimodal (mm) systems have been proposed, see @xcite for a survey and @xcite @xcite @xcite @xcite for individual contributions, but it is an ongoing concern that they do not generalize well in a cross-domain setting. possible causes are (i) the implicit knowledge captured by multimodal hate messages (memes) @xcite @xcite , (ii) additional annotation noise in multi-modal settings @xcite , and (iii) more complex network architectures. in this study, we explore the generalization capabilities of mm models for detecting hate memes. while previous studies @xcite support the significant role of image modality in other multimodal-based downstream tasks, however, in the case of meme classification, the meaning can only be correctly inferred from also looking at the image, so we find the analysis to be of special importance and worth replicating. consequently, we initiate the evaluation of these models in settings outside their domain. we observe a significant decline in performance, with an average macro f1 score of 0.28. we aim to tackle this issue by utilizing a textonly (unimodal) hate classifier, specifically crafted for the detection of hateful memes. previous research @xcite @xcite demonstrates relatively higher generalization capabilities in the context of unimodal text-only hate. our approach involves applying an unimodal transformation to memes by concatenating the text within the meme with a caption generated from the meme's image. subsequently, we train a text-based classifier using a combination of nine diverse hate speech datasets and assess its performance on a transformed meme test set. we observe performance levels from our unimodal classifier that are comparable to those of mm models. in certain instances, our unimodal classifier even exhibits an improvement in performance, with an average f1 increase of 0.05 compared to late-fusion-based mm models. the results make us infer that the text modality demonstrates superior generalizability compared to the image modality in detecting hateful memes. figure 1 gives an overview of our experimental setup. additionally, we find that mm models behave differently than textual-based models. we retrain the mm models on hateful meme datasets which also include captions generated from the images available in the memes. surprisingly, in comparison with existing models, in general, we find small performance drops (average ∆f1 of 0.02) in both in-domain as well as out-of-domain settings regardless of the presence of captions in the test sets. we explain the behavior of mm models by computing the contribution of text and image modality individually toward the prediction. we apply shapley values @xcite to the features used in the models and average the final score for each modality (section 3). our results indicate a substantial contribution (83%) of textual modality by the models evaluated on all the datasets we have used in our study. nevertheless, incorporating the image caption of the meme into the input data during the mm model training results in a decreased textual contribution of 52%. we believe that images in hateful memes are more like facilitators and provide context to the mm models. to validate this, we compose a confounder dataset where we subset from the harmeme and fb dataset @xcite , selecting 100 memes featuring celebrities or known figures such as donald trump, nelson mandela and adolf hitler. we observe that mm models are sensitive to text confounders, while the prediction labels remain unchanged when the model is triggered with image confounders. (an average ∆ f1 of 0.18 is observed when the mm model is evaluated on text and image confounder sets). although, prior studies such as @xcite have represented similar hypotheses. however, we find such studies for explicit types of downstream tasks. in this paper, we present compelling evidence substantiating the hypothesis that the generalization of multimodal classifiers across diverse domains is primarily attributable to the textual component of hateful memes. remarkably, our findings reveal a heightened sensitivity of the image part to the nuances of a specific training dataset. we believe we are the first to provide a thorough analysis supporting this idea, making our work unique in contributing to the field. ## modality contribution with shapley values applying the method proposed by parcalabescu and frank, 2023, we attempt to investigate the modality contribution of existing hate meme detection models. there are multiple existing methods that can be used to estimate the importance of the model's features in the prediction process. shapley values provide important ingredients for sample-based explanations that can be aggregated in a straightforward way into dataset-level explanations for machine learning methods @xcite . we calculate shapley values for meme text tokens and image patches utilized in mm models during prediction. each entity (token or patch) through its shapely value gauges its impact on the model prediction, such as the likelihood of imagesentence alignment. it can be positive (enhancing the model prediction), negative (diminishing it), or zero (no discernible effect). ## experiments & results we conduct multiple sets of experiments in this study. initially, we assess the cross-domain performance of hate-meme classifiers to gauge their generalization capabilities. subsequently, we compare the performance of text-only hate classifiers on the textual component of memes with that of the hate-meme classifiers. we also assess the impact of captions generated from the image component of memes on text-only hate classifiers and hate meme detection models. additionally, we compare the modality contribution from the blackbox explanations of the models with and without the introduction of captions. finally, we apply the models to a confounder dataset to evaluate their sensitivity to a particular modality confounder set. ## conclusion commencing from the observation that multimodal hate-meme classifiers exhibit poor generalization to other datasets, we demonstrate that comparable cross-domain performance can be achieved by disregarding the image segment and concentrating solely on the text. furthermore, we reveal that text classifiers exhibit improved performance when incorporating image content into the text classifier through image captioning. intriguingly, the introduction of captions generated from meme images to the hate meme classifier leads to a deterioration in performance. the insights obtained from the analysis of modality-specific contributions, along with the diminishing effect of including captions, indicate that current multimodal models are primarily focused on finding alignment between image and text tokens at a concrete level. the addition of captions generated by other multimodal models misdirects attention to those low-level alignments, whereas text-image alignment in hate text classifiers typically occurs at a more abstract (metaphor-ical) level. it is evident that the meaning of the image could be extracted and incorporated at a higher level, where current models and training regimes fall short in addressing this issue. additionally, our evaluation on a newly established confounder dataset underscores superior performance on text confounders as opposed to image confounders. these findings strongly support the assertion that the image component of multimodal hate meme classifiers exhibits limited transferability, with the generalization capabilities primarily dependent on the text component of the meme.