A Novel Paradigm for Sentiment Analysis on COVID-19 Tweets with Transfer Learning Based Fine-Tuned BERT


  • Amit Pimpalkar School of Computing, Sathyabama Institute of Science and Technology, Chennai, India; Department of Computer Science and Engineering (AIML), Shri Ramdeobaba College of Engineering and Management, Nagpur, India
  • Jeberson Retna Raj School of Computing, Sathyabama Institute of Science and Technology, Chennai, India




COVID-19, pre-trained, sentiment analysis, BERT, transfer learning


The rapid escalation in global COVID-19 cases has engendered profound emotions of fear, agitation, and despondency within society. It is evident from COVID-19-related tweets that spark panic and elevate stress among individuals. Analyzing the sentiment expressed in online comments aids various stakeholders in monitoring the situation. This research aims to improve the performance of pre-trained bidirectional encoder representations from transformers (BERT) by employing transfer learning (TL) and fine hyper-parameter tuning (FT). The model is applied to three distinct COVID-19-related datasets, and each of the datasets belongs to a different class. The evaluation of the model’s performance involves six different machine learning (ML) classification models. This model is trained and evaluated using metrics such as accuracy, precision, recall, and F1-score. Heat maps are generated for each model to visualize the results. The performance of the model demonstrates accuracies of 83%, 97%, and 98% for Class-5, Class-3, and binary classifications, respectively.


S. Hosgurmath, V. Petli, and V. K. Jalihal, “An Omicron Variant Tweeter Sentiment Analysis Using NLP Technique,” Global Transitions Proceedings, vol. 3, no. 1, pp. 215-219, June 2022.

C. Guo, S. Lin, Z. Huang, and Y. Yao, “Analysis of Sentiment Changes in Online Messages of Depression Patients before and during the COVID-19 Epidemic Based on BERT+BiLSTM,” Health Information Science and Systems, vol. 10, no. 1, article no. 15, December 2022.

H. M. Yella, “How Do SARS and MERS Compare with COVID-19?” https://www.medicalnewstoday.com/articles/how-do-sars-and-mers-compare-with-covid-19, September 20, 2022.

World Health Organization, “Weekly Epidemiological Update on COVID-19 - 11 January 2023,” https://www.who.int/publications/m/item/weekly-epidemiological-update-on-covid-19---11-january-2023, January 19, 2023.

M. Zhuang, Y. Li, X. Tan, L. Xing, and X. Lu, “Analysis of Public Opinion Evolution of COVID-19 Based on LDA-ARMA Hybrid Model,” Complex & Intelligent Systems, vol. 7, no. 6, pp. 3165-3178, December 2021.

S. Malla and P. J. A. Alphonse, “COVID-19 Outbreak: An Ensemble Pre-Trained Deep Learning Model for Detecting Informative Tweets,” Applied Soft Computing, vol. 107, article no. 107495, August 2021.

M. E. Basiri, S. Nemati, M. Abdar, S. Asadi, and U. R. Acharrya, “A Novel Fusion-Based Deep Learning Model for Sentiment Analysis of COVID-19 Tweets,” Knowledge-Based Systems, vol. 228, article no. 107242, September 2021.

M. Singh, H. K. Dhillon, P. Ichhpujani, S. Iyengar, and R. Kaur, “Twitter Sentiment Analysis for COVID-19 Associated Mucormycosis,” Indian Journal of Ophthalmology, vol. 70, no. 5, pp. 1773-1779, May 2022.

S. Karthikeyan, G. Ramkumar, S. Aravindkumar, M. Tamilselvi, S. Ramesh and A. Ranjith, “A Novel Deep Learning-Based Black Fungus Disease Identification Using Modified Hybrid Learning Methodology,” Contrast Media & Molecular Imaging, vol. 2022, article no. 4352730, 2022.

C. Yan, J. Liu, W. Liu, and X. Liu, “Research on Public Opinion Sentiment Classification Based on Attention Parallel Dual-Channel Deep Learning Hybrid Model,” Engineering Applications of Artificial Intelligence, vol. 116, article no. 105448, November 2022.

D. Suganya and R. Kalpana, “Prognosticating Various Acute Covid Lung Disorders from COVID-19 Patient Using Chest CT Images,” Engineering Applications of Artificial Intelligence, vol. 119, article no. 105820, March 2023.

M. Mahyoob, J. Algaraady, M. Alrahiali, and A. Alblwi, “Sentiment Analysis of Public Tweets Towards the Emergence of SARS-CoV-2 Omicron Variant: A Social Media Analytics Framework,” Engineering, Technology & Applied Science Research, vol. 12, no. 3, June 2022.

B. N. Ramya, S. M. Shetty, A. M. Amaresh, and R. Rakshitha, “Smart Simon Bot with Public Sentiment Analysis for Novel COVID-19 Tweets Stratification,” SN Computer Science, vol. 2, no. 3, article no. 227, May 2021.

