Content area
This paper proposes a hybrid deep learning model for robust and interpretable sentiment classification of Twitter data. The model integrates Bidirectional Encoder Representations from Transformers (BERT)-based contextual embeddings, a Bidirectional Long Short-Term Memory (BiLSTM) network, and a custom attention mechanism to classify tweets into four sentiment categories: Positive, Negative, Neutral, and Irrelevant. Addressing the challenges of noisy and multilingual social media content, the model incorporates a comprehensive preprocessing pipeline and data augmentation strategies including back-translation and synonym replacement. An ablation study demonstrates that combining BERT with BiLSTM improves the model’s sensitivity to sequence dependencies, while the attention mechanism enhances both classification accuracy and interpretability. Empirical results show that the proposed model outperforms BERT-only and BERT+BiLSTM baselines, achieving F1-scores (F1) above 0.94 across all sentiment classes. Attention weight visualizations further reveal the model’s ability to focus on sentiment-bearing tokens, providing transparency in decision-making. The proposed framework is well-suited for deployment in real-time sentiment monitoring systems and offers a scalable solution for multilingual and multi-class sentiment analysis in dynamic social media environments. We also include a focused characterization of the dataset via an Exploratory Data Analysis in the Methods section.
Details
Data augmentation;
Accuracy;
Deep learning;
Datasets;
Classification;
Artificial intelligence;
Sentiment analysis;
Social networks;
Neural networks;
Ablation;
Natural language processing;
Multilingualism;
Robustness (mathematics);
Machine learning;
Annotations;
Real time;
Emojis;
Digital media;
Semantics
; Liu, Yang 2
; Zhang, Tianhui 3
; Hou Lingmin 1 ; Liu, Xianchen 4 ; Guo Zhen 5 ; Mulati Aliya 6
1 Department of Computer Science, Rochester Institute of Technology, Rochester, NY 14623, USA; [email protected]
2 College of Arts & Sciences, University of Miami, Miami, FL 33124, USA; [email protected]
3 College of Engineering, Northeastern University, Boston, MA 02115, USA; [email protected]
4 Department of Computer Engineering, Florida International University, Miami, FL 33199, USA; [email protected]
5 Department of Material Engineering, Florida International University, Miami, FL 33199, USA; [email protected]
6 Department of Politics and International Relations, Florida International University, Miami, FL 33199, USA; [email protected]