Twitter Sentiment Analysis via Bi-sense Emoji Embedding and Attention-based LSTM

Yuxiao Chen, Jianbo Yuan, Quanzeng You, Jiebo Luo

TL;DR

Researchers have developed a "bi-sense" embedding approach that assigns two distinct mathematical vectors to every emoji—one for positive contexts and one for negative. By combining these dual-meaning embeddings with an attention-based LSTM, the model can effectively navigate linguistic nuances like sarcasm and irony, significantly outperforming traditional sentiment analysis methods.

What Problem Does This Paper Address?

Sentiment analysis on social media is notoriously difficult because people don't always mean what they say—or what they "emoji." While textual sentiment analysis is a mature field, the role of emojis has often been oversimplified.

Most existing models treat an emoji as a single, static entity (a "word-emoji embedding"). However, emojis are linguistically complex. A "grinning face" (😁) might signal genuine happiness in one tweet, but biting sarcasm in another (e.g., "I love sitting in four hours of traffic 😁"). When a model only has one vector for that emoji, it gets "confused" by these contradictory signals. The authors tackle this "sentiment inconsistency" by acknowledging that an emoji’s meaning is a function of its context.

Methods

The authors propose a novel framework centered on Bi-sense Emoji Embeddings. Instead of one vector per emoji, they create two: a positive-sense vector and a negative-sense vector.

  1. Initialization: They use the fasttext algorithm to learn these embeddings. To distinguish between the two senses during training, they use a rule-based tool (VADER) to provide "weak labels" to a massive dataset of tweets, tagging the emoji tokens as either positive or negative based on the surrounding text.
  2. Architecture: They introduce two specific architectures using Long Short-Term Memory (LSTM) networks:
  3. WATT-BiE-LSTM (Word-guide Attention): Here, each word in the tweet "guides" the model on which emoji sense to pay attention to at that specific moment.
  4. MATT-BiE-LSTM (Multi-level Attention): This model looks at the tweet as a whole to determine the emoji's sentiment, then uses that emoji information to re-evaluate the importance of specific words in the text.
  5. Attention Mechanism: The core innovation is the "self-selected" attention, which allows the model to dynamically weigh the positive vs. negative sense of an emoji based on the textual cues provided by the rest of the tweet.

Datasets

The study utilizes a massive, custom-crawled dataset of Twitter data:

  • AA-Sentiment (Automatic Annotation): A large-scale dataset of ~1.49 million tweets. Labels were generated automatically using VADER (filtering for high-confidence scores > 0.7 or < -0.7) to provide a "weak" ground truth for pre-training.
  • HA-Sentiment (Human Annotation): A smaller, high-quality set of 4,183 tweets manually labeled by human annotators. This was used for fine-tuning and final testing, specifically targeting tweets where sentiment might be more ambiguous (scores between 0.6 and 0.7).

Key Insights and Ideas

  • The Sarcasm Detector: The bi-sense approach is essentially a structural solution for sarcasm. By allowing the emoji to "flip" its vector to a negative sense when the text is negative, the model avoids the "tug-of-war" between a happy emoji and a sad sentence.
  • Context is King: The visualization of attention weights (Figure 3 in the paper) reveals that the bi-sense model ignores "sentiment-irrelevant" words (like "hoodies" or "after") and focuses on high-impact words (like "happy" or "ridiculous") to decide which emoji sense to activate.
  • Clustering of Senses: Using t-SNE visualizations, the authors found that positive-sense embeddings and negative-sense embeddings for the same emoji cluster in entirely different regions of vector space. This confirms that the "dual life" of an emoji is mathematically measurable.

Key Results

The bi-sense models consistently outperformed the baselines across both datasets:

  • Accuracy Gains: On the human-annotated (HA) dataset—the more difficult of the two—the WATT-BiE-LSTM achieved an accuracy of 83.4% and an F1 score of 0.859, significantly higher than a standard LSTM (70.7% accuracy).
  • Superiority over Single-Sense: Even a simple LSTM using bi-sense embeddings (BiE-LSTM) outperformed an LSTM using traditional single-vector emoji embeddings (E-LSTM), proving that the dual-vector representation itself is a powerful feature, regardless of the attention mechanism used.

Limitations and Future Work

The authors identify a few areas for growth:

  • Binary Constraint: Currently, the model only considers two senses (positive and negative). However, emojis can convey complex emotions like surprise, anger, or fear that don't fit neatly into a binary scale.
  • Multi-sense Expansion: The authors suggest that this framework could be extended to "multi-sense" embeddings, similar to how Word Sense Disambiguation (WSD) works in broader Natural Language Processing.
  • Beyond Emojis: The "bi-embedding" framework could potentially be applied to ambiguous words (like "sick" or "wicked") that have evolved to have polar opposite meanings in slang vs. formal English.

Summary updated

Abstract

Sentiment analysis on large-scale social media data is important to bridge the gaps between social media contents and real world activities including political election prediction, individual and public emotional status monitoring and analysis, and so on. Although textual sentiment analysis has been well studied based on platforms such as Twitter and Instagram, analysis of the role of extensive emoji uses in sentiment analysis remains light. In this paper, we propose a novel scheme for Twitter sentiment analysis with extra attention on emojis. We first learn bi-sense emoji embeddings under positive and negative sentimental tweets individually, and then train a sentiment classifier by attending on these bi-sense emoji embeddings with an attention-based long short-term memory network (LSTM). Our experiments show that the bi-sense embedding is effective for extracting sentiment-aware embeddings of emojis and outperforms the state-of-the-art models. We also visualize the attentions to show that the bi-sense emoji embedding provides better guidance on the attention mechanism to obtain a more robust understanding of the semantics and sentiments.
BibTeX
@inproceedings{chen2018twitter,
  author = {Yuxiao Chen and Jianbo Yuan and Quanzeng You and Jiebo Luo},
  title = {{Twitter Sentiment Analysis via Bi-sense Emoji Embedding and Attention-based LSTM}},
  booktitle = {ACM Multimedia},
  year = {2018},
  doi = {10.1145/3240508.3240533},
}
Figure