Sentiment Analysis Using Transformer-Based Language Models

Authors

  • Ayesha Naeem Department of Computer Science, University of Lahore, Pakistan
  • Muhammad Raza Department of Artificial Intelligence, COMSATS University Islamabad, Pakistan
  • Sana Farooq Department of Data Science, National University of Computer and Emerging Sciences (FAST-NUCES), Lahore, Pakistan

Keywords:

Sentiment Analysis, Transformers, BERT, Natural Language Processing, Deep Learning, Text Classification, Contextual Embeddings, Attention Mechanism

Abstract

Sentiment analysis has emerged as a critical field in natural language processing (NLP), enabling machines to understand human emotions embedded within text. Transformer-based architectures, such as BERT, RoBERTa, and GPT variants, have revolutionized this task through contextual embeddings and self-attention mechanisms. Unlike traditional models relying on static word embeddings, transformers dynamically capture semantic dependencies and linguistic nuances. This paper explores the methodologies, performance benchmarks, and optimization strategies of transformer-based models for sentiment classification across diverse datasets, including IMDB, Twitter, and Yelp. Comparative results demonstrate that fine-tuned transformer architectures consistently outperform classical machine learning models such as SVM and LSTM, achieving higher accuracy, robustness, and generalization. The study concludes with future research prospects, emphasizing multilingual sentiment analysis, zero-shot learning, and cross-domain transferability

References

Rashid, I. (2021). National security challenges arising from big data privacy gaps in ICT environments. Scientific and Practical Cyber Security Journal, 9(3), 51–58.

Downloads

Published

2022-06-30

Issue

Section

Articles