Unleashing the Power of Emojis in Texts via Self-supervised Graph Pre-Training

Zhou Zhang, Dongzeng Tan, Jiaan Wang, Yilong Chen, Jiarong Xu

Abstract

Emojis are integral to modern digital communication, yet they are frequently overlooked or simplified in Natural Language Processing (NLP) pipelines. This paper introduces a novel self-supervised graph pre-training framework designed to capture the complex, symbiotic relationships between emojis, words, and social media posts. By constructing a heterogeneous graph and employing contrastive learning and link reconstruction, the model generates "universal" emoji embeddings. These embeddings significantly enhance the performance of various Large Language Models (LLMs) on downstream tasks, including sentiment analysis and post popularity prediction, demonstrating improvements of up to 10% in F1 scores across diverse architectures.

Introduction

Despite being a cornerstone of modern digital communication, emojis are often the "forgotten children" of NLP. Most current approaches either strip emojis away as noise, treat them as ordinary Unicode characters (ignoring their unique emotional weight), or rely on static text descriptions that fail to capture how emoji meanings evolve in different contexts. Emojis often serve as emotional anchors, sometimes even reversing the literal meaning of a sentence through sarcasm.

The core challenge is that emojis and text are symbiotic: an emoji can completely flip the sentiment of a sentence, and similar texts often cluster around the same emojis. Existing models struggle to capture this reciprocal relationship. The authors aim to bridge this gap by modeling the interaction between posts, words, and emojis as a structural graph problem rather than a simple sequence problem.

Methodology

The authors introduce a two-stage approach: Heterogeneous Graph Construction and Self-supervised Pre-training.

1. Graph Construction

The framework begins by building a graph with three distinct types of nodes:

  • Post nodes: Representing the entire textual content of a social media post.
  • Word nodes: Representing individual words from a vocabulary.
  • Emoji nodes: Representing the most frequent emojis.

Edges are drawn to represent relationships, such as whether a post contains a specific emoji or word, and whether a word appears in close proximity to an emoji within a sentence. This structure allows emojis to act as semantic bridges; if two posts share an emoji but use different words, the graph helps the model realize those posts might share a common sentiment or topic.

2. Pre-training Tasks

To train the Graph Neural Network (GNN) encoder without labeled data, the model utilizes two self-supervised tasks:

  • Node-level Sub-graph Contrastive Learning: The model learns to identify if two sampled sub-graphs originated from the same starting node, helping it capture semantic similarity across the graph.
  • Edge-level Link Reconstruction: The model is tasked with predicting whether an edge should exist between two nodes (e.g., predicting if a specific emoji belongs in a specific post).
The proposed framework: (a) Graph Construction, (b) Pre-training Tasks, and (c) Downstream Task integration.

The resulting embeddings are then integrated into the embedding layers of various backbone models (like BERT, RoBERTa, or Llama2) for downstream tasks.

Experimental Setup

The model was evaluated using two primary datasets:

  • Xiaohongshu (Little Red Book): A massive dataset of over 4 million posts from the Chinese social media platform. This was used for pre-training and a "popularity prediction" task, which involves predicting the number of likes, collects, and comments a post will receive.
  • Twitter: A public dataset used for sentiment classification (negative, neutral, and positive), specifically filtered to include posts with emojis.

Results and Analysis

The proposed model consistently outperformed strong baselines across all tested LLM backbones.

Key Performance Metrics

On the Xiaohongshu dataset, the model outperformed baselines like Emoji2vec and simple translation methods by 2% to 10% in F1 score. Notably, these improvements were observed across a wide variety of architectures, from older encoders like BERT to modern 7-billion-parameter LLMs like Llama2-7B, proving the approach is backbone-agnostic.

Performance comparison (F1 score) for popularity prediction across different LLM backbones.

On the Twitter dataset, the model achieved an F1 score of 0.5679, outperforming specialized emoji models like SEntiMoji and DeepMoji. Ablation studies confirmed that removing either the node-level or edge-level pre-training tasks resulted in a performance drop, indicating that both global context and local word-emoji interactions are necessary for robust representations.

Emergent Semantic Clustering

t-SNE visualizations of the learned embeddings showed that the model naturally grouped emojis by emotion (e.g., "happiness" emojis in one cluster, "sadness" in another) and category (objects vs. faces) without any explicit supervision. Unlike static methods, this graph-based approach learns emoji meanings from how they are actually used alongside words in the wild.

Conclusion and Future Work

While the framework significantly advances emoji representation, it currently only handles Unicode-based emojis. It cannot yet process "stickers" or custom image-based emojis common on platforms like WeChat or Discord. Furthermore, the authors noted "bad cases" where the model struggled with sarcasm or cultural-specific emoji uses (e.g., the "face with tears of joy" emoji being used to express helplessness in certain contexts).

Future work will focus on moving toward multimodal approaches that combine vision and text, as well as developing more culturally-aware pre-training strategies to better capture the nuanced evolution of digital language.

Summary updated

BibTeX
@inproceedings{zhang2024unleashing,
  author = {Zhou Zhang and Dongzeng Tan and Jiaan Wang and Yilong Chen and Jiarong Xu},
  title = {{Unleashing the Power of Emojis in Texts via Self-supervised Graph Pre-Training}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  doi = {10.18653/v1/2024.emnlp-main.989},
}
Figure