The increasing use of social media in Indonesia has driven the growth of toxic content in various forms, such as verbal abuse, harassment, and discrimination, which has the potential to damage the quality of digital interactions. The complexity of informal language on social media, such as slang, abbreviations, and variations in contextual expressions, makes classifying toxic text in Indonesian a challenge that requires a more adaptive and accurate automatic detection system. This study aims to optimize contextual representation in classifying toxic text in Indonesian through the IndoBERTweet fine-tuning approach. The dataset used consists of 10,702 labeled text data with four categories: violence, neutral, racist, and harassment. The main model employed in this study is IndoBERTweet, a domain-specific transformer model that was fine-tuned for Indonesian toxic text classification, is evaluated comparatively with several benchmark models, namely IndoBERT, TF-IDF + SVM, BiLSTM, and Graph + Contrastive Learning. The evaluation is conducted using Accuracy, Precision, Recall, and F1-score metrics to comprehensively measure the performance of multi-class classification. The experimental results show that IndoBERTweet achieved the best performance with an accuracy of 0.863 and a F1-score of 0.864, outperforming all baseline models used. These findings indicate that fine-tuning a domain-specific transformer model trained on Indonesian social media data can improve toxic text classification performance, particularly in handling informal linguistic patterns and contextual expressions commonly found in online interactions. This research provides an empirical contribution to the development of Indonesian Natural Language Processing and demonstrates the potential for implementing the model for automated content moderation systems on digital platforms.
Copyrights © 2026