Benchmarking CNN, LSTM, GRU and Transformer Models for Twitter Sentiment Analysis
Vol. 12, Issue 1, Jan-Dec 2025 | Page: 10-19
Abstract
Twitter has become a primary source for mining public opinion across domains such as politics, health, finance and customer behaviour. The short, noisy and evolving nature of tweets, however, makes sentiment analysis a challenging task. Deep learning models have substantially improved performance over traditional machine-learning and lexicon-based methods, yet there is still limited systematic comparison focused specifically on Twitter data. This paper evaluates convolutional neural networks (CNN), recurrent architectures (LSTM, BiLSTM, GRU), hybrid CNN–LSTM models and transformer-based models (BERT, RoBERTa) for sentiment analysis on multiple Twitter datasets. We combine a structured literature review (2015–2025) with a unified experimental study on three representative datasets: Sentiment140, a COVID-19 tweets corpus, and a multi-domain tweet collection. Results show that transformer-based models consistently outperform CNN/RNN architectures by 3–7 F1 points, but at higher computational cost. Hybrid CNN–LSTM models still offer competitive performance under constrained resources, particularly when training data is limited or noisy. We further analyse error patterns, robustness to domain shift, and implications for real-time monitoring on Twitter. Finally, we discuss open challenges such as sarcasm, multilingual tweets, adversarial robustness and data annotation bottlenecks, and outline promising future research directions.
References
- Ainapure, B. S., Pise, N., & others. (2023). Sentiment analysis of COVID-19 tweets using deep learning and ensemble techniques. Sustainability, 15(3), 2573. https://doi.org/10.3390/su15032573 Aygun, I., & Kaya, M. (2021). Aspect-based Twitter sentiment analysis on vaccination and vaccine types in COVID19 pandemic with deep learning. IEEE Journal of Biomedical and Health Informatics, 26(6), 2360–2369. https://doi.org/10.1109/JBHI.2021.3131062 Basiri, M. E., Nemati, S., Abdar, M., Asadi, S., & Acharya, U. R. (2021). A novel fusion-based deep learning model for sentiment analysis of COVID-19 tweets. Knowledge-Based Systems, 228, 107242. https://doi.org/10.1016/j.knosys.2021.107242 Bello, A., Ng, S.-C., & Leung, M.-F. (2023). A BERT framework to sentiment analysis of tweets. Sensors, 23(1), 506. https://doi.org/10.3390/s23010506 Bhushan, A., Dwivedi, D., Singh, A. K., & Snehlata. (2024). Analyzing sentiments on Twitter using deep learning techniques. International Journal of Modern Education and Computer Science, 16(6), 20–39. https://doi.org/10.5815/ijmecs.2024.06.02
- Birjali, M., Kasri, M., & Beni-Hssane, A. (2021). A comprehensive survey on sentiment analysis: Approaches, challenges and trends. Knowledge-Based Systems, 226, 107134. https://doi.org/10.1016/j.knosys.2021.107134 Chakraborty, K., Bhatia, S., Bhattacharyya, S., Platos, J., Bag, R., & Hassanien, A. E. (2020). Sentiment analysis of COVID-19 tweets by deep learning classifiers – A study to show how popularity is affecting accuracy in social media. Applied Soft Computing, 97, 106754. https://doi.org/10.1016/j.asoc.2020.106754 Chandrasekaran, G., & Hemanth, J. (2022). Deep learning and TextBlob-based sentiment analysis for coronavirus (COVID-19) using Twitter data. International Journal of Artificial Intelligence Tools, 31(02), 2250011. https://doi.org/10.1142/S0218213022500117 Dang, N. C., Moreno-García, M. N., & De la Prieta, F. (2020). Sentiment analysis based on deep learning: A comparative study. Electronics, 9(3), 483. https://doi.org/10.3390/electronics9030483 Elmitwalli, S., et al. (2024). Sentiment analysis of COP9-related tweets: A comparative study of lexicon-based, machine learning, Bi-LSTM, BERT and GPT-3 approaches. Frontiers in Big Data, 7, 1357926. https://doi.org/10.3389/fdata.2024.1357926 Guven, Z. A. (2021). Comparison of BERT models and machine learning methods for sentiment analysis on Turkish tweets. In Proceedings of AINA 2021. https://doi.org/10.1109/AINA52469.2021.00046
- Kaur, H., Ahsaan, S. U., Alankar, B., & Chang, V. (2021). A proposed sentiment analysis deep learning algorithm for analyzing COVID-19 tweets. Information Systems Frontiers, 23(6), 1417–1429. https://doi.org/10.1007/s10796-021- 10135-7 Kumar, V. (2022). Spatiotemporal sentiment variation analysis of geotagged COVID-19 tweets from India using a hybrid deep learning model. Scientific Reports, 12(1), 1849. https://doi.org/10.1038/s41598-022-05912-4 Lyu, J. C., Han, E. L., & Luli, G. K. (2021). COVID-19 vaccine–related discussion on Twitter: Topic modeling and sentiment analysis. Journal of Medical Internet Research, 23(6), e24435. https://doi.org/10.2196/24435 Ramadhani, A. M., & Goo, H. S. (2017). Twitter sentiment analysis using deep learning methods. In 2017 7th International Annual Engineering Seminar (InAES) (pp. 1–4). https://doi.org/10.1109/INAES.2017.8068556 Stojanovski, D., Dimitrovski, I., Madjarov, G., & Džeroski, S. (2015). Twitter sentiment analysis using deep convolutional neural network. In Discovery Science (LNCS 9447, pp. 46–58). https://doi.org/10.1007/978-3-319- 24282-8_4 Subedi, A. R., et al. (2025). Gradient attack on Twitter sentiment analysis for targeted misclassification. arXiv:2504.01345. https://doi.org/10.48550/arXiv.2504.01345 Sunitha, D., Patra, R. K., Babu, N. V., et al. (2022). Twitter sentiment analysis using ensemble-based deep learning model towards COVID-19 in India and European countries. Pattern Recognition Letters, 158, 164–170. https://doi.org/10.1016/j.patrec.2022.01.006 Yeasmin, N., Mahbub, N. I., Baowaly, M. K., et al. (2022). Analysis and prediction of user sentiment on COVID-19 pandemic using tweets. Big Data and Cognitive Computing, 6(3), 65. https://doi.org/10.3390/bdcc6030065

Aakash Kharb
Maharshi Dayanand University, Rohtak
Received: 12-01-2025, Accepted: 18-02-2025, Published Online: 08-03-2025