Sentiment Analysis towards Jokowi Post-Presidential Term Using CNN-BiLSTM with Multi-head Attention on Platform X


Muhammad Rizki Setyawan(1); Fajar Rahardika Bahari Putra(2*); Ardhina Ramadhani(3);

(1) Universitas Muhammadiyah Sorong
(2) Universitas Muhammadiyah Sorong
(3) Universitas Muhammadiyah Sorong
(*) Corresponding Author

  

Abstract


The development of social media has changed the way the public expresses political opinions, especially regarding the evaluation of President Joko Widodo’s (Jokowi) leadership after his term. Platform X (formerly Twitter) has become the primary source of public opinion data, but the use of informal language and sarcasm makes accurate sentiment analysis challenging. This study creates a sentiment analysis model that uses deep learning with a CNN-BiLSTM structure and a multi-head attention mechanism. The dataset consists of 52,643 tweets that have been labeled and embedded using IndoBERT. To address class imbalance, the SMOTE method was applied to the training data, enabling the model to better learn from minority classes. The results indicate that the model achieves a high accuracy of 98.78%, with an average precision, recall, and F1-score of 0.98. These findings indicate that the model is not only accurate but also reliable in distinguishing each sentiment class. A comparison with other model variants suggests that the complete combination of CNN-BiLSTM and Multi-Head Attention delivers the best performance, although the improvement is relatively small.


Keywords


CNN-BiLSTM; Jokowi; Multi-Head Attention; Sentiment Analysis; Platform X

  
  

Full Text:

PDF
  

Article Metrics

Abstract view: 197 times
PDF view: 65 times
     

Digital Object Identifier

doi  https://doi.org/10.33096/ilkom.v17i2.2843.150-161
  

Cite

References


A. N. Ma’aly, D. Pramesti, A. D. Fathurahman, and H. Fakhrurroja, “Exploring Sentiment Analysis for the Indonesian Presidential Election Through Online Reviews Using Multi-Label Classification with a Deep Learning Algorithm,” Inf., vol. 15, no. 11, pp. 1–33, 2024, doi: 10.3390/info15110705.

A. A. Firdaus, A. Yudhana, I. Riadi, and Mahsun, “Indonesian presidential election sentiment: Dataset of response public before 2024,” Data Br., vol. 52, p. 109993, Feb. 2024, doi: 10.1016/j.dib.2023.109993.

C. G. Kim, Y. J. Hwang, and C. Kamyod, “A Study of Profanity Effect in Sentiment Analysis on Natural Language Processing Using ANN,” J. Web Eng., vol. 21, no. 3, pp. 751–766, 2022, doi: 10.13052/jwe1540-9589.2139.

B. A. Pramono and Fitriyani, “Sentiment Analysis of Political Discourse on Platform X Using Graph Neural Network (GNN),” in 2024 International Conference on Intelligent Cybernetics Technology & Applications (ICICyTA), 2024, pp. 302–307. doi: 10.1109/ICICYTA64807.2024.10913222.

S. Gupta et al., “Aspect Based Feature Extraction in Sentiment Analysis using Bi-GRU-LSTM Model,” J. Mob. Multimed., vol. 20, no. 4, pp. 935–960, 2024, doi: 10.13052/jmm1550-4646.2048.

R. Olusegun, T. Oladunni, H. Audu, Y. A. O. Houkpati, and S. Bengesi, “Text Mining and Emotion Classification on Monkeypox Twitter Dataset: A Deep Learning-Natural Language Processing (NLP) Approach,” IEEE Access, vol. 11, no. March, pp. 49882–49894, 2023, doi: 10.1109/ACCESS.2023.3277868.

M. R. Setyawan, F. R. B. Putra, and L. J. Fakhri, “Comparison of Accuracy Level of Certainty Factor Method and Bayes Theorem on Cattle Disease,” Ilk. J. Ilm., vol. 16, no. 3, pp. 343–355, 2024, doi: 10.33096/ilkom.v16i3.1943.343-355.

M. Alfreihat, O. S. Almousa, Y. Tashtoush, A. Alsobeh, K. Mansour, and H. Migdady, “Emo-SL Framework: Emoji Sentiment Lexicon Using Text-Based Features and Machine Learning for Sentiment Analysis,” IEEE Access, vol. 12, no. March, pp. 81793–81812, 2024, doi: 10.1109/ACCESS.2024.3382836.

