Skip to main content
QUICK REVIEW

[论文解读] Hate Speech and Offensive Language Detection using an Emotion-aware Shared Encoder

Khouloud Mnassri, Praboda Rajapaksha|arXiv (Cornell University)|Feb 17, 2023
Hate Speech and Cyberbullying DetectionComputer Science被引用 3
一句话总结

本文提出了一种多任务学习框架,利用 BERT 和 mBERT 作为共享编码器,联合检测仇恨言论和攻击性语言,并整合外部情感特征以提升在数据不平衡数据集上的性能。该模型在仇恨言论检测中实现了 3% 的性能提升,并通过共享表征和情感知识显著减少了误报。

ABSTRACT

The rise of emergence of social media platforms has fundamentally altered how people communicate, and among the results of these developments is an increase in online use of abusive content. Therefore, automatically detecting this content is essential for banning inappropriate information, and reducing toxicity and violence on social media platforms. The existing works on hate speech and offensive language detection produce promising results based on pre-trained transformer models, however, they considered only the analysis of abusive content features generated through annotated datasets. This paper addresses a multi-task joint learning approach which combines external emotional features extracted from another corpora in dealing with the imbalanced and scarcity of labeled datasets. Our analysis are using two well-known Transformer-based models, BERT and mBERT, where the later is used to address abusive content detection in multi-lingual scenarios. Our model jointly learns abusive content detection with emotional features by sharing representations through transformers' shared encoder. This approach increases data efficiency, reduce overfitting via shared representations, and ensure fast learning by leveraging auxiliary information. Our findings demonstrate that emotional knowledge helps to more reliably identify hate speech and offensive language across datasets. Our hate speech detection Multi-task model exhibited 3% performance improvement over baseline models, but the performance of multi-task models were not significant for offensive language detection task. More interestingly, in both tasks, multi-task models exhibits less false positive errors compared to single task scenario.

研究动机与目标

  • 通过多任务学习解决仇恨言论与攻击性语言检测中的数据稀缺与类别不平衡问题。
  • 通过在相关任务(攻击性内容与情感分类)之间共享表征,提升模型泛化能力并减少过拟合。
  • 探究外部情感特征作为辅助信号在低资源与数据不平衡设置下提升检测性能的有效性。
  • 评估 BERT 与 mBERT 作为共享编码器在单语与多语上下文中用于攻击性语言检测的性能。
  • 证明情感感知多任务学习相比单任务基线模型能显著减少误报错误。

提出的方法

  • 使用共享的 Transformer 编码器(BERT 或 mBERT)为仇恨言论与攻击性语言检测任务提取上下文表征。
  • 通过外部情感标注语料库将情感分类作为辅助任务,提供额外监督并提升数据效率。
  • 在端到端的多任务学习设置中训练模型,其中共享编码器学习攻击性内容与情感特征之间的联合表征。
  • 使用早停法与学习率调度来优化训练过程,尤其在数据不平衡的数据集上防止过拟合。
  • 采用加权交叉熵损失以处理仇恨言论与攻击性语言数据集中存在的类别不平衡问题。
  • 使用标准 NLP 指标(如 F1-macro 与准确率)对比多任务模型(MTL)与单任务基线模型(STL)的性能。
Figure 1: Overview of the BERT and mBERT-based: Single-task, and Multitask leveraging emotions representations (auxiliary task) model architecture in the detection of Hate speech “HS” and Offensive language “OFF” (main tasks) from text input
Figure 1: Overview of the BERT and mBERT-based: Single-task, and Multitask leveraging emotions representations (auxiliary task) model architecture in the detection of Hate speech “HS” and Offensive language “OFF” (main tasks) from text input

实验结果

研究问题

  • RQ1将情感特征作为辅助任务是否能提升在数据不平衡数据集上仇恨言论与攻击性语言检测模型的性能?
  • RQ2与单任务学习相比,使用共享编码器的多任务学习在分类准确率与误报率方面表现如何?
  • RQ3与单语 BERT 相比,使用 mBERT 作为共享编码器是否能提升仇恨与攻击性语言检测中的跨语言泛化能力?
  • RQ4情感特征在多大程度上减少了误分类错误,尤其是攻击性内容检测中的误报?
  • RQ5当联合学习攻击性内容与情感分类任务时,不同预训练模型(BERT 与 mBERT)的性能表现如何?

主要发现

  • 与单任务基线模型相比,多任务模型在仇恨言论检测中实现了 3% 的性能提升,F1-macro 分数分别为 BERT 的 0.9288 与 mBERT 的 0.9204。
  • 尽管仇恨言论检测性能有所提升,但攻击性语言检测的性能提升并不显著,可能是因为 Davidson-OFF 数据集中攻击性样本占比过高(91%)。
  • 在仇恨言论检测中,mBERT-MTL 模型的误报错误数量少于基于 BERT 的集成模型,尤其在少数类(仇恨言论)中表现更优,表明其具有更强的鲁棒性。
  • 在攻击性语言检测中,BERT-MTL 模型实现了 98.94% 的真正例率与仅 1.06% 的误报率,显著低于 BERT-STL 模型的 14.40%。
  • 混淆矩阵证实,多任务模型在两个任务中均持续减少了误分类错误,尤其在降低误报方面表现突出。
  • 情感知识在高度不平衡的数据集中仍能提升分类性能,表明情感特征为攻击性语言检测提供了有用的归纳偏置。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。