Skip to main content
QUICK REVIEW

[Paper Review] An LSTM model for Twitter Sentiment Analysis

Md Parvez Mollah|arXiv (Cornell University)|Dec 4, 2022
Sentiment Analysis and Opinion MiningComputer Science5 citations
TL;DR

This paper proposes a fine-tuned LSTM model for Twitter sentiment analysis using a newly constructed, combined dataset from seven publicly available, manually annotated Twitter sentiment datasets. The model achieves 68% overall accuracy, significantly outperforming the rule-based VADER tool (51%), particularly in identifying positive and negative sentiments, though performance on neutral tweets remains lower.

ABSTRACT

Sentiment analysis on social media such as Twitter provides organizations and individuals an effective way to monitor public emotions towards them and their competitors. As a result, sentiment analysis has become an important and challenging task. In this work, we have collected seven publicly available and manually annotated twitter sentiment datasets. We create a new training and testing dataset from the collected datasets. We develop an LSTM model to classify sentiment of a tweet and evaluate the model with the new dataset.

Motivation & Objective

  • To address the challenge of inconsistent performance in Twitter sentiment analysis due to dataset-specific biases and overfitting in existing models.
  • To create a unified, balanced training and testing dataset by combining seven publicly available, manually annotated Twitter sentiment datasets.
  • To develop and evaluate an LSTM-based deep learning model on the newly constructed dataset for improved generalization in sentiment classification.
  • To compare the performance of the proposed LSTM model against the widely used VADER lexicon-based tool in terms of accuracy and runtime.

Proposed method

  • The authors collected seven manually annotated Twitter sentiment datasets and merged them into a single, balanced dataset after filtering out irrelevant and mixed-label tweets.
  • Text preprocessing included normalization of hashtags, handles, URLs, emoticons, and punctuations using standardized replacement patterns to reduce feature sparsity.
  • Word embeddings were learned using pre-trained GloVe vectors to convert tokenized words into fixed-size dense vectors for input to the LSTM.
  • An LSTM architecture with a single hidden layer of 100 neurons, ReLU activation, and a sigmoid output layer was implemented for binary classification of positive, negative, and neutral sentiment.
  • The model was trained using categorical cross-entropy loss, Adam optimizer, 50 epochs, and a batch size of 256, with accuracy as the evaluation metric.
  • Performance was evaluated on a 20% test split, and results were compared with the VADER sentiment analysis tool in terms of overall and per-class accuracy.

Experimental results

Research questions

  • RQ1Can a unified, combined dataset from multiple manually annotated Twitter sentiment datasets improve model generalization in sentiment classification?
  • RQ2How does an LSTM-based deep learning model compare to a rule-based lexicon approach like VADER in classifying Twitter sentiment?
  • RQ3What are the performance differences between the LSTM model and VADER across positive, negative, and neutral sentiment classes?
  • RQ4To what extent does the use of pre-trained GloVe embeddings limit the model’s ability to capture emoticon and punctuation-based sentiment cues?

Key findings

  • The proposed LSTM model achieved an overall accuracy of 68% on the test set, significantly outperforming VADER’s 51% accuracy.
  • The model showed higher accuracy in classifying positive tweets (77%) compared to negative (68%) and neutral (61%) tweets.
  • VADER achieved only 44% accuracy on negative tweets and 43% on neutral tweets, indicating poor performance on non-positive sentiment classes.
  • The LSTM model required 10 minutes to train and 10 seconds for inference with a pre-trained model, while VADER ran in just 3 seconds, indicating a trade-off between speed and accuracy.
  • The authors observed that the lack of emoticon-specific vector representations in GloVe embeddings may have limited model performance, especially on emoticon-dependent sentiment cues.
  • The study suggests that incorporating attention mechanisms could improve focus on key sentiment indicators like emoticons and punctuation, potentially enhancing model accuracy.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.