A benchmark for toxic comment classification on Civil Comments dataset

26 Jan 2023  ·  Corentin Duchene, Henri Jamet, Pierre Guillaume, Reda Dehak ·

Toxic comment detection on social media has proven to be essential for content moderation. This paper compares a wide set of different models on a highly skewed multi-label hate speech dataset. We consider inference time and several metrics to measure performance and bias in our comparison. We show that all BERTs have similar performance regardless of the size, optimizations or language used to pre-train the models. RNNs are much faster at inference than any of the BERT. BiLSTM remains a good compromise between performance and inference time. RoBERTa with Focal Loss offers the best performance on biases and AUROC. However, DistilBERT combines both good AUROC and a low inference time. All models are affected by the bias of associating identities. BERT, RNN, and XLNet are less sensitive than the CNN and Compact Convolutional Transformers.

PDF Abstract

Datasets


Task Dataset Model Metric Name Metric Value Global Rank Result Benchmark
Toxic Comment Classification Civil Comments RoBERTa Focal Loss AUROC 0.9818 # 1
Macro F1 0.4648 # 2
Micro F1 0.5524 # 3
Precision 0.4017 # 3
Recall 0.8839 # 8
GMB Subgroup 0.8807 # 1
GMB BPSN 0.901 # 1
GMB BNSP 0.9581 # 6
Toxic Comment Classification Civil Comments AlBERT AUROC 0.979 # 5
Macro F1 0.3541 # 9
Micro F1 0.4845 # 9
Precision 0.3247 # 10
Recall 0.9104 # 5
GMB Subgroup 0.8734 # 6
GMB BPSN 0.8982 # 2
GMB BNSP 0.9499 # 7
Toxic Comment Classification Civil Comments BiGRU GMB BPSN 0.8616 # 9
Toxic Comment Classification Civil Comments Unfreeze Glove ResNet 56 AUROC 0.9639 # 9
Macro F1 0.3778 # 6
Recall 0.8707 # 9
GMB Subgroup 0.8487 # 9
GMB BPSN 0.8445 # 11
Toxic Comment Classification Civil Comments DistilBERT AUROC 0.9804 # 3
Macro F1 0.3879 # 5
Micro F1 0.5115 # 5
Precision 0.3572 # 5
Recall 0.9001 # 6
GMB Subgroup 0.8762 # 4
GMB BPSN 0.874 # 8
GMB BNSP 0.9644 # 1
Toxic Comment Classification Civil Comments Freeze Glove ResNet 44 Macro F1 0.4189 # 4
Micro F1 0.5591 # 2
Precision 0.4631 # 2
Recall 0.7053 # 12
GMB Subgroup 0.8219 # 11
GMB BPSN 0.7876 # 13
Toxic Comment Classification Civil Comments BiLSTM Micro F1 0.5115 # 5
Precision 0.3572 # 5
GMB Subgroup 0.8636 # 8
Toxic Comment Classification Civil Comments BERTweet AUROC 0.979 # 5
Macro F1 0.3612 # 8
Micro F1 0.4928 # 7
Precision 0.3363 # 8
Recall 0.9216 # 3
GMB Subgroup 0.878 # 3
GMB BPSN 0.8945 # 3
GMB BNSP 0.9603 # 3
Toxic Comment Classification Civil Comments XLNet Macro F1 0.3336 # 11
Micro F1 0.4586 # 12
Precision 0.3045 # 12
Recall 0.9254 # 1
GMB Subgroup 0.8689 # 7
GMB BPSN 0.8834 # 7
GMB BNSP 0.9597 # 4
Toxic Comment Classification Civil Comments HateBERT AUROC 0.9791 # 4
Macro F1 0.3679 # 7
Micro F1 0.4844 # 10
Precision 0.3297 # 9
Recall 0.9165 # 4
GMB Subgroup 0.8744 # 5
GMB BPSN 0.8915 # 4
GMB BNSP 0.9589 # 5
Toxic Comment Classification Civil Comments RoBERTa BCE AUROC 0.9813 # 2
Macro F1 0.4749 # 1
Micro F1 0.5359 # 4
Precision 0.3836 # 4
Recall 0.8891 # 7
GMB Subgroup 0.88 # 2
GMB BPSN 0.8901 # 5
GMB BNSP 0.9616 # 2
Toxic Comment Classification Civil Comments XLM RoBERTa Micro F1 0.468 # 11
Precision 0.3135 # 11
Recall 0.923 # 2
GMB BPSN 0.8859 # 6
Toxic Comment Classification Civil Comments Unfreeze Glove ResNet 44 AUROC 0.966 # 8
Macro F1 0.4648 # 2
Micro F1 0.5958 # 1
Precision 0.4835 # 1
Recall 0.7759 # 11
GMB Subgroup 0.8421 # 10
GMB BPSN 0.8493 # 10
Toxic Comment Classification Civil Comments Compact Convolutional Transformer (CCT) AUROC 0.9526 # 10
Macro F1 0.3428 # 10
Micro F1 0.4874 # 8
Precision 0.3507 # 7
Recall 0.7983 # 10
GMB Subgroup 0.8133 # 12
GMB BPSN 0.8307 # 12
GMB BNSP 0.9447 # 8

Methods