R. Obiedat et al., “Sentiment Analysis of Customers’ Reviews Using a Hybrid Evolutionary SVM-Based Approach in an Imbalanced Data Distribution,” IEEE Access, vol. 10, pp. 22260–22273, 2022, doi: 10.1109/ACCESS.2022.3149482.

D. Petrova and V. Bozhikova, “Random forest and recurrent neural network for sentiment analysis on texts in Bulgarian language,” in 2021 International Conference on Biomedical Innovations and Applications (BIA), 2022, pp. 66–69. doi: 10.1109/BIA52594.2022.9831326.

H. Liu, X. Chen, and X. Liu, “A Study of the Application of Weight Distributing Method Combining Sentiment Dictionary and TF-IDF for Text Sentiment Analysis,” IEEE Access, vol. 10, pp. 32280–32289, 2022, doi: 10.1109/ACCESS.2022.3160172.

C. Lal and Z. Nasir, “Comparative Analysis of Deep Learning Methods in the Realm of Sentiment Analysis,” in 2023 International Multi-disciplinary Conference in Emerging Research Trends (IMCERT), 2023, pp. 1–3. doi: 10.1109/IMCERT57083.2023.10075107.

F. R. B. Putra, M. R. Setyawan, and L. J. F. Rendra Soekarta, Nabila, “Implementasi Deep Learning Menggunakan Cnn Untuk Klasifikasi Tingkat Kematangan Buah Jeruk Berbasis Android,” vol. 8, no. 1, pp. 36–43, 2023, doi: 10.51544/jurnalmi.v9i2.5462.

B. A. Iswenda, Irhamah, and H. Kuswanto, “Convolutional Neural Network for Sentiment Analysis of Indonesian Online News,” in 2024 Beyond Technology Summit on Informatics International Conference (BTS-I2C), 2024, pp. 693–696. doi: 10.1109/BTS-I2C63534.2024.10941990.

L. Yao, “Sentiment analysis based on CNN - LSTM hotel reviews,” J. Phys. Conf. Ser., vol. 2330, no. 1, 2022, doi: 10.1088/1742-6596/2330/1/012018.

T. Ho, H. M. Bui, and T. K. Phung, “A hybrid model for aspect-based sentiment analysis on customer feedback: research on the mobile commerce sector in Vietnam,” Int. J. Adv. Intell. Informatics, vol. 9, no. 2, pp. 273–285, 2023, doi: 10.26555/ijain.v9i2.976.

L. Khan, A. Amjad, K. M. Afaq, and H. T. Chang, “Deep Sentiment Analysis Using CNN-LSTM Architecture of English and Roman Urdu Text Shared in Social Media,” Appl. Sci., vol. 12, no. 5, 2022, doi: 10.3390/app12052694.

Y. Dong, X. Li, M. He, and J. Li, “DC-BiLSTM-CNN Algorithm for Sentiment Analysis of Chinese Product Reviews,” Appl. Artif. Intell., vol. 39, no. 1, 2025, doi: 10.1080/08839514.2025.2461809.

A. S. Mirdan, S. Buyrukoglu, and M. R. Baker, “Advanced deep learning techniques for sentiment analysis: combining Bi-LSTM, CNN, and attention layers,” Int. J. Adv. Intell. Informatics, vol. 11, no. 1, p. 55, Feb. 2025, doi: 10.26555/ijain.v11i1.1848.

Shivaranjini, A. Srinivasan, S. B. Anjappa, R. V. Selvakumar, and E. Purushotham, “An Evaluation of the CNN-LSTM Model’s Efficacy in Sentiment Analysis Using the Bert and Attendance Mechanisms,” Int. Res. J. Multidiscip. Scope, vol. 5, no. 2, pp. 822–829, 2024, doi: 10.47857/irjms.2024.v05i02.0659.

Z. Huang, H. Liu, C. Duan, and J. Min, “Customer sentiment recognition in conversation based on bidirectional LSTM and self-attention mechanism,” J. Intell. Fuzzy Syst., vol. 46, no. 2, pp. 4417–4428, 2024, doi: 10.3233/JIFS-224183.

