Abstract
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.