RANDOM FOREST-XGBOOST STACKING ENSEMBLE FOR TOXIC COMMENT DETECTION ON ROBLOX
Keywords:
per class. These results confirm the effectiveness of hybrid ensemble learning for low-resource multilingual toxic content moderationAbstract
This study developed a hybrid stacking ensemble model combining Random Forest (RF) and XGBoost for multi-class toxic comment detection in Indonesian gaming chat on Roblox. The dataset comprised 10,702 labeled comments across four categories: Violence, Harassment, Racist, and Neutral. Text preprocessing included case folding, URL removal, tokenization, slang normalization using a 200+ entry lexicon, stopword removal, and stemming. Features were extracted using TF-IDF with 10,000 maximum features and unigram-bigram n-grams. A stacking ensemble was constructed with RF and XGBoost as base models and Logistic Regression as the meta-classifier, trained using 5-fold cross-validation to prevent data leakage. The proposed model achieved an overall accuracy of 91.4% and macro F1-Score of 91.3%, surpassing standalone RF (87.2%) and XGBoost (89.5%) as well as IndoBERT-based baselines from prior work. McNemar test confirmed statistical significance of improvement over XGBoost (χ²=10.46, p=0.0012). Feature importance analysis identified discriminative