Loading article...
Loading article...
Stream/Area:
-
Subject:
-
Paper ID:
IJSREM62516
Volume:
10 |
5 |
May 2026
Pages:
1-5
Publication Frequency:
Monthly (12 issues per year)
License:International Journal of Scientific Research in Engineering and Management follows the Creative Commons Attribution 4.0 (CC BY 4.0) License, allowing free use and distribution with proper attribution.
Department of Aritificial Intelligence & Data Science
Dr. Akhilesh Das Gupta Institute of Professional Studies
Department of Aritificial Intelligence & Data Science
Dr. Akhilesh Das Gupta Institute of Professional Studies
Sentiment analysis of user-generated reviews remains a foundational problem in Natural Language Processing (NLP). Standard recurrent architectures such as Long Short-Term Memory (LSTM) networks compress the entire review into a fixed hidden state, obscuring how emotional polarity evolves across the token sequence. This paper presents a compact Transformer-based encoder architecture that treats each IMDb movie review as an explicit time series of positionally-encoded token embeddings. By integrating Multi-Head Self-Attention (MHSA) with 4 heads and embedding dimension d=64, two stacked Transformer encoder blocks with residual connections and Layer Normalization (LN), and a Global Average Pooling (GAP) classification head, the model captures long-range temporal dependencies and achieves 85.08% accuracy on the IMDb Large Movie Review Dataset (50,000 samples). Self-attention weights are extracted from the first encoder block and visualized as temporal heatmaps, providing interpretable evidence of how sentiment evolves across token positions. Custom review prediction yields confidence scores up to 0.9979 for unambiguous reviews and 0.0003 for strongly negative reviews. The complete pipeline is implemented in TensorFlow 2.16.1 on a local CPU environment, demonstrating accessibility without GPU infrastructure.
KEYWORDS
We have presented a Transformer-based time series approach for temporal sentiment evolution modeling in IMDb movie reviews. By evaluating the effect of positional encoding, multi-head self-attention, layer normalization, and attention weight extraction, we demonstrated that a compact 2-block encoder trained from scratch achieves 85.08% accuracy on the IMDb benchmark. The temporal self-attention heatmaps and entropy metrics provide novel interpretable evidence of how sentiment evolves across the token sequence, with negative reviews exhibiting mean attention entropy of 1.7580. The complete pipeline — from preprocessing through training to custom prediction — runs on a local CPU environment using TensorFlow 2.16.1 without requiring GPU infrastructure or pre-trained model downloads, demonstrating significant accessibility advantages over BERT-scale approaches.
[1] B. Pang and L. Lee, "Opinion Mining and Sentiment Analysis," Foundations and Trends in Information Retrieval, vol. 2, no. 1-2, pp. 1-135, 2008. [2] A. L. Maas et al., "Learning Word Vectors for Sentiment Analysis," in Proc. ACL, 2011, pp. 142-150. [IMDb Dataset] [3] B. Pang, L. Lee, and S. Vaithyanathan, "Thumbs Up? Sentiment Classification Using Machine Learning Techniques," in Proc. EMNLP, 2002, pp. 79-86. [4] S. Hochreiter and J. Schmidhuber, "Long Short-Term Memory," Neural Computation, vol. 9, no. 8, pp. 1735-1780, 1997. [5] A. Vaswani et al., "Attention Is All You Need," in Proc. NeurIPS, 2017, pp. 5998-6008. [6] J. Devlin, M.-W. Chang, K. Lee, and K. Toutanova, "BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding," in Proc. NAACL-HLT, 2019, pp. 4171-4186. [7] K. Clark, U. Khandelwal, O. Levy, and C. D. Manning, "What Does BERT Look At? An Analysis of BERT's Attention," in Proc. BlackboxNLP, 2019. [8] S. Jain and B. C. Wallace, "Attention Is Not Explanation," in Proc. NAACL-HLT, 2019, pp. 3543-3556. [9] P. K. Diederik and B. Jimmy, "Adam: A Method for Stochastic Optimization," CoRR, vol. abs/1412.6980, 2015. [10] T. Mikolov et al., "Distributed Representations of Words and Phrases," in Proc. NeurIPS, 2013, pp. 3111-3119.
Publication Date
5/5/2026
Peer Review Type
Double-Blind Peer Review
Review Rounds: 2
Documents
Article Views
0
Total views since publication
PDF Downloads
6
Total downloads since publication
Geographic Reach
5
Digital Preservation: This article is permanently archived on Zenodo and complies with all data preservation standards across major indexing platforms.
Plagiarism Screening
This manuscript has been checked for plagiarism using TurnitinPlagiarismChecker software.
Conflict of Interest
The authors declare no conflict of interest related to this research work.
Funding Information
No funding information available for this research.
Related research in the same subject area
Loading similar articles...