hate-speech-detection-eval
ToxSyn: Reducing Bias in Hate Speech Detection via Synthetic Minority Data in Brazilian Portuguese — Brito et al. (2025) (arXiv:2506.10245, 2025)
What this evaluates
Evaluates binary and multi-label hate speech detection models on Brazilian Portuguese text. It specifically probes a model's sensitivity to targeted minority groups and its ranking quality under severe class imbalance.
Datasets
- ToxiGen-PT — total 8960; splits: test (8960)
- Portuguese Superset Benchmark — total 6002; splits: test (6002)
- HateBR — total ?; splits: test (-1)
- OLID-BR — total ?; splits: test (-1)
- TuPy-E — total ?; splits: test (-1)
- ToLD-BR — total ?; splits: test (-1)
Metrics
Macro-Recall(primary) — range: [0, 1]- Unweighted mean of recall scores computed independently for each class (toxic/non-toxic or each minority group).
ROC AUC— range: [0, 1]- Area under the Receiver Operating Characteristic curve, measuring the model's ability to rank positive instances higher than negative ones across all classification thresholds.
Input / output format
Input: Raw text strings in Brazilian Portuguese (social media posts/comments).
Output: Binary label (toxic vs. non-toxic) or a multi-label vector indicating presence of specific protected minority group targets.
Scoring recipe
def compute_macro_recall(y_true, y_pred, num_classes):
recalls = []
for c in range(num_classes):
tp = sum(1 for t, p in zip(y_true, y_pred) if t == c and p == c)
fn = sum(1 for t, p in zip(y_true, y_pred) if t == c and p != c)
recalls.append(tp / (tp + fn) if (tp + fn) > 0 else 0.0)
return sum(recalls) / len(recalls)
def compute_roc_auc(y_true, y_scores):
fpr, tpr, _ = roc_curve(y_true, y_scores)
return auc(fpr, tpr)
Common pitfalls
- Severe class imbalance in hate speech corpora makes accuracy misleading; macro-recall is required to capture minority group sensitivity.
- Existing benchmarks only label protected groups when content is explicitly toxic, leaving neutral/supportive references unlabeled and skewing evaluation.
- Translated datasets contain unnaturalized phrasing and culturally mismatched slurs that may not reflect authentic Brazilian Portuguese usage.
Evidence (verbatim from paper)
Due to class imbalance, we report macro-averaged recall (to measure per-class sensitivity) and ROC AUC (to assess ranking quality).
Citation
@misc{brito2025toxsyn,
title={ToxSyn: Reducing Bias in Hate Speech Detection via Synthetic Minority Data in Brazilian Portuguese},
author={Brito et al. (2025)},
year={2025},
note={arXiv:2506.10245}
}
- arXiv: 2506.10245