A. Kumar, V. T. Narapareddy, V. A. Srikanth, A. Malapati, and L. B. M. Neti, “Sarcasm Detection Using Multi-Head Attention Based Bidirectional LSTM,” IEEE Access, vol. 8, pp. 6388–6397, 2020, doi: 10.1109/ACCESS.2019.2963630.

H. Qiu, C. Fan, J. Yao, and X. Ye, “Chinese Microblog Sentiment Detection Based on CNN-BiGRU and Multihead Attention Mechanism,” Sci. Program., vol. 2020, 2020, doi: 10.1155/2020/8865983.

F. Muftie and M. Haris, “IndoBERT Based Data Augmentation for Indonesian Text Classification,” in 2023 International Conference on Information Technology Research and Innovation (ICITRI), 2023, pp. 128–132. doi: 10.1109/ICITRI59340.2023.10250061.

L. Khan, A. Qazi, H. T. Chang, M. Alhajlah, and A. Mahmood, “Empowering Urdu sentiment analysis: an attention-based stacked CNN-Bi-LSTM DNN with multilingual BERT,” Complex Intell. Syst., vol. 11, no. 1, pp. 1–14, 2025, doi: 10.1007/s40747-024-01631-9.

M. Wnkhade, C. Sekhar, and A. Abraham, “CBMAFM: CNN-BiLSTM Multi-Attention Fusion Mechanism for sentiment classification,” Multimed. Tools Appl., vol. 83, pp. 1–32, Nov. 2023, doi: 10.1007/s11042-023-17437-9.

T. A. Putra, V. Ariandi, and S. Defit, “Enhancing Accuracy by Using Boosting and Stacking Techniques on the Random Forest Algorithm on Data from Social Media X,” Ilk. J. Ilm., vol. 16, no. 2, pp. 184–189, Aug. 2024, doi: 10.33096/ilkom.v16i2.2058.184-189.

C. Owen and D. Suhartono, “Artificial Intelligence-Powered Intent Classification for Indonesian E-Wallet Customer Service Chatbots,” in 2024 International Conference on Intelligent Cybernetics Technology & Applications (ICICyTA), 2024, pp. 653–658. doi: 10.1109/ICICYTA64807.2024.10913352.

N. Sholihah, F. F. Abdulloh, M. Rahardi, A. Aminuddin, B. P. Asaddulloh, and A. Y. A. Nugraha, “Feature Selection Optimization for Sentiment Analysis of Tax Policy Using SMOTE and PSO,” in 2023 3rd International Conference on Smart Cities, Automation & Intelligent Computing Systems (ICON-SONICS), 2023, pp. 44–48. doi: 10.1109/ICON-SONICS59898.2023.10435269.

P. Durga and D. Godavarthi, “Deep-Sentiment: An Effective Deep Sentiment Analysis Using a Decision-Based Recurrent Neural Network (D-RNN),” IEEE Access, vol. 11, no. October, pp. 108433–108447, 2023, doi: 10.1109/ACCESS.2023.3320738.

Y. B. P. Pamukti and M. Rahardi, “Sentiment Analysis of Bandung Tourist Destination Using Support Vector Machine and Naïve Bayes Algorithm,” in 2022 6th International Conference on Information Technology, Information Systems and Electrical Engineering (ICITISEE), 2022, pp. 391–395. doi: 10.1109/ICITISEE57756.2022.10057802.

G. Tamami, W. A. Triyanto, and S. Muzid, “Sentiment Analysis Mobile JKN Reviews Using SMOTE Based LSTM,” IJCCS (Indonesian J. Comput. Cybern. Syst., vol. 19, no. 1, p. 13, Jan. 2025, doi: 10.22146/ijccs.101910.

F. Meng and C.-A. Wang, “Sentiment analysis with adaptive multi-head attention in Transformer,” Appl. Comput. Eng., vol. 50, no. 1, pp. 133–137, 2024, doi: 10.54254/2755-2721/50/20241326.

X. Li, R. Lu, P. Liu, and Z. Zhu, “Graph convolutional networks with hierarchical multi-head attention for aspect-level sentiment classification,” J. Supercomput., vol. 78, no. 13, pp. 14846–14865, 2022, doi: 10.1007/s11227-022-04480-w.


Refbacks

  • There are currently no refbacks.


Copyright (c) 2025 Muhammad Rizki Setyawan, Fajar Rahardika Bahari Putra, Ardhina Ramadhani

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