Deteksi Cyberbullying pada Twitter menggunakan Distilbert dan (Explainable Ai) Shap
DOI:
https://doi.org/10.58192/populer.v5i3.5517Keywords:
Cyberbullying, DistilBERT, Explainable AI, NLP, SHAPAbstract
The prevalence of cyberbullying on Twitter demands a fast and transparent automated moderation system. This study designs an efficient and explainable binary cyberbullying detection system using DistilBERT and the SHAP-based Explainable AI (XAI) method. The dataset, sourced from Kaggle, consists of 13,169 raw data filtered into 12,548 clean tweets. Preprocessing was conducted without stemming and stopword removal to preserve the language's semantic context, setting a max_length of 48 tokens. The pre-trained distilbert-base-multilingual-cased model was evaluated on an 80% training and 20% testing data split, while model transparency was validated using SHAP's PartitionExplainer algorithm. Evaluation results show DistilBERT performed robustly, achieving 84% accuracy, 84% precision, 86% F1-score, and 88% recall in detecting bullying, with an Area Under Curve (AUC) score reaching 0.9207. Locally, SHAP evaluation proved that the model concentrated heavy penalty weights on abusive words like "brengsek". Globally, SHAP revealed a unique phenomenon where the most important features were dominated by neutral vocabularies such as "times. roman" and "pendidikan", which the model cleverly utilized as strong discriminative indicators to validate normal texts. In conclusion, the integration of DistilBERT and SHAP yields a classification system that is not only accurate and efficient but also transparent and logically reasoned.
References
Anjani, A. F., Anggraeni, D., & Tirta, I. M. (2023). Implementasi Random Forest Menggunakan SMOTE untuk Analisis Sentimen Ulasan Aplikasi Sister for Students UNEJ. Jurnal Nasional Teknologi dan Sistem Informasi, 9(2), 163–172. https://doi.org/10.25077/TEKNOSI.v9i2.2023.163-172
Asalnaije, E., Bete, Y., Tira, A. D., & Lian, Y. P. (2024). Bentuk-Bentuk CyberbullyingDi Indonesia.
Azmi Verdikha, N., Habid, R., & Johar Latipah, A. (2023). Analisis DistilBERT dengan Support Vector Machine (SVM) untuk Klasifikasi Ujaran Kebencian pada Sosial Media Twitter. METIK JURNAL, 7(2), 101–110. https://doi.org/10.47002/metik.v7i2.583
Basbeth, F. (2024). Klasifikasi Emosi Data Text Bahasa Indonesia Menggunakan Algoritma BERT, RoBERTa, dan DistilBERT.
Fajri, F., Tutuko, B., & Sukemi, S. (2022). Membandingkan Nilai Akurasi BERT dan DistilBERT pada Dataset Twitter. JUSIFO (Jurnal Sistem Informasi), 8(2), 71–80. https://doi.org/10.19109/jusifo.v8i2.13885
Khaira, U., Johanda, R., Utomo, P. E. P., & Suratno, T. (2020). Sentiment Analysis Of Cyberbullying On Twitter Using SentiStrength. Indonesian Journal of Artificial Intelligence and Data Mining, 3(1), 21. https://doi.org/10.24014/ijaidm.v3i1.9145
Lukman, K., & Novianto, S. (2025). Komparasi Algoritma Naïve Bayes dan SVM untuk Identifikasi Cyberbullying Selebriti di Media Sosial Twitter. Jurnal Algoritma, 22(1), 970–981. https://doi.org/10.33364/algoritma/v.22-1.2196
Muftie, F., Yafi, K. M., & Addina, Q. M. (2024). Perbandingan performa deteksi cyberbullying dengan transformer, deep learning, dan machine learning. Jurnal Pendidikan Informatika dan Sains, 13(1), 75–87. https://doi.org/10.31571/saintek.v13i1.4002
Saputra, A. C., Saragih, A. S., & Ronaldo, D. (2024). PERBANDINGAN NILAI AKURASI DISTILBERT DAN BERT PADA DATASET ANALISIS SENTIMEN LEMBAGA KURSUS. Jurnal Teknologi Informasi: Jurnal Keilmuan dan Aplikasi Bidang Teknik Informatika, 18(2), 160–171. https://doi.org/10.47111/jti.v18i2.13278
Saraswati, N. W. S., Yanti, C. P., Muku, I. D. M. K., & Dewi, D. A. P. R. (2025). Evaluation Analysis of the Necessity of Stemming and Lemmatization in Text Classification. MATRIK : Jurnal Manajemen, Teknik Informatika dan Rekayasa Komputer, 24(2), 321–332. https://doi.org/10.30812/matrik.v24i2.4833
Susanto, E., Budimansyah, D., Komalasari, K., & Masyitoh, I. S. (2024). Pendidikan Kewarganegaraan Digital: Upaya Meningkatkan Keadaban Digital pada Warga Negara Muda Indonesia. Jurnal Moral Kemasyarakatan, 9(2). https://doi.org/10.21067/jmk.v9i2.10337
Thabtah, F., Hammoud, S., Kamalov, F., & Gonsalves, A. (2019). Data imbalance in classification: Experimental evaluation. Information Sciences, 513, 429–441. https://doi.org/10.1016/j.ins.2019.11.004
Tolla, Y. (2025). Deteksi Stres dan Depresi Unggahan Media Sosial dengan Machine Learning. 15(1).
Wisdayani, D. S., Nur, I. M., & Wasono, R. (2019). PERBANDINGAN ALGORITMA K-NEAREST NEIGHBOR DAN NAIVE BAYES UNTUK KLASIFIKASI TINGKAT KEPARAHAN KORBAN KECELAKAAN LALU LINTAS DI KABUPATEN PATI JAWA TENGAH.
Yudhistira, D., Saraswati, G. W., & Lutfina, E. (2025). ANALISIS SENTIMEN OPINI MASYARAKAT INDONESIA TERHADAP KASUS CYBERBULLYING DI MEDIA SOSIAL X (TWITTER) MENGGUNAKAN ALGORITMA SUPPORT VECTOR MACHINE.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Populer: Jurnal Penelitian Mahasiswa

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









