Detecting Implicit Sexual Harassment on Instagram and X: IndoBERT vs. Random Forest Efficiency and Manual Gold Standard

Authors

  • Wili Sandi Febriantana Department of Informatics Engineering, Faculty of Technology and Design, Institut Teknologi dan Bisnis Asia Malang, Indonesia
  • Philip Faster Eka Adipraja Department of Informatics Engineering, Faculty of Technology and Design, Institut Teknologi dan Bisnis Asia Malang, Indonesia

DOI:

https://doi.org/10.52436/1.jutif.2026.7.5.5500

Keywords:

Computational Efficiency, Implicit Harassment, IndoBERT, Random Forest, Sexual Harassment

Abstract

Implicit sexual harassment on Indonesian social media frequently evades conventional keyword-based moderation due to linguistic complexity, such as slang and sarcasm. This study evaluates the trade-off between the effectiveness and efficiency of Random Forest and IndoBERT for detecting such content. Using a purposive sampling strategy to select high-risk Instagram and X (Twitter) accounts, we developed a manually labeled "Gold Standard" dataset, validated through inter-annotator agreement, to ensure high-quality ground truth. Experiments were conducted on an NVIDIA RTX 5050 environment to simulate real-world constraints, measuring F1-Score, Recall, and inference latency. The results demonstrate that IndoBERT significantly outperforms Random Forest, particularly on the imbalanced Instagram dataset, achieving an F1-Score of 0.7667 compared to Random Forest’s 0.5924. Statistical verification using the Wilcoxon Signed-Rank Test confirms this superiority. While Random Forest is computationally lighter, requiring only 0.346 ± 0.016 seconds per training fold, it failed to detect subtle harassment, evidenced by a critically low Recall of 51.67% on the imbalanced Instagram dataset. Conversely, although IndoBERT requires a 345x higher training cost (119.28 ± 1.60 seconds), it achieved a rapid inference latency of 0.0239 ± 0.0008 seconds on GPU, proving its viability for real-time systems. Ultimately, this study's primary contribution lies in proving that IndoBERT significantly outperforms traditional Random Forest algorithms, thereby offering a major methodological step forward for Natural Language Processing in Indonesian. This ensures the reliable generalization of context-aware automated content moderation, delivering significant practical impacts for the field of Informatics and real-world social media safety.

Downloads

Download data is not yet available.

References

S. Kemp, “Digital 2025: Indonesia,” DataReportal – Global Digital Insights. Accessed: Nov. 19, 2025. [Online]. Available: https://datareportal.com/reports/digital-2025-indonesia

CATAHU, “CATAHU 2024: Menata Data, Menajamkan Arah: Refleksi Pendokumentasian dan Tren Kasus Kekerasan Terhadap Perempuan.” Accessed: Nov. 19, 2025. [Online]. Available: https://komnasperempuan.go.id/catatan-tahunan-detail/catahu-2024-menata-data-menajamkan-arah-refleksi-pendokumentasian-dan-tren-kasus-kekerasan-terhadap-perempuan

W. Lei, N. A. S. Abdullah, and S. R. S. Aris, “A Systematic Literature Review on Automatic Sexism Detection in Social Media,” Eng. Technol. Appl. Sci. Res., vol. 14, no. 6, pp. 18178–18188, Dec. 2024, doi: 10.48084/etasr.8881.

J. F. Kusuma and A. Chowanda, “Indonesian Hate Speech Detection Using IndoBERTweet and BiLSTM on Twitter,” JOIV Int. J. Inform. Vis., vol. 7, no. 3, pp. 773–780, Sep. 2023, doi: 10.30630/joiv.7.3.1035.

M. O. Ibrohim and I. Budi, “Hate speech and abusive language detection in Indonesian social media: Progress and challenges,” Heliyon, vol. 9, no. 8, Aug. 2023, doi: 10.1016/j.heliyon.2023.e18647.

M. Reveilhac and D. Morselli, “Dictionary-based and machine learning classification approaches: a comparison for tonality and frame detection on Twitter data,” Polit. Res. Exch., vol. 4, no. 1, p. 2029217, Dec. 2022, doi: 10.1080/2474736X.2022.2029217.

