Using millions of emoji occurrences to learn any-domain representations for detecting sentiment, emotion and sarcasm

Bjarke Felbo, Alan Mislove, Anders Søgaard, Iyad Rahwan, Sune Lehmann

Abstract

NLP tasks are often limited by scarcity of manually annotated data. In social media sentiment analysis and related tasks, researchers have therefore used binarized emoticons and specific hashtags as forms of distant supervision. Our paper shows that by extending the distant supervision to a more diverse set of noisy labels, the models can learn richer representations. Through emoji prediction on a dataset of 1246 million tweets containing one of 64 common emojis we obtain state-of-the-art performance on 8 benchmark datasets within sentiment, emotion and sarcasm detection using a single pretrained model. Our analyses confirm that the diversity of our emotional labels yield a performance improvement over previous distant supervision approaches.

Introduction

Natural Language Processing (NLP) tasks like sentiment analysis usually suffer from a "data hunger" problem: manually labeling thousands of sentences for specific emotions is expensive and slow. To bypass this, researchers often use "distant supervision"—using easy-to-find markers like :) or :( as noisy labels for "happy" or "sad."

However, human emotion isn't binary. A simple "positive/negative" split misses the nuance of sarcasm, anger, or subtle social cues. DeepMoji addresses this by expanding the set of noisy labels to include 64 different emojis, allowing the model to learn a much more sophisticated "emotional vocabulary" that generalizes better to real-world language.

Methods

The core of the research is the DeepMoji architecture and a novel fine-tuning approach called "chain-thaw."

Architecture

The model uses an embedding layer followed by two bidirectional LSTM (Long Short-Term Memory) layers. Crucially, it employs an attention mechanism with skip-connections. This allows the model to "look back" at all previous layers when making a prediction, helping it capture both low-level word meanings and high-level context.

The DeepMoji architecture featuring BiLSTM layers and an attention mechanism with skip-connections.

Chain-Thaw Fine-Tuning

When moving from the emoji task to a specific benchmark (like sarcasm detection), standard fine-tuning often leads to overfitting. The authors proposed "chain-thaw," which sequentially unfreezes and trains one layer at a time (starting with the new head, then the first layer, then the second, etc.) before finally training the entire network together.

Datasets

The authors utilized a massive raw dataset of 56.6 billion tweets, filtered down to 1.2 billion relevant tweets containing at least one of 64 common emojis for pretraining. For evaluation, they benchmarked against 8 established datasets across three domains:

  • Emotion: SE0714 (news headlines), Olympic (tweets), and PsychExp (self-reported experiences).
  • Sentiment: SS-Twitter, SS-Youtube, and SE1604.
  • Sarcasm: SCv1 and SCv2-GEN (debate forum posts).

Key Insights

Emojis as Semantic Proxies

Emojis aren't just "flair"; they often disambiguate intent. The model learned that "this is the shit" (positive) and "this is shit" (negative) require very different emoji predictions, effectively learning to handle slang and negation.

Examples of DeepMoji's top emoji predictions for various sentences, demonstrating its ability to capture nuance and sarcasm.

Diversity vs. Volume

The authors showed that a model trained on a diverse set of 64 emojis significantly outperforms a model trained on just "positive vs. negative" emoticons, even when the data size is comparable. Diversity of labels forces the model to learn more granular features. Furthermore, without being told which emojis are "sad" or "happy," the model’s internal representations naturally clustered similar emojis together, proving it had captured the underlying emotional structure.

Results

DeepMoji achieved state-of-the-art (SOTA) results on all 8 benchmark datasets.

  • Sarcasm Detection: On the SCv2-GEN dataset, DeepMoji reached an F1 score of 0.75, beating the previous SOTA of 0.72.
  • Sentiment Analysis: On the SS-Youtube dataset, it achieved 93% accuracy, a significant jump from the previous 86%.
  • Beating the Human Baseline: In a sentiment agreement test, DeepMoji achieved 82.4% agreement with a consensus of human raters, outperforming the average individual human rater (76.1%).

Conclusion

DeepMoji demonstrates that massive-scale distant supervision using emojis can produce highly versatile emotional representations. While "data decay" (the deletion of tweets over time) remains a challenge for replication, the model's ability to bridge the gap between informal social media text and formal benchmarks marks a significant step forward in nuanced NLP.

Summary updated

BibTeX
@inproceedings{felbo2017using,
  author = {Bjarke Felbo and Alan Mislove and Anders Søgaard and Iyad Rahwan and Sune Lehmann},
  title = {{Using millions of emoji occurrences to learn any-domain representations for detecting sentiment, emotion and sarcasm}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2017},
  url = {https://openreview.net/forum?id=S1ExgfMuWB},
}
Figure