Twitter Sentiment Analysis Using Natural Language Processing with Attention-Based Multi-Scale Feature Fusion

Authors

  • Mrs. N. Swaroopa Author
  • Sangi Sathvik Author
  • Sandupatla Sripal Reddy Author
  • Pravas Sagar Author
  • Mohammad Aijaz Ahmed Author

DOI:

https://doi.org/10.64751/ijdim.2024.v3.n4.1235

Abstract

Twitter Sentiment Analysis Using Natural Language Processing presents a fundamental challenge in NLP, Sentiment Analysis, Social Media. Existing approaches, including Naive Bayes, SVM, and LogReg, process input data at a single resolution and fail to capture patterns spanning multiple scales, resulting in a mean accuracy ceiling on benchmark datasets. We address this limitation by introducing SentNLP, a hybrid deep learning framework that integrates three parallel convolutional streams (kernel sizes 3, 7, and 13) with bidirectional LSTM encoding and a gated attention fusion module. We propose a parameter-sharing strategy within the attention mechanism that reduces trainable parameters while maintaining representational capacity. We train and evaluate our framework on Sentiment140, Twitter Airlines using stratified 10-fold cross-validation. Our method achieves a mean accuracy (%) of 93.8% on the primary benchmark, surpassing the nearest baseline by 3.6 percentage points (p < 0.001, Cohen's d = 1.42). We further demonstrate a 35.2% reduction in computational cost relative to comparable hybrid architectures and convergence within 62 epochs on all benchmark datasets. Keywords NLP; sentiment; social media; text classification; BERT; Twitter

Downloads

Published

2024-11-13

How to Cite

Mrs. N. Swaroopa, Sangi Sathvik, Sandupatla Sripal Reddy, Pravas Sagar, & Mohammad Aijaz Ahmed. (2024). Twitter Sentiment Analysis Using Natural Language Processing with Attention-Based Multi-Scale Feature Fusion. International Journal of Data Science and IoT Management System, 3(4), 41–51. https://doi.org/10.64751/ijdim.2024.v3.n4.1235