Klasifikasi Hate Speech dan Offensive Language Menggunakan BERT dan Support Vector Machine
DOI:
https://doi.org/10.47065/bulletincsr.v6i3.1061Keywords:
Classification; Hate Speech; Offensive Language; SVM; BERTAbstract
Hate speech and offensive language have become increasingly complex problems on social media, requiring classification approaches that can effectively capture linguistic context. While transformer-based models with end-to-end fine-tuning have become the dominant approach, the use of transformers as fixed feature extractors combined with classical machine learning algorithms remains relatively underexplored, particularly in benchmark settings such as HASOC 2021. This study aims to investigate the effectiveness of a feature-based transformer approach by combining embeddings from BERT and RoBERTa with Support Vector Machine (SVM) classifiers using multiple kernel configurations, including Linear, RBF, Polynomial, and LinearSVC. Experiments were conducted on Sub-task A and Sub-task B by comparing traditional feature-based methods (TF-IDF) with transformer-based embeddings. The experimental results show that RoBERTa embeddings consistently outperform other feature extraction methods. On the test dataset, the combination of RoBERTa and SVM achieves competitive performance compared to other systems in HASOC 2021. In Sub-task B, the optimal model achieves a Macro F1-score of 0.61, outperforming several BERT-based and classical baseline systems.These findings demonstrate that using transformer embeddings as fixed feature representations combined with optimized SVM classifiers can serve as an effective alternative to fine-tuning approaches, particularly in achieving more stable performance under class imbalance conditions. This study contributes by highlighting the potential of feature-based transformer methods as a flexible and competitive strategy for hate speech and offensive language detection.
Downloads
References
N. Bölücü and P. Canbay, “Hate Speech and Offensive Content Identification with Graph Convolutional Networks,” in Proceedings of the FIRE 2021 Working Notes, CEUR-WS.org, 2021, pp. 44–51. [Online]. Available: http://ceur-ws.org
R. Kumar, V. Gupta, and R. Pamula, “Hate Speech and Offensive Content Identification in English Tweets,” in Proceedings of the FIRE 2021 Working Notes, CEUR-WS.org, 2021. [Online]. Available: http://ceur-ws.org
A. Rogers, O. Kovaleva, and A. Rumshisky, “A Primer in BERTology: What We Know About How BERT Works,” Trans. Assoc. Comput. Linguist., vol. 8, pp. 842–866, 2020, doi: 10.1162/tacl.
N. Azmi Verdikha, R. Habid, and A. Johar Latipah, “Analisis DistilBERT dengan Support Vector Machine (SVM) untuk Klasifikasi Ujaran Kebencian pada Sosial Media Twitter,” METIK JURNAL, vol. 7, no. 2, pp. 101–110, Dec. 2023, doi: 10.47002/metik.v7i2.583.
T. Mandl et al., “Overview of the HASOC Subtrack at FIRE 2021: Hate Speech and Offensive Content Identification in English and Indo-Aryan Languages under Creative Commons License Attribution 4.0 International (CC BY 4.0),” in Proceedings of the FIRE 2021 Working Notes, CEUR-WS.org, 2021. [Online]. Available: http://ceur-ws.org
K. Kumari and J. P. Singh, “AI_ML_NIT_Patna @HASOC 2020: BERT Models for Hate Speech Identification in Indo-European Languages,” in Proceedings of the FIRE 2020 Working Notes, CEUR-WS.org, 2020. [Online]. Available: http://ceur-ws.org
S. Agustian, R. Saputra, and A. Fadhilah, “‘Feature Selection’ with Pretrained-BERT for Hate Speech and Offensive Content Identification in English and Hindi Languages,” in Proceedings of the FIRE 2021 Working Notes, CEUR-WS.org, 2021. [Online]. Available: https://huggingface.co/surajp/RoBERTa-hindi-guj-san
M. Bhatia et al., “One to Rule Them All: Towards Joint Indic Language Hate Speech Detection,” in Proceedings of the FIRE 2021 Working Notes, CEUR-WS.org, 2021. [Online]. Available: http://ceur-ws.org
M. Artetxe, S. Ruder, and D. Yogatama, “On the Cross-lingual Transferability of Monolingual Representations,” in Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, Association for Computational Linguistics, 2020, pp. 4623–4637. [Online]. Available: https://github.
M. Das, S. Kamalanathan, and P. Alphonse, “A Comparative Study on TF-IDF feature Weighting Method and its Analysis using Unstructured Dataset,” in CEUR Workshop Proceedings, CEUR-WS.org, 2020.
Y. Hacohen-Kerner and M. Uzan, “Detecting Offensive Language in English, Hindi, and Marathi using Classical Supervised Machine Learning Methods and Word/Char N-grams,” in Proceedings of the FIRE 2021 Working Notes, CEUR-WS.org, 2021. [Online]. Available: http://www.icra.org/
S. Ratan, S. Sinha, and S. Singh, “SVM for Hate Speech and Offensive Content Detection,” in Proceedings of the FIRE 2021 Working Notes, CEUR-WS.org, 2021.
R. Rofik, R. A. Hakim, J. Unjung, B. Prasetiyo, and M. A. Muslim, “Optimization of SVM and Gradient Boosting Models Using GridSearchCV in Detecting Fake Job Postings,” MATRIK?: Jurnal Manajemen, Teknik Informatika dan Rekayasa Komputer, vol. 23, no. 2, pp. 419–430, Mar. 2024, doi: 10.30812/matrik.v23i2.3566.
F. S. Anindya and Y. R. Kaesmetan, “Implementasi Metode BERT DAN SVM pada Analisis Sentimen Game Genshin Impact,” Jurnal Manajamen Informatika Jayakarta, vol. 5, no. 1, p. 52, Feb. 2025, doi: 10.52362/jmijayakarta.v5i1.1781.
M. R. Iffa, S. Agustian, N. Safaat, and M. Irsyad, “Peningkatan Kinerja Support Vector Machine Menggunakan Model Bahasa BERT untuk Klasifikasi Sentimen dengan Dataset Terbatas,” ZONAsi?: Jurnal Sistem Informasi, vol. 7, pp. 422–432, 2025, doi: https://doi.org/10.31849/zn.v7i2.26847.
K. Hadi and E. Utami, “Analisis K-NN Dengan Integrasi BOW, TF-IDF, Dan N-Grams untuk Klasifikasi Ujaran Kebencian pada Twitter,” JIPI (Jurnal Ilmiah Penelitian dan Pembelajaran Informatika), vol. 10, no. 4, pp. 2971–2983, Nov. 2025, doi: 10.29100/jipi.v10i4.6694.
U. Abdurohim et al., “Implementasi Algoritma Support Vector Machine (SVM) untuk Klasifikasi Komentar Spam pada Instagram,” Jurnal Teknologi Informasi dan Komunikasi, vol. 13, no. 1, pp. 13–19, 2024, doi: 10.58761/jurtikstmikbandung.v13i1.1319.
F. Abdusyukur, “Penerapan Algoritma Support Vector Machine (SVM) untuk Klasifikasi Pencemaran Nama Baik di Media Sosial Twitter,” KOMPUTA?: Jurnal Ilmiah Komputer dan Informatika, vol. 12, no. 1, pp. 73–82, 2023, doi: https://doi.org/10.34010/komputa.v12i1.9418.
R. Difandana and I. Imaduddin, “Analisis Komparatif Algoritma Naive Bayes dan Support Vector Machine dalam Klasifikasi Ujaran Kebencian dan Teks Abusif Berbahasa Indonesia,” FON Jurnal Pendidikan Bahasa dan Sastra Indonesia, vol. 22, pp. 267–278, 2026, doi: 10.25134/fon.v22i1.471.
C. Wulandari, L. Afrianty, E. Budianita, and S. K. Gusti, “Thyroid Disease Classification Using Support Vector Machine and Recursive Feature Elimination Method,” bit-Tech, vol. 8, no. 2, pp. 2948–2960, Dec. 2025, doi: 10.32877/bt.v8i2.3454.
A. A. P. Putra and G. A. G. A. K. Kadyanan, “Klasifikasi Citra Jamur Menggunakan SVM dengan PCA Berbasis Ekstraksi Fitur Hibrida,” Jurnal Nasional Teknologi Informasi dan Aplikasinya, vol. 4, no. 2, pp. 243–252, 2026, doi: 10.24843/JNATIA.2026.v04.i02.p02.
J. Rama Dani, “Analisis Sentimen Komentar YouTube terhadap Kenaikan Tunjangan DPR RI menggunakan Naïve Bayes, SVM, dan Random Forest,” Technology and Science (BITS), vol. 7, no. 3, pp. 1512–1524, 2025, doi: 10.47065/bits.v7i3.8513.
Y. Liu et al., “RoBERTa: A Robustly Optimized BERT Pretraining Approach,” ArXiv, Jul. 2019, doi: 10.48550/arXiv.1907.11692.
L. P. Vecchi, A. De Souza Britto, E. Cabrera Paraiso, and R. Menelau Cruz, “HARM: Learning Hate-Aware Reward Model for Evaluating Natural Language Explanations of Offensive Content,” in Findings of the Association for Computational Linguistics: EACL 2026, Association for Computational Linguistics (ACL), 2026, pp. 4393–4431. doi: https://doi.org/10.18653/v1/2026.findings-eacl.230.
F. Barbieri, J. Camacho-Collados, L. Neves, and L. Espinosa-Anke, “TweetEval: Unified Benchmark and Comparative Evaluation for Tweet Classification,” in Findings of the Association for Computational Linguistics: EMNLP 2020, Association for Computational Linguistics, Oct. 2020, pp. 1644–1650. doi: 10.18653/v1/2020.findings-emnlp.148.
D. Ismunandar, M. R. Firdaus, and Y. Alkhalifi, “Penerapan Hyperparameter Machine Learning dalam Prediksi Gagal Pinjam,” INTI Nusa Mandiri, vol. 19, no. 1, pp. 62–70, Aug. 2024, doi: 10.33480/inti.v19i1.5612.
Bila bermanfaat silahkan share artikel ini
Berikan Komentar Anda terhadap artikel Klasifikasi Hate Speech dan Offensive Language Menggunakan BERT dan Support Vector Machine
ARTICLE HISTORY
How to Cite
Issue
Section
Copyright (c) 2026 Muhammad Tirta Syakban, Surya Agustian, Muhammad Fikry, Muhammad Affandes

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).