S. Cahyawijaya et al., “IndoNLG: Benchmark and Resources for Evaluating Indonesian Natural Language Generation,” in Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, M.-F. Moens, X. Huang, L. Specia, and S. W. Yih, Eds., Online and Punta Cana, Dominican Republic: Association for Computational Linguistics, Nov. 2021, pp. 8875–8898. doi: 10.18653/v1/2021.emnlp-main.699.

M. ElSherief et al., “Latent Hatred: A Benchmark for Understanding Implicit Hate Speech,” Sep. 11, 2021, arXiv: arXiv:2109.05322. doi: 10.48550/arXiv.2109.05322.

M. Omar, “Comparative Analysis of Feature Selection Methods for Twitter Sentiment Classification,” J. Inf. Syst. Eng. Manag., vol. 10, no. 21s, pp. 330–338, Mar. 2025, doi: 10.52783/jisem.v10i21s.3331.

Y. Sun, Y. Li, Q. Zeng, and Y. Bian, “Application Research of Text Classification Based on Random Forest Algorithm,” in 2020 3rd International Conference on Advanced Electronic Materials, Computers and Software Engineering (AEMCSE), Apr. 2020, pp. 370–374. doi: 10.1109/AEMCSE50948.2020.00086.

H. Allam, L. Makubvure, B. Gyamfi, K. N. Graham, and K. Akinwolere, “Text Classification: How Machine Learning Is Revolutionizing Text Categorization,” Information, vol. 16, no. 2, p. 130, Feb. 2025, doi: 10.3390/info16020130.

D. A. Sulistyo and M. F. Fahrudillah, “Analisis Sentimen Ulasan Pemain Genshin Impact Menggunakan Kombinasi TF-IDF, Lexicon, dan Support Vector Machine,” J. FASILKOM, vol. 15, no. 3, pp. 580–593, Dec. 2025, doi: 10.37859/jf.v15i3.10553.

E. Omran, E. A. Tararwah, and J. A. Qundus, “A comparative analysis of machine learning algorithms for hate speech detection in social media,” Online J. Commun. Media Technol., vol. 13, no. 4, p. e202348, Oct. 2023, doi: 10.30935/ojcmt/13603.

A. Alasmari, N. Farooqi, and Y. Alotaibi, “Sentiment analysis of pilgrims using CNN-LSTM deep learning approach,” PeerJ Comput. Sci., vol. 10, p. e2584, Dec. 2024, doi: 10.7717/peerj-cs.2584.

Y. Setiawan and L. A. Wulandhari, “Comparative Analysis of IndoBERT and LSTM for Multi-Label Text Classification of Indonesian Motivation Letter,” J. Online Inform., vol. 10, no. 2, pp. 260–269, Aug. 2025, doi: 10.15575/join.v10i2.1499.

B. Wilie et al., “IndoNLU: Benchmark and Resources for Evaluating Indonesian Natural Language Understanding,” Oct. 08, 2020, arXiv: arXiv:2009.05387. doi: 10.48550/arXiv.2009.05387.

M. Mozafari, R. Farahbakhsh, and N. Crespi, “Hate speech detection and racial bias mitigation in social media based on BERT model,” PLOS ONE, vol. 15, no. 8, p. e0237861, Aug. 2020, doi: 10.1371/journal.pone.0237861.

A. Zevana and D. Riana, “TEXT CLASSIFICATION USING INDOBERT FINE-TUNING MODELING WITH CONVOLUTIONAL NEURAL NETWORK AND BI-LSTM,” J. Tek. Inform. Jutif, vol. 4, no. 6, pp. 1605–1610, 2023, doi: 10.52436/1.jutif.2023.4.6.1650.

D. A. Sulistyo and E. Setiadi, “Analisis Sentimen Kebijakan Makan Bergizi Gratis Menggunakan IndoBERT dan Machine Learning,” J. FASILKOM, vol. 15, no. 3, pp. 507–513, Dec. 2025, doi: 10.37859/jf.v15i3.10546.

