1 of 29

Semantic Search of Memes

on Twitter

Magdalena Saldaña

Jesús Pérez-Martín

Benjamin Bustos

2 of 29

Meme

Originally coined by the evolutionary biologist R. Dawkins as the corresponding cultural unit to the biological gene.

Ideas that are passed from host to carrier in a similar manner to genes, replicating, mutating and occasionally going extinct

"idea of a unit of cultural transmission, or a unit of imitation"

Richard Dawkins

3 of 29

Internet Meme

A virtually transmitted cultural symbol or social idea, that is shared on social media and is spread rapidly by Internet users.

“Internet Memes” can adapt to all formats available on the Internet (photo, video, text or audio)

"ideas that spread through populations via the Web. They can present as videos, Twitter hashtags, and cat photos with misspelled captions"

Steve Kolowich

4 of 29

Context

  • Memes are an interesting mode of representation in the digital age.
  • In the fields of Computer Vision and Multimedia Information Retrieval, Internet memes have attracted the attention of the research community
  • Their adequate classification and retrieval, as opposed to general images, are challenging problems since they have a more complex semantic meaning that is often ironic and ambiguous.
  • Chile is a country with high rates of internet penetration and social media usage.

"We are living in a digital world that attaches deep value to the capacity to share, ant to laugh together at almost anything"

Tom Chatfield

5 of 29

Motivation

Our long-term goal is to develop algorithms that allow us to determine which images are based on memes (or all the memes that have been created with the same image), for observing the discourse associated with said memes.

6 of 29

Objectives

  1. To build a system that identifies Chilean accounts and download all tweets that have images.
  2. To develop an algorithm capable of automatically classifying images in the meme, sticker, and no-meme classes.
  3. To develop an algorithm able to rank and match a set of memes given a sentence as a query.

7 of 29

Preliminar Concepts

Classification

Semantic Search

Vector Model

Visual Descriptor

Text Embedding

8 of 29

SemanticMemes Dataset

9 of 29

SemanticMemes Dataset

  • Large dataset of textually described memes in Spanish.
  • Four experts manually classified 52,000 images (13,000 each one) from Chilean tweets posted from May to July, 2019.
  • Three classes: 1,194 Memes, 1,443 Stickers, and 49,347 No-memes.
  • The experts provided three textual annotations of each meme:
  • the text, a visual description, and semantic information
  • Spanish Vocabulary: 8,669 words.

10 of 29

SemanticMemes Dataset

Annotations:

  • Text in Meme: La política, explicada en una foto. nueva mayoría. tú, derecha. Alguna duda?
  • Visual Description: tres personas de espalda, sentadas en una banca. La persona de la izquierda y la derecha se están dando la mano por atrás de la banca.
  • Semantic Information: alude que las coaliciones políticas en chile se encuentran confabuladas y se ponen de acuerdo respecto a como funciona el pais, dejando de lado a la ciudadanía.

11 of 29

Why using Twitter?

  • Ideal for spreading news, with presence of traditional media.
  • For situations with little information, like rumors and spam, the first information appear on social networks, particularly on Twitter.
  • The people share their story on this social networks, and this information is public and free.
  • Machine Learning techniques allows us to extract opinions and other characteristics from the text of tweets.

12 of 29

Meme Recognition Task

13 of 29

Meme Recognition Task

Classify any image among the classes meme, sticker and no-meme.

  1. Extract global visual representation of the image by ResNet-152 model
  2. Train a SVM machine learning classifier.

14 of 29

Meme Recognition Task

Classify any image among the classes meme, sticker and no-meme.

  • Extract global visual representation of the image by ResNet-152 model
  • Train a SVM machine learning classifier.

15 of 29

Meme Recognition Task

Classify any image among the classes meme, sticker and no-meme.

  • Extract global visual representation of the image by ResNet-152 model
  • Train a SVM machine learning classifier.

16 of 29

Meme Retrieval Task

17 of 29

Challenges retrieving Internet Memes

  • More search criteria that general images, e.g., the text in the meme, the context in which was created, and in some cases, the contents of more than one photo.
  • More complex semantic meanings beyond their visual appearance.
  • The text of the memes is often ironic and thus captions that contain common words may express different ideas.
  • General image retrieval algorithm cannot be used effectively for the meme retrieval task.

18 of 29

Meme Retrieval Task

Learn a common visual-semantic-embedding.

  • A language model maps the texts to a language representation vector (text embedding).
  • A visual model produces a visual representation vector with semantic information.
  • Both vectors are projected into a shared feature space. Minimizing the distance between them.

19 of 29

Meme Retrieval Task

Learn a common visual-semantic-embedding.

  • A language model maps the texts to a language representation vector (text embedding).
  • A visual model produces a visual representation vector with semantic information.
  • Both vectors are projected into a shared feature space. Minimizing the distance between them.

20 of 29

Meme Retrieval Task

Learn a common visual-semantic-embedding.

  • A language model maps the texts to a language representation vector (text embedding).
  • A visual model produces a visual representation vector with semantic information.
  • Both vectors are projected into a shared feature space. Minimizing the distance between them.

21 of 29

Meme Retrieval Task

Learn a common visual-semantic-embedding.

  • A language model maps the texts to a language representation vector (text embedding).
  • A visual model produces a visual representation vector with semantic information.
  • Both vectors are projected into a shared feature space. Minimizing the distance between them.

22 of 29

Experimental Evaluation

23 of 29

Meme Recognition Experiments

SmanticMemes dataset distribution

24 of 29

Meme Recognition Experiments

SmanticMemes dataset distribution

25 of 29

Meme Recognition Results

Average results of Meme / Sticker / No-Meme classification on the Twitter Memes

Method

Precision

Recall

F1-Score

HOG + Naive Bayes

0.556

0.554

0.547

HOG + KNN

0.554

0.55

0.546

HOG + Linear-SVM

0.574

0.574

0.57

ResNet + Naive Bayes

0.641

0.633

0.631

ResNet + KNN

0.7

0.676

0.672

ResNet + Linear-SVM

0.73

0.73

0.73

26 of 29

Meme Recognition Results

Average Confusion Matrix results of ResNet + KNN method

27 of 29

Meme Retrieval Results

SemanticMemes dataset splits:

  • Training set: 6,228 pairs
  • Validation set: 289 pairs
  • Test set: 83 pairs

Hyper-parameters:

  • Epochs: 270
  • Batch-size: 16
  • Optimizer: Stochastic Gradient Descent (SGD)
  • Learning-rate: 0.0001
  • Criterion: Triplet Ranking Loss (margin=0.1)

28 of 29

Meme Retrieval Results

Training process

29 of 29

Thanks!!

jesus.perez@ug.uchile.cl

@jes_prz

Welcome to chatbox of the Advancement in Visual Analysis Paper Session.