The fast spread of hate speech on social media impacts the Internet environment and our society by increasing prejudice and hurting people. Detecting hate speech has aroused broad attention in the field of natural language processing. Although hate speech detection has been addressed in recent work, this task still faces two inherent unsolved challenges. The first challenge lies in the complex semantic information conveyed in hate speech, particularly the interference of insulting words in hate speech detection. The second challenge is the imbalanced distribution of hate speech and non-hate speech, which may significantly deteriorate the performance of models. To tackle these challenges, we propose a novel dual contrastive learning (DCL) framework for hate speech detection. Our framework jointly optimizes the self-supervised and the supervised contrastive learning loss for capturing span-level information beyond the token-level emotional semantics used in existing models, particularly detecting speech containing abusive and insulting words. Moreover, we integrate the focal loss into the dual contrastive learning framework to alleviate the problem of data imbalance. We conduct experiments on two publicly available English datasets, and experimental results show that the proposed model outperforms the state-of-the-art models and precisely detects hate speeches.
翻译:社交媒体上有害言论的快速传播通过加剧偏见和伤害他人,影响着网络环境及整个社会。有害言论检测已引起自然语言处理领域的广泛关注。尽管近期的研究已涉足有害言论检测,但该任务仍面临两个固有的未解决挑战。第一个挑战在于有害言论所传达的复杂语义信息,特别是侮辱性词汇对检测的干扰。第二个挑战是有害言论与非有害言论分布的不均衡性,这可能会显著降低模型的性能。为应对这些挑战,我们提出了一种新颖的双对比学习框架用于有害言论检测。该框架联合优化自监督对比学习和监督对比学习损失,以捕获超越现有模型所用词级情感语义的跨度级信息,尤其针对包含辱骂和侮辱性词汇的言论检测。此外,我们将焦点损失整合到双对比学习框架中,以缓解数据不均衡问题。我们在两个公开的英文数据集上进行了实验,结果表明所提模型优于当前最先进的模型,能够精准检测有害言论。