F. Koto, A. Rahimi, J. H. Lau, and T. Baldwin, “IndoLEM and IndoBERT: A Benchmark Dataset and Pre-trained Language Model for Indonesian NLP,” Nov. 02, 2020, arXiv: arXiv:2011.00677. doi: 10.48550/arXiv.2011.00677.

F. D. Palo, P. Singhi, and B. H. Fadlallah, “Performance-Guided LLM Knowledge Distillation for Efficient Text Classification at Scale,” in Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, Y. Al-Onaizan, M. Bansal, and Y.-N. Chen, Eds., Miami, Florida, USA: Association for Computational Linguistics, Nov. 2024, pp. 3675–3687. doi: 10.18653/v1/2024.emnlp-main.215.

L. Yuan, T. Wang, G. Ferraro, H. Suominen, and M.-A. Rizoiu, “Transfer learning for hate speech detection in social media,” J. Comput. Soc. Sci., vol. 6, no. 2, pp. 1081–1101, Oct. 2023, doi: 10.1007/s42001-023-00224-9.

S. F. Taskiran, B. Turkoglu, E. Kaya, and T. Asuroglu, “A comprehensive evaluation of oversampling techniques for enhancing text classification performance,” Sci. Rep., vol. 15, no. 1, p. 21631, Jul. 2025, doi: 10.1038/s41598-025-05791-7.

Vladkens, vladkens/twscrape. (Feb. 25, 2026). Python. Accessed: Feb. 25, 2026. [Online]. Available: https://github.com/vladkens/twscrape

C. H. Reis, “How to get data from a public Instagram profile,” Medium. Accessed: Feb. 25, 2026. [Online]. Available: https://carloshenriquereis-17318.medium.com/how-to-get-data-from-a-public-instagram-profile-edc6704c9b45

O. Gabrielyan, M. Gasparyan, I. Kravchenko, and M. Krapivina, “AI-Based Approaches for Multi-Class Text Classification in Social Media: A Comparative Study,” Eng. Technol. Appl. Sci. Res., vol. 15, no. 6, pp. 29833–29839, Dec. 2025, doi: 10.48084/etasr.14303.

S. Jatmika, M. T. Indriastuti, and G. A. Wafdulloh, “Implementasi Teks Mining Untuk Klasifikasi Buku Berdasarkan Dewey Decimal Clasification (Ddc) Di Perpustakaan Stmik Asia Malang Berbasis Vektor Space Model,” POSITIF J. Sist. Dan Teknol. Inf., vol. 4, no. 2, pp. 103–112, Nov. 2018, doi: 10.31961/positif.v4i2.567.

R. I. Perwira, V. A. Permadi, D. I. Purnamasari, and R. P. Agusdin, “Domain-Specific Fine-Tuning of IndoBERT for Aspect-Based Sentiment Analysis in Indonesian Travel User-Generated Content,” J. Inf. Syst. Eng. Bus. Intell., vol. 11, no. 1, pp. 30–40, Mar. 2025, doi: 10.20473/jisebi.11.1.30-40.

L. A. A. Rahim, K. A. F. A. Samah, and M. F. Dzulkalnine, “Revealing Hidden Sentiments: Implicit Aspectbased Sentiment Analysis Using Bert on Amazon Reviews,” in 2025 IEEE Symposium on Industrial Electronics & Applications (ISIEA), Jul. 2025, pp. 1–6. doi: 10.1109/ISIEA65768.2025.11138369.

X. Li and Q. Li, “Using BERT and Word Definitions for Implicit Sentiment Analysis,” in 2022 IEEE 24th Int Conf on High Performance Computing & Communications; 8th Int Conf on Data Science & Systems; 20th Int Conf on Smart City; 8th Int Conf on Dependability in Sensor, Cloud & Big Data Systems & Application (HPCC/DSS/SmartCity/DependSys), Dec. 2022, pp. 1063–1068. doi: 10.1109/HPCC-DSS-SmartCity-DependSys57074.2022.00168.

C. R. Harris et al., “Array programming with NumPy,” Nature, vol. 585, no. 7825, pp. 357–362, Sep. 2020, doi: 10.1038/s41586-020-2649-2.

