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:
- XLM-RoBERTa-base: A standard multilingual transformer.
- XLM-RoBERTa-large: A high-capacity version of the base model.
- 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.
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.
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