Multi-modal Sarcasm Generation: Dataset and Solution

Wenye Zhao, Qingbao Huang, Dongsheng Xu, Peizhi ZhaoACL 2023

Abstract

Researchers introduce MuSG, the first benchmark dataset specifically designed for Multi-modal Sarcasm Generation (MSG), and propose MTMSG, a Transformer-based model that synthesizes information from images, hashtags, and OCR tokens. By leveraging cross-modal reasoning and a pointer network decoder, MTMSG generates witty, sarcastic descriptions that significantly outperform existing baselines in both automated metrics and human evaluation.

Introduction

Sarcasm is a sophisticated form of communication that relies on "incongruity"—the gap between what is explicitly said and what is actually meant. While AI has made strides in textual sarcasm detection, social media is inherently multi-modal. On platforms like Twitter, a sarcastic post often depends on the subtle interplay between an image, its embedded text, and accompanying hashtags.

Overview of the Multi-modal Sarcasm Generation task, showing the integration of visual objects, OCR tokens, and hashtags.

The challenge of Multi-modal Sarcasm Generation (MSG) is twofold. First, there is a lack of datasets focused on generation rather than detection. Second, a model cannot simply describe an image literally; it must identify the "sarcastic target" (often found in hashtags), extract text embedded in the image (OCR tokens), and generate a response that subverts the literal meaning of these visual cues.

The MuSG Dataset

To address these challenges, the authors introduced MuSG, a new benchmark dataset consisting of 5,000 manually curated image-text pairs from Twitter. The dataset was filtered to ensure clear sarcastic targets and high-quality imagery. Analysis of MuSG highlights the necessity of a multi-modal approach: 40.3% of the sarcasm originates from the image alone, while 27.3% requires both the image and hashtags for full comprehension.

The MTMSG Architecture

The proposed solution, MTMSG (Multi-modal Transformer-based Sarcasm Generation), follows an encoder-decoder paradigm with several specialized components designed for cross-modal synthesis.

The MTMSG architecture featuring multi-modal transformer layers and a pointer network decoder.

Key Components:

  • Joint Embedding Space: The model processes three distinct inputs: Hashtags (representing topic or intent), Visual Objects (detected via Faster R-CNN), and OCR Tokens (text found within the image). These are projected into a common 768-dimensional semantic space.
  • Multi-modal Transformer: These embeddings are fed into a multi-layer Transformer that facilitates intra- and inter-modality interactions. This allows the model to associate visual cues (e.g., a smiling face) with contradictory textual cues (e.g., a hashtag about a bad Monday).
  • Pointer Network Decoder: This component allows the model to "copy" specific OCR tokens directly from the image into the generated description. This ensures the sarcasm is grounded in the image's specific context, such as referencing a sign that contradicts the situation.

Experimental Results

MTMSG was evaluated against several strong baselines, including image-only models (BLIP, ViT) and text-only models (Chandler).

Quantitative Performance

MTMSG outperformed all competitors across standard metrics, achieving a CIDEr-D score of 48.6. This is a significant improvement over the next best multi-modal model, MMT, which scored 35.2.

Human Evaluation

In human trials, MTMSG was rated significantly higher in Creativity and Sarcasticness. Notably, in the "Coherence" category, it approached the scores of human-written ground-truth captions, suggesting the model produces natural-sounding and contextually appropriate language.

Key Insights and Limitations

Ablation studies confirmed that OCR tokens and hashtags are non-negotiable for this task. Removing OCR tokens led to a significant performance drop, as text within images often provides the "literal" anchor that the sarcastic comment needs to subvert. Hashtags act as a "compass," providing the necessary intent or target for the joke.

Despite this progress, "machine wit" still faces hurdles. Approximately 63% of the model's errors were attributed to a failure to capture the specific intent within OCR tokens. Additionally, the model sometimes misses subtle visual attributes, such as fine-grained facial expressions, that change the entire context of a joke.

Conclusion

This work establishes a foundation for Multi-modal Sarcasm Generation by providing both a benchmark dataset and a high-performing model. Future research will explore more sophisticated language interpreters to better decode the deeper meaning of OCR text and improve the detection of fine-grained visual cues to further bridge the gap between human and machine humor.

Summary updated

BibTeX
@inproceedings{zhao2023multi,
  author = {Wenye Zhao and Qingbao Huang and Dongsheng Xu and Peizhi Zhao},
  title = {{Multi-modal Sarcasm Generation: Dataset and Solution}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.findings-acl.346},
}
Figure