The rapid growth of social media in Indonesia has increased digital interaction while also giving rise to hate speech issues that affect communication quality and social stability. This study aims to compare the performance of two Transformer-based models, IndoBERT and IndoRoBERTa, in Indonesian-language hate speech classification and to evaluate the effect of the SMOTE data balancing technique. The dataset consisted of Indonesian-language Twitter data that underwent preprocessing and was divided using an 80:20 stratified train-test split. Model training was conducted through fine-tuning, while evaluation employed accuracy, precision, recall, and F1-score metrics. The results show that IndoRoBERTa outperformed IndoBERT across all evaluation metrics and was more effective in reducing classification errors. The application of SMOTE also improved the models' ability to detect minority classes, particularly in terms of recall. These findings indicate that the combination of Transformer-based models and data balancing techniques is effective in improving both classification accuracy and class balance in hate speech detection. Furthermore, the results suggest that the combination of IndoRoBERTa and SMOTE has strong potential to support the development of more accurate and adaptive automated content moderation systems for Indonesian-language social media platforms.
Copyrights © 2026