# LEIA: Linguistic Embeddings for the Identification of Affect

arXiv: https://arxiv.org/abs/2304.10973 · HTML: https://mlsanity.com/paper/2304.10973/

## Key facts

- Cited by 3 papers in the map (data through 14 Oct 2026).
- Builds on 22 of its 65 references that are in the map.
- First posted on arXiv 21 Apr 2023.

## Builds on (most cited first, 22 of 22)

- [RoBERTa: A Robustly Optimized BERT Pretraining Approach](https://mlsanity.com/paper/1907.11692/) (2019)
- ["Why Should I Trust You?": Explaining the Predictions of Any Classifier](https://mlsanity.com/paper/1602.04938/) (2016)
- [Don't Stop Pretraining: Adapt Language Models to Domains and Tasks](https://mlsanity.com/paper/2004.10964/) (2020)
- [Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference time](https://mlsanity.com/paper/2203.05482/) (2022)
- [Fine-Tuning can Distort Pretrained Features and Underperform Out-of-Distribution](https://mlsanity.com/paper/2202.10054/) (2022)
- [GoEmotions: A Dataset of Fine-Grained Emotions](https://mlsanity.com/paper/2005.00547/) (2020)
- [TweetEval: Unified Benchmark and Comparative Evaluation for Tweet Classification](https://mlsanity.com/paper/2010.12421/) (2020)
- [BERTweet: A pre-trained language model for English Tweets](https://mlsanity.com/paper/2005.10200/) (2020)
- [Supervised Contrastive Learning for Pre-trained Language Model Fine-tuning](https://mlsanity.com/paper/2011.01403/) (2020)
- [Neural Theory-of-Mind? On the Limits of Social Intelligence in Large LMs](https://mlsanity.com/paper/2210.13312/) (2022)
- [Crowdsourcing a Word-Emotion Association Lexicon](https://mlsanity.com/paper/1308.6297/) (2013)
- [Using millions of emoji occurrences to learn any-domain representations for detecting sentiment, emotion and sarcasm](https://mlsanity.com/paper/1708.00524/) (2017)
- [PMI-Masking: Principled masking of correlated spans](https://mlsanity.com/paper/2010.01825/) (2020)
- [Crowdsourcing and Validating Event-focused Emotion Corpora for German and English](https://mlsanity.com/paper/1905.13618/) (2019)
- [ktrain: A Low-Code Library for Augmented Machine Learning](https://mlsanity.com/paper/2004.10703/) (2020)
- [Ethics Sheet for Automatic Emotion Recognition and Sentiment Analysis](https://mlsanity.com/paper/2109.08256/) (2021)
- [Joint Modelling of Emotion and Abusive Language Detection](https://mlsanity.com/paper/2005.14028/) (2020)
- [Measuring Emotional Contagion in Social Media](https://mlsanity.com/paper/1506.06021/) (2015)
- [Uncovering the Limits of Text-based Emotion Detection](https://mlsanity.com/paper/2109.01900/) (2021)
- [Sharing emotions at scale: The Vent dataset](https://mlsanity.com/paper/1901.04856/) (2019)
- [Validating daily social media macroscopes of emotions](https://mlsanity.com/paper/2108.07646/) (2021)
- [Social media emotion macroscopes reflect emotional experiences in society at large](https://mlsanity.com/paper/2107.13236/) (2021)

## Built on by (most cited first, 3 of 3)

- [Linguistic and Embedding-Based Profiling of Texts generated by Humans and Large Language Models](https://mlsanity.com/paper/2507.13614/) (2025)
- [Automatic Classifiers Underdetect Emotions Expressed by Men](https://mlsanity.com/paper/2601.04730/) (2026)
- [Politics of Feelings: Emotional Expression and Legislative Effectiveness in the U.S. Congress](https://mlsanity.com/paper/2609.10198/) (2026)

## Abstract (arXiv)

The wealth of text data generated by social media has enabled new kinds of analysis of emotions with language models. These models are often trained on small and costly datasets of text annotations produced by readers who guess the emotions expressed by others in social media posts. This affects the quality of emotion identification methods due to training data size limitations and noise in the production of labels used in model development. We present LEIA, a model for emotion identification in text that has been trained on a dataset of more than 6 million posts with self-annotated emotion labels for happiness, affection, sadness, anger, and fear. LEIA is based on a word masking method that enhances the learning of emotion words during model pre-training. LEIA achieves macro-F1 values of approximately 73 on three in-domain test datasets, outperforming other supervised and unsupervised methods in a strong benchmark that shows that LEIA generalizes across posts, users, and time periods. We further perform an out-of-domain evaluation on five different datasets of social media and other sources, showing LEIA's robust performance across media, data collection methods, and annotation schemes. Our results show that LEIA generalizes its classification of anger, happiness, and sadness beyond the domain it was trained on. LEIA can be applied in future research to provide better identification of emotions in text from the perspective of the writer. The models produced for this article are publicly available at https://huggingface.co/LEIA
