Aligning Implied Statements for Implicit Hate Speech Generalizability with Context-Bounded Semi-hard Negative Mining
Summary
This paper proposes ImpSH, a triplet-based framework for implicit hate speech classification that aligns posts with implied statements and uses context-bounded semi-hard negative mining to improve cross-dataset generalization.
View Cached Full Text
Cached at: 06/18/26, 05:46 AM
# Aligning Implied Statements for Implicit Hate Speech Generalizability with Context-Bounded Semi-hard Negative Mining
Source: [https://arxiv.org/html/2606.18852](https://arxiv.org/html/2606.18852)
Wicaksono Leksono Muhamad♢,♠Yunita Sari♠ ♢Mantera Studio♠Universitas Gadjah Mada wicaksonoleksonomuhamad2001@mail\.ugm\.ac\.idyunita\.sari@ugm\.ac\.id [Code](https://github.com/airlanggawicaksono/acl-future/)
###### Abstract
Classifying implicit hate speech remains a challenge, intent is often masked through insinuation and context rather than explicit slurs\. Prior supervised contrastive approaches improve in\-domain detection but can overfit surface cues and struggle to transfer across datasets\. We proposeImpSH, a triplet\-based framework that aligns posts with implied statements when available and uses context\-bounded semi\-hard negatives to focus learning on near confusions\. We also examineAugSH, which forms positives via data augmentation\. In controlled evaluations onIHC,SBIC, andDynaHatewithBERTandHateBERT,ImpSHis a viable alternative to standard supervised contrastive baselines and often improves cross\-domain performance under matched preprocessing and tuning budgets\. Representation analysis using alignment and uniformity indicates tighter positive pairs with balanced global spread, and qualitative nearest\-neighbor case studies illustrate typical false negatives under domain shift\. These results demonstrate that aligning posts with their implied statements via context\-bounded mining provides a more stable, bijective\-like mapping to related insinuations, overcoming the volatility inherent in traditional clustering\-based representation learning\.
Aligning Implied Statements for Implicit Hate Speech Generalizability with Context\-Bounded Semi\-hard Negative Mining
Wicaksono Leksono Muhamad♢,♠Yunita Sari♠♢Mantera Studio♠Universitas Gadjah Madawicaksonoleksonomuhamad2001@mail\.ugm\.ac\.idyunita\.sari@ugm\.ac\.id[Code](https://github.com/airlanggawicaksono/acl-future/)
## Content Warning
The content of this paper may contain offensive, harmful, or distressing language, including examples of hate speech and discriminatory expressions\. These materials are included solely for research purposes and do not reflect the views of the authors\. Reader discretion is advised\.
## 1Introduction
Figure 1:Posts that share similar implied targets form tight yet fragmented clusters; small wording changes disperse points even within the same demographic group\(ElSheriefet al\.,[2021](https://arxiv.org/html/2606.18852#bib.bib26)\)\.Classifying implicit hate remains challenging because hateful intent is often expressed indirectly through sarcasm, euphemisms, rhetorical questions, and other pragmatic cues, so surface text features are often insufficient\(ElSheriefet al\.,[2021](https://arxiv.org/html/2606.18852#bib.bib26); Sapet al\.,[2020](https://arxiv.org/html/2606.18852#bib.bib25); Kimet al\.,[2022](https://arxiv.org/html/2606.18852#bib.bib1); Zhanget al\.,[2024](https://arxiv.org/html/2606.18852#bib.bib4)\)\. A second challenge is semantic overlap with non\-hateful content: posts that target the same group can share topical content despite different labels, which blurs the decision boundary and weakens supervision\(Sapet al\.,[2020](https://arxiv.org/html/2606.18852#bib.bib25); ElSheriefet al\.,[2021](https://arxiv.org/html/2606.18852#bib.bib26)\)\. When this boundary is weak, standard training can learn dataset\-specific shortcuts tied to topic and group\-linked surface cues, reducing cross\-dataset generalization and transfer to related abusive\-language settings\(Nejadgholi and Kiritchenko,[2020](https://arxiv.org/html/2606.18852#bib.bib59); Röttgeret al\.,[2022](https://arxiv.org/html/2606.18852#bib.bib6); Sapet al\.,[2019](https://arxiv.org/html/2606.18852#bib.bib60)\)\.
Figure[1](https://arxiv.org/html/2606.18852#S1.F1)illustrates this issue for examples aligned to the same target demographic\. Despite different labels, many instances share topic and group mentions and can lie close in representation space, so accurate detection requires inferring intent and implied meaning, not just matching surface wording\. To address semantic overlap, prior work uses supervised contrastive learning \(SCL\), most notablyImpCon\.ImpConpulls each post toward its human\-annotated implied statement as a positive pair\(Khoslaet al\.,[2020](https://arxiv.org/html/2606.18852#bib.bib11); Gunelet al\.,[2021](https://arxiv.org/html/2606.18852#bib.bib27); Kimet al\.,[2022](https://arxiv.org/html/2606.18852#bib.bib1)\)\. However, standard SCL treats most other in\-batch examples as negatives; in implicit hate datasets, many near\-neighbors differ only slightly, so repelling them can introduce false negatives and hurt generalization\(Huynhet al\.,[2020](https://arxiv.org/html/2606.18852#bib.bib41); Kalantidiset al\.,[2020](https://arxiv.org/html/2606.18852#bib.bib20); Wanget al\.,[2019](https://arxiv.org/html/2606.18852#bib.bib50)\)\.Ahnet al\.\([2024](https://arxiv.org/html/2606.18852#bib.bib58)\)proposeSharedCon, which forms positives from shared semantics among same\-label posts, reducing reliance on implied\-statement annotations\(Ahnet al\.,[2024](https://arxiv.org/html/2606.18852#bib.bib58)\), yet it still inherits the same fragile negative treatment when many examples are topically similar\.
Motivated by this remaining fragility on the negative side, we instead target*negative selection*\. Through the lens of alignment and uniformity\(Wang and Isola,[2020](https://arxiv.org/html/2606.18852#bib.bib7)\), SCL\-style training that aligns positives while repelling all other in\-batch instances as negatives\(Kimet al\.,[2022](https://arxiv.org/html/2606.18852#bib.bib1); Ahnet al\.,[2024](https://arxiv.org/html/2606.18852#bib.bib58)\)can yield tight, topic\-driven clusters and weaker global coverage of the embedding space, which can hurt transfer\. This effect is amplified by false negatives and class collisions that distort local neighborhoods\(Chuanget al\.,[2020](https://arxiv.org/html/2606.18852#bib.bib44)\)\. To mitigate clustering driven purely by shared topics and target mentions, we explicitly separate semantically close instances with opposing labels, using a margin\-based triplet objective with semi\-hard negative mining\(Schroffet al\.,[2015](https://arxiv.org/html/2606.18852#bib.bib17); Hermanset al\.,[2017](https://arxiv.org/html/2606.18852#bib.bib31); Wuet al\.,[2017](https://arxiv.org/html/2606.18852#bib.bib18); Musgraveet al\.,[2020](https://arxiv.org/html/2606.18852#bib.bib23); Xuanet al\.,[2020](https://arxiv.org/html/2606.18852#bib.bib3); Robinsonet al\.,[2021](https://arxiv.org/html/2606.18852#bib.bib2)\)\.
In summary, we make the following contributions:
- •We propose a triplet\-based framework for implicit hate detection that uses*context\-bounded semi\-hard negative mining*to avoid repelling all in\-batch negatives, while keeping a standard cross\-entropy objective for classification\.
- •We introduce two variants,ImpSHandAugSH\.ImpSHuses post\-implied\-statement positives when available, whileAugSHuses augmentation\-based positives for all instances to isolate the role of implication\.
- •We evaluate onIHC,SBIC, andDynaHatewithBERTandHateBERTunder matched tokenization and tuning budgets, and analyze representation structure with alignment and uniformity scores alongside qualitative neighbor and embedding visualizations\.
## 2Related Work
Early hate speech detection relied on lexical cues\(Waseem and Hovy,[2016](https://arxiv.org/html/2606.18852#bib.bib32); Davidsonet al\.,[2017](https://arxiv.org/html/2606.18852#bib.bib30)\), which often fail for implicit hate expressed via sarcasm, euphemisms, and other pragmatic cues\(Badjatiyaet al\.,[2017](https://arxiv.org/html/2606.18852#bib.bib33); Golbecket al\.,[2017](https://arxiv.org/html/2606.18852#bib.bib35)\)\. More recent benchmarks such asIHCandSBIC, and cross\-domain evaluation settings likeDynaHate, shifted attention to semantic modeling, but robust cross\-dataset generalization remains difficult\(Sapet al\.,[2020](https://arxiv.org/html/2606.18852#bib.bib25); ElSheriefet al\.,[2021](https://arxiv.org/html/2606.18852#bib.bib26); Vidgenet al\.,[2021](https://arxiv.org/html/2606.18852#bib.bib24); Kimet al\.,[2022](https://arxiv.org/html/2606.18852#bib.bib1); Ramponi and Tonelli,[2022](https://arxiv.org/html/2606.18852#bib.bib5)\)\.
To improve generalization, recent work applies supervised contrastive learning \(SCL\) to implicit hate\.Kimet al\.\([2022](https://arxiv.org/html/2606.18852#bib.bib1)\)proposeImpCon, which uses the human\-annotated implied statement as a positive and pulls post\-implication pairs together\.Ahnet al\.\([2024](https://arxiv.org/html/2606.18852#bib.bib58)\)proposeSharedCon, which removes reliance on implied statements by mining shared semantics among same\-label instances \(e\.g\., clustering\) and constructing positives from label\-consistent neighborhoods\.
Figure 2:Triplet vs\. SCL\. Triplet updates use a margin\-violating, confusable negative; SCL repels all non\-positives in the batch\.### 2\.1Triplet Objectives and Negative Selection
Triplet losses optimize relative comparisons by pulling an anchor toward a positive and pushing it away from a negative by a margin\(Schroffet al\.,[2015](https://arxiv.org/html/2606.18852#bib.bib17); Hermanset al\.,[2017](https://arxiv.org/html/2606.18852#bib.bib31)\)\. In contrast, SCL pulls each anchor toward all same\-label examples in the minibatch and pushes it away from different\-label examples\(Khoslaet al\.,[2020](https://arxiv.org/html/2606.18852#bib.bib11); Gunelet al\.,[2021](https://arxiv.org/html/2606.18852#bib.bib27); Liao,[2021](https://arxiv.org/html/2606.18852#bib.bib52)\)\. In datasets with heavy topical overlap, treating most in\-batch items as negatives can create false negatives and distort local neighborhoods, which can hurt transfer\(Huynhet al\.,[2020](https://arxiv.org/html/2606.18852#bib.bib41); Kalantidiset al\.,[2020](https://arxiv.org/html/2606.18852#bib.bib20); Wanget al\.,[2019](https://arxiv.org/html/2606.18852#bib.bib50); Wang and Isola,[2020](https://arxiv.org/html/2606.18852#bib.bib7)\)\.
Negative selection is therefore critical\. Semi\-hard mining focuses on negatives that violate the margin but are not extreme outliers, concentrating updates on realistic near\-misses\(Schroffet al\.,[2015](https://arxiv.org/html/2606.18852#bib.bib17); Wuet al\.,[2017](https://arxiv.org/html/2606.18852#bib.bib18); Musgraveet al\.,[2020](https://arxiv.org/html/2606.18852#bib.bib23); Xuanet al\.,[2020](https://arxiv.org/html/2606.18852#bib.bib3); Robinsonet al\.,[2021](https://arxiv.org/html/2606.18852#bib.bib2)\)\. For implicit hate, where examples can share topic and target cues while differing in implied intent, context\-bounded semi\-hard selection helps the model separate intent\-sensitive cases without over\-repelling broadly similar content\.
## 3Methodology
Figure 3:Training overview for our triplet framework\. Left: positive formation \(ImpSHuses a post–implication pair;AugSHuses augmentation\-based positives when implication is absent\)\. Right: semi\-hard negative mining from the minibatch relative to the chosen anchor–positive pair\. The encoder is updated by the triplet lossℒtripletImpSH\\mathcal\{L\}^\{\\mathrm\{ImpSH\}\}\_\{\\text\{triplet\}\}orℒtripletAugSH\\mathcal\{L\}^\{\\mathrm\{AugSH\}\}\_\{\\text\{triplet\}\}\(Eqs\.[5](https://arxiv.org/html/2606.18852#S3.E5)and[6](https://arxiv.org/html/2606.18852#S3.E6)\), alongside a standard classification lossℒCE\\mathcal\{L\}\_\{\\mathrm\{CE\}\}\.Figure[3](https://arxiv.org/html/2606.18852#S3.F3)summarizes training\. We jointly optimize a standard cross\-entropy lossℒCE\\mathcal\{L\}\_\{\\mathrm\{CE\}\}and a triplet loss, mining semi\-hard negatives within each minibatch \(Eqs\.[5](https://arxiv.org/html/2606.18852#S3.E5)\-[6](https://arxiv.org/html/2606.18852#S3.E6)\)\. For each anchor\-positive pair, we select an opposite\-label negative that is farther than the positive but still within the margin band, focusing updates on near\-confusable cases\.
The standard cross\-entropy loss is:
ℒCE=−1N∑i=1N\[yilogy^i\+\(1−yi\)log\(1−y^i\)\]\.\\mathcal\{L\}\_\{\\text\{CE\}\}=\-\\frac\{1\}\{N\}\\sum\_\{i=1\}^\{N\}\\left\[y\_\{i\}\\log\\hat\{y\}\_\{i\}\+\(1\-y\_\{i\}\)\\log\(1\-\\hat\{y\}\_\{i\}\)\\right\]\.\(1\)
We use cosine distance:
dcos\(zi,zj\)=1−zi⋅zj∥zi∥∥zj∥\.d\_\{\\text\{cos\}\}\(z\_\{i\},z\_\{j\}\)=1\-\\frac\{z\_\{i\}\\cdot z\_\{j\}\}\{\\lVert z\_\{i\}\\rVert\\,\\lVert z\_\{j\}\\rVert\}\.\(2\)
We define one positive per anchor\. For hatefulxix\_\{i\},zi\+=h\(IMP\(xi\)\)z\_\{i\}^\{\+\}=h\(\\mathrm\{IMP\}\(x\_\{i\}\)\); for non\-hatexix\_\{i\},zi\+=h\(AUG\(xi\)\)z\_\{i\}^\{\+\}=h\(\\mathrm\{AUG\}\(x\_\{i\}\)\), whereh\(⋅\)h\(\\cdot\)is the encoder,IMP\(⋅\)\\mathrm\{IMP\}\(\\cdot\)returns the implied statement, andAUG\(⋅\)\\mathrm\{AUG\}\(\\cdot\)applies synonym augmentation\. The anchor\-positive distance is:
dpos=dcos\(zi,zi\+\)\.d\_\{\\mathrm\{pos\}\}=d\_\{\\text\{cos\}\}\(z\_\{i\},z\_\{i\}^\{\+\}\)\.\(3\)
To ensure the model separates negatives that are truly close to the positive, we select a context\-bounded semi\-hard negative from the opposite\-label pool𝒩\\mathcal\{N\}:
zneg=argminzj∈𝒩dpos<dcos\(zi,zj\)<dpos\+αdcos\(zi,zj\)\.z\_\{\\text\{neg\}\}=\\underset\{\\begin\{subarray\}\{c\}z\_\{j\}\\in\\mathcal\{N\}\\\\ d\_\{\\mathrm\{pos\}\}<d\_\{\\text\{cos\}\}\(z\_\{i\},z\_\{j\}\)<d\_\{\\mathrm\{pos\}\}\+\\alpha\\end\{subarray\}\}\{\\arg\\min\}\\;d\_\{\\text\{cos\}\}\(z\_\{i\},z\_\{j\}\)\.\(4\)
The triplet objectives specialize by the choice ofz\+z^\{\+\}:
ℒtripletImpSH\\displaystyle\\mathcal\{L\}^\{\\mathrm\{ImpSH\}\}\_\{\\text\{triplet\}\}=1N∑i=1NReLU\[dpos−dcos\(zi,zneg\)\+α\]\\displaystyle=\\frac\{1\}\{N\}\\sum\_\{i=1\}^\{N\}\\mathrm\{ReLU\}\\\!\\left\[d\_\{\\mathrm\{pos\}\}\-d\_\{\\text\{cos\}\}\(z\_\{i\},z\_\{\\text\{neg\}\}\)\+\\alpha\\right\]\(5\)withz\+=h\(IMP\(xi\)\)\\displaystyle\\text\{with \}z^\{\+\}=h\(\\mathrm\{IMP\}\(x\_\{i\}\)\)
ℒtripletAugSH\\displaystyle\\mathcal\{L\}^\{\\mathrm\{AugSH\}\}\_\{\\text\{triplet\}\}=1N∑i=1NReLU\[dpos−dcos\(zi,zneg\)\+α\]\\displaystyle=\\frac\{1\}\{N\}\\sum\_\{i=1\}^\{N\}\\mathrm\{ReLU\}\\\!\\left\[d\_\{\\mathrm\{pos\}\}\-d\_\{\\text\{cos\}\}\(z\_\{i\},z\_\{\\text\{neg\}\}\)\+\\alpha\\right\]\(6\)withz\+=h\(AUG\(xi\)\)\\displaystyle\\text\{with \}z^\{\+\}=h\(\\mathrm\{AUG\}\(x\_\{i\}\)\)
The final training objective is:
ℒ=ℒCE\+λℒtriplet,ℒtriplet∈\{ℒtripletImpSH,ℒtripletAugSH\}\.\\mathcal\{L\}=\\mathcal\{L\}\_\{\\text\{CE\}\}\+\\lambda\\,\\mathcal\{L\}\_\{\\text\{triplet\}\},\\mathcal\{L\}\_\{\\text\{triplet\}\}\\in\\\{\\mathcal\{L\}^\{\\mathrm\{ImpSH\}\}\_\{\\text\{triplet\}\},\\mathcal\{L\}^\{\\mathrm\{AugSH\}\}\_\{\\text\{triplet\}\}\\\}\.\(7\)For ImpSH[5](https://arxiv.org/html/2606.18852#S3.E5)method we use implied statement if available, otherwise we use augmentation\. And for AugSH we use augmentation for both label\.
## 4Experiments
### 4\.1Dataset
FollowingKimet al\.\([2022](https://arxiv.org/html/2606.18852#bib.bib1)\); Ahnet al\.\([2024](https://arxiv.org/html/2606.18852#bib.bib58)\), we treat implicit hate detection as a binary classification task\. We evaluate on three datasets shown in Table[1](https://arxiv.org/html/2606.18852#S4.T1)\.IHC\(ElSheriefet al\.,[2021](https://arxiv.org/html/2606.18852#bib.bib26)\)contains tweets labeled for hate, with annotations for target groups and implied hateful meanings\.SBIC\(Sapet al\.,[2020](https://arxiv.org/html/2606.18852#bib.bib25)\)contains Reddit posts annotated for social bias and offensiveness, and it also provides free\-text implications\.DynaHate\(Vidgenet al\.,[2021](https://arxiv.org/html/2606.18852#bib.bib24)\)is a dynamically generated hate speech dataset created through human\-model\-in\-the\-loop collection, with diverse and challenging hate examples\. ForSBICandDynaHate, we map all abusive categories \(explicit/implicit/offensive\) to the*hate*label for binary evaluation\.
Table 1:Datasets used for training and cross\-dataset evaluation, including class distribution\. Thehatelabel covers offensive, explicit, and implicit hate\.
### 4\.2Implementation Details
We fine\-tune BERT\(Devlinet al\.,[2019](https://arxiv.org/html/2606.18852#bib.bib28)\)and HateBERT\(Caselliet al\.,[2021](https://arxiv.org/html/2606.18852#bib.bib29)\)as sentence encoders\. FollowingKimet al\.\([2022](https://arxiv.org/html/2606.18852#bib.bib1)\), we fix the learning\-rate\-to\-batch\-size ratio, using a batch size of 8 and a learning rate of2×10−52\\times 10^\{\-5\}with AdamW\. Models are trained for 6 epochs with dropout 0\.1 on RTX 3050 GPU \(4GB\)\. For the metric\-learning objective, we tuneλ=0\.25\\lambda=0\.25andα∈\{0\.1,0\.2,0\.3,0\.4,0\.5\}\\alpha\\in\\\{0\.1,0\.2,0\.3,0\.4,0\.5\\\}using dev set performance\. Experiments use 4 random seeds\{0,1,2,3\}\\\{0,1,2,3\\\}\. Synonym substitution is applied via NLPAug111[https://nlpaug\.readthedocs\.io/en/latest/augmenter/word/synonym\.html](https://nlpaug.readthedocs.io/en/latest/augmenter/word/synonym.html)as inKimet al\.\([2022](https://arxiv.org/html/2606.18852#bib.bib1)\)\.
### 4\.3Baselines
We compare against four objectives:
- •CE\.Standard fine\-tuning with cross\-entropy only\.
- •CE \+ SCL\(Gunelet al\.,[2021](https://arxiv.org/html/2606.18852#bib.bib27)\)\. Cross\-entropy plus supervised contrastive loss\.
- •CE \+ ImpCon\(Kimet al\.,[2022](https://arxiv.org/html/2606.18852#bib.bib1)\)\. Cross\-entropy plus implication\-aware supervised contrastive loss\.
- •CE \+ SharedCon\(Ahnet al\.,[2024](https://arxiv.org/html/2606.18852#bib.bib58)\)\. Cross\-entropy plus shared\-semantics supervised contrastive loss\.
All baselines use the same backbone, preprocessing, and optimization setup as our method\.
## 5Results and Analysis
### 5\.1F1 Score result
ModelObjectiveIHC→\\rightarrowSBICIHC→\\rightarrowDynaHateIHC→\\rightarrowIHCBERTCE56\.9%53\.3%77\.7%BERTCE\+SCL\(Gunelet al\.,[2021](https://arxiv.org/html/2606.18852#bib.bib27)\)59\.8%52\.2%77\.7%BERTCE\+ImpCon\(Kimet al\.,[2022](https://arxiv.org/html/2606.18852#bib.bib1)\)60\.8%57\.9%78\.0%BERTCE\+SharedCon\(Ahnet al\.,[2024](https://arxiv.org/html/2606.18852#bib.bib58)\)65\.2%59\.1%78\.4%BERTCE\+AugSH59\.2%54\.8%77\.8%BERTCE\+ImpSH61\.4%59\.2%78\.3%HateBERTCE58\.8%54\.8%76\.5%HateBERTCE\+SCL\(Gunelet al\.,[2021](https://arxiv.org/html/2606.18852#bib.bib27)\)55\.9%52\.7%76\.9%HateBERTCE\+ImpCon\(Kimet al\.,[2022](https://arxiv.org/html/2606.18852#bib.bib1)\)63\.9%59\.5%77\.4%HateBERTCE\+SharedCon\(Ahnet al\.,[2024](https://arxiv.org/html/2606.18852#bib.bib58)\)63\.5%57\.7%77\.1%HateBERTCE\+AugSH58\.2%54\.8%77\.2%HateBERTCE\+ImpSH65\.0%60\.8%76\.4%SBIC→\\rightarrowIHCSBIC→\\rightarrowDynaHateSBIC→\\rightarrowSBICBERTCE59\.7%60\.3%83\.7%BERTCE\+SCL\(Gunelet al\.,[2021](https://arxiv.org/html/2606.18852#bib.bib27)\)59\.4%60\.9%83\.7%BERTCE\+ImpCon\(Kimet al\.,[2022](https://arxiv.org/html/2606.18852#bib.bib1)\)61\.4%61\.2%83\.8%BERTCE\+SharedCon\(Ahnet al\.,[2024](https://arxiv.org/html/2606.18852#bib.bib58)\)62\.5%62\.0%83\.8%BERTCE\+AugSH58\.4%60\.6%82\.3%BERTCE\+ImpSH61\.8%62\.0%84\.1%HateBERTCE59\.0%60\.2%84\.1%HateBERTCE\+SCL\(Gunelet al\.,[2021](https://arxiv.org/html/2606.18852#bib.bib27)\)59\.5%59\.3%84\.3%HateBERTCE\+ImpCon\(Kimet al\.,[2022](https://arxiv.org/html/2606.18852#bib.bib1)\)60\.1%60\.4%84\.8%HateBERTCE\+SharedCon\(Ahnet al\.,[2024](https://arxiv.org/html/2606.18852#bib.bib58)\)59\.3%59\.4%84\.5%HateBERTCE\+AugSH60\.0%60\.6%84\.4%HateBERTCE\+ImpSH60\.6%60\.4%84\.4%Table 2:F1\-scores for in\-domain and cross\-dataset evaluations\. Models are trained onIHCorSBICand tested on the dataset indicated by the arrow\. Bold marks the best objective*within each encoder*for a given source→\\rightarrowtarget; ties are both bolded\. See Appendix[A](https://arxiv.org/html/2606.18852#A1)for details\.Table[2](https://arxiv.org/html/2606.18852#S5.T2)reports macro\-F1 \(%\) averaged over four seeds described in Section[4\.2](https://arxiv.org/html/2606.18852#S4.SS2)with both in\-domain and cross\-dataset evaluation\. Since the goal ofImpSHis to handle semantic overlap during representation learning for generalization, we compareImpSHprimarily on cross\-dataset transfer and we useAugSHas an ablation that keeps augmentation based multi\-view training but removes implied\-statement supervision\. Prior work finds that in\-domain and out\-of\-distribution performance can be strongly correlated but can also become inversely related on real benchmarks, so selecting models only by in\-domain performance can miss the best cross\-dataset model\(Milleret al\.,[2021](https://arxiv.org/html/2606.18852#bib.bib63); Teneyet al\.,[2023](https://arxiv.org/html/2606.18852#bib.bib64)\)\. With BERT trained onIHC,ImpSHis best for transfer toDynaHatebut it does not surpass the strongest baseline for transfer toSBICand it also does not surpass the strongest baseline for in\-domain evaluation onIHC, whereSharedConremains best\. In both casesImpSHstill surpasses the next strongest baseline which isImpCon, and it remains aboveAugSHacross all three evaluations, which supports that implied\-statement supervision adds signal beyond augmentation alone\. WhileSharedConshows high scores in specific settings, it relies on clustering\-based shared semantics which is often volatile and sensitive to batch composition\. In contrast,ImpSHmaintains more consistent alignment by mining negatives specifically relative to the context of the implied statement, focusing on separating negatives that are semantically close to the positive\. With HateBERT trained onIHC,ImpSHis strongest on both transfer targets but it does not surpass the strongest in\-domain baseline, whereImpConis best andAugSHis second, andImpSHfalls below both\. This suggests a transfer versus in\-domain tension in this configuration, where objectives that best separate the source dataset can differ from objectives that best preserve meaning under cross\-dataset shift, while the transfer gap betweenImpSHandAugSHstill supports benefits beyond augmentation on both targets\.
With BERT trained onSBIC,ImpSHdoes not surpass the strongest baseline for transfer toIHC, whereSharedConremains best, but it surpasses the next strongest baseline which isImpConand it also stays aboveAugSH\. For transfer toDynaHate,ImpSHmatches the strongest baseline which isSharedConand it stays above the next strongest baseline which isImpCon\. For in\-domain evaluation onSBIC,ImpSHis the strongest objective and it surpasses the next strongest baselines,ImpConandSharedCon, and it remains aboveAugSH, which again supports that implied\-statement supervision contributes beyond augmentation\.
With HateBERT trained onSBIC,ImpSHis best for transfer toIHCand it surpasses the next strongest baseline which isImpConwhile remaining aboveAugSH\. For transfer toDynaHate,ImpSHdoes not surpass the strongest baseline, whereAugSHis best, andImpSHmatches the next strongest baseline which isImpCon\. This is the one setting where the ablation suggests that multi\-view regularization accounts for most of the gain and implied\-statement supervision adds limited additional benefit\. For in\-domain evaluation onSBICwith HateBERT,ImpSHdoes not surpass the strongest baseline, whereImpConis best, and it also does not surpass the next strongest baseline, whereSharedConis second, while it matchesAugSH, which is consistent with implied\-statement supervision being less helpful for maximizing in\-domain fit on this source\.
### 5\.2Alignment and uniformity
Following standard practice for representation evaluation\(Wang and Isola,[2020](https://arxiv.org/html/2606.18852#bib.bib7)\), we assessAlignmentandUniformityon our best encoder,HateBERT\(Caselliet al\.,[2021](https://arxiv.org/html/2606.18852#bib.bib29)\)\. We L2\-normalize embeddings so that‖f\(x\)‖2=1\\\|f\(x\)\\\|\_\{2\}=1\. Alignment measures how close a positive pair lands in the embedding space, and Uniformity measures how evenly the full set of normalized embeddings spreads on the hypersphere, which helps detect representation collapse\. Lower is better for both metrics, and for Uniformity this typically appears as more negative values\(Wang and Isola,[2020](https://arxiv.org/html/2606.18852#bib.bib7)\)\. We user=2r=2for Alignment and report a global score by averaging per\-class values, and we uset=2t=2for Uniformity\.
This analysis supports our hypothesis because improved cross\-domain generalization should appear as tighter positive neighborhoods without sacrificing global spread\. Table[3](https://arxiv.org/html/2606.18852#S5.T3)shows thatImpSHachieves the best Alignment in four of six train→\\rightarrowtest settings, specificallyIHC→\\rightarrowIHC,IHC→\\rightarrowSBIC,SBIC→\\rightarrowSBIC, andSBIC→\\rightarrowIHC\. The remaining two cases areDynaHateevaluations, whereSharedConattains lower Alignment, which is consistent with its clustering\-based objective that pulls together shared semantics and can be effective under perturbation\-heavy shifts\(Ahnet al\.,[2024](https://arxiv.org/html/2606.18852#bib.bib58); Vidgenet al\.,[2021](https://arxiv.org/html/2606.18852#bib.bib24)\)\. For Uniformity,ImpSHis best in three of six settings, including both transfers toDynaHate, whileImpConremains strongest on several in\-domain or near\-domain evaluations\. Overall,ImpSHtends to improve local compactness under transfer while maintaining a competitive global spread, and this trend is qualitatively consistent with our t\-SNE inspection\.
Table 3:Averaged Alignment and Uniformity scores across 4 seeds comparison across methods trained on HateBERT Encoder\. Lower is better \(↓\\downarrow\)\. Best results in bold\.
### 5\.3Qualitative Representation Analysis
We further probe the embedding space with t\-SNE projections that provide a qualitative view of how classes and target groups organize in the learned representation\. We report a class\-colored view and a target\-colored view, where target labels serve as a rough proxy for shared topical content\. We train onIHCas the source domain, visualize theIHCin\-domain test split, and then visualize transfer toSBICandDynaHate\. OnIHC, bothImpConandSharedConshow target\-consistent clusters in the target view \(Fig\.[4](https://arxiv.org/html/2606.18852#S5.F4)d\-f\)\. In the class view,ImpConshows more class interleaving within these clusters, whileSharedConandImpSHexhibit a clearer large\-scale separation betweenHateandNon\-Hate\(Fig\.[4](https://arxiv.org/html/2606.18852#S5.F4)a\-c\)\.ImpSHappears to preserve target\-coherent neighborhoods while reducing cross\-class overlap in several regions of the map\.
Under transfer toSBIC, class mixing increases for all methods, which is expected under a larger shift, butImpSHshows comparatively less overlap in the class view while still maintaining target\-coherent neighborhoods in the target view \(Fig\.[4](https://arxiv.org/html/2606.18852#S5.F4)g\-l\)\. OnDynaHate, all projections become more fragmented and mixed, yetImpSHretains a weak but visible global class structure compared to the baselines \(Fig\.[4](https://arxiv.org/html/2606.18852#S5.F4)m\-o\)\. These observations are qualitative and can vary with t\-SNE settings, but they are broadly consistent with the Alignment and Uniformity trends in Table[3](https://arxiv.org/html/2606.18852#S5.T3)\.
\(a\)
\(b\)
\(c\)
\(d\)
\(e\)
\(f\)
\(g\)
\(h\)
\(i\)
\(j\)
\(k\)
\(l\)
\(m\)
\(n\)
\(o\)
Figure 4:t\-SNE visualization of test embeddings\. Rows:IHC\(in\-domain\),SBICandDynaHate\(cross\-domain\)\. Left: class\-colored; right: target\-colored\.ImpConfragments class boundaries into target\-centric clusters\.SharedConshows partial separation\.ImpSHmaintains global Hate/Non\-Hate separation across all domains\.
## 6Case Study
Table[4](https://arxiv.org/html/2606.18852#S6.T4)lists nearest neighbours fromImpSHwith cosine similarity \(lower is closer\)\. True positives show that the model clusters coherent hate themes: onSBIC, misogynistic posts group together; onDynaHate, homophobic contexts align tightly\. The false negatives expose three failure modes\. First, topic bias: inSBICthe anchor is a non\-hate “Stable Genius” joke, yet its neighbours are political Trump comments that match topic but not label, indicating target\-centric proximity can override stance\. Second, stance reversal: inDynaHatethe anchor attacks immigrants while a neighbour condemns slurs, so opposite polarity is pulled close by shared lexical cues\. Third, shallow lexical ties: “Rats are disgusting” is retrieved via short, high\-overlap phrasing despite being off\-topic\. Overall,ImpSHgroups most hate correctly at the sentence level, but residual errors arise from topic alignment dominating stance, brief or unequal contexts, and lexical shortcuts\.
Table 4:Alignment case study\(k=2k\{=\}2\)\. Rows show true‑positives \(TP\) and false‑negatives \(FN\) for label hate \(Offensive inSBIC, Hate inDynaHate\)\. NN‑ii/ Sim‑iigive theii‑th neighbour and cosine similarity \(lower = closer\)\.
## 7Conclusion
We proposedImpSHandAugSH, two objectives that combine semantic priors with semi\-hard negative mining to support transfer under domain shift in implicit hate detection\. Across BERT and HateBERT,ImpSHis consistently competitive on cross\-dataset evaluation and it is strongest in several transfer settings, most clearly when training onIHCwith HateBERT\. When training onSBIC, the best objective depends on the target and encoder, and clustering based baselines such asSharedConor the augmentation ablationAugSHcan be stronger in some cases\. The geometry analysis supports this interpretation, where alignment and uniformity trends and qualitative visualizations suggest clearer Hate versus Non\-Hate structure and less target specific fragmentation compared with prior contrastive objectives\. Overall, our findings suggest thatImpSHfacilitates superior separation in cross\-data scenarios because it maps the input post somewhat bijectively to its underlying insinuation\. By carefully mining negatives within the context of these implied statements, we mitigate the volatility of unsupervised clustering and achieve a more robust alignment of intent\.
## 8Limitations and broader impact
Our method inherits limitations from triplet learning with semi\-hard mining\. It uses a fixed margin, so training can be sensitive to the margin choice and to batch composition\. Small batches can produce too few informative triplets and larger batches increase compute and memory due to within\-batch pairwise distance computation\. Empirically, gains over strong contrastive baselines are modest and not consistent across all transfer directions, and prior objectives can remain stronger for in\-domain fitting, so we positionImpSHas a complementary objective rather than a replacement that dominates prior work\(Kimet al\.,[2022](https://arxiv.org/html/2606.18852#bib.bib1); Ahnet al\.,[2024](https://arxiv.org/html/2606.18852#bib.bib58)\)\. A further limitation is dependence on implication supervision because implied statements define positive pairs, which limits applicability when implication annotations are missing or noisy\(Kimet al\.,[2022](https://arxiv.org/html/2606.18852#bib.bib1)\)\. A practical extension is to replace the fixed margin with an adaptive margin scheme and to reduce reliance on implied statements by constructing positives through label\-aware neighborhoods that cluster shared semantics within each label\(Ahnet al\.,[2024](https://arxiv.org/html/2606.18852#bib.bib58)\), while still sampling negatives from nearby opposing clusters to keep the objective focused on borderline errors\.
## 9Ethics statement
This work proposes a training objective for hate related text classification\. We evaluate on public datasets that contain hateful and abusive content, so readers may face secondary exposure\. We include a content warning and we minimize qualitative examples\. When examples are necessary, we keep excerpts short and we redact slurs and identity terms when this does not change the linguistic phenomenon under discussion\.
Our objective uses semi\-hard negative mining around borderline pairs\. This focuses learning on difficult cases, but it can also amplify the impact of annotation noise and spurious cues such as identity markers that correlate with labels\. For this reason, we emphasize cross\-dataset evaluation and we recommend targeted error analysis that checks false positives for benign identity mentions and false negatives for implicit hate\. Where metadata permits, we recommend reporting group\-wise error rates and documenting dataset populations and labeling choices\.
We do not present trained checkpoints as a ready to deploy moderation tool\. Hate detection models can be misused for surveillance or censorship and they can produce harmful errors in deployment\. If models or code are released, we recommend documenting intended use, failure modes, and evaluation conditions using established responsible NLP guidance and model documentation practices\.
## References
- SharedCon: implicit hate speech detection using shared semantics\.pp\. 10444–10455\.Cited by:[§1](https://arxiv.org/html/2606.18852#S1.p2.1),[§1](https://arxiv.org/html/2606.18852#S1.p3.1),[§2](https://arxiv.org/html/2606.18852#S2.p2.1),[4th item](https://arxiv.org/html/2606.18852#S4.I1.i4.p1.1),[§4\.1](https://arxiv.org/html/2606.18852#S4.SS1.p1.1),[§5\.2](https://arxiv.org/html/2606.18852#S5.SS2.p2.5),[Table 2](https://arxiv.org/html/2606.18852#S5.T2.6.10.4.2),[Table 2](https://arxiv.org/html/2606.18852#S5.T2.6.16.10.2),[Table 2](https://arxiv.org/html/2606.18852#S5.T2.6.22.16.2),[Table 2](https://arxiv.org/html/2606.18852#S5.T2.6.28.22.2),[§8](https://arxiv.org/html/2606.18852#S8.p1.1)\.
- P\. Badjatiya, S\. Gupta, M\. Gupta, and V\. Varma \(2017\)Deep learning for hate speech detection in tweets\.pp\. 759–760\.Cited by:[§2](https://arxiv.org/html/2606.18852#S2.p1.1)\.
- T\. Caselli, V\. Basile, J\. Mitrović, and M\. Granitzer \(2021\)HateBERT: retraining BERT for abusive language detection in English\.Online,pp\. 17–25\.External Links:[Link](https://aclanthology.org/2021.woah-1.3/),[Document](https://dx.doi.org/10.18653/v1/2021.woah-1.3)Cited by:[§4\.2](https://arxiv.org/html/2606.18852#S4.SS2.p1.4),[§5\.2](https://arxiv.org/html/2606.18852#S5.SS2.p1.3)\.
- C\. Chuang, J\. Robinson, Y\. Lin, A\. Torralba, and S\. Jegelka \(2020\)Debiased contrastive learning\.Advances in neural information processing systems33,pp\. 8765–8775\.Cited by:[§1](https://arxiv.org/html/2606.18852#S1.p3.1)\.
- T\. Davidson, D\. Warmsley, M\. Macy, and I\. Weber \(2017\)Automated hate speech detection and the problem of offensive language\.pp\. 512–515\.Cited by:[§2](https://arxiv.org/html/2606.18852#S2.p1.1)\.
- J\. Devlin, M\. Chang, K\. Lee, and K\. Toutanova \(2019\)BERT: pre\-training of deep bidirectional transformers for language understanding\.Minneapolis, Minnesota,pp\. 4171–4186\.External Links:[Link](https://aclanthology.org/N19-1423/),[Document](https://dx.doi.org/10.18653/v1/N19-1423)Cited by:[§4\.2](https://arxiv.org/html/2606.18852#S4.SS2.p1.4)\.
- M\. ElSherief, C\. Ziems, D\. Muchlinski, V\. Anupindi, J\. Seybolt, M\. De Choudhury, and D\. Yang \(2021\)Latent hatred: a benchmark for understanding implicit hate speech\.Online and Punta Cana, Dominican Republic,pp\. 345–363\.External Links:[Link](https://aclanthology.org/2021.emnlp-main.29/),[Document](https://dx.doi.org/10.18653/v1/2021.emnlp-main.29)Cited by:[Figure 1](https://arxiv.org/html/2606.18852#S1.F1),[§1](https://arxiv.org/html/2606.18852#S1.p1.1),[§2](https://arxiv.org/html/2606.18852#S2.p1.1),[§4\.1](https://arxiv.org/html/2606.18852#S4.SS1.p1.1)\.
- J\. Golbeck, Z\. Ashktorab, R\. O\. Banjo, A\. Berlinger, S\. Bhagwan, C\. Buntain, P\. Cheakalos, A\. A\. Geller, R\. K\. Gnanasekaran, R\. R\. Gunasekaran,et al\.\(2017\)A large labeled corpus for online harassment research\.pp\. 229–233\.Cited by:[§2](https://arxiv.org/html/2606.18852#S2.p1.1)\.
- B\. Gunel, J\. Du, A\. Conneau, and V\. Stoyanov \(2021\)Supervised contrastive learning for pre\-trained language model fine\-tuning\.Cited by:[§1](https://arxiv.org/html/2606.18852#S1.p2.1),[§2\.1](https://arxiv.org/html/2606.18852#S2.SS1.p1.1),[2nd item](https://arxiv.org/html/2606.18852#S4.I1.i2.p1.1),[Table 2](https://arxiv.org/html/2606.18852#S5.T2.6.14.8.2),[Table 2](https://arxiv.org/html/2606.18852#S5.T2.6.20.14.2),[Table 2](https://arxiv.org/html/2606.18852#S5.T2.6.26.20.2),[Table 2](https://arxiv.org/html/2606.18852#S5.T2.6.8.2.2)\.
- A\. Hermans, L\. Beyer, and B\. Leibe \(2017\)In defense of the triplet loss for person re\-identification\.arXiv preprint arXiv:1703\.07737\.Cited by:[§1](https://arxiv.org/html/2606.18852#S1.p3.1),[§2\.1](https://arxiv.org/html/2606.18852#S2.SS1.p1.1)\.
- H\. Huynh, V\. Murino, and T\. Tuytelaars \(2020\)Boosting contrastive self\-supervised learning with false negatives\.arXiv preprint arXiv:2011\.11765\.Cited by:[§1](https://arxiv.org/html/2606.18852#S1.p2.1),[§2\.1](https://arxiv.org/html/2606.18852#S2.SS1.p1.1)\.
- Y\. Kalantidis, M\. B\. Sariyildiz, N\. Pion, P\. Weinzaepfel, and D\. Larlus \(2020\)Hard negative mixing for contrastive learning\.Advances in neural information processing systems33,pp\. 21798–21809\.Cited by:[§1](https://arxiv.org/html/2606.18852#S1.p2.1),[§2\.1](https://arxiv.org/html/2606.18852#S2.SS1.p1.1)\.
- P\. Khosla, P\. Teterwak, C\. Wang, A\. Sarna, Y\. Tian, P\. Isola, A\. Maschinot, C\. Liu, and D\. Krishnan \(2020\)Supervised contrastive learning\.Advances in neural information processing systems33,pp\. 18661–18673\.Cited by:[§1](https://arxiv.org/html/2606.18852#S1.p2.1),[§2\.1](https://arxiv.org/html/2606.18852#S2.SS1.p1.1)\.
- Y\. Kim, S\. Park, and Y\. Han \(2022\)Generalizable implicit hate speech detection using contrastive learning\.InProceedings of the 29th International Conference on Computational LinguisticsICLRProceedings of the IEEE/CVF Winter Conference on Applications of Computer VisionProceedings of the 62nd Annual Meeting of the Association for Computational Linguistics \(Volume 1: Long Papers\)Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language TechnologiesProceedings of the Sixth Workshop on Online Abuse and Harms \(WOAH\)International conference on machine learningProceedings of the IEEE/CVF International Conference on Computer VisionInternational Conference on Machine LearningTENCON 2022\-2022 IEEE Region 10 Conference \(TENCON\)Proceedings of the AAAI conference on artificial intelligenceInternational Conference on Machine LearningProceedings of the IEEE conference on computer vision and pattern recognitionProceedings of the IEEE international conference on computer visionProceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing \(EMNLP\-IJCNLP\)International conference on machine learningComputer Vision – ECCV 2020Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing \(Volume 1: Long Papers\)Proceedings of the 58th Annual Meeting of the Association for Computational LinguisticsProceedings of the 2021 Conference on Empirical Methods in Natural Language ProcessingInternational Conference on Learning Representations \(ICLR\)Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 \(Long and Short Papers\)Proceedings of the 5th Workshop on Online Abuse and Harms \(WOAH 2021\)Proceedings of the international AAAI conference on web and social mediaProceedings of the NAACL Student Research WorkshopProceedings of the 26th international conference on World Wide Web companionProceedings of the international AAAI conference on web and social mediaProceedings of the 2017 ACM on web science conferenceProceedings of the IEEE/CVF conference on computer vision and pattern recognitionFindings of the Association for Computational Linguistics: EMNLP 2023Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language TechnologiesProceedings of the 2021 Conference on Empirical Methods in Natural Language ProcessingProceedings of the IEEE/CVF Conference on Computer Vision and Pattern RecognitionProceedings of the 2021 Conference on Empirical Methods in Natural Language ProcessingProceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing \(EMNLP\-IJCNLP\)Proceedings of the IEEE/CVF conference on computer vision and pattern recognitionProceedings of the IEEE/CVF winter conference on applications of computer visionEuropean conference on computer visionFindings of the Association for Computational Linguistics ACL 2024Proceedings of the 57th annual meeting of the association for computational linguisticsProceedings of the 59th annual meeting of the association for computational linguistics and the 11th international joint conference on natural language processing \(volume 1: long papers\)Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics \(Volume 1: Long Papers\)International conference on machine learning,N\. Calzolari, C\. Huang, H\. Kim, J\. Pustejovsky, L\. Wanner, K\. Choi, P\. Ryu, H\. Chen, L\. Donatelli, H\. Ji, S\. Kurohashi, P\. Paggio, N\. Xue, S\. Kim, Y\. Hahm, Z\. He, T\. K\. Lee, E\. Santus, F\. Bond, S\. Na, L\. Ku, A\. Martins, V\. Srikumar, K\. Narang, A\. Mostafazadeh Davani, L\. Mathias, B\. Vidgen, Z\. Talat, K\. Inui, J\. Jiang, V\. Ng, X\. Wan, A\. Vedaldi, H\. Bischof, T\. Brox, J\. Frahm, C\. Zong, F\. Xia, W\. Li, R\. Navigli, M\. Moens, X\. Huang, L\. Specia, S\. W\. Yih, J\. Burstein, C\. Doran, T\. Solorio, A\. Mostafazadeh Davani, D\. Kiela, M\. Lambert, B\. Vidgen, V\. Prabhakaran, Z\. Waseem, J\. Andreas, E\. Choi, A\. Lazaridou, H\. Bouamor, J\. Pino, K\. Bali, M\. Carpuat, M\. de Marneffe, I\. V\. Meza Ruiz, M\. Moens, X\. Huang, L\. Specia, S\. W\. Yih, M\. Moens, X\. Huang, L\. Specia, S\. W\. Yih, K\. Inui, J\. Jiang, V\. Ng, and X\. Wan \(Eds\.\),Vol\.37,Gyeongju, Republic of Korea,pp\. 6667–6679\.Cited by:[§1](https://arxiv.org/html/2606.18852#S1.p1.1),[§1](https://arxiv.org/html/2606.18852#S1.p2.1),[§1](https://arxiv.org/html/2606.18852#S1.p3.1),[§2](https://arxiv.org/html/2606.18852#S2.p1.1),[§2](https://arxiv.org/html/2606.18852#S2.p2.1),[3rd item](https://arxiv.org/html/2606.18852#S4.I1.i3.p1.1),[§4\.1](https://arxiv.org/html/2606.18852#S4.SS1.p1.1),[§4\.2](https://arxiv.org/html/2606.18852#S4.SS2.p1.4),[Table 2](https://arxiv.org/html/2606.18852#S5.T2.6.15.9.2),[Table 2](https://arxiv.org/html/2606.18852#S5.T2.6.21.15.2),[Table 2](https://arxiv.org/html/2606.18852#S5.T2.6.27.21.2),[Table 2](https://arxiv.org/html/2606.18852#S5.T2.6.9.3.2),[§8](https://arxiv.org/html/2606.18852#S8.p1.1)\.
- D\. Liao \(2021\)Sentence embeddings using supervised contrastive learning\.arXiv preprint arXiv:2104\.09540\.Cited by:[§2\.1](https://arxiv.org/html/2606.18852#S2.SS1.p1.1)\.
- J\. P\. Miller, R\. Taori, A\. Raghunathan, S\. Sagawa, P\. W\. Koh, V\. Shankar, P\. Liang, Y\. Carmon, and L\. Schmidt \(2021\)Accuracy on the line: on the strong correlation between out\-of\-distribution and in\-distribution generalization\.pp\. 7721–7735\.Cited by:[§5\.1](https://arxiv.org/html/2606.18852#S5.SS1.p1.1)\.
- K\. Musgrave, S\. Belongie, and S\. Lim \(2020\)A metric learning reality check\.Cham,pp\. 681–699\.External Links:ISBN 978\-3\-030\-58595\-2Cited by:[§1](https://arxiv.org/html/2606.18852#S1.p3.1),[§2\.1](https://arxiv.org/html/2606.18852#S2.SS1.p2.1)\.
- I\. Nejadgholi and S\. Kiritchenko \(2020\)On cross\-dataset generalization in automatic detection of online abuse\.arXiv preprint arXiv:2010\.07414\.Cited by:[§1](https://arxiv.org/html/2606.18852#S1.p1.1)\.
- A\. Ramponi and S\. Tonelli \(2022\)Features or spurious artifacts? data\-centric baselines for fair and robust hate speech detection\.pp\. 3027–3040\.Cited by:[§2](https://arxiv.org/html/2606.18852#S2.p1.1)\.
- J\. Robinson, C\. Chuang, S\. Sra, and S\. Jegelka \(2021\)Contrastive learning with hard negative samples\.External Links:[Link](https://arxiv.org/abs/2010.04592)Cited by:[§1](https://arxiv.org/html/2606.18852#S1.p3.1),[§2\.1](https://arxiv.org/html/2606.18852#S2.SS1.p2.1)\.
- P\. Röttger, H\. Seelawi, D\. Nozza, Z\. Talat, and B\. Vidgen \(2022\)Multilingual HateCheck: functional tests for multilingual hate speech detection models\.Seattle, Washington \(Hybrid\),pp\. 154–169\.External Links:[Link](https://aclanthology.org/2022.woah-1.15/),[Document](https://dx.doi.org/10.18653/v1/2022.woah-1.15)Cited by:[§1](https://arxiv.org/html/2606.18852#S1.p1.1)\.
- M\. Sap, D\. Card, S\. Gabriel, Y\. Choi, and N\. A\. Smith \(2019\)The risk of racial bias in hate speech detection\.pp\. 1668–1678\.Cited by:[§1](https://arxiv.org/html/2606.18852#S1.p1.1)\.
- M\. Sap, S\. Gabriel, L\. Qin, D\. Jurafsky, N\. A\. Smith, and Y\. Choi \(2020\)Social bias frames: reasoning about social and power implications of language\.Online,pp\. 5477–5490\.External Links:[Document](https://dx.doi.org/10.18653/v1/2020.acl-main.486)Cited by:[§1](https://arxiv.org/html/2606.18852#S1.p1.1),[§2](https://arxiv.org/html/2606.18852#S2.p1.1),[§4\.1](https://arxiv.org/html/2606.18852#S4.SS1.p1.1)\.
- F\. Schroff, D\. Kalenichenko, and J\. Philbin \(2015\)Facenet: a unified embedding for face recognition and clustering\.pp\. 815–823\.Cited by:[Appendix B](https://arxiv.org/html/2606.18852#A2.p5.1),[§1](https://arxiv.org/html/2606.18852#S1.p3.1),[§2\.1](https://arxiv.org/html/2606.18852#S2.SS1.p1.1),[§2\.1](https://arxiv.org/html/2606.18852#S2.SS1.p2.1)\.
- D\. Teney, Y\. Lin, S\. J\. Oh, and E\. Abbasnejad \(2023\)Id and ood performance are sometimes inversely correlated on real\-world datasets\.Advances in Neural Information Processing Systems36,pp\. 71703–71722\.Cited by:[§5\.1](https://arxiv.org/html/2606.18852#S5.SS1.p1.1)\.
- B\. Vidgen, T\. Thrush, Z\. Waseem, and D\. Kiela \(2021\)Learning from the worst: dynamically generated datasets to improve online hate detection\.Online,pp\. 1667–1682\.External Links:[Link](https://aclanthology.org/2021.acl-long.132/),[Document](https://dx.doi.org/10.18653/v1/2021.acl-long.132)Cited by:[§2](https://arxiv.org/html/2606.18852#S2.p1.1),[§4\.1](https://arxiv.org/html/2606.18852#S4.SS1.p1.1),[§5\.2](https://arxiv.org/html/2606.18852#S5.SS2.p2.5)\.
- T\. Wang and P\. Isola \(2020\)Understanding contrastive representation learning through alignment and uniformity on the hypersphere\.pp\. 9929–9939\.Cited by:[Appendix D](https://arxiv.org/html/2606.18852#A4.p1.1),[§1](https://arxiv.org/html/2606.18852#S1.p3.1),[§2\.1](https://arxiv.org/html/2606.18852#S2.SS1.p1.1),[§5\.2](https://arxiv.org/html/2606.18852#S5.SS2.p1.3)\.
- X\. Wang, X\. Han, W\. Huang, D\. Dong, and M\. R\. Scott \(2019\)Multi\-similarity loss with general pair weighting for deep metric learning\.pp\. 5022–5030\.Cited by:[§1](https://arxiv.org/html/2606.18852#S1.p2.1),[§2\.1](https://arxiv.org/html/2606.18852#S2.SS1.p1.1)\.
- Z\. Waseem and D\. Hovy \(2016\)Hateful symbols or hateful people? predictive features for hate speech detection on Twitter\.San Diego, California,pp\. 88–93\.External Links:[Link](https://aclanthology.org/N16-2013/),[Document](https://dx.doi.org/10.18653/v1/N16-2013)Cited by:[§2](https://arxiv.org/html/2606.18852#S2.p1.1)\.
- C\. Wu, R\. Manmatha, A\. J\. Smola, and P\. Krahenbuhl \(2017\)Sampling matters in deep embedding learning\.pp\. 2840–2848\.Cited by:[§1](https://arxiv.org/html/2606.18852#S1.p3.1),[§2\.1](https://arxiv.org/html/2606.18852#S2.SS1.p2.1)\.
- H\. Xuan, A\. Stylianou, and R\. Pless \(2020\)Improved embeddings with easy positive triplet mining\.pp\. 2474–2482\.Cited by:[§1](https://arxiv.org/html/2606.18852#S1.p3.1),[§2\.1](https://arxiv.org/html/2606.18852#S2.SS1.p2.1)\.
- M\. Zhang, J\. He, T\. Ji, and C\. Lu \(2024\)Don’t go to extremes: revealing the excessive sensitivity and calibration limitations of LLMs in implicit hate speech detection\.Bangkok, Thailand,pp\. 12073–12086\.External Links:[Link](https://aclanthology.org/2024.acl-long.652/),[Document](https://dx.doi.org/10.18653/v1/2024.acl-long.652)Cited by:[§1](https://arxiv.org/html/2606.18852#S1.p1.1)\.
## Appendix ASeed Report
Table[5](https://arxiv.org/html/2606.18852#A1.T5)reports macro\-F1 across four random seeds for in\-domain and cross\-domain evaluation\. When trained onIHC,BERT\(α=0\.3\\alpha\{=\}0\.3\) achieves an in\-domain mean macro\-F1 of 0\.783 \(std 0\.0025\)\. Cross\-domain evaluation yields 0\.614 \(std 0\.0119\) onSBICand 0\.592 \(std 0\.0036\) onDynaHate\. Under the same training set,HateBERT\(α=0\.4\\alpha\{=\}0\.4\) achieves 0\.764 \(std 0\.0049\) in\-domain, and 0\.650 \(std 0\.0148\) onSBICand 0\.608 \(std 0\.0035\) onDynaHatein cross\-domain evaluation\.When trained onSBIC,BERT\(α=0\.4\\alpha\{=\}0\.4\) achieves an in\-domain mean macro\-F1 of 0\.841 \(std 0\.0022\), with cross\-domain results of 0\.618 \(std 0\.0195\) onIHCand 0\.620 \(std 0\.0024\) onDynaHate\.HateBERT\(α=0\.2\\alpha\{=\}0\.2\) achieves 0\.844 \(std 0\.0035\) in\-domain, with cross\-domain results of 0\.606 \(std 0\.0243\) onIHCand 0\.604 \(std 0\.0180\) onDynaHate\. Overall, the results are stable across seeds\. The largest variance appears in theSBIC→\\rightarrowIHCtransfer setting, suggesting higher sensitivity to initialization in that direction\.
Table 5:Macro\-F1 across four seeds onImpSh\. Seed/Mean are shown in %, while Std is reported in raw F1 \(0\-1\)\.
## Appendix BSampling Strategies Ablation
To determine the optimal mining strategy for our triplet objective, we evaluate four sampling rules\. These rules govern how negative examples are selected for each anchor\-positive pair\.
RandomSelect a same\-class post at random\. This ignores the implied statement for defining negatives\.
Hard MarginUse the implied statement as positive\. Always pick the hardest negative that violates the margin\.
Semi\-HardUse the implied statement as positive\. Choose a negative inside the margin but farther from the anchor than the positive\.
Semi\-Hard \+ FallbackAttempt semi\-hard first\. If no suitable negative is found in the batch, fall back to the hard margin rule\.
Our initial hypothesis was that theHard Marginstrategy would be most effective\. By forcing the model to contend with the most confusing negative samples relative to a post’s implied meaning, we expected it to learn to separate similar insinuations effectively\.
However, the results in Table[6](https://arxiv.org/html/2606.18852#A2.T6)point decisively to the superiority ofSemi\-Hardsampling for generalization\. When trained onIHC, it achieves the highest F1 score on both cross\-domain datasets\. This strength is mirrored when training onSBIC, where Semi\-Hard again secures the best performance on theIHCcross\-domain task plus ties for the best score onDynaHate\. Its robust performance, including tying for the best in\-domain score, contrasts sharply with the volatility of other methods\. Random sampling may perform well in\-domain but fails on transfer, while Hard Margin is inconsistent across different setups\.
This empirical outcome is consistent with the original analysis of triplet loss by\(Schroffet al\.,[2015](https://arxiv.org/html/2606.18852#bib.bib17)\)\. They argue that focusing exclusively on the hardest negatives can yield unstable gradients plus lead to poor local minima early in training\. The semi\-hard approach provides more stable learning signals, balancing model improvement without risking collapse\. Given its superior and consistent performance on cross\-domain evaluation, we adopt theSemi\-Hardsampling strategy for all main experiments\.
Table 6:Macro F1 for each mining rule\. Best score in each column is bold\.#### Implementation Details of Ablation
We evaluate both BERT and HateBERT encoders on models trained with eitherIHCorSBIC\. For the semi\-hard triplet mining strategy, we swept the margin parameterα∈\{0\.1,0\.2,0\.3,0\.4,0\.5\}\\alpha\\in\\\{0\.1,0\.2,0\.3,0\.4,0\.5\\\}and selected the best\-performing configuration per model\-dataset pair based on validation performance\. The optimal margins were:α=0\.3\\alpha=0\.3for BERT trained onIHC,α=0\.4\\alpha=0\.4for HateBERT trained onIHC,α=0\.4\\alpha=0\.4for BERT trained onSBIC, andα=0\.2\\alpha=0\.2for HateBERT trained onSBIC\. we replicate only on seed 0\.
## Appendix CAlpha Study
We conducted anα\\alphahyperparameter study using the same training setup and optimization settings described in Section[4\.2](https://arxiv.org/html/2606.18852#S4.SS2)\. Each configuration was evaluated by sweepingα∈\{0\.1,0\.2,0\.3,0\.4,0\.5\}\\alpha\\in\\\{0\.1,0\.2,0\.3,0\.4,0\.5\\\}, and performance was measured using macro\-F1 averaged over multiple random seeds\. The results for both in\-domain and cross\-domain evaluations are reported in Table[7](https://arxiv.org/html/2606.18852#A3.T7)\. For each training setup, we select theα\\alphavalue that yields the best overall performance, which is highlighted in bold\.
Table 7:Alpha study onImpSh: macro\-F1 \(mean over seeds\) for in\-domain and cross\-domain evaluation across differentα\\alphavalues\. Bold indicates the selectedα\\alphaper training setup \(BERT\+IHC:α=0\.3\\alpha\{=\}0\.3, HateBERT\+IHC:α=0\.4\\alpha\{=\}0\.4, BERT\+SBIC:α=0\.4\\alpha\{=\}0\.4, HateBERT\+SBIC:α=0\.2\\alpha\{=\}0\.2\)\.
## Appendix DRepresentation quality through class alignment and uniformity
To quantitatively evaluate the structure of the learned embedding space, we use theAlignmentandUniformitymetrics proposed byWang and Isola \([2020](https://arxiv.org/html/2606.18852#bib.bib7)\)\. These metrics provide a formal way to measure two desirable properties of a representation: that similar samples should be mapped to nearby embeddings \(intra\-class compactness\) and that dissimilar samples should be spread out evenly \(inter\-class separation\)\. Embeddings are L2\-normalized before computing distances\.
## Alignment
Alignment measures the expected distance between embeddings of positive pairs\. In our context, a positive pair consists of two samples belonging to the same class\. A lower alignment score indicates that samples within the same class are more tightly clustered\. It is defined as:
ℒalign\(f;r\)≜𝔼\(x,y\)∼ppos\[‖f\(x\)−f\(y\)‖2r\]\\mathcal\{L\}\_\{\\text\{align\}\}\(f;r\)\\triangleq\\underset\{\(x,y\)\\sim p\_\{\\text\{pos\}\}\}\{\\mathbb\{E\}\}\[\\\|f\(x\)\-f\(y\)\\\|\_\{2\}^\{r\}\]\(8\)
whereffis the encoder,\(x,y\)∼ppos\(x,y\)\\sim p\_\{\\text\{pos\}\}denotes a pair of samples drawn from the positive pair distribution \(i\.e\., having the same class label\), andα\>0\\alpha\>0is a parameter \(typically set to 2\)\.
## Uniformity
Uniformity measures how well the embeddings of negative pairs are distributed across the embedding space\. A lower uniformity score indicates that dissimilar samples are spread further apart and more evenly, maximizing the entropy of the representation\. It is defined as:
ℒuniform\(f;t\)≜log𝔼\(x,y\)∼pneg\[e−t‖f\(x\)−f\(y\)‖22\]\\mathcal\{L\}\_\{\\text\{uniform\}\}\(f;t\)\\triangleq\\log\\underset\{\(x,y\)\\sim p\_\{\\text\{neg\}\}\}\{\\mathbb\{E\}\}\[e^\{\-t\\\|f\(x\)\-f\(y\)\\\|\_\{2\}^\{2\}\}\]\(9\)
where\(x,y\)∼pneg\(x,y\)\\sim p\_\{\\text\{neg\}\}denotes a pair of samples drawn from the negative pair distribution \(i\.e\., having different class labels\), andt\>0t\>0is a parameter \(typically set to 2\)\.
Together, these two metrics provide a comprehensive evaluation of the global structure of the embedding space, quantifying both the cohesion within classes and the separation between them\.Similar Articles
Cross-Platform Chinese Offensive Comment Detection via Dual-Threshold Hard Example Mining
This paper proposes a dual-threshold hard example mining strategy for cross-platform Chinese offensive comment detection, addressing performance degradation due to domain shift. The method fine-tunes a RoBERTa model on the COLD dataset and adapts it to four Chinese social media platforms with minimal labeled data.
Simulating Hate Speech Cascades with Multi-LLM Agents: Empirical Grounding, Modeling Fidelity, and Intervention Strategies
This paper studies hate speech cascades on Bluesky and uses multi-LLM agents to simulate them, finding that such simulations reproduce key patterns like stance monoculture and toxicity-delta direction, and that amplifier targeting on dense networks yields 7.5–12.9% reduction in hateful content with low benign collateral.
IYKYK (But AI Doesn't): Automated Content Moderation Does Not Capture Communities' Heterogeneous Attitudes Towards Reclaimed Language
Researchers from UCLA examine how automated content moderation tools, including Perspective API, fail to distinguish between reclaimed and hateful uses of slurs for LGBTQIA+, Black, and women communities. The study finds low inter-annotator agreement even among in-group members and poor alignment between community judgments and AI moderation tools, highlighting the need for context-sensitive approaches.
AHA-Memes: A Fine-Grained Multimodal Benchmark for Understanding Hate in Arabic Memes
This paper introduces AHA-Memes, the first large-scale Arabic hateful meme benchmark with fine-grained multi-label annotations, covering 5K manually annotated and ~66K silver-labeled memes, and benchmarks various multimodal models for culturally grounded hate detection.
Majority Vote Silences Minority Values: Annotator Disagreement at the Hate/Offensive Boundary in HateXplain
This paper finds that 42.6% of annotator disagreement in HateXplain concentrates at the hate/offensive boundary, demonstrating that majority vote silences minority values and leads to models being wrong but highly confident on contested inputs.