SEMANTIFY: Unveiling Memes with Robust Interpretability beyond Input Attribution

Dibyanayan Bandyopadhyay, Asmit Ganguly, Baban Gain, Asif EkbalIJCAI 2024

Abstract

Detecting and explaining offensive memes is a complex multimodal task where meaning is often implicit. Traditional Explainable AI (XAI) methods rely on input attribution, highlighting specific pixels or words that often lack semantic depth or cohesive themes. We present SEMANTIFY, an interpretability framework that moves beyond the input space into a conceptual space. By leveraging a global vocabulary via a language model, SEMANTIFY retrieves high-level, semantically relevant keywords (e.g., "racism", "slavery") to explain model predictions. Our approach demonstrates superior performance on the Leakage-adjusted Simulatability (LAS) metric and receives higher human ratings for relatedness and exhaustiveness compared to traditional baselines.

Introduction: The Challenge of Implicit Offense

Offensive memes present a unique challenge for AI because their harmful nature typically emerges from the interplay between image and text, rather than either component in isolation. While deep learning models can classify these memes, they often function as "black boxes."

Existing XAI tools like Integrated Gradients or SHAP focus on input attribution, pointing to specific input features. However, this approach often results in "semantic irrelevance"—where highlighted words don't capture the underlying hateful concept—and "incohesiveness," producing a scattered list of tokens without a central theme. SEMANTIFY addresses these gaps by shifting the explanation from the input space to a conceptual space.

Figure 1: Comparison between traditional input attribution and SEMANTIFY. While traditional methods highlight specific words like "Mexican" or "Child," SEMANTIFY identifies high-level concepts like "Racism" and "Slavery."

Methodology: The SEMANTIFY Framework

SEMANTIFY utilizes a two-stage architecture to generate both a classification and a semantically rich explanation.

1. Multimodal Encoding and Fusion

The system employs a frozen CLIP model to extract visual and textual features. These features are fused through a specialized "alignment-optimization" layer. This layer ensures that the multimodal representation is mathematically grounded for subsequent interpretation.

2. GPT-2 as a Classifier and Keyword Retriever

Instead of a simple classification head, SEMANTIFY uses GPT-2. The multimodal embedding acts as a prefix, and the language model is tasked with generating the next token as the label (e.g., "Offensive").

Figure 2: Detailed architecture of SEMANTIFY, showing the flow from meme input through CLIP encoding, alignment-optimization, and finally into GPT-2 for classification and keyword retrieval.

3. Four-Step Keyword Filtering

To ensure the generated explanations are faithful to the model's logic, a rigorous filtering process is applied to GPT-2's entire vocabulary:

  • Maximally Relevant: Uses Top-K sampling to identify plausible continuations of the input prompt.
  • Alignment-Optimization Correlation: A theoretically grounded filter (based on a new theorem proposed in the paper) ensuring tokens are mathematically aligned with the model's optimization gradient.
  • Semantically Relevant: Uses CLIP embeddings to verify keywords actually relate to the meme's specific content.
  • Prediction Preserving: A causal check where keywords are discarded if their inclusion as "knowledge" in the prompt alters the model's original prediction.

Key Results and Evaluation

The framework was evaluated on the Facebook Hateful Meme dataset, a standard benchmark for multimodal hate speech detection.

  • Quantitative Performance: SEMANTIFY outperformed baselines like Integrated Gradients and KernelSHAP on the Leakage-adjusted Simulatability (LAS) metric by up to 2.5 points, indicating that its explanations better allow a surrogate to simulate the model's behavior.
  • Human Validation: In blind studies, human evaluators preferred SEMANTIFY’s keywords, rating them significantly higher for "Relatedness" (3.32/5) and "Exhaustiveness" (3.30/5) compared to input attribution methods (~2.5/5).
  • Qualitative Clarity: SEMANTIFY successfully identifies abstract themes. For instance, where traditional methods might highlight "Mexican" and "Child," SEMANTIFY correctly surfaces "Racism" as the driving factor behind an offensive classification.

Conclusion

SEMANTIFY represents a significant step toward more human-understandable AI by moving interpretability into the conceptual domain. By naming the underlying offense through a global vocabulary, it provides clearer, more cohesive justifications for meme classification. Future work will explore scaling this approach to larger language models and applying it to other complex multimodal reasoning tasks like Visual Question Answering (VQA).

Summary updated

BibTeX
@inproceedings{bandyopadhyay2024semantify,
  author = {Dibyanayan Bandyopadhyay and Asmit Ganguly and Baban Gain and Asif Ekbal},
  title = {{SEMANTIFY: Unveiling Memes with Robust Interpretability beyond Input Attribution}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2024},
}
Figure