Emotion Recognition from Text: A Comparative Study of Machine Learning and Deep Learning Models
Emotion Recognition from Text: A Comparative Study of Machine Learning and Deep Learning Models
M. Yaseen,Bilal Khan,2 Authors,F. Khan
TLDR
This study presents a comprehensive evaluation of traditional Machine Learning (ML) and advanced Deep Learning models on four diverse emotion-labeled datasets, revealing that DL models, particularly CNN and BiLSTM, outperform ML models in terms of accuracy and contextual understanding, especially on structured datasets.
Abstract
Emotion recognition from textual data has become increasingly vital in domains such as sentiment-aware systems, conversational agents, and mental health analysis. Despite significant progress, accurately detecting emotions from text remains a challenging task due to the lack of prosodic and visual cues, contextual ambiguity, and imbalanced datasets. This study presents a comprehensive evaluation of traditional Machine Learning (ML) and advanced Deep Learning (DL) models on four diverse emotion-labeled datasets: DailyDialog, ISEAR, Emotion-Stimulus, and CrowdFlower. Various feature extraction techniques—TF-IDF and Count Vectorizer for ML models, and semantic embeddings (Word2Vec and GloVe) for DL models—were employed to assess their impact on model performance. The models compared include Logistic Regression, Random Forest, Stochastic Gradient Descent, and Multinomial Naïve Bayes for ML, and LSTM, BiLSTM, and CNN for DL. Evaluation metrics such as accuracy, precision, recall, F1-score, and MCC were used for performance assessment. Results reveal that DL models, particularly CNN and BiLSTM, outperform ML models in terms of accuracy and contextual understanding, especially on structured datasets. Conversely, Logistic Regression with TF-IDF demonstrates robustness on noisy and imbalanced data. Word2Vec embeddings consistently enhance DL model performance, highlighting the importance of contextual semantics. This work underscores the significance of dataset characteristics, model architecture, and feature representation in achieving effective emotion classification. Future directions include integrating transformer-based models, addressing class imbalance, and exploring multimodal emotion recognition to improve generalization and real-world applicability.
