Journal of Computer Applications ›› 2024, Vol. 44 ›› Issue (4): 1065-1071.DOI: 10.11772/j.issn.1001-9081.2023040533

• Advanced computing • Previous Articles     Next Articles

Offensive speech detection with irony mechanism

Haihan WANG, Yan ZHU()   

  1. School of Computing and Artificial Intelligence,Southwest Jiaotong University,Chengdu Sichuan 611756,China
  • Received:2023-05-06 Revised:2023-07-20 Accepted:2023-07-24 Online:2024-04-22 Published:2024-04-10
  • Contact: Yan ZHU
  • About author:WANG Haihan, born in 1999, M. S. candidate. His research interests include natural language processing.
    ZHU Yan, born in 1965, Ph. D., professor. Her research interests include social network analysis and computing, big data and data mining.
  • Supported by:
    Sichuan Provincial Science and Technology Plan Project(2019YFSY0032)

融合反讽机制的攻击性言论检测

王海涵, 朱焱()   

  1. 西南交通大学 计算机与人工智能学院,成都 611756
  • 通讯作者: 朱焱
  • 作者简介:王海涵(1999—),男,山东潍坊人,硕士研究生,主要研究方向:自然语言处理
    朱焱(1965—),女,广西桂林人,教授,博士,CCF会员,主要研究方向:社交网络分析计算、大数据与数据挖掘。yzhu@swjtu.edu.cn
  • 基金资助:
    四川省科技计划项目(2019YFSY0032)

Abstract:

Offensive speech on the internet seriously disrupts the normal network order and destroys the network environment for healthy communication. Existing detection technologies focus on the distinctive features in the text, and are difficult to discover more implicit attack methods. For the above problems, an offensive speech detection model BSWD (Bidirectional Encoder Representation from Transformers-based Sarcasm and Word Detection) incorporating irony mechanism was proposed. First, a model based on irony mechanism Sarcasm-BERT was proposed to detect semantic conflicts in speech. Secondly, a fine-grained word offensive feature extraction model WordsDetect was proposed to detect offensive words in speech. Finally, the model BSWD was obtained by fusing the above two models. The experimental results show that the accuracy, precision, recall, and F1 score indicators of the proposed model are generally improved by 2%, compared with the BERT(Bidirectional Encoder Representation from Transformers) and HateBERT methods. BSWD significantly improves the detection performance and can better detect implicit offensive speech. Compared with the SKS (Sentiment Knowledge Sharing) and BiCHAT (Bi-LSTM with deep CNN and Hierarchical ATtention) methods, BSWD has stronger generalization ability and robustness. The above results verify that BSWD can effectively detect the implicit offensive speech.

Key words: irony detection, offensive speech detection, fine-grained feature, implicit attack, attention mechanism

摘要:

互联网上的攻击性言论严重扰乱了正常网络秩序,破坏了健康交流的网络环境。现有的检测技术更关注文本中的鲜明特征,难以发现更隐晦的攻击方式。针对上述问题,提出融合反讽机制的攻击性言论检测模型BSWD(Bidirectional Encoder Representation from Transformers-based Sarcasm and Word Detection)。首先,提出基于反讽机制的模型Sarcasm-BERT,以检测言论中的语义冲突;其次,提出细粒度词汇攻击性特征提取模型WordsDetect,检测言论中的攻击性词汇;最后,融合两种模型得到BSWD。实验结果表明,与BERT(Bidirectional Encoder Representation from Transformers)、HateBERT模型相比,所提模型的准确率、精确率、召回率和F1分数指标大部分能提升2%,显著提高了检测性能,更能发现隐含的攻击性言论;同时,与SKS(Sentiment Knowledge Sharing)、BiCHAT(Bidirectional long short-term memory with deep Convolution neural network and Hierarchical ATtention)模型相比,具有更强的泛化能力和鲁棒性。以上结果验证了BSWD检测隐晦攻击性言论的有效性。

关键词: 反讽检测, 攻击性言论检测, 细粒度特征, 隐晦攻击, 注意力机制

CLC Number: