XLM-EMO: Multilingual Emotion Prediction in Social Media Text

Federico Bianchi, Debora Nozza, Dirk HovyWASSA @ ACL 2022

Introduction

Emotion detection is a cornerstone of Natural Language Processing (NLP), yet it faces a significant "language gap." Most high-quality models and datasets are restricted to English or a few high-resource languages, leaving social scientists with few tools to study global reactions in languages like Tamil or Romanian. Furthermore, existing emotion datasets are fragmented, using inconsistent categories. XLM-EMO addresses these challenges by unifying disparate datasets into a common four-emotion framework: joy, anger, fear, and sadness.

Methodology

The researchers developed XLM-EMO by fine-tuning three variants of the XLM-RoBERTa architecture:

  1. XLM-RoBERTa-base: A standard multilingual transformer.
  2. XLM-RoBERTa-large: A high-capacity version of the base model.
  3. Twitter-XLM-RoBERTa: A model pre-trained specifically on Twitter data to better handle the informal nature of social media text.

The core innovation is a transformation pipeline that maps various existing labels to the core four-emotion set. To address data imbalance, a weighted loss function was employed during training to prevent the model from biasing toward more frequent emotions.

Datasets

The study aggregates datasets covering 19 languages from diverse families, including Indo-European, Afroasiatic, and Sino-Tibetan. Data sources include Twitter, YouTube, and Facebook. For languages with scarce native social media data, such as French and German, the authors utilized machine translation (DeepL) to adapt Spanish tweets.

Table 1: Overview of languages, data sources, and linguistic families included in the study.

Key Insights

  • Multilingual Generalization: Training on multiple languages simultaneously allows the model to learn underlying patterns of emotional expression that transcend specific vocabularies.
  • Domain Specificity: The Twitter-XLM-RoBERTa-base model often outperformed the general base model, suggesting that familiarity with internet-specific dialects (emojis, hashtags) is more critical than raw parameter count for social media tasks.
  • Zero-Shot Capability: The model demonstrates strong performance on languages not seen during training, providing a viable path for emotion detection in low-resource contexts.

Key Results

The XLM-RoBERTa-large variant emerged as the top performer, achieving an average Macro-F1 score of 0.86 across all languages. The model also proved robust in zero-shot scenarios; for instance, it achieved a 0.81 F1 score on Arabic without specific training data, compared to 0.91 for a language-specific model.

Figure 1: Performance comparison (Macro-F1) of XLM-R variants across 19 languages.

In out-of-domain testing on datasets like MultiEmotion Italian and EmoEvent, XLM-EMO consistently outperformed existing baselines such as LS-EMO and Universal Joy (UJ).

Limitations and Future Work

Despite its success, the model has limitations. There is a notable lack of representation for African languages, and the use of machine translation for certain datasets may introduce "translationese" biases. Additionally, performance was lower for languages like Korean and Filipino due to limited training data availability. Future work aims to expand the linguistic scope and refine data collection strategies.

Summary updated

BibTeX
@inproceedings{bianchi2022xlm,
  author = {Federico Bianchi and Debora Nozza and Dirk Hovy},
  title = {{XLM-EMO: Multilingual Emotion Prediction in Social Media Text}},
  booktitle = {WASSA @ ACL},
  year = {2022},
  doi = {10.18653/v1/2022.wassa-1.18},
}
Figure