Comparative performance of LSTM and DNN in sentiment analysis
DOI:
https://doi.org/10.35335/mandiri.v13i4.403Keywords:
Deep Neural Network, Long Short-Term Memory, Online Transportation, Sentiment Analysis, TwitterAbstract
Understanding public sentiment toward online transportation services through social media analysis has gained increasing importance. This study provides a comparison between the effectiveness of Deep Neural Network (DNN), and Long Short-Term Memory (LSTM) models in analyzing user sentiment toward online transportation services in Indonesia using Twitter data. The dataset consists of 10,000 tweets related to Gojek, Grab, Maxim, and InDrive, collected from January to December 2023. Data preprocessing includes noise removal, case folding, tokenization, and stemming. Sentiment labeling was conducted using IndoBERTweet and manually validated. Using K-Fold Cross-Validation, both DNN and LSTM models were trained, and assessed using performance metrics such as accuration, precision, recall, and F1-score, training time, and Mean Absolute Error (MAE). The LSTM model demonstrated superior performances with accuration of 82,15%, precision of 82,21%, recall of 82,15%, specificity of 90,74%, F1-score of 82,10%, and MAE of 23,15%, compared to the DNN model which achieved an accuracy of 81,22%, precision of 81,20%, recall of 81,22%, specificity of 90,18%, F1-score of 81,12%, and MAE of 24,46%. However, DNN outperformed LSTM in training time efficiency (50,435 seconds vs. 148,765 seconds). LSTM shows significant advantages in understanding context and word relationships in sentiment analysis, while DNN offers better computational efficiency. The findings of this study can be utilized by online transportation services providers to improve service quality based on user feedback from social media.
References
Abbas, S. K., & George, L. E. (2020). The performance differences between using recurrent neural networks and feedforward neural network in sentiment analysis problem. Iraqi Journal of Science, 61(6), 1512–1524. https://doi.org/10.24996/ijs.2020.61.6.31
Alsini, R. (2023). Analysis of Real Time Twitter Sentiments using Deep Learning Models. Journal of Applied Data Sciences, 4(4), 480–489. https://doi.org/10.47738/jads.v4i4.146
Ao, S. I., & Fayek, H. (2023). Continual Deep Learning for Time Series Modeling. Sensors, 23(16), 91–108. https://doi.org/10.3390/s23167167
Bijarnia, S., Khetan, R., Ilavarasan, P. V., & Kar, A. K. (2019). Analyzing Customer Engagement Using Twitter Analytics: A Case of Uber Car-Hailing Services. Lecture Notes in Computer Science (Including Subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), 11701 LNCS, 404–414. https://doi.org/10.1007/978-3-030-29374-1_33
Chen, D., Su, W., Wu, P., & Hua, B. (2023). Joint multimodal sentiment analysis based on information relevance. Information Processing and Management, 60(2), 1567–1589. https://doi.org/10.1016/j.ipm.2022.103193
Devlin, J., Chang, M. W., Lee, K., & Toutanova, K. (2019). BERT: Pre-training of deep bidirectional transformers for language understanding. NAACL HLT 2019 - 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies - Proceedings of the Conference, 1, 4171–4186. https://doi.org/https://doi.org/10.48550/arXiv.1810.04805
Haque, M. R., Akter Lima, S., & Mishu, S. Z. (2019). Performance Analysis of Different Neural Networks for Sentiment Analysis on IMDb Movie Reviews. 3rd International Conference on Electrical, Computer and Telecommunication Engineering, ICECTE 2019, 161–164. https://doi.org/10.1109/ICECTE48615.2019.9303573
Joshi, A., Dabre, R., Kanojia, D., Li, Z., Zhan, H., Haffari, G., & Dippold, D. (2024). Natural Language Processing for Dialects of a Language: A Survey. ACM Transactions on Asian and Low-Resource Language Information Processing, 22(3), 1–28. https://doi.org/10.1145/3712060
Koto, F., Lau, J. H., & Baldwin, T. (2021). INDOBERTWEET: A Pretrained Language Model for Indonesian Twitter with Effective Domain-Specific Vocabulary Initialization. EMNLP 2021 - 2021 Conference on Empirical Methods in Natural Language Processing, Proceedings, 10660–10668. https://doi.org/10.18653/v1/2021.emnlp-main.833
Kumar, A., Srinivasan, K., Cheng, W. H., & Zomaya, A. Y. (2020). Hybrid context enriched deep learning model for fine-grained sentiment analysis in textual and visual semiotic modality social data. Information Processing and Management, 57(1). https://doi.org/10.1016/j.ipm.2019.102141
Kumar, G. L., Karan, I., Pati, R., & Koduru, S. (2021). Sentiment Analysis in Transportation System 1 1. Internatonal Journal of Creative Research Thoughts (IJCRT), 9(11), 618–627.
Li, S., Shi, W., Wang, J., & Zhou, H. (2021). A Deep Learning-Based Approach to Constructing a Domain Sentiment Lexicon: a Case Study in Financial Distress Prediction. Information Processing and Management, 58(5), 8234–8245. https://doi.org/10.1016/j.ipm.2021.102673
Liu, J., Li, K., Zhu, A., Hong, B., Zhao, P., Dai, S., Wei, C., Huang, W., & Su, H. (2024). Application of Deep Learning-Based Natural Language Processing in Multilingual Sentiment Analysis. Mediterranean Journal of Basic and Applied Sciences, 08(02), 243–260. https://doi.org/10.46382/mjbas.2024.8219
Mamani-Coaquira, Y., & Villanueva, E. (2024). A Review on Text Sentiment Analysis with Machine Learning and Deep Learning Techniques. IEEE Access, 60(2), 103123. https://doi.org/10.1109/ACCESS.2024.3513321
Manalu, B. U., Tulus, & Efendi, S. (2020). Deep learning performance in sentiment analysis. 2020 4th International Conference on Electrical, Telecommunication and Computer Engineering, ELTICOM 2020 - Proceedings, 97–102. https://doi.org/10.1109/ELTICOM50775.2020.9230488
Minaee, S., Kalchbrenner, N., Cambria, E., Nikzad Khasmakhi, N., Asgari-Chenaghlu, M., & Gao, J. (2021). Deep Learning--based Text Classification: A Comprehensive Review. ACM Computing Surveys, 54, 1–40. https://doi.org/10.1145/3439726
Mohamed Ali, N., El Hamid, M. M. A., & Youssif, A. (2019). Sentiment Analysis for Movies Reviews Dataset Using Deep Learning Models. International Journal of Data Mining & Knowledge Management Process, 09(03), 19–27. https://doi.org/10.5121/ijdkp.2019.9302
Pan, D., Yuan, J., Li, L., & Sheng, D. (2019). Deep neural network-based classification model for Sentiment Analysis. BESC 2019 - 6th International Conference on Behavioral, Economic and Socio-Cultural Computing, Proceedings, 35(3), 1–12. https://doi.org/10.1109/BESC48373.2019.8963171
Rishu, Singh, A., & Tanwar, S. (2024). Unveiling Sentiments: CNN-LSTM Based Social Media Sentiment Analysis. 2024 Asia Pacific Conference on Innovation in Technology, APCIT 2024, 34(2), 891–907. https://doi.org/10.1109/APCIT62007.2024.10673560
Saymon Ahammad, M., Sinthia, S. A., Muaj Chowdhury, M., Asif, N.-A.-A., & Nurul AfsarIkram, M. (2024). Sentiment Analysis of Various Ride Sharing Applications Reviews: A Comparative Analysis Between Deep Learning and Machine Learning Algorithms. Transportation Research Part C, 148, 434–448. https://doi.org/10.1007/978-3-031-69986-3_33
Sengar, S. S., Hasan, A. Bin, Kumar, S., & Carroll, F. (2024). Generative artificial intelligence: a systematic review and applications. Multimedia Tools and Applications, 66(1), 1–27. https://doi.org/10.1007/s11042-024-20016-1
Șerban, O., Thapen, N., Maginnis, B., Hankin, C., & Foot, V. (2019). Real-time processing of social media with SENTINEL: A syndromic surveillance system incorporating deep learning for health classification. Information Processing and Management, 56(3), 1166–1184. https://doi.org/10.1016/j.ipm.2018.04.011
Shah, D., Campbell, W., & Zulkernine, F. H. (2018). A Comparative Study of LSTM and DNN for Stock Market Forecasting. Proceedings - 2018 IEEE International Conference on Big Data, Big Data 2018, 4148–4155. https://doi.org/10.1109/BigData.2018.8622462
Šmíd, J., & Král, P. (2025). Cross-lingual aspect-based sentiment analysis: A survey on tasks, approaches, and challenges. Information Fusion, 120, 119422. https://doi.org/10.1016/j.inffus.2025.103073
Zhou, W., An, L., Han, R., & Li, G. (2025). Classification and severity assessment of disaster losses based on multi-modal information in social media. Information Processing and Management, 62(5). https://doi.org/10.1016/j.ipm.2025.104179
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2025 Jandri Tampubolon, Kusrini Kusrini

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