The LSTM and Bidirectional GRU Comparison for Text Classification


  • Hannan Asrawi Magister Teknik Informatika, Universitas Amikom Yogyakarta, Yogyakarta, Indonesia
  • Ema Utami Magister Teknik Informatika, Universitas Amikom Yogyakarta, Yogyakarta, Indonesia
  • Ainul Yaqin Magister Teknik Informatika, Universitas Amikom Yogyakarta, Yogyakarta, Indonesia




Bidirectional GRU; LSTM; Machine learning; NLP; Text Classification


Although the phrases machine learning and AI are frequently used interchangeably and are frequently discussed together, they do not have the same meanings. While all artificial intelligence (AI) is machine learning, not all AI is machine learning, which is a key distinction. In the beginning, machine learning and natural language processing (NLP) are related since machine learning is frequently employed as a tool for NLP tasks. The advantage of NLP is that it can perform analysis, and examine a lot of data, including comments on social media accounts and hundreds of online customer evaluations. Text classification is essentially what needs to be done. This study compares Bidirectional GRU and LSTM as text classification algorithms using 20,000 newsgroup documents from 20 newsgroups from The UCI KDD Archive.

After using the suggested model, we compare it to the long short-term memory and bidirectional GRU models for accuracy and validation. The results of the two comparisons show that the bidirectional GRU model performs better than the long short-term memory model. And this is a successful classification of text using a deep learning algorithm that uses a bidirectional GRU.

GS Cited Analysis


Download data is not yet available.



Agustiningsih, K. K., Utami, E., Muhammad, O., & Alsyaibani, A. (2022). Sentiment Analysis of COVID-19 Vaccines in Indonesia on Twitter Using Pre-Trained and Self-Training Word Embeddings. 1, 39–46.

Chamidy, T., Informatika, M., Islam, U., Maulana, N., Ibrahim, M., & Mechanism, A. (2023). Bidirectional GRU dengan Attention Mechanism pada Analisis Sentimen PLN Mobile. 22(2), 358–372.

Cheng, Y., Sun, H., Chen, H., Li, M., Cai, Y., Cai, Z., & Huang, J. (2021). Sentiment Analysis Using Multi-Head Attention Capsules with Multi-Channel CNN and Bidirectional GRU. IEEE Access, 9, 60383–60395.

Dicky Wahyu Hariyanto, W. M. (2020). Analisis Sentimen Pada Media Sosial Twitter. 12(1), 79–86.

Fransiska, S., & Irham Gufroni, A. (2020). Sentiment Analysis Provider by.U on Google Play Store Reviews with TF-IDF and Support Vector Machine (SVM) Method. Scientific Journal of Informatics, 7(2), 2407–7658.

Fudholi, D. H., Zahra, A., & Nayoan, R. A. N. (2022). A Study on Visual Understanding Image Captioning using Different Word Embeddings and CNN-Based Feature Extractions. Kinetik: Game Technology, Information System, Computer Network, Computing, Electronics, and Control, 4(1), 91–98.

Handayani, S. F., Pratiwi, R. W., Dairoh, D., & Af’idah, D. I. (2022). Analisis Sentimen pada Data Ulasan Twitter dengan Long-Short Term Memory. JTERA (Jurnal Teknologi Rekayasa), 7(1), 39.

Hermanto, D. T., Setyanto, A., & Luthfi, E. T. (2021). Algoritma LSTM-CNN untuk Binary Klasifikasi dengan Word2vec pada Media Online. Creative Information Technology Journal, 8(1), 64.

Jakaria, A., Mu’minah, S., Riana, D., & Hadianti, S. (2021). Klasifikasi Varietas Buah Kiwi dengan Metode Convolutional Neural Networks Menggunakan Keras. Jurnal Media Informatika Budidarma, 5(4), 1309.

Ji, C., & Wu, H. (2020). Cascade architecture with rhetoric long short-term memory for complex sentence sentiment analysis. Neurocomputing, 405, 161–172.

Jiao, Y., & Qu, Q. X. (2019). A proposal for Kansei knowledge extraction method based on natural language processing technology and online product reviews. Computers in Industry, 108, 1–11.

Ma, S., Tong, L., Ye, F., Xiao, J., Bénard, P., & Chahine, R. (2019). Hydrogen purification layered bed optimization based on artificial neural network prediction of breakthrough curves. International Journal of Hydrogen Energy, 44(11), 5324–5333.

Muhammad, P. F., Kusumaningrum, R., & Wibowo, A. (2021). Sentiment Analysis Using Word2vec and Long Short-Term Memory (LSTM) for Indonesian Hotel Reviews. Procedia Computer Science, 179(2020), 728–735.

Nurvania, J., Jondri, & Muslim Lhaksamana, K. (2021). Analisis Sentimen Pada Ulasan di TripAdvisor Menggunakan Metode Long Short-Term Memory (LSTM). E-Proceeding of Engineering, 8(4), 4124–4135.

Qaisar, S. M. (2020). Sentiment Analysis of IMDb Movie Reviews Using Long Short-Term Memory. 2020 2nd International Conference on Computer and Information Sciences, ICCIS 2020, 12–15.

Salur, M. U., & Aydin, I. (2020). A Novel Hybrid Deep Learning Model for Sentiment Classification. IEEE Access, 8, 58080–58093.

Setiawan, E. I., & Lestari, I. (2021). Stance Classification Pada Berita Berbahasa Indonesia Berbasis Bidirectional LSTM. Journal of Intelligent System and Computation, 3(1), 41–48.

Staudemeyer, R. C., & Morris, E. R. (2019). Understanding LSTM -- a tutorial into Long Short-Term Memory Recurrent Neural Networks. 1–42.

Tran, M. T., Trieu, L. Q., & Tran, H. Q. (2019). Document representation and classification with Twitter-based document embedding, adversarial domain-adaptation, and query expansion. Journal of Heuristics.

Tulu, C. N. (2022). Experimental Comparison of Pre-Trained Word Embedding Vectors of Word2Vec, Glove, FastText for Word Level Semantic Text Similarity Measurement in Turkish. Advances in Science and Technology Research Journal, 16(4), 147–156.

Yang, S., Yu, X., & Zhou, Y. (2020). LSTM and GRU Neural Network Performance Comparison Study: Taking Yelp Review Dataset as an Example. Proceedings - 2020 International Workshop on Electronic Communication and Artificial Intelligence, IWECAI 2020, 98–101.

Zulqarnain, M., Ghazali, R., Ghouse, M. G., & Mushtaq, M. F. (2019). Efficient processing of GRU based on word embedding for text classification. International Journal on Informatics Visualization, 3(4), 377–383.


Crossmark Updates

How to Cite

Asrawi, H., Utami, E. ., & Yaqin, A. . (2023). The LSTM and Bidirectional GRU Comparison for Text Classification. Sinkron : Jurnal Dan Penelitian Teknik Informatika, 8(4), 2264-2274.

Most read articles by the same author(s)