Comparative Analysis of Transformer-Based and Neural Network Models for Emotion Detection in Tweets

Abstract

This study assesses the effectiveness of transformer-based and neural network models for detecting emotions in tweets. Five models are evaluated: two transformer-based frameworks (DistilBERT and ALBERT), two neural network architectures (CNN and 3CNN-3LSTM), and a hybrid model (3CNN- 3LSTM-GloVe 300x). The models are evaluated based on accuracy, precision, recall, and F1-score. The findings indicate that ALBERT attains the maximum accuracy at 86.38%, succeeded by DistilBERT with an accuracy of 84.35%. The 3CNN-3LSTM model exhibits an accuracy of 83.79%, whilst the CNN model demonstrates the lowest performance at 65.37%. The hybrid 3CNN-3LSTM-GloVe 300x model exhibits a performance of 75.61%. The results demonstrate that transformer-based models surpass neural network models in emotion recognition, especially in recognizing subtle emotional expressions. Nonetheless, transformer-based models demonstrate increased computational expenses, highlighting the necessity for optimization in real-time applications. This study enhances the domain of emotion detection by a comparative comparison of diverse models, emphasizing the benefits of transformers while acknowledging the computational difficulties. The results indicate significant implications for marketing, mental health, and digital communication, highlighting the need for further enhancement of transformer models for effective implementation.

Authors

  • Bin Zhang School of Information Engineering, Hunan University of Science and Engineering, Yongzhou 425199, Hunan, China
  • Xi Yang College of intelligent Manufacturing, Hunan University of Science and Engineering, Yongzhou 425199, hunan,China
  • Chen Zhang School of International Education, Guangdong University of Technology, Guangzhou 510006, Guangdong, China
  • Tangsen Huang School of Information Engineering, Hunan University of Science and Engineering, Yongzhou 425199, hunan,China

DOI:

https://doi.org/10.31449/inf.v50i12.7551

Downloads

Published

05/13/2026

How to Cite

Zhang, B., Yang, X., Zhang, C., & Huang, T. (2026). Comparative Analysis of Transformer-Based and Neural Network Models for Emotion Detection in Tweets. Informatica, 50(12). https://doi.org/10.31449/inf.v50i12.7551