Comparative analysis of unidirectional and bidirectional LSTM networks for sentiment classification in film reviews using TensorFlow
DOI:
https://doi.org/10.61799/2216-0388.2100Keywords:
sentiment analysis, deep learning, LSTM, BiLSTM, natural language processing, TensorFlowAbstract
Due to the rapid increase in the quantity and size of textual data generated daily on various digital platforms, sentiment analysis using deep learning methods has gained popularity in natural language processing applications. Recurrent neural networks (RNNs) have been successfully used to model the semantic and temporal dependencies present in a text sequence thanks to their ability to learn sequential information. In this article, the authors compare the performance of unidirectional and bidirectional long-term memory (LSTM) networks for binary sentiment classification of IMDb movie reviews. The authors used various methods to preprocess the text data and convert it into a sequence of vectors using TensorFlow, as well as trainable embeddings and regularization using Early Stopping. The study concludes that the bidirectional LSTM model achieved an accuracy of 99.87%, while the unidirectional LSTM model achieved an accuracy of 97.01%, demonstrating that the bidirectional LSTM model exhibits greater convergence stability, both during and after training, than the unidirectional version. Furthermore, the authors provide additional evidence, in the form of graphs illustrating the differences between the two models, demonstrating that bidirectional contextual processing significantly contributes to improving semantic language representations, as well as overall performance on sentiment analysis tasks.
Downloads
References
[1] A. García-Carrillo, E.-A. Anaya-Vejar, and B. Medina-Delgado, “Ciencia, Tecnología, Ingeniería y Matemática STEM como Método de Enseñanza en Ingeniería,” Respuestas, vol. 25, no. 3, pp. 207–222, Sep. 2020, doi: 10.22463/0122820X.2708.
[2] S. Tam, R. Ben Said, and Ö. Tanriöver, “A ConvBiLSTM Deep Learning Model-Based Approach for Twitter Sentiment Classification,” IEEE Access, vol. 9, pp. 41283–41293, 2021, doi: 10.1109/ACCESS.2021.3064830.
[3] M. U. Salur and I. Aydin, “A Novel Hybrid Deep Learning Model for Sentiment Classification,” IEEE Access, vol. 8, pp. 58080–58093, 2020, doi: 10.1109/ACCESS.2020.2982538.
[4] G. Liu and J. Guo, “Bidirectional LSTM with attention mechanism and convolutional layer for text classification,” Neurocomputing, vol. 337, pp. 325–338, Apr. 2019, doi: 10.1016/J.NEUCOM.2019.01.078.
[5] H. Kim and Y. S. Jeong, “Sentiment Classification Using Convolutional Neural Networks,” Applied Sciences 2019, Vol. 9, Page 2347, vol. 9, no. 11, p. 2347, Jun. 2019, doi: 10.3390/APP9112347.
[6] S. J. Johnson, M. R. Murty, and I. Navakanth, “A detailed review on word embedding techniques with emphasis on word2vec,” Multimedia Tools and Applications 2023 83:13, vol. 83, no. 13, pp. 37979–38007, Oct. 2023, doi: 10.1007/S11042-023-17007-Z.
[7] S. Y. C. Chen, S. Yoo, and Y. L. L. Fang, “QUANTUM LONG SHORT-TERM MEMORY,” ICASSP, IEEE International Conference on Acoustics, Speech and Signal Processing - Proceedings, vol. 2022-May, pp. 8622–8626, 2022, doi: 10.1109/ICASSP43922.2022.9747369.
[8] W. Li, F. Qi, M. Tang, and Z. Yu, “Bidirectional LSTM with self-attention mechanism and multi-channel features for sentiment classification,” Neurocomputing, vol. 387, pp. 63–77, Apr. 2020, doi: 10.1016/J.NEUCOM.2020.01.006.
[9] P. J. Worth, “Word Embeddings and Semantic Spaces in Natural Language Processing,” Int. J. Intell. Sci., vol. 13, no. 1, pp. 1–21, Jan. 2023, doi: 10.4236/IJIS.2023.131001.
[10] K. S. Tai, R. Socher, and C. D. Manning, “Improved Semantic Representations From Tree-Structured Long Short-Term Memory Networks,” ACL-IJCNLP 2015 - 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing of the Asian Federation of Natural Language Processing, Proceedings of the Conference, vol. 1, pp. 1556–1566, 2015, doi: 10.3115/V1/P15-1150.
[11] S. M. Qaisar, “Sentiment Analysis of IMDb Movie Reviews Using Long Short-Term Memory,” 2020 2nd International Conference on Computer and Information Sciences, ICCIS 2020, Oct. 2020, doi: 10.1109/ICCIS49240.2020.9257657.
[12] K. Kim, M. E. Aminanto, and H. C. Tanuwidjaja, “Sentiment Analysis for Movies Reviews Dataset Using Deep Learning Models,” International Journal of Data Mining & Knowledge Management Process (IJDKP), vol. 9, no. 2/3, pp. 27–34, Jun. 2019, doi: 10.1007/978-981-13-1444-5_4.
[13] K. Mouthami, N. Yuvaraj, K. K. Thilaheswaran, and K. J. Lokeshvar, “Text Sentiment Analysis of Film Reviews Using Bi-LSTM and GRU,” 2023 4th International Conference on Electronics and Sustainable Communication Systems, ICESC 2023 - Proceedings, pp. 1379–1386, 2023, doi: 10.1109/ICESC57686.2023.10193121.
[14] T. Adewumi, F. Liwicki, and M. Liwicki, “Word2Vec: Optimal hyperparameters and their impact on natural language processing downstream tasks,” Open Computer Science, vol. 12, no. 1, pp. 134–141, Jan. 2022, doi: 10.1515/COMP-2022-0236/XML.
[15] G. Xu, Y. Meng, X. Qiu, Z. Yu, and X. Wu, “Sentiment analysis of comment texts based on BiLSTM,” IEEE Access, vol. 7, pp. 51522–51532, 2019, doi: 10.1109/ACCESS.2019.2909919.
[16] J. J. Castro-Maldonado, J. A. Patiño-Murillo, and E. Camargo-Casallas, “Aplicación de analítica de datos en la evaluación de los procesos de investigación aplicada y desarrollo experimental para fortalecer las competencias del siglo XXI en una institución de educación no formal,” Respuestas, vol. 27, no. 2, pp. 6–26, May 2022, doi: 10.22463/0122820X.3541.
[17] E. Juliana Hernández-Leal et al., “Pre-procesamiento de datos educativos desde un enfoque de dominio específico.,” Respuestas, vol. 27, no. 1, pp. 22–37, Jan. 2022, doi: 10.22463/0122820X.3113.
[18] S. Tabinda Kokab, S. Asghar, and S. Naz, “Transformer-based deep learning models for the sentiment analysis of social media data,” Array, vol. 14, p. 100157, Jul. 2022, doi: 10.1016/J.ARRAY.2022.100157.
[19] D. S. Asudani, N. K. Nagwani, and P. Singh, “Impact of word embedding models on text analytics in deep learning environment: a review,” Artificial Intelligence Review 2023 56:9, vol. 56, no. 9, pp. 10345–10425, Feb. 2023, doi: 10.1007/S10462-023-10419-1.
[20] L. D. S. Riveros, W. P. Ríos, and I. M. M. Ramírez, “Técnicas estadísticas y logro de aprendizaje: revisión bibliográfica,” Eco Matemático, vol. 12, no. 2, pp. 112–125, Jul. 2021, doi: 10.22463/17948231.3323.
Published
Issue
Section
License
Copyright (c) 2026 Mundo FESC Journal

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.

