Sexual harassment in online comment sections is a growing concern on social media platforms like TikTok, where informal language makes manual moderation ineffective. This study developed an automated detection model using a hybrid Indonesian bidirectional encoder representation from transformers (IndoBERT)-long short-term memory (LSTM) architecture, employing IndoBERT as a static feature extractor and an LSTM network to model sequential dependencies. Given the high-class imbalance in social media data, this study specifically evaluated the impact of the synthetic minority over-sampling technique (SMOTE) on classification performance. Experimental results showed that the base IndoBERT-LSTM model achieved a high overall accuracy of 89.04% but struggles with a low recall (0.40) for the minority harassment class. While applying SMOTE improved the model’s sensitivity (recall) for harassment to 0.54, it resulted in a significant decrease in precision, and an overall accuracy drop to 87.79%. These findings indicate that while oversampling can modestly enhance the detection of harassment instances, it introduces a substantial trade-off by increasing false positives. This study concludes that for highly informal and imbalanced TikTok data, standard oversampling techniques such as SMOTE may be less effective, suggesting the need for more advanced contextual augmentation or cost-sensitive learning approaches in future digital safety research.
Copyrights © 2026