W. McKinney, “Data Structures for Statistical Computing in Python,” presented at the Python in Science Conference, Austin, Texas, 2010, pp. 56–61. doi: 10.25080/Majora-92bf1922-00a.

F. Pedregosa et al., “Scikit-learn: Machine Learning in Python,” Mach. Learn. PYTHON.

A. Paszke et al., “PyTorch: An Imperative Style, High-Performance Deep Learning Library,” in Advances in Neural Information Processing Systems, Curran Associates, Inc., 2019. Accessed: Feb. 21, 2026. [Online]. Available: https://proceedings.neurips.cc/paper/2019/hash/bdbca288fee7f92f2bfa9f7012727740-Abstract.html

T. Wolf et al., “Transformers: State-of-the-Art Natural Language Processing,” in Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, Q. Liu and D. Schlangen, Eds., Online: Association for Computational Linguistics, Oct. 2020, pp. 38–45. doi: 10.18653/v1/2020.emnlp-demos.6.

M. Adriani, J. Asian, B. Nazief, S. M. M. Tahaghoghi, and H. E. Williams, “Stemming Indonesian: A confix-stripping approach,” ACM Trans. Asian Lang. Inf. Process., vol. 6, no. 4, pp. 1–33, Dec. 2008, doi: 10.1145/1316457.1316459.

V. Teodorescu and L. Obreja Brașoveanu, “Assessing the Validity of k-Fold Cross-Validation for Model Selection: Evidence from Bankruptcy Prediction Using Random Forest and XGBoost,” Computation, vol. 13, no. 5, p. 127, May 2025, doi: 10.3390/computation13050127.

L. Lin, D. Shi, A. Han, Z. Wang, and J. Gao, “Diffusing to the Top: Boost Graph Neural Networks with Minimal Hyperparameter Tuning,” arXiv.org. Accessed: Feb. 21, 2026. [Online]. Available: https://arxiv.org/abs/2410.05697v1

A. Tharwat, “Classification assessment methods,” Appl. Comput. Inform., vol. 17, no. 1, pp. 168–192, Jul. 2020, doi: 10.1016/j.aci.2018.08.003.

P. F. E. Adipraja, C.-C. Chang, W.-J. Wang, and D. Liang, “Prediction of per-batch yield rates in production based on maximum likelihood estimation of per-machine yield rates,” J. Manuf. Syst., vol. 62, pp. 249–262, Jan. 2022, doi: 10.1016/j.jmsy.2021.11.015.

A. A. J. Karim, K. H. M. Asad, and M. G. R. Alam, “Larger models yield better results? Streamlined severity classification of ADHD-related concerns using BERT-based knowledge distillation,” PLOS ONE, vol. 20, no. 2, p. e0315829, Feb. 2025, doi: 10.1371/journal.pone.0315829.

A. Sbei, K. ElBedoui, and W. Barhoumi, “Assessing the Efficiency of Transformer Models with Varying Sizes for Text Classification: A Study of Rule-Based Annotation with DistilBERT and Other Transformers,” Vietnam J. Comput. Sci., vol. 12, no. 03, pp. 301–328, Aug. 2025, doi: 10.1142/S2196888824500209.

S. Setyorini, I. A. E. Zaeni, and H. Elmunsyah, “A Hybrid Machine Learning Approach Utilizing PCA and ICA Features for Stress Classification,” JOIV Int. J. Inform. Vis., vol. 9, no. 3, pp. 1226–1234, May 2025, doi: 10.62527/joiv.9.3.3378.

V. U. Gongane, M. V. Munot, and A. D. Anuse, “A survey of explainable AI techniques for detection of fake news and hate speech on social media platforms,” J. Comput. Soc. Sci., vol. 7, no. 1, pp. 587–623, Apr. 2024, doi: 10.1007/s42001-024-00248-9.

Additional Files

Published

2026-10-10

How to Cite

[1]
W. S. . Febriantana and P. F. E. Adipraja, “Detecting Implicit Sexual Harassment on Instagram and X: IndoBERT vs. Random Forest Efficiency and Manual Gold Standard ”, J. Tek. Inform. (JUTIF), vol. 7, no. 5, pp. 4303–4321, Oct. 2026.