Effect of Word Embedding on Indonesian Social Media Hate Speech Classification Using Hybrid CNN-SimpleRNN
Abstract
The rapid rise in the number of people using social media platforms, specifically platform X, poses great difficulties for spotting any possible harm from hate speech. In particular, due to the high informality of discourse of Indonesian internet users, expressed through slang, abbreviation, and distorted spelling, automatic moderation becomes even more complicated. The current study attempts at classifying hate speech on social media platform X, proposing a hybrid model of CNN combined with a Bidirectional SimpleRNN architecture, alongside a comparative study on word embedding approaches. The combination between CNN and SimpleRNN is chosen because it allows for exploiting both CNN's capability to extract local spatial features by finding toxic n-grams and the strength of Bidirectional SimpleRNN for capturing long contextual dependency in the sequence of text data. Given that the problem of OOV is highly significant, TF-IDF, FastText, and Word2Vec have been rigorously tested not only separately but also combined in different ways. Compared to the baseline configuration using standalone TF-IDF (which achieved 84.56% accuracy), the results show that the use of the hybrid TF-IDF + FastText provided the best performance with average accuracy of 86.49%, average precision of 86.32%, recall of 86.80% and F1 score of 86.55%. Conversely, the combination of multiple dense semantic vectors (Word2Vec and FastText) led to semantic drift and feature ambiguity; this created feature overlap and computational noise that obscured classification decision boundaries, resulting in redundancy and poor performance. It shows that the combination of lexico-statistical significance and semantic subword context greatly contributes to achieving better results in the Indonesian language setting and is very resistant to slang and OOV words found in digital settings. This study contributes to the field of natural language processing by providing a lightweight, highly accurate, and computationally efficient lexico-semantic framework tailored for moderating highly unstructured Indonesian social media text.
Downloads
References
F. E. Ayo, O. Folorunso, F. T. Ibharalu, and I. A. Osinuga, “Machine Learning Techniques For Hate Speech Classification Of Twitter Data: State-Of-The-Art, Future Challenges And Research Directions,” Comput. Sci. Rev., vol. 38, p. 100311, 2020, doi: 10.1016/j.cosrev.2020.100311.
M. S. Jahan and M. Oussalah, “A Systematic Review Of Hate Speech Automatic Detection Using Natural Language Processing,” Neurocomputing, vol. 546, p. 126232, 2023, doi: 10.1016/j.neucom.2023.126232.
Salsabila, R. Sarno, I. Ghozali, and K. R. Sungkono, “Improving Cyberbullying Detection Through Multi-Level Machine Learning,” Int. J. Electr. Comput. Eng., vol. 14, no. 2, pp. 1779–1787, 2024, doi: 10.11591/ijece.v14i2.pp1779-1787.
A. M. El Koshiry, E. H. I. Eliwa, T. A. El-Hafeez, and M. Khairy, “Detecting Cyberbullying Using Deep Learning Techniques: A Pre-Trained Glove And Focal Loss Technique,” PeerJ Comput. Sci., vol. 10, pp. 1–33, 2024, doi: 10.7717/peerj-cs.1961.
I. Pangestuti and S. Agustian, “Klasifikasi Komentar Abusive Dan Hate Speech Teks Twitter Menggunakan Metode Convolutional Neural Network,” Pros. Semin. Nas. Teknoka, vol. 7, no. 2502, pp. 23–30, 2022, [Online]. Available: https://journal.uhamka.ac.id/index.php/teknoka/article/view/11000
F. LAGRARI and Y. ELKETTANI, “Customized BERT With Convolution Model: A New Heuristic Enabled Encoder For Twitter Sentiment Analysis,” Int. J. Adv. Comput. Sci. Appl., vol. 11, no. 10, p. 2025, 2020, doi: 10.14569/IJACSA.2020.0111053.
M. Isnan, G. N. Elwirehardja, and B. Pardamean, “Sentiment Analysis For TikTok Review Using VADER Sentiment And SVM Model,” Procedia Comput. Sci., vol. 227, pp. 168–175, 2023, doi: 10.1016/j.procs.2023.10.514.
K. W. Church, “Emerging Trends: Word2Vec,” Nat. Lang. Eng., vol. 23, no. 1, pp. 155–162, 2017, doi: 10.1017/S1351324916000334.
J. Xu and Q. Du, “A Deep Investigation Into FastText,” Proc. - 21st IEEE Int. Conf. High Perform. Comput. Commun. 17th IEEE Int. Conf. Smart City 5th IEEE Int. Conf. Data Sci. Syst. HPCC/SmartCity/DSS 2019, pp. 1714–1719, 2019, doi: 10.1109/HPCC/SmartCity/DSS.2019.00234.
F. N. Puteri, Y. Sibaroni, and F. F., “Hate Speech Detection in Indonesia Twitter Comments Using Convolutional Neural Network (CNN) and FastText Word Embedding,” J. Media Inform. Budidarma, vol. 7, no. 3, p. 1154, 2023, doi: 10.30865/mib.v7i3.6401.
A. J. Andika, Y. Kristian, and E. I. Setiawan, “Deteksi Komentar Cyberbullying Pada YouTube Dengan Metode Convolutional Neural Network – Long Short-Term Memory Network (CNN-LSTM),” Teknika, vol. 12, no. 3, pp. 183–188, 2023, doi: 10.34148/teknika.v12i3.677.
M. A. S. Nasution and E. B. Setiawan, “Enhancing Cyberbullying Detection on Indonesian Twitter: Leveraging FastText for Feature Expansion and Hybrid Approach Applying CNN and BiLSTM,” Rev. d’Intelligence Artif., vol. 37, no. 4, pp. 929–936, 2023, doi: 10.18280/ria.370413.
M. O. Ibrohim and I. Budi, “Multi-label Hate Speech and Abusive Language Detection in Indonesian Twitter,” Proc. Third Work. Abus. Lang. Online, vol. 1, no. 1, pp. 46–57, 2019, doi: 10.18653/v1/w19-3506.
A. Onan, “Sentiment Analysis On Product Reviews Based On Weighted Word Embeddings And Deep Neural Networks,” Concurr. Comput. Pract. Exp., vol. 33, no. 23, pp. 1–12, 2021, doi: 10.1002/cpe.5909.
M. N. Hasan, K. S. Sakib, T. T. Preeti, J. Allohibi, A. A. Alharbi, and J. Uddin, “OLF-ML: An Offensive Language Framework for Detection, Categorization, and Offense Target Identification Using Text Processing and Machine Learning Algorithms,” Mathematics, vol. 12, no. 13, 2024, doi: 10.3390/math12132123.
M. Corazza, S. Menini, E. Cabrio, S. Tonelli, and S. Villata, “A Multilingual Evaluation for Online Hate Speech Detection,” ACM Trans. Internet Technol., vol. 20, no. 2, 2020, doi: 10.1145/3377323.
Z. Li, F. Liu, W. Yang, S. Peng, and J. Zhou, “A Survey of Convolutional Neural Networks: Analysis, Applications, and Prospects,” IEEE Trans. Neural Networks Learn. Syst., vol. 33, no. 12, pp. 6999–7019, 2022, doi: 10.1109/TNNLS.2021.3084827.
M. Kamyab, G. Liu, A. Rasool, and M. Adjeisah, “ACR-SA: Attention-Based Deep Model Through Two-Channel CNN And Bi-RNN For Sentiment Analysis,” PeerJ Comput. Sci., vol. 8, pp. 1–29, 2022, doi: 10.7717/peerj-cs.877.
D. Chicco and G. Jurman, “The Advantages Of The Matthews Correlation Coefficient (MCC) Over F1 Score And Accuracy In Binary Classification Evaluation,” BMC Genomics, vol. 21, no. 1, pp. 1–13, 2020, doi: 10.1186/s12864-020-6950-5.
J. S. Malik, H. Qiao, G. Pang, and A. van den Hengel, “Deep Learning for Hate Speech Detection: A Comparative Study,” Arxiv, pp. 1–18, 2022, [Online]. Available: http://arxiv.org/abs/2202.09517
Bila bermanfaat silahkan share artikel ini
Berikan Komentar Anda terhadap artikel Effect of Word Embedding on Indonesian Social Media Hate Speech Classification Using Hybrid CNN-SimpleRNN
Pages: 550-559
Copyright (c) 2026 Mas Muhammad Rizqi Adiguna, Yuliant Sibaroni

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under Creative Commons Attribution 4.0 International License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (Refer to The Effect of Open Access).





















