Skip to main content
Log in

Sentiment classification with modified RoBERTa and recurrent neural networks

  • Published:
Multimedia Tools and Applications Aims and scope Submit manuscript

Abstract

The unprecedented growth in the use of social media platforms, where opinions and decisions are made and updated within seconds. Hence, Twitter is becoming a huge commercial interest for brands and companies to assess the sentiment of customers. Sentiment analysis tries to extract subjective opinions and sentiments from opinionated data using Natural Language Processing (NLP). Ontology-based analysis was primarily used to disambiguate the terms and get a high precision score for the emotive terms. In this paper, to improve the accuracy of sentiment analysis we modified the RoBERTa model to extract the more relevant contextualized information. Moreover, this modified RoBERTa is combined with RNN for effective sentiment classification. The proposed work attempts to find which words or phrases actually contribute to the particular sentiment as output by a modified RoBERTa model and this output of the RoBERTa model is fed as input for RNNs. The proposed model is experimented on the Twitter comment dataset. The proposed model experimented on various models such as single RNN, single layer LSTM, and Bi-directional LSTM and evaluated performance measures in terms of accuracy, precision, recall, and F1-score. Our proposed model performance significantly improved with respect to all other models in terms of accuracy, precision, recall, and F1-score. The experiments show that the proposed model not only increases the Jaccard similarity score but also improves different RNN performance when compared to existing state-of-the-art models. The proposed approach obtained a maximum accuracy of 84.6% which is a huge improvement and also evaluated comparison analysis of Simple RNN, Single-LSTM, and Bi-LSTM on full text and selected test. Our proposed modified ROBERTa performance is superior with selected text and full text. Finally, the statistical paired T-test is performed between the proposed model, and other models such as simple RNN, One layer RNN is giving evidence that the proposed model performance is superior with 95% confidence and \(p<0.05\).

This is a preview of subscription content, log in via an institution to check access.

Access this article

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5

Similar content being viewed by others

Explore related subjects

Discover the latest articles, news and stories from top researchers in related subjects.

