MemeSequencer: Sparse Matching for Embedding Image Macros

Abhimanyu Dubey, Esteban Moro, Manuel Cebrian, Iyad RahwanarXiv 2018

TL;DR

MemeSequencer is a novel multimodal framework designed to understand internet memes by decoupling their background templates from text or image overlays using sparse representation. By separating global context from local mutations, it creates a rich semantic embedding that significantly outperforms standard deep learning models in meme clustering, retrieval, and virality prediction.

What Problem Does This Paper Address?

Memes, particularly "image macros" (a template image with superimposed text or imagery), are the lifeblood of internet culture and information cascades. However, analyzing them computationally is incredibly difficult. Standard Convolutional Neural Networks (CNNs) treat text overlays as pixel noise or fail to separate the background template's meaning from the overlay's specific context (as illustrated in Futurama Fry template and overlay types). This prevents models from grouping memes of the same template together or tracking how subtle text mutations alter a meme's virality and semantic trajectory.

Futurama Fry template and overlay types

Methods

The authors introduce MemeSequencer, which processes image macros through a multi-step pipeline:

  1. Overlay Decoupling via Sparse Matching: Using an $\ell_1$-sparse reconstruction framework, the algorithm matches a given meme to its original, clean template image. This approach is highly robust to severe occlusions like large text blocks. If the template set is unknown, they present an unsupervised algorithm that uses Median Blending to iteratively reconstruct clean templates from a noisy dataset of memes (demonstrated in Template recovery via median blending).
  2. Decoupled Feature Extraction: Instead of feeding the raw meme into a CNN, MemeSequencer extracts features from the matched template image and the difference image (meme minus template) separately, then concatenates them.
  3. Textual Feature Extraction: Optical Character Recognition (OCR) extracts the text, which is then embedded using either Word2Vec pooling or Skip-Thought vectors.
Template recovery via median blending

The complete architecture is visualized below: The central feature extraction pipeline

Figure 3: The central feature extraction pipeline.

Datasets

The framework was evaluated on three major datasets:

  • Viral Images Dataset: 10,078 Reddit images across 20 subreddits/topics, evaluated using three splits: Viral-Complete (VCom), Viral-Pairs (VPair), and Viral-RandomPairs (VRPairs).
  • Memegenerator Dataset: 326,181 meme images scraped with upvote counts, representing the largest dataset used.
  • Quickmeme Dataset: 178,801 meme images from October 2012.

Key Insights and Ideas

  • Context Separation is Key: Treating a meme as a single monolithic image discards crucial evolutionary data. Separating the global context (the template) from the local context (the overlay) allows deep learning models to map related memes closer together in semantic space.
  • Robustness of Sparse Representations: $\ell_1$ minimization proves remarkably effective at stripping away text overlays to identify the underlying template, even when the text covers a significant portion of the image.
  • Memes as Evolving Organisms: By cleanly separating templates and text, the embeddings can be used to construct "phylogenetic trees" of memes, tracing how a single template mutates semantically over time through different online communities.

Key Results

  • Superior Clustering: MemeSequencer achieved significantly lower Davies-Bouldin Index scores and better Silhouette Scores compared to vanilla CNNs or naive image+text concatenations, proving it creates a much cleaner semantic space. Clustering analysis metrics
  • Topic & Timeline Prediction: On the Viral Images Dataset, MemeSequencer (using ResNet18 + SkipThought) achieved 80.69% accuracy in topic prediction (outperforming the previous state-of-the-art by over 5%) and 46.91% in timeline prediction.
  • Virality Prediction: In pairwise virality classification, the model achieved unmatched performance, hitting 73.03% on VCom and 85.15% on VPairs, beating existing benchmarks by up to 7%.
  • Temporal Robustness: When trained on historical meme data and tested on future time periods, MemeSequencer maintained its predictive edge, demonstrating strong resilience to cultural drift.
Figure 4: Evaluation of Sparse Matching on Clustering - variation of Silhouette Score (left), and Davies-Bouldin Index (right).

Limitations and Future Work

  • Template Dependence: The decoupling step assumes memes are derived from a finite set of templates. While the median blending algorithm helps recover templates automatically, it still requires multiple variations of a meme to succeed.
  • OCR Vulnerability: The textual pipeline depends heavily on the accuracy of the OCR engine (Tesseract). Poorly rendered text or stylized fonts can degrade performance, forcing the model to fall back on mean template text features.
  • Future Directions: The authors suggest combining this content-based embedding with social network structure models to create a holistic framework for predicting information diffusion and tracking large-scale cultural evolution online.

Summary updated

Abstract

The analysis of the creation, mutation, and propagation of social media content on the Internet is an essential problem in computational social science, affecting areas ranging from marketing to political mobilization. A first step towards understanding the evolution of images online is the analysis of rapidly modifying and propagating memetic imagery or `memes'. However, a pitfall in proceeding with such an investigation is the current incapability to produce a robust semantic space for such imagery, capable of understanding differences in Image Macros. In this study, we provide a first step in the systematic study of image evolution on the Internet, by proposing an algorithm based on sparse representations and deep learning to decouple various types of content in such images and produce a rich semantic embedding. We demonstrate the benefits of our approach on a variety of tasks pertaining to memes and Image Macros, such as image clustering, image retrieval, topic prediction and virality prediction, surpassing the existing methods on each. In addition to its utility on quantitative tasks, our method opens up the possibility of obtaining the first large-scale understanding of the evolution and propagation of memetic imagery.
BibTeX
@misc{dubey2018memesequencer,
  author = {Abhimanyu Dubey and Esteban Moro and Manuel Cebrian and Iyad Rahwan},
  title = {{MemeSequencer: Sparse Matching for Embedding Image Macros}},
  year = {2018},
  eprint = {1802.04936},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1802.04936},
}

Loading related content...

Figure