Tags:BERT, DistilBERT, GPT-2, Natural Language Processing, RoBERTa and Sentiment Analysis
Abstract:
Sentiment analysis, also known as opinion mining, employs natural language processing (NLP) techniques to determine, extract, and measure the emotional undertones within a text. This approach is valuable for measuring public sentiment and interests across various domains, including social media discussions, product and movie reviews, among others. Techniques like Linear Regression, Support Vector Machines, Convolutional Neural Networks (CNN), Recurrent Neural Networks (RNN), and Long Short-Term Memory (LSTM) are utilized in analyzing sentiments. However, these are no comparison to the capabilities of the pre-trained transformer models such as BERT, DistilBERT, RoBERTa, and the recent large language model (LLM) GPT-2, which offer significantly enhanced performance and flexibility. This study employs the Sentiment140 dataset to evaluate sentiments expressed in tweets, utilizing four advanced transformer-based models: BERT, DistilBERT, RoBERTa, and GPT-2. The sentiment analysis conducted within this research framework focuses on accuracy as the primary performance metric. The findings of the analysis indicate that the GPT-2 model outperforms its counterparts by achieving an impressive accuracyof 94.13%, thereby demonstrating its superior capability in handling sentiment analysis tasks. This study not only reinforces the efficacy of transformer-based models in processing complex language data but also highlights the cutting-edge potential of GPT-2 to revolutionize sentiment analysis in social media contexts. Furthermore, the integration of these technologies aligns with the principles of Industry 5.0 by enhancing human machine collaboration, thus driving more personalized, efficient, and sustainable technological advancements. By leveraging such sophisticated models, businesses can harness real-time sentiment analysis to foster a more responsive and sustainable operational framework, ultimately contributing to smarter and more sustainable technology deployments.
Analyzing the Performance of Sentiment Analysis Using BERT, DistilBERT, RoBERTa and GPT-2