G. M. Demirci, S. R. Keskin, and G. Dogan, “Sentiment Analysis in Turkish with Deep Learning,” International Conference on Big Data, pp. 2215-2221, December 2019.

S. S. Aljameel, D. A. Alabbad, N. A. Alzahrani, S. M. Alqarni, F. A. Alamoudi, L. M. Babili, et al., “A Sentiment Analysis Approach to Predict an Individual’s Awareness of the Precautionary Procedures to Prevent COVID-19 Outbreaks in Saudi Arabia,” International Journal of Environmental Research and Public Health, vol. 18, no. 1, article no. 218, January 2021.

A. Onan, “Sentiment Analysis on Product Reviews Based on Weighted Word Embeddings and Deep Neural Networks,” Concurrency and Computation: Practice and Experience, vol. 33, no. 23, article no. e5909, December 2020.

J. Samuel, G. G. M. N. Ali, M. M. Rahman, E. Esawi, and Y. Samuel, “COVID-19 Public Sentiment Insights and Machine Learning for Tweets Classification,” Information, vol. 11, no. 6, article no. 314, June 2020.

G. Barkur, Vibha, and G. B. Kamath, “Sentiment Analysis of Nationwide Lockdown Due to COVID 19 Outbreak: Evidence from India,” Asian Journal of Psychiatry, vol. 51, article no. 102089, June 2020.

A. Abd-Alrazaq, D. Alhuwail, M. Househ, M. Hamdi, and Z. Shah, “Top Concerns of Tweeters During the COVID-19 Pandemic: Infoveillance Study,” Journal of Medical Internet Research, vol. 22, no. 4, article no. e19016, April 2020.

S. Li, Y. Wang, J. Xue, N. Zhao, and T. Zhu, “The Impact of COVID-19 Epidemic Declaration on Psychological Consequences: A Study on Active Weibo Users,” International Journal of Environmental Research and Public Health, vol. 17, no. 6, article no. 2032, March 2020.

M. A. Tocoglu, O. Ozturkmenoglu, and A. Alpkocak, “Emotion Analysis from Turkish Tweets Using Deep Neural Networks,” IEEE Access, vol. 7, pp. 183061-183069, 2019.

S. Darad and S. Krishnan, “Sentimental Analysis of COVID-19 Twitter Data Using Deep Learning and Machine Learning Models,” Ingenius, Revista de Ciencia y Tecnología, no. 29, pp. 108-117, January-June 2023. (In Español)

U. Naseem, I. Razzak, M. Khushi, P. W. Eklund, and J. Kim, “COVIDSenti: A Large-Scale Benchmark Twitter Data Set for COVID-19 Sentiment Analysis,” IEEE Transactions on Computational Social Systems, vol. 8, no. 4, pp. 1003-1015, August 2021.

J. Devlin, M. W. Chang, K. Lee, and K. Toutanova, “BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding,” https://doi.org/10.48550/arXiv.1810.04805, May 24, 2019.

K. Garcia and L. Berton, “Topic Detection and Sentiment Analysis in Twitter Content Related to COVID-19 from Brazil and the USA,” Applied Soft Computing, vol. 101, article no. 107057, March 2021.

N. Chintalapudi, G. Battineni, and F. Amenta, “Sentimental Analysis of COVID-19 Tweets Using Deep Learning Models,” Infectious Disease Reports, vol. 13, no. 2, pp. 329-339, June 2021.

M. S. Satu, M. I. Khan, M. Mahmud, S. Uddin, M. A. Summers, J. M. W. Quinn, et al., “TClustVID: A Novel Machine Learning Classification Model to Investigate Topics and Sentiment in COVID-19 Tweets,” Knowledge-Based Systems, vol. 226, article no. 107126, August 2021.

A. T. Kabakus, “A Novel COVID-19 Sentiment Analysis in Turkish Based on the Combination of Convolutional Neural Network and Bidirectional Long-Short Term Memory on Twitter,” Concurrency and Computation: Practice and Experience, vol. 34, no. 22, article no. e6883, October 2022.

Z. Jalil, A. Abbasi, A. R. Javed, M. B. Khan, M. H. A. Hasanat, K. M. Malik, et al., “COVID-19 Related Sentiment Analysis Using State-of-the-Art Machine Learning and Deep Learning Techniques,” Frontiers in Public Health, vol. 9, article no. 812735, January 2022.

A. Pimpalkar and J. R. Raj, “MBiLSTMGloVe: Embedding GloVe Knowledge into the Corpus Using Multi-Layer BiLSTM Deep Learning Model for Social Media Sentiment Analysis,” Expert Systems with Applications, vol. 203, article no. 117581, October 2022.




How to Cite

Amit Pimpalkar and Jeberson Retna Raj, “A Novel Paradigm for Sentiment Analysis on COVID-19 Tweets with Transfer Learning Based Fine-Tuned BERT”, Adv. technol. innov., vol. 8, no. 4, pp. 254–266, Sep. 2023.