Emotion classification using advanced neural networks on sentence-level data
Athapol Ruangkanjanases, Taqwa Hariguna · PeerJ Computer Science · 2025
This study explores the efficacy of advanced neural network architectures, including bidirectional long short-term memory (BiLSTM), bidirectional gated recurrent unit (BiGRU), and bidirectional encoder representations from transformers (BERT), for sentence-level emotion classification using a large-scale, imbalanced dataset of 422,746 text samples spanning six emotions. Static embeddings (Global Vectors for Word Representation (GloVe), FastText), trainable embeddings, and contextual embeddings (BERT) with varying dimensionality were evaluated. While BERT achieved the best performance (accuracy: 94.07%, F1-score: 94.05%) due to its dynamic contextual understanding, it required significantly higher computational resources and training time. Class imbalance was addressed using class-weighted loss, with potential for future exploration of oversampling, undersampling, and synthetic data generation. Error analysis revealed frequent misclassifications among semantically overlapping emotions, suggesting opportunities for hybrid embeddings and multimodal integration in future work. These findings highlight the trade-offs between performance and computational cost, providing a robust baseline for scalable emotion classification systems.