通过强化目标与上下文关系注意力,提升隐性仇恨检测效果
AmpleHate: Amplifying the Attention for Versatile Implicit Hate Detection
- 用实体识别和[CLS] token捕捉显性与隐性目标
- 将目标-上下文关系向量注入句表示,提升关键信号
- 效果超越对比学习基线82.14%,且更贴近人类判断
隐性仇恨言论检测因依赖上下文理解而非明显攻击词汇而具有挑战性。现有方法多采用对比学习,在区分仇恨与非仇恨句子上表现良好。但人类检测时会先识别文本中的具体目标,再分析其与上下文的关系。受此启发,我们提出AmpleHate,一种模仿人类推理过程的新方法。该方法利用预训练命名实体识别模型识别显性目标,并通过[CLS] token捕获隐性目标信息;计算显性、隐性目标与句子上下文间的注意力关系,并将这些关系向量直接注入最终句表示中,从而增强目标-上下文关系的关键信号。实验表明,AmpleHate在多项指标上达到当前最优,平均性能超越对比学习基线82.14%,且收敛更快。定性分析显示,AmpleHate生成的注意力模式与人类判断高度一致,体现其可解释性与鲁棒性。代码已开源:https://github.com/leeyejin1231/AmpleHate。
原文摘要 · Abstract (English)
Implicit hate speech detection is challenging due to its subtlety and reliance on contextual interpretation rather than explicit offensive words. Current approaches rely on contrastive learning, which are shown to be effective on distinguishing hate and non-hate sentences. Humans, however, detect implicit hate speech by first identifying specific targets within the text and subsequently interpreting how these target relate to their surrounding context. Motivated by this reasoning process, we propose AmpleHate, a novel approach designed to mirror human inference for implicit hate detection. AmpleHate identifies explicit target using a pretrained Named Entity Recognition model and capture implicit target information via [CLS] tokens. It computes attention-based relationships between explicit, implicit targets and sentence context and then, directly injects these relational vectors into the final sentence representation. This amplifies the critical signals of target-context relations for determining implicit hate. Experiments demonstrate that AmpleHate achieves state-of-the-art performance, outperforming contrastive learning baselines by an average of 82.14% and achieve faster convergence. Qualitative analyses further reveal that attention patterns produced by AmpleHate closely align with human judgement, underscoring its interpretability and robustness. Our code is publicly available at: https://github.com/leeyejin1231/AmpleHate.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。