Evaluating the Effectiveness of CNN, LSTM, and Bi-LSTM Models in Classifying Twitter Sentiments

Main Article Content

Naveen P, J.Jaganpradeep, R.Thalapathi Rajasekaran, Amirthavalli R, N Umasankari, Mohanaprakash T A

Abstract

Introduction: Twitter sentiment analysis is an essential tool for understanding public opinions and extracting valuable insights from social media discussions. However, the informal, concise nature of tweets, along with their context-dependent language, poses significant challenges for accurate sentiment classification. Deep learning techniques have shown promise in addressing these challenges due to their ability to learn complex patterns and contextual relationships in data. This study explores the application of Convolutional Neural Networks (1D-CNN), Long Short-Term Memory (LSTM), and Bidirectional LSTM (Bi-LSTM) models for classifying tweet sentiments into four categories: positive, negative, neutral, and irrelevant.


 


Objectives: The primary objective of this study is to evaluate the effectiveness of deep learning models, including 1D-CNN, LSTM, and Bi-LSTM, in classifying tweet sentiments into categories such as positive, negative, neutral, and irrelevant. By analyzing the performance of these models, the study aims to compare their accuracy, precision, recall, and F1-score to determine their strengths and limitations. Additionally, the research seeks to identify the most suitable model capable of effectively capturing the sequential and contextual nature of tweets, addressing the unique challenges posed by the informal and context-dependent language of social media data.


Methods: The study employs a publicly available Twitter sentiment dataset comprising 73,906 tweets related to general Twitter discussions. The dataset undergoes pre-processing steps, including tokenization, stopword removal, and handling emoticons and hashtags, to ensure clean input for training the models. Tweets are represented using pre-trained word embeddings, specifically GloVe and Word2Vec, which provide rich semantic information by capturing word meanings in context. Individual models—1D-CNN, LSTM, and Bi-LSTM—are trained and evaluated using this pre-processed data. Performance metrics, including accuracy, precision, recall, and F1-score, are calculated to compare the models' effectiveness.


Results: The experimental analysis demonstrates that each model has unique strengths in sentiment classification. However, the 1D-CNN outperforms both LSTM and Bi-LSTM models, achieving superior results in capturing both the sequential and contextual information inherent in tweet data. This highlights its efficiency and suitability for Twitter sentiment analysis.


Conclusions: This study underscores the potential of deep learning techniques for sentiment analysis in social media. Among the evaluated models, 1D-CNN proves to be the most effective, offering a robust approach to handling the complexities of tweet sentiment classification. Future work could explore hybrid models and further optimization techniques to enhance sentiment analysis performance.

Article Details

Section
Articles