Introduction
In Chinese Social Networking Services (SNS), "meme-faces" (known as Biaoqingbao) have become a cornerstone of digital communication. Unlike standard emojis, these memes typically consist of a recognizable template image—such as the ubiquitous "Panda face"—modified with specific facial expressions or objects to match a text caption. Generating these memes automatically presents a unique challenge: the semantic gap. Standard text-to-image models rely on literal "lexicon-object" matching. However, memes are often metaphorical or emotional. A caption like "Stop it, I'm blushing" requires a model to understand it should add pink cheeks to a template rather than drawing a literal person blushing.
Methodology
The authors propose MemeFaceGenerator, a specialized Generative Adversarial Network (GAN) that moves beyond literal translation to capture the abstract, emotional, and often ironic semantics of internet subcultures. The core innovation is the introduction of Template Information into a multi-stage refinement process.
Model Architecture
Building upon the AttnGAN framework, the system utilizes a Stacked Attentional Network:
- Text Encoding: A bi-LSTM transforms natural sentences into visual-semantic representations.
- Template Injection: Instead of generating from a blank canvas, the model uses a template ($P_i$) as a supplementary signal. An editing component ($G'_i$) down-samples the template and text embedding, concatenating them to guide the generation.
- Refinement and Loss: The model generates images at increasing scales (from $64 \times 64$ to $256 \times 256$). It is trained using standard GAN loss combined with the DAMSM (Deep Attentional Multimodal Similarity Model) loss, which ensures generated image regions align with specific words in the caption.
Dataset Construction
Because no standard dataset existed for this task, the researchers created a custom pipeline:
- Collection: 56,710 meme-faces were crawled from the web.
- Processing: OCR was used to extract captions, and an Inception-v3 network combined with k-means clustering identified 33 representative template categories (e.g., "Panda face," "Wrestler face").
- Cleaning: Captions were filtered for information density and length (3–12 characters), resulting in a final high-quality set of 2,955 meme-face pairs.
Experimental Results
The model demonstrates a significant ability to capture latent semantics. For instance, the phrase "hang up the phone" prompts the synthesis of a telephone receiver, while provocative text generates "tears" or "shouting" expressions.
In human evaluations, 82.2% of generated memes were rated as "acceptable" or better, with 38.8% rated as "interesting" and perfectly matching the text's sentiment. These results suggest that by using templates as anchors, the GAN can effectively focus on modifying local regions (eyes, mouth, cheeks) to match complex human emotions.
Conclusion and Future Work
MemeFaceGenerator successfully bridges the semantic gap in meme synthesis by treating the task as an editing problem rather than pure creation. While currently limited by a relatively small dataset and a fixed number of templates, future work aims to expand the variety of meme formats and handle more complex, nuanced sentences. The authors have demonstrated the system's potential through a real-time web service, suggesting future integration into social applications as a creative tool for users.
Summary updated