Joint Modeling of Emoji Position and Its Label for Better Understanding in Social Media

Jingun Kwon, Naoki Kobayashi, Hidetaka Kamigaito, Hiroya Takamura, Manabu OkumuraJournal of Natural Language Processing 2022

TL;DR

This paper shifts the focus of emoji prediction from simply identifying which emoji to use to determining where it should be placed within a text. By jointly modeling emoji labels and their positions using Bi-Affine layers and a novel "Contextualized Dynamic-Smoothing" technique, the researchers improved prediction accuracy and demonstrated that emoji placement is a critical signal for downstream tasks like irony detection.

What Problem Does This Paper Address?

Most existing research treats emoji prediction as a simple classification task: given a string of text, predict a single emoji label, usually assuming it belongs at the end of the sentence. However, social media users are much more creative. They use emojis to replace words (e.g., using a 🌲 instead of the word "tree"), to substitute characters, or to separate distinct emotional thoughts within a single post.

The authors identify two major gaps:

  1. Positional Neglect: Ignoring where an emoji is placed loses valuable linguistic context.
  2. Dataset Contamination: They discovered that the widely used SemEval 2018 emoji dataset contained "hidden traces"—Unicode fragments (like \ufe0f)—that effectively leaked the identity of the target emoji to the models, leading to inflated performance metrics.

Methods

The authors propose a joint architecture that predicts both the position (where to insert) and the label (which emoji) simultaneously.

  • The Backbone: A Bi-LSTM captures forward and backward context, followed by a Selective Gate that weights the importance of each word based on the entire sentence's information.
  • Position Module: To find the insertion point, they compared a simple concatenation of neighboring hidden states against a more sophisticated Bi-Affine transformation. The Bi-Affine approach is better at capturing the nuanced interactions between the words surrounding a potential emoji slot.
  • Label Module & CDS: To handle the "power law" distribution of emojis (where a few emojis like ❤️ are used vastly more than others), they introduced Contextualized Dynamic-Smoothing (CDS). Instead of a static bias, CDS calculates a dynamic bias based on the local context of the predicted position, helping the model better predict infrequent or non-emotional emojis.
  • Joint Loss: The model is trained on a combined cross-entropy loss for both position and label, weighted by a hyperparameter $\lambda$.

Datasets

The researchers primarily used a Modified SemEval 2018 English Dataset. To ensure a fair test, they:

  • Removed the "hidden traces" (Unicode fragments) that caused data leakage.
  • Filtered out duplicate tweets and posts with multiple emojis to focus on single-insertion accuracy.
  • The final cleaned dataset consisted of 357,305 tweets covering the 20 most frequent emoji labels.

Key Insights and Ideas

  • Position is a Feature, Not Just an Output: The "aha moment" here is that knowing the intended position of an emoji significantly boosts the accuracy of predicting the emoji itself. The position acts as a structural clue.
  • "Fanciness" and Naturalness: Through human evaluation, the authors found that placing emojis inside the text (where they were originally intended) makes tweets feel more "natural" and "fancy" compared to just sticking them at the end.
  • Irony Detection Signal: Emojis are often used to signal irony (e.g., a sarcastic ❤️ after a mean comment). The paper shows that the position of the emoji provides better context for irony detection models than the emoji label alone.
  • The Power of Bi-Affine Layers: Borrowing from dependency parsing, the use of Bi-Affine layers proved highly effective at modeling the relationship between the "left" and "right" context of an insertion point.

Key Results

  • Prediction Performance: The best joint model (Joint Learning 4) outperformed the baseline by +2.77, +2.5, and +1.93 F-1 points for the top 5, 10, and 20 emoji categories, respectively.
  • Position Accuracy: The models achieved a high average position accuracy of ~77%, proving that emoji placement is highly predictable based on surrounding text.
  • Irony Detection: Incorporating emoji position into an irony detection task (SemEval 2018 Task 3A) improved the F-1 score from 68.9 to 70.8, outperforming models that only looked at the emoji label.
  • Human Preference: In 90% of cases, human annotators preferred the "gold" internal position of an emoji over moving it to the end of the tweet.

Limitations and Future Work

The current study is limited to tweets containing a single emoji. In reality, social media is often "replete with emojis" used in sequence or scattered throughout a long thread.

Future directions suggested by the authors include: * Extending the model to handle multiple emojis per tweet. * Applying the method to Japanese text, where different character types (Kanji, Hiragana, Katakana) might provide even stronger linguistic clues for emoji insertion. * Exploring how object-based emojis (like airplanes or cameras) can specifically replace their corresponding nouns in various languages.

Summary updated

BibTeX
@article{kwon2022joint,
  author = {Jingun Kwon and Naoki Kobayashi and Hidetaka Kamigaito and Hiroya Takamura and Manabu Okumura},
  title = {{Joint Modeling of Emoji Position and Its Label for Better Understanding in Social Media}},
  journal = {Journal of Natural Language Processing},
  year = {2022},
  doi = {10.5715/jnlp.29.467},
}
Figure