arXiv:2506.21795cs.CLcs.LG2025-06被引 5

用XLNet检测社交媒体辱骂内容,效果优于BERT。

Offensive Language Detection on Social Media Using XLNet

  • 基于XLNet的模型捕捉上下文信息,提升语言理解能力。
  • 在OLID数据集上,XLNet对攻击性内容识别准确率更高。
  • 适合需要高效文本审核的平台或研究者使用。

社交媒体中的文字交流(如聊天、评论、微博)虽提升了用户互动,但也导致仇恨言论、种族歧视等攻击性内容激增。由于用户生成内容体量巨大,人工审核不可行,亟需自动化检测系统。深度学习模型,特别是利用迁移学习的大规模预训练模型,在自然语言理解方面表现优异。本研究提出一种基于XLNet(一种广义自回归预训练方法)的自动攻击性语言检测模型,并与广泛使用的BERT模型在进攻性语言识别数据集(OLID)上进行对比。该数据集为基准推特数据集,包含层级标注。实验结果表明,XLNet在检测攻击性内容及分类攻击类型方面优于BERT;而BERT在识别攻击目标方面略胜一筹。此外,过采样与欠采样策略有效缓解类别不平衡问题,提升分类性能。研究验证了迁移学习及基于XLNet的架构在构建社交媒体攻击性语言检测系统中的潜力。

原文摘要 · Abstract (English)

The widespread use of text-based communication on social media-through chats, comments, and microblogs-has improved user interaction but has also led to an increase in offensive content, including hate speech, racism, and other forms of abuse. Due to the enormous volume of user-generated content, manual moderation is impractical, which creates a need for automated systems that can detect offensive language. Deep learning models, particularly those using transfer learning, have demonstrated significant success in understanding natural language through large-scale pretraining. In this study, we propose an automatic offensive language detection model based on XLNet, a generalized autoregressive pretraining method, and compare its performance with BERT (Bidirectional Encoder Representations from Transformers), which is a widely used baseline in natural language processing (NLP). Both models are evaluated using the Offensive Language Identification Dataset (OLID), a benchmark Twitter dataset that includes hierarchical annotations. Our experimental results show that XLNet outperforms BERT in detecting offensive content and in categorizing the types of offenses, while BERT performs slightly better in identifying the targets of the offenses. Additionally, we find that oversampling and undersampling strategies are effective in addressing class imbalance and improving classification performance. These findings highlight the potential of transfer learning and XLNet-based architectures to create robust systems for detecting offensive language on social media platforms.

自然语言处理攻击性语言XLNet

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。