RacistDetect: A Racism Prediction Ensemble Model using DistilBERT and Logistic Regression

Closed

Eduardo Miguel M. Cortes, Liam Michael A. Jones, Christine F. Pena

2025 Proceedings ICSINTESA 2025 - 2025 5th International Conference of Science and Information Technology in Smart Administration Conference paper Cited by 0 Quartile

Abstract

Racism, the belief in racial superiority, fuels discrimination and inequality. Online platforms have amplified the spread of racist content, often unchecked, normalizing hate speech and deepening social divides. This highlights the urgent need for effective, automated methods to detect and filter such harmful discourse. The study uses a dataset of 1,987 Twitter comments originally gathered and manually annotated by Miguel [12]. The version used in this study was uploaded by Johri [11], from whom the dataset was obtained. Labels indicate whether each comment is racist or non-racist, and the final dataset is nearly balanced with 49.97% racist and 50.03% non-racist entries. RacistDetect is a model designed to predict racism in text content using an ensemble machine learning approach. The model comprises two branches: one fine-tunes DistilBERT for direct classification, while the other applies contrastive learning with DistilBERT, feeding the resulting contextual embeddings into a Logistic Regression classifier. Predictions from both branches were then integrated to form the final model. Cross-validation was performed to verify the model's accuracy, along with precision, recall, and F1-score to assess its effectiveness. Built on prior work that achieved an 85.22% precision using BETO, a BERT-based model, on racist Twitter data [8], the goal was to improve this benchmark by achieving at least 90% precision through an ensemble approach. The RacistDetect model achieved an average accuracy and F1-score of 90.10%, precision of 90.18%, and recall of 90.10%. © 2025 IEEE.

Affiliations

University of San Carlos, Information Sciences and Mathematics, Department of Computer, Cebu City, Philippines