Memeify: A Large-Scale Meme Generation System

Suryatej Reddy Vyalla, Vishaal Udandarao · OpenReview

Abstract

Memeify is a large-scale meme generation system that utilizes GPT-2 and a novel dataset of 1.1 million memes to automate the creation of contextually relevant humor. By organizing memes into six emotional themes—Normie, Savage, Depressing, Unexpected, Frustrated, and Wholesome—the system allows for both template-specific and mood-based generation. Human evaluation shows that Memeify-generated captions are indistinguishable from human-authored ones 66.67% of the time, marking a significant advancement in automated digital humor.

Introduction

While memes are the "lingua franca" of the modern internet, automating their creation is surprisingly difficult. A good meme requires a perfect marriage of visual context, cultural nuance, and humor. Prior attempts at automated meme generation faced two major hurdles: data scarcity and model limitations. Existing datasets were often small or imbalanced, and earlier LSTM-based models failed to capture the subtle, irreverent humor characteristic of viral memes.

Methodology and Dataset

The authors introduced the Memeify Dataset, a collection of 1.1 million meme captions across 128 classes, primarily scraped from QuickMeme. To manage this scale, they performed stratified sampling to identify six broad emotional "themes": Normie, Savage, Depressing, Unexpected, Frustrated, and Wholesome.

The system utilizes a Transformer-based architecture (GPT-2) for caption generation. To ensure relevance to specific templates, the researchers employed class-conditioning, prepending class names to captions during training. This taught the model to associate specific labels with distinct styles of humor.

The Primacy of Text in Meme Thematics

A core insight of the research is that the emotional resonance of a meme is driven primarily by its text rather than its background image. TSNE plots of the dataset reveal that while word embeddings form distinct, thematic clusters, image vectors for the same memes remain scattered.

TSNE plots comparing word clusters (a) and image clusters (b), showing that text provides clearer thematic separation.

This finding suggests that GPT-2’s self-attention mechanism is the "secret sauce" for humor. Unlike linear models, Transformers can relate distant words, which is essential for the setup-and-punchline structure of many memes.

System Architecture

The Memeify backend was built using Flask and Redis. For the web application, a VGG16 convolutional neural network acts as a feature extractor. When a user uploads a custom image, the system converts it into a vector and uses Locality Sensitive Hashing (LSH) to find the most similar existing meme template.

The Memeify system architecture, illustrating the workflow for both random theme-based and custom image-based meme generation.

Experimental Results

A human study involving 20 experts validated the system's efficacy:

  • The Meme Turing Test: Volunteers misidentified Memeify-generated memes as human-made 66.67% of the time.
  • User Satisfaction: Memeify scored 3.1/5, nearly matching the 3.23 score of original memes and outperforming previous baselines.
  • Theme Recovery: Humans correctly categorized generated memes into the six themes with 85.5% accuracy, confirming the model's ability to capture a specific "vibe."

Conclusion

Memeify demonstrates the power of large-scale, class-conditioned transformer models in creative tasks. While currently limited to one or two-part captions and existing templates, future work aims to address multi-panel formats and visual synthesis to further push the boundaries of automated humor.

Summary updated

BibTeX
@misc{vyalla2019memeify,
  author = {Suryatej Reddy Vyalla and Vishaal Udandarao},
  title = {{Memeify: A Large-Scale Meme Generation System}},
  year = {2019},
  eprint = {1910.12279},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1910.12279},
}
Figure