This paper evaluates data augmentation and feature enhancement techniques for hate speech detection, comparing traditional classifiers, e.g., Delta Term Frequency-Inverse Document Frequency (Delta TF-IDF), with transformer-based models (DistilBERT, RoBERTa, DeBERTa, Gemma-7B, gpt-oss-20b) across diverse datasets. It examines the impact of Synthetic Minority Over-sampling Technique (SMOTE), weighted loss determined by inverse class proportions, Part-of-Speech (POS) tagging, and text data augmentation on model performance. The open-source gpt-oss-20b consistently achieves the highest results. On the other hand, Delta TF-IDF responds strongly to data augmentation, reaching 98.2% accuracy on the Stormfront dataset. The study confirms that implicit hate speech is more difficult to detect than explicit hateful content and that enhancement effectiveness depends on dataset, model, and technique interaction. Our research informs the development of hate speech detection by highlighting how dataset properties, model architectures, and enhancement strategies interact, supporting more accurate and context-aware automated detection.
Figures & tables
Fig. 1: Training & evaluation process for each dataset.
Dataset
Metric
Delta TF-IDF
DistilBERT
DeBERTaV3
RoBERTa
gpt-oss-20b
Gemma-7B
Hate Corpus
Accuracy
0.655 ( 0.566 )
0.694 ( 0.475 )
0.712 ( 0.507 )
0.738 ( 0.488 )
0.757 ( 0.695 )
0.728 ( 0.596 )
Macro F1
0.412 ( 0.382 )
0.444 ( 0.369 )
0.487 ( 0.418 )
0.480 ( 0.396 )
0.483 ( 0.566 )
0.490 ( 0.540 )
AUC
0.312 ( 0.345 )
0.400 ( 0.336 )
0.524 ( 0.456 )
0.561 ( 0.401 )
0.518 ( 0.564 )
0.592 ( 0.597 )
Gab Reddit
Accuracy
0.889 ( 0.890 )
0.908 ( 0.907 )
0.909 ( 0.907 )
0.910 ( 0.909 )
0.919 ( 0.916 )
0.856 ( 0.859 )
Macro F1
0.874 ( 0.876 )
0.900 ( 0.899 )
0.903 ( 0.901 )
0.902 (0.902)
0.912 ( 0.909 )
0.842 ( 0.849 )
AUC
0.918 ( 0.914 )
0.925 ( 0.943 )
0.952 ( 0.954 )
0.949 ( 0.945 )
0.911 (0.911)
0.923 ( 0.924 )
TABLE I: SMOTE & Weighted Loss Configuration Results