Beyond Bag-of-Words: Transformers for Robust Cyberbullying Detection on Twitter
摘要
The internet and social media (SM) have facilitated connectivity and communications between individuals; contrariwise it have also raised the hazard of being a victim of cyberbullying. Cyberbullying is a hurtful phenomenon associated with deep psychological consequences going to suicide intention. To address this growing matter our study inquires Bidirectional Encoder Representations from Transformers (BERT) for identifying cyberbullying in twitter data; then evaluating its efficacy against traditional machine learning approaches. We systematically evaluate various BERT training configurations including fine-tuning pre-trained models and hyper-parameters optimization to identify the optimal setup; the objective is capturing the nuanced character of online harassment. To establish performance baselines, we benchmarked our model against a strong classifier that uses Term Frequency-Inverse Document Frequency (TF-IDF) features. Our empirical results provide detailed performance comparisons using standard metrics such as accuracy, precision, recall and F1 score. With an accuracy of 0.985 and a precision of 0.960, BERT outperforms TF-IDF significantly. The findings highlight BERT’s advanced capability to understand nuanced language patterns and implicit threats that elude keyword-based methods. This research exposes practical insights for implementing transformer-based solutions in real-world content moderation systems.