Improving Textual Ekman-Based Emotion Mapping on Social Media and RoBERTa Models

Authors

  • Khawla Hadi Nasserallah1 D1Department of Computer Science, Faculty of Education, University of Kufa, Iraq
  • Mohammed Hasan Abdulameer 2Department of Computer Science, Faculty of Education for women, University of Kufa, Iraq

DOI:

https://doi.org/10.29304/jqcsm.2026.18.32739

Keywords:

:Emotion Recognition Social Media Text, Deep Learning, RoBERTa, GoEmotions Dataset

Abstract

Recognizing emotions from social media short text continues to be a difficult problem due to the presence of serious class imbalance and semantic confusion in the fine-grained emotion corpus. Although the GoEmotions dataset is realistic, it involves 28 different emotion labels in an imbalanced manner, with significant class underrepresentation. Imbalance in class distribution negatively impacts the performance of multi-label classification models in terms of generalization capability and minority class detection.

In this paper, the effects of emotion label representations and adaptive decision criteria are investigated on multi-label emotion classification. More precisely, the number of emotion labels is reduced from 28 to seven basic emotions according to Ekman’s theory to mitigate the problem of class imbalance and decrease the complexity of the classification problem. Moreover, a label-based threshold adjustment technique is used, where different optimal threshold values are determined.

In the experiments, we utilized a RoBERTa model that implements partial freezing of layers and make a comparison with a hybrid BERT–BiLSTM–Attention model within both fine-grained and Ekman-based configurations. The Binary Cross-Entropy loss function is used for training the model, while early stopping is implemented to avoid overfitting. In terms of results, our method provides an average Micro-F1 score of 0.6501 and Macro-F1 score of 0.5951 for the GoEmotions test dataset.

These results indicate that the reduction of the label set space positively affects the stability and accuracy of classification. Moreover, threshold tuning for individual labels allows balancing precision and recall and, consequently, achieves better results for minority classes. Therefore, label engineering and adaptive decisions prove to be more effective than complex models in improving emotion classification accuracy.

Downloads

Download data is not yet available.

References

S. A. Kumar S. and A. Geetha, “Emotion Detection from Text using Natural Language Processing and Neural Networks,” Int. J. Intell. Syst. Appl. Eng., vol. 12, no. 14s, pp. 609–615, 2024.

D. Demszky, D. M. Jeongwoo, A. Cowen, G. Nemade, and S. Ravi, “GoEmotions : A Dataset of Fine-Grained Emotions,” pp. 4040–4054, 2020, doi: 10.18653/v1/2020.acl-main.372.

M. Kumar, “Emotion Recognition in Natural Language Processing: Understanding How AI Interprets the Emotional Tone of Text,” J. Artif. Intell. Cloud Comput., vol. 3, no. 6, pp. 1–5, 2024, doi: 10.47363/jaicc/2024(3)e238.

S. K. Bharti et al., “Text-Based Emotion Recognition Using Deep Learning Approach,” 2022. doi: 10.1155/2022/2645381.

L. R. Gomez et al., “Emotion Recognition on Social Media Using Natural Language Processing (NLP) Techniques,” ACM Int. Conf. Proceeding Ser., no. Dl, pp. 113–118, 2023, doi: 10.1145/3625156.3625173.

A. Thiab, L. Alawneh, and M. AL-Smadi, “Contextual emotion detection using ensemble deep learning,” Comput. Speech Lang., vol. 86, p. 101604, Jun. 2024, doi: 10.1016/J.CSL.2023.101604.

M. Rezapour, “E MOTION D ETECTION WITH TRANSFORMERS : A,” no. Xlm, 2024, doi: 10.48550/arXiv.2403.15454.

A. Bandhakavi, N. Wiratunga, and S. Massie, “Pattern Recognition Letters Lexicon based Feature Extraction for Emotion Text Classification,” pp. 1–11, [Online]. Available: www.elsevier.com

S. M. Mohammad and P. D. Turney, “Crowdsourcing a word-emotion association lexicon,” Comput. Intell., vol. 29, no. 3, pp. 436–465, 2013, doi: 10.1111/j.1467-8640.2012.00460.x.

Y. Kim, “Convolutional Neural Networks for Sentence Classification,” 2011.

R. Cascade-correlation and N. S. Chunking, “Neural Comput.-1997-LSTM-Long short term memory,” vol. 9, no. 8, pp. 1–32, 1997.

P. Zhou et al., “Attention-based bidirectional long short-term memory networks for relation classification,” 54th Annu. Meet. Assoc. Comput. Linguist. ACL 2016 - Short Pap., pp. 207–212, 2016, doi: 10.18653/v1/p16-2034.

J. Devlin, M.-W. Chang, K. Lee, and K. Toutanova, BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. 2018. doi: 10.48550/arXiv.1810.04805.

Y. Liu et al., “RoBERTa: A Robustly Optimized BERT Pretraining Approach,” no. 1, 2019, [Online]. Available: http://arxiv.org/abs/1907.11692

F. A. Acheampong, N.-M. Henry, and W. Chen, “Transformer Models for Text-based Emotion Detection: A Review of BERT-based Approaches,” 2021.

L. A. M. Bostan and R. Klinger, “An analysis of annotated corpora for emotion classification in text,” COLING 2018 - 27th Int. Conf. Comput. Linguist. Proc., pp. 2104–2119, 2018.

A. R. Murthy and K. M. Anil Kumar, “A Review of Different Approaches for Detecting Emotion from Text,” IOP Conf. Ser. Mater. Sci. Eng., vol. 1110, no. 1, p. 12009, 2021, doi: 10.1088/1757-899x/1110/1/012009.

P. Ekman, “An argument for basic emotions,” Cogn. Emot., vol. 6, no. 3–4, pp. 169–200, May 1992, doi: 10.1080/02699939208411068.

A. Topic, M. Russo, M. Stella, and M. Saric, “Emotion Recognition Using a Reduced Set of EEG Channels Based on Holographic Feature Maps,” Sensors, vol. 22, no. 9, 2022, doi: 10.3390/s22093248.

S. Minaee, N. Kalchbrenner, E. Cambria, N. Nikzad, M. Chenaghlu, and J. Gao, “Deep Learning Based Text Classification: A Comprehensive Review,” vol. 1, no. 1, pp. 1–42, 2021, [Online]. Available: http://arxiv.org/abs/2004.03705

F. Zhang, J. Chen, Q. Tang, and Y. Tian, “Evaluation of emotion classification schemes in social media text: an annotation-based approach,” 2024. doi: 10.1186/s40359-024-02008-w.

Downloads

Published

2026-09-30

How to Cite

Khawla Hadi Nasserallah1, & Abdulameer, M. H. (2026). Improving Textual Ekman-Based Emotion Mapping on Social Media and RoBERTa Models. Journal of Al-Qadisiyah for Computer Science and Mathematics, 18(3), Comp 39–49. https://doi.org/10.29304/jqcsm.2026.18.32739

Issue

Section

Computer Articles