节点文献

基于主题记忆和注意力机制的仇恨和攻击性言论识别算法研究

Research on Algorithm of Hate Speech and Offensive Language Detection Based on Topic Memory and Attention Mechanism

【作者】 陈静;

【导师】 马坤;

【作者基本信息】 济南大学 , 计算机科学与技术, 2022, 硕士

【摘要】 社交网络和微博网站的迅猛发展,将世界各地的人们紧密的联系在一起。现有的一些社交软件,如微博、推特和脸书等平台给人们提供了自由表达观点的机会。但是由于其服务的用户来自不同文化背景,且在非面对面的沟通中,人们之间的沟通变得更加直接,导致软件中滋生出大量的仇恨和攻击性言论,对他人的身心均造成伤害,造成网络环境的污染。由于每日的数据量呈指数级增长,依靠人工处理这些仇恨和攻击性言论已经有心无力,因此迫切的需要能够自动识别仇恨和攻击性言论的机制,自动识别互联网中的仇恨和攻击性言论刻不容缓。目前针对仇恨和攻击性言论识别的任务主要通过仇恨词典进行识别,需要对词典进行及时更新。仇恨词典的频繁维护需要大量的人力物力,因此创建高效的分类算法是非常有必要的。由于目前的社交软件中均存在字符限制,因此大多数的文本都是以短文本的方式存在。而短文本数据存在特征稀疏性问题,在进行文本分类时,难以提取到有用的特征。同时在文本中普遍存在一词多义问题,诸多问题给仇恨和攻击性言论识别问题带来了困难。针对以上问题,本文提出了基于主题记忆和注意力机制的仇恨和攻击性言论识别方法,其中主要包含两个模型,分别为:面向仇恨和攻击性言论的异构信息模型HI-HOL(Heterogeneous Information model for Hate speech and Offensive Language detection,简称HGAT-HOL)和面向仇恨和攻击性言论的主题记忆模型TM-HOL(Topic Memory model for detection of Hate speech and Offensive Language,简称TM-HOL)。这两个模型中的主要贡献如下:(1)用于仇恨和攻击性言论识别的异构信息网络(Heterogeneous Information Network for Hate speech and Offensive Language detection,简称HIN-HOL):提出面向仇恨和攻击性言论识别的异构信息网络模型,用于捕获短文本、主题词和实体之间的关系,达到丰富短文本特征的目的。同时通过计算实体词和主题词之间的相似度,解决文本中存在的一词多义问题。(2)用于仇恨和攻击性言论识别的神经主题模型(Neural Topic Model for Hate speech and Offensive Language detection,简称NTM-HOL):提出NTM-HOL神经主题模型,该模型由编码器和解码器组成,用于生成潜在的主题,以丰富短文本特征。NTM-HOL的神经元能够实现向零均值和单位方差收敛,避免了重要信息的丢失问题。(3)用于仇恨和攻击性言论识别的主题记忆机制(Topic Memory Mechanism for Hate speech and Offensive Language detection,简称TMM-HOL):提出TMM-HOL主题记忆机制,由两个记忆内存矩阵和一个仇恨特征矩阵构成。两个记忆矩阵分别对应主题词和文本,利用改进计算层与仇恨特征矩阵学习语法特征。该机制可以使句子和特征更好地融合,解决整体特性丢失问题。为评估模型性能,本文在三个数据集上进行多组对比实验。实验结果表明,提取主题词和实体词可以有效地解决短文本特征稀疏问题。HI-HOL模型的Weighted-F1、准确率、宏平均查准率和宏平均召回率分别达到0.8998、0.8954、0.8263和0.6416。TM-HOL模型的最优Weighted-F1、准确率、宏平均查准率和宏平均召回率分别达到0.9042、0.9036、0.7718和0.7597。这些实验结果表明本文设计的模型能够精准的识别出仇恨和攻击性言论。

【Abstract】 The rapid development of social networking and micro-blogging sites has brought people all over the world together.Certain social media applications such as Sina Micro-Blog,Twitter,Facebook,and Instagram provide opportunities for people to express their ideas and opinions freely.However,as the users of its services come from different cultural backgrounds,and the communication between people becomes more direct in non-face-toface communication,a large number of hate speech and offensive language are bred in the software,causing physical and mental harm to others and pollution of the network environment.At the same time,the network environment has been polluted.The amount of data we produce every day is truly mind-boggling,and it is very difficult to process these texts manually.Methods that automatically detect hate speech and offensive language are required.Currently,the task of detect of hate speech and offensive language is mainly based on hate dictionary,and this method is based on already-built dictionaries.This method requires updating the hate dictionary.The frequent maintenance of hate dictionary requires a lot of manpower and material resources,so it is necessary to create efficient classification algorithm.Due to the character limit in current social software,most text exists in a short form.The data sparsity of short text makes it difficult to extract useful information.At the same time,polysemy is common in the text,which brings difficulties to the detection of hate speech and offensive language.To address the problem of data sparsity and polysemy,we have proposed method what is based on a topic memory model and attention mechanism for hate speech and offensive language detection.It contains two models,respectively: HI-HOL(Heterogeneous Information Model for Hate Speech and Offensive Language Detection,abbreviated as HI-HOL)and TM-HOL(Topic Memory Model for Detection of Hate Speech and Offensive Language,abbreviated as TM-HOL).The main contributions of the thesis are the following:(1)Heterogeneous Information Network for Hate speech and Offensive Language detection(abbreviated as HIN-HOL): HIN-HOL is proposed.The network is used to capture the relationships among short texts,topic words and entities,so as to enrich the features of short texts.To solve the problem of polysemy,we map the entities to Wikipedia with the entity linking tool,at the same time,cosine similarity between entities is calculated.(2)Neural Topic Model for Hate speech and Offensive Language detection(abbreviated as NTM-HOL): The NTM-HOL model,which consists of encoder and decoder,is proposed to generate topic words to enrich short text features.Neuron activation of NTM-HOL automatically converge toward zero mean and unit variance.This mechanism avoided the loss of essential information easily.(3)Topic Memory Mechanism for Hate speech and Offensive Language detection(abbreviated as TMM-HOL): The TMM-HOL is proposed,which consists of two memory matrices and a hate feature matrix.Two memory matrices correspond to the topic words and the text,and the hate feature matrix in the modified computing layer is used to learn the syntactic features.It can make sentences and features merge better.This mechanism can solve the problem of losing the overall characteristics.To evaluate the performance of classification,several comparative experiments are carried out on three data sets.According to the experimental results,extracting topic words and entities can effectively solve the problem of data sparsity in short texts.The Weighted-F1,Accuracy,macro-average precision and macro-average recall of HGAT-HOL model were0.8998,0.8954,0.8263 and 0.6416,respectively.The Weighted-F1,Accuracy,macro-average precision and macro-average recall of TM-HOL model reached 0.9042,0.9036,0.7718,and0.7597,respectively.These experimental results show that our model can accurately detect hate speech and offensive language.

  • 【网络出版投稿人】 济南大学
  • 【网络出版年期】2023年 03期
节点文献中: