Emoji-Based Transfer Learning for Sentiment Tasks

Susann Boy, Dana Ruiter, Dietrich Klakow

Abstract

This paper explores how the "emotional shorthand" of emojis can be used to boost performance on sentiment tasks like hate speech detection, especially in low-resource languages. By using emoji prediction as a pre-training step (transfer learning), the researchers achieved significant performance gains—up to a +0.280 F1 score improvement—finding that monolingual models capture crucial cultural nuances that multilingual models often miss.

What Problem Does This Paper Address?

Natural Language Processing (NLP) models for sentiment analysis and hate speech detection typically require massive amounts of manually labeled data. While English has plenty of resources, other languages often face a "data desert."

However, social media provides a massive, untapped reservoir of "distantly supervised" data: emojis. Emojis act as natural labels for the underlying emotion of a post. The authors tackle the challenge of how to effectively transfer the emotional knowledge encoded in emojis to specific downstream tasks, while accounting for the fact that emoji usage isn't universal—it varies wildly across different cultures and languages.

Methods

The researchers employed a transfer learning pipeline using Transformer-based language models (BERT-DE for German and BERT-Multilingual for others). The process involves two stages:

  1. Source Task (ST): The model is trained to predict emojis or emoji clusters from tweets where the emojis have been removed.
  2. Target Task (TT): The pre-trained weights are then fine-tuned on specific sentiment or hate speech datasets.

The paper introduces three ways to group emojis for the source task:

  • Single Emoji Prediction (EP): Predicting which of the 64 most common emojis was originally in the tweet.
  • Unsupervised Clustering (KMeans): Using emoji embeddings to group them into "emotional neighborhoods" (e.g., a "happy" cluster vs. an "unhappy" cluster).
  • Supervised Clustering (PMI): Using Pointwise Mutual Information to group emojis based on their statistical association with specific labels, such as "slurs" (for hate speech) or "positive/negative" labels in the target data.

Datasets

The study utilized a massive collection of tweets (2011–2019) for the source tasks across five languages: German (16M tweets), English (323M), Spanish (320M), Polish (7M), and Arabic (183M). These were applied to target tasks including Hate Speech (HS) detection in German, Spanish, and Polish, and Sentiment Analysis (SA) in German, English, and Arabic.

Key Insights and Ideas

  • Cultural Nuance Matters: One of the most striking findings is that monolingual source tasks often outperform multilingual ones. Emojis are culturally specific; for example, the "recycling" emoji ♻️ is a top-5 emoji in Arabic Twitter (often used to encourage sharing/retweeting), a nuance lost in a generalized multilingual model.
  • The "Emoji Density" Threshold: Transfer learning is most effective when the target dataset has a high percentage of emoji usage. If the target task is "emoji-poor" (like the English SA dataset at 1.9%), the benefits of emoji-based pre-training vanish.
  • PMI-Swear is a Powerhouse for Hate Speech: For detecting hate speech, training the model to distinguish between "slur-associated emojis" and "neutral emojis" (PMI-Swear) provided the largest gains. It effectively teaches the model the "vibe" of toxic language before it ever sees a labeled hate speech example.
  • Balance is Key: The transfer is significantly more successful when the target task has a balanced label distribution. In highly unbalanced datasets, the model tends to struggle with the minority class regardless of the emoji pre-training.

Key Results

The experimental results demonstrate that emoji-based pre-training can lead to substantial improvements over standard baselines and even surpass existing benchmarks.

Performance comparison across monolingual and multilingual settings for various target tasks.

As shown in the performance charts, the gains are particularly pronounced in hate speech detection. On the German Hate Speech task (HS-DE), the PMI-Swear method achieved an F1 score of 0.730, a staggering +0.280 improvement over the baseline. In the Polish Hate Speech task (HS-PL), the emoji-prediction (EP) approach achieved an F1 of 0.617, actually surpassing the State-of-the-Art (SOTA) result of 0.586.

Final F1 scores of the best-performing emoji-based methods compared to State-of-the-Art (SOTA) results.

Sentiment Analysis (ternary classification: positive/negative/neutral) proved more challenging than binary Hate Speech classification. Gains in SA were generally more modest, suggesting that the ternary objective is a more difficult leap for the model to make from emoji prediction.

Limitations and Future Work

The authors acknowledge that their method is highly dependent on the quality and quantity of the source emoji data. For languages like Polish, where the slur list was smaller and the tweet corpus was thinner, the gains were less consistent.

Additionally, the study focused on tweets. Future work could explore whether these emoji-based representations transfer well to other domains, like product reviews or news comments, where emoji usage might be less frequent or used differently. There is also room to explore more sophisticated clustering techniques beyond KMeans and PMI to capture the multi-faceted meanings of emojis.

Summary updated

BibTeX
@inproceedings{boy2021emoji,
  author = {Susann Boy and Dana Ruiter and Dietrich Klakow},
  title = {{Emoji-Based Transfer Learning for Sentiment Tasks}},
  booktitle = {Student Research Workshop @ EACL},
  year = {2021},
  doi = {10.18653/v1/2021.eacl-srw.15},
}
Figure