TOT: Topology-Aware Optimal Transport For Multimodal Hate Detection

Linhao Zhang, Li Jin, Xian Sun, Guangluan Xu, Zequn Zhang, Xiaoyu Li, Nayu Liu, Qing Liu, Shiyao Yan

TL;DR

Detecting implicit hate in memes is notoriously difficult because the text and image often lack direct semantic overlap. This paper introduces TOT (Topology-Aware Optimal Transport), a framework that uses kernel methods and optimal transport theory to bridge the "modality gap" between text and images, allowing for more accurate and interpretable detection of subtle, harmful content.

What Problem Does This Paper Address?

Standard hate speech detection often relies on explicit markers like slurs or obvious visual cues. However, memes frequently employ implicit harm, where the text and image appear innocent in isolation but become offensive when combined.

Consider a meme that pairs the word "Pakistanis" with a picture of pigs. A human immediately perceives the dehumanizing intent, but a machine sees no direct semantic link between the linguistic token and the visual object. Existing multimodal models often struggle with this "distributional modality gap"—the fact that text and image features live in very different mathematical spaces—and their internal attention mechanisms often lack logical interpretability.

Figure 1: Differences between explicit-aligned and implicit- aligned memes. The aligning procedure is naturally com- pleted in explicit harmful content, but is indispensable for implicit cases.

Methods

The authors propose the TOT framework to decipher these implicit connections through three main stages:

  1. Input Representation: They use CLIP (Contrastive Language-Image Pre-training) to extract both global and local features for the meme's image and text.
  2. Kernel-Based Optimal Transport: To bridge the modality gap, they map these features into a Reproducing Kernel Hilbert Space (RKHS) using a Gaussian kernel. In this space, they formulate the alignment of image patches to text tokens as an Optimal Transport (OT) problem. By solving this using the Sinkhorn algorithm, the model finds the most efficient "transportation plan" to align the two modalities, effectively finding the hidden links between disparate clues.
  3. Dynamic Topology Reasoning: Once aligned, the features are treated as nodes in a bipartite graph. The model performs multiple steps of reasoning across this graph to propagate information and capture complex inter-modal correspondences.

Finally, a residual global interaction module combines these reasoned scores with global CLIP features to make a final classification.

Figure 2: The model architecture of our TOT. Firstly, the representations of images and text can be learned through CLIP. Secondly, Kernel Mapping stage formulates the transportation cost matrix to optimize. Thirdly, we perform topology aligning and output two graphs with aligned representation. Finally, TOT conducts reasoning to calculate classification scores.

Datasets

The model was evaluated on two recent, real-world benchmarks:

  • Harm-C: A dataset of memes related to COVID-19.
  • Harm-P: A dataset of memes related to US politics.

These datasets are particularly challenging because they contain nuanced, topical humor and satire that often borders on or crosses into hateful territory.

Key Insights and Ideas

  • The Kernel Trick for Modalities: While kernel methods are "old school" in machine learning, this paper shows they are highly effective for eliminating the distributional gap between vision and language, providing a more stable foundation for alignment than raw feature concatenation.
  • OT as Interpretable Attention: Unlike standard attention mechanisms which can be "noisy," Optimal Transport provides a mathematically grounded way to ensure every relevant piece of information in one modality is accounted for in the other.
  • Topology Matters: Treating multimodal alignment as a graph problem allows the model to "think" through the relationship between a specific word and a specific image region over several iterations, mimicking a human's cognitive process when deciphering a complex joke or slur.

Key Results

TOT achieved new state-of-the-art (SOTA) performance on both datasets. In binary classification (Harmful vs. Non-Harmful), TOT outperformed the previous best model (MOMENTA) by 3.13% in Macro-F1 on Harm-C and 3.02% on Harm-P.

Qualitative analysis (see Figure 4) shows that the model's "heat maps" successfully identify the specific regions of an image that align with harmful text, such as correctly linking the phrase "The Democrat Party" to a satirical image of a donkey.

Figure 4: Case studies of memes from Harm-C and Harm-P datasets.

Limitations and Future Work

The authors note that while their model is excellent at alignment, alignment itself is necessary but not always sufficient for detecting harm. They highlight "error cases" where innocent, funny memes (like a dog "herding" sheep on a computer screen) are misclassified as harmful because the model detects strong anthropomorphic alignment similar to that found in dehumanizing hate speech.

Future work will likely focus on incorporating more advanced reasoning modules that can better distinguish between puckish humor and genuine malice once the modalities are aligned.

Summary updated

Abstract

Multimodal hate detection, which aims to identify harmful content online such as memes, is crucial for building a wholesome internet environment. Previous work has made enlightening exploration in detecting explicit hate remarks. However, most of their approaches neglect the analysis of implicit harm, which is particularly challenging as explicit text markers and demographic visual cues are often twisted or missing. The leveraged cross-modal attention mechanisms also suffer from the distributional modality gap and lack logical interpretability. To address these semantic gaps issues, we propose TOT: a topology-aware optimal transport framework to decipher the implicit harm in memes scenario, which formulates the cross-modal aligning problem as solutions for optimal transportation plans. Specifically, we leverage an optimal transport kernel method to capture complementary information from multiple modalities. The kernel embedding provides a non-linear transformation ability to reproduce a kernel Hilbert space (RKHS), which reflects significance for eliminating the distributional modality gap. Moreover, we perceive the topology information based on aligned representations to conduct bipartite graph path reasoning. The newly achieved state-of-the-art performance on two publicly available benchmark datasets, together with further visual analysis, demonstrate the superiority of TOT in capturing implicit cross-modal alignment.
BibTeX
@inproceedings{zhang2023tot,
  author = {Linhao Zhang and Li Jin and Xian Sun and Guangluan Xu and Zequn Zhang and Xiaoyu Li and Nayu Liu and Qing Liu and Shiyao Yan},
  title = {{TOT: Topology-Aware Optimal Transport For Multimodal Hate Detection}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2023},
  doi = {10.1609/aaai.v37i4.25614},
}
Figure