Bulletin of Computer Science Research
Vol. 6 No. 3 (2026): April 2026

Klasifikasi Hate Speech dan Offensive Language Menggunakan BERT dan Support Vector Machine

Muhammad Tirta Syakban (Universitas Islam Negeri Sultan Syarif Kasim Riau, Pekanbaru)
Surya Agustian (Universitas Islam Negeri Sultan Syarif Kasim Riau, Pekanbaru)
Muhammad Fikry (Universitas Islam Negeri Sultan Syarif Kasim Riau, Pekanbaru)
Muhammad Affandes (Universitas Islam Negeri Sultan Syarif Kasim Riau, Pekanbaru)



Article Info

Publish Date
30 Apr 2026

Abstract

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.

Copyrights © 2026






Journal Info

Abbrev

bulletincsr

Publisher

Subject

Computer Science & IT

Description

Bulletin of Computer Science Research covers the whole spectrum of Computer Science, which includes, but is not limited to : • Artificial Immune Systems, Ant Colonies, and Swarm Intelligence • Bayesian Networks and Probabilistic Reasoning • Biologically Inspired Intelligence • Brain-Computer ...