Hate speech detection using pretrained DeBERTaV3 optimized with Grey Wolf Optimizer: a hybrid approach for social media content moderation
摘要
The proliferation of hate speech on social media poses a significant challenge to maintaining safe and inclusive online environments, necessitating accurate and scalable automated detection systems. However, the performance of transformer-based models for hate speech detection is highly sensitive to hyperparameter configurations, making manual and conventional tuning strategies inefficient in high-dimensional search spaces.To address this challenge, this study proposes a hybrid optimization framework that integrates the DeBERTaV3 transformer model with the Grey Wolf Optimizer (GWO) for automated hyperparameter tuning. The proposed approach enables efficient exploration of complex hyperparameter spaces by balancing global search and local refinement. The framework optimizes eight critical hyperparameters, including learning rate, weight decay, and dropout rates, to enhance convergence stability and generalization performance. The proposed method is evaluated on the Davidson et al. (2017) dataset, consisting of 24,783 labeled tweets. Experimental results demonstrate that the GWO-DeBERTaV3 model achieves a peak accuracy of 97.72% and a macro F1-score of 97.71%, with statistically significant improvements over baseline and conventional tuning approaches.These findings highlight the effectiveness of metaheuristic-based optimization for transformer fine-tuning and demonstrate its potential for improving robustness and performance in real-world hate speech detection systems.