References

  1. Liu B, Zhang L (2012) A survey of opinion mining and sentiment analysis. In: Mining text data, pp. 415–463. Springer, ???

  2. de Oliveira Carosia AE, Coelho GP, da Silva AEA (2021) Investment strategies applied to the brazilian stock market: a methodology based on sentiment analysis with deep learning. Expert Syst Appl 184:115470

  3. Jing N, Wu Z, Wang H (2021) A hybrid model integrating deep learning with investor sentiment analysis for stock price prediction. Expert Syst Appl 178:115019

    Article  Google Scholar 

  4. Zhang J, Zhang A, Liu D, Bian Y (2021) Customer preferences extraction for air purifiers based on fine-grained sentiment analysis of online reviews. Knowl Based Syst 228:107259

    Article  Google Scholar 

  5. Balakrishnan V, Lok PY, Abdul Rahim H (2021) A semi-supervised approach in detecting sentiment and emotion based on digital payment reviews. J Supercomput 77:3795–3810

    Article  Google Scholar 

  6. Narayanasamy SK, Srinivasan K, Mian Qaisar S, Chang C-Y (2021) Ontology-enabled emotional sentiment analysis on covid-19 pandemic-related twitter streams. Front Public Health 1902

  7. Cambria E, Das D, Bandyopadhyay S, Feraco A (2017) Affective computing and sentiment analysis. A practical guide to sentiment analysis 1–10

  8. Teng Z, Vo DT, Zhang Y (2016) Context-sensitive lexicon features for neural sentiment analysis. In: Proceedings of the 2016 conference on empirical methods in natural language processing, pp. 1629–1638

  9. Qian Q, Huang M, Lei J, Zhu X (2016) Linguistically regularized lstms for sentiment classification. arXiv preprint arXiv:1611.03949

  10. Tang D, Wei F, Yang N, Zhou M, Liu T, Qin B et al (2014) Learning sentiment-specific word embedding for twitter sentiment classification. In: ACL (1), pp. 1555–1565

  11. Birjali M, Kasri M, Beni-Hssane A (2021) A comprehensive survey on sentiment analysis: Approaches, challenges and trends. Knowl Based Syst 226:107134

    Article  Google Scholar 

  12. Ma J, Ganchev K, Weiss D (2018) State-of-the-art chinese word segmentation with bi-lstms. arXiv preprint arXiv:1808.06511

  13. Lerner I, Paris N, Tannier X (2020) Terminologies augmented recurrent neural network model for clinical named entity recognition. J Biomed Inform 102:103356

    Article  PubMed  Google Scholar 

  14. Petrucci G, Ghidini C, Rospocher M (2016) Using recurrent neural network for learning expressive ontologies. arXiv preprint arXiv:1607.04110

  15. Pak A, Paroubek P (2010) Twitter as a corpus for sentiment analysis and opinion mining in: Proceedings of the seventh conference on international language resources and evaluation. European languages resources association, Valletta, Malta

  16. Nair AJ, Veena G, Vinayak A (2021) Comparative study of twitter sentiment on covid - 19 tweets. In: 2021 5th International conference on computing methodologies and communication (ICCMC), pp. 1773–1778. https://doi.org/10.1109/ICCMC51019.2021.9418320

  17. Devlin J, Chang MW, Lee K, Toutanova K (2018) Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805

  18. Liu Y, Ott M, Goyal N, Du J, Joshi M, Chen D, Levy O, Lewis M, Zettlemoyer L, Stoyanov V (2019) Roberta: A robustly optimized bert pretraining approach. arXiv preprint arXiv:1907.11692

  19. Tan KL, Lee CP, Anbananthen KSM, Lim KM (2022) Roberta-lstm: A hybrid model for sentiment analysis with transformer and recurrent neural network. IEEE Access 10:21517–21525

    Article  Google Scholar 

  20. Monika R, Deivalakshmi S, Janet B (2019) Sentiment analysis of us air-lines tweets using lstm/rnn. In: 2019 IEEE 9th International conference on advanced computing (IACC), pp. 92–95. https://doi.org/10.1109/IACC48062.2019.8971592

  21. SivaSai JG, Srinivasu PN, Sindhuri MN, Rohitha K, Deepika S (2020) An automated segmentation of brain mr image through fuzzy recurrent neural network. In: Bio-inspired neurocomputing, pp. 163–179. Springer, ???

  22. Bhuvan MS, Rao VD, Jain S, Ashwin T, Guddeti RMR (2015) Semantic sentiment analysis using context specific grammar. In: International conference on computing, communication & automation, pp. 28–35. IEEE

  23. Horne L, Matti M, Pourjafar P, Wang Z (2020) Grubert: A gru-based method to fuse bert hidden layers for twitter sentiment analysis. In: Proceedings of the 1st conference of the Asia-Pacific chapter of the association for computational linguistics and the 10th international joint conference on natural language processing: Student research workshop, pp. 130–138

  24. Katz G, Ofek N, Shapira B (2015) Consent: Context-based sentiment analysis. Knowl Based Syst 84:162–178

    Article  Google Scholar 

  25. Tang D, Wei F, Qin B, Yang N, Liu T, Zhou M (2016) Sentiment embeddings with applications to sentiment analysis. IEEE Trans Knowl Data Eng 28(2):496–509. https://doi.org/10.1109/TKDE.2015.2489653

    Article  Google Scholar 

  26. Vimali J, Murugan S (2021) A text based sentiment analysis model using bi-directional lstm networks. In: 2021 6th International conference on communication and electronics systems (ICCES), pp. 1652–1658. IEEE

  27. Vaswani A, Shazeer N, Parmar N, Uszkoreit J, Jones L, Gomez AN, Kaiser Ł, Polosukhin I (2017) Attention is all you need. Adv Neural Inf Process Syst 30

  28. Qiu X, Sun T, Xu Y, Shao Y, Dai N, Huang X (2020) Pre-trained models for natural language processing: A survey. Sci China Technol Sci 63(10):1872–1897

    Article  ADS  Google Scholar 

  29. Sennrich R, Haddow B, Birch A (2015) Neural machine translation of rare words with subword units. arXiv preprint arXiv:1508.07909

  30. Lai S, Yu Z, Wang H (2020) Text sentiment support phrases extraction based on roberta. In: 2020 2nd International conference on applied machine learning (ICAML), pp. 232–237. https://doi.org/10.1109/ICAML51583.2020.00056

  31. Thukral S, Kovac S, Paturu M (2023) Chapter 29 - t-test. In: Eltorai AEM., Liu T, Chand R, Kalva SP (eds.) Translational interventional radiology. Handbook for designing and conducting clinical, pp. 139–143. Academic Press, ???. https://doi.org/10.1016/B978-0-12-823026-8.00104-8. https://www.sciencedirect.com/science/article/pii/B9780128230268001048

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Ramalingaswamy Cheruku.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Cheruku, R., Hussain, K., Kavati, I. et al. Sentiment classification with modified RoBERTa and recurrent neural networks. Multimed Tools Appl 83, 29399–29417 (2024). https://doi.org/10.1007/s11042-023-16833-5

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11042-023-16833-5

Keywords