A rumor detection method and system integrating sentiment mining
By combining a deep learning network model with multi-level attention and knowledge graphs, and utilizing syntactic dependencies and external knowledge, the problem of insufficient utilization of context and sentiment information in rumor detection is solved, thereby improving the accuracy and robustness of rumor detection.
Patent Information
- Application Number
- CN202211139407.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-19
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2042-09-19
AI Technical Summary
Existing rumor detection methods are insufficient in utilizing sentence context and sentiment information, resulting in low detection accuracy, and they also ignore syntactic dependency information and external knowledge information.
We employ a deep learning network model based on multi-level attention and knowledge graphs, combining bidirectional long short-term memory networks, graph convolutional networks, and multi-head attention mechanisms with syntactic dependencies and external knowledge to enhance the feature representation of rumor detection.
It improves the accuracy and robustness of rumor detection, and can better utilize fine-grained semantic and sentiment information to enhance feature representation and improve detection accuracy.
Smart Images

Figure CN115422945B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of natural language processing technology, and in particular to a rumor detection method and system that integrates sentiment mining. Background Technology
[0002] Rumor detection, also known as fake news detection, is an important task in the field of Natural Language Processing (NLP). Rumor detection can be viewed as a supervised learning text classification problem, generally categorized into two types: rumors and non-rumors. With the development of internet technology, social networking platforms such as Weibo and Twitter have rapidly become popular in people's lives. On these platforms, people are not only receivers of information but also creators of content. Social networking platforms have greatly accelerated the speed and depth of information exchange between people. They can provide timely and comprehensive information about events happening around the world, leading to a growing number of people actively participating in discussions and exchanges on trending topics. This discussion and exchange, on the one hand, promotes the dissemination and spread of news, making it easier and faster for people to understand what is happening. However, in this convenient environment, social networking platforms also lower the cost of spreading misinformation. False rumors typically use fake or fabricated images and inflammatory language to mislead readers and spread rapidly. The spread of false rumors can have large-scale negative effects on society, causing social unrest.
[0003] In recent years, with the rise of deep learning technology, it has been widely applied to rumor detection tasks. The most commonly used neural networks are Convolutional Neural Networks (CNNs) and Recurrent Neural Networks (RNNs). Because CNNs perform well in capturing semantic information from text, some researchers have applied them to content-based rumor detection. However, this network cannot fully utilize the contextual information within sentences, which is crucial for modeling the semantic relationship between an aspect and its context. Therefore, the performance of CNN-based neural network models is limited in rumor detection tasks. To address this problem, many researchers have adopted RNNs, especially Long Short-Term Memory (LSTM) and Gated Recurrent Units (GRUs), to extract the contextual semantic information of rumors. Unlike CNNs, RNNs treat a sentence as a sequence of words, taking each word in chronological order and using the output of the hidden layer as the input to the next hidden layer, continuously learning the contextual information in the sequence data. Ma et al. used recurrent neural networks to capture the semantic changes between each source post and its reposts and comments, and made predictions based on these semantic changes. RNN-based neural network models significantly outperform CNN-based neural network models in rumor detection.
[0004] Researchers point out that the rumor-like characteristics of a given post are often determined by a few keywords, rather than by all the words in the context. Furthermore, RNNs cannot accurately estimate the contribution of different context words to the overall semantics. In contrast, attention mechanisms can capture the importance of each context word by calculating its attention weight to the semantics of a given post and using this attention weight to compute the semantic representation of the post.
[0005] However, most of these neural network models neglect the sentiment information in posts, which represents the publisher's emotion towards the content, crucial for accurately determining the post's authenticity. Recently, scholars have focused on discovering unique sentiment features between fake and genuine rumors. Ajao et al. verified a relationship between the authenticity (true or false) of news and the use of sentiment words, and designed a sentiment feature (the ratio of negative to positive words) to help detect fake news. Furthermore, Giachanou et al. extracted sentiment features from news content based on a sentiment lexicon for rumor detection. However, existing research neglects the syntactic dependencies and external knowledge information needed for sentiment analysis, resulting in insufficient extraction of sentiment information. Summary of the Invention
[0006] This invention proposes a rumor detection method and system that integrates sentiment mining, which can improve the accuracy of rumor detection on Weibo.
[0007] The present invention adopts the following technical solution.
[0008] A rumor detection method integrating sentiment analysis, the method comprising the following steps;
[0009] Step A: Collect and extract the text content and comments of source posts from social media, and manually label the source posts with real tags to form the training dataset DT;
[0010] Step B: Using the training dataset DT, train a deep learning network model N based on multi-level attention and knowledge graph. The training content includes analyzing the authenticity of source posts and predicting the authenticity labels of source posts.
[0011] Step C: Input the text content and comments of the source post into the trained deep learning network model N to obtain the authenticity label of the source post.
[0012] Step B includes the following steps;
[0013] Step B1: Encode each training sample in the training dataset DT to obtain the initial representation vector T of the text content. st The initial representation vector T of the comment content rt and the syntactic adjacency matrix A st ;
[0014] Step B2: Based on the syntactic knowledge subgraph construction algorithm, generate the corresponding syntactic knowledge subgraph SK of the text content from the knowledge graph and the syntactic dependency graph, and obtain its adjacency matrix A. SK Then, its nodes are encoded to obtain the node knowledge representation vector H of the syntactic knowledge subgraph SK. SK ;
[0015] Step B3: Convert the initial text content representation vector T obtained in Step B1 into a vector. 虻 The input is fed into a bidirectional long short-term memory network (Bi-LSTM) to obtain a context-enhanced text content representation vector H. st , let U st =H st Then, the representation vector T sk and the initial representation vector T of the comment content rt The data is fed into a multi-head cross-attention mechanism to obtain a comment representation vector P based on the text content. sr At the same time, the representation vector T st The input is fed into a multi-head self-attention mechanism to obtain a text content augmentation representation vector Ps; then, the text content-based comment representation vector Ps is... sr The text content augmentation representation vector Ps is input into the pooling layer for average pooling to obtain the average pooled sentence representation vector of the comment content. and average pooling text content augmentation representation vector ;
[0016] Step B4: Represent the node knowledge vector H of subgraph SK SK and the representation vector U obtained in step B3 st The inputs are fed into two graph convolutional networks with K layers, denoted as Text Knowledge Graph Convolutional Network (SKGCN) and Text Content Graph Convolutional Network (SCGCN), respectively, to learn external knowledge information and extract syntactic information. Simultaneously, a knowledge guidance mechanism is used to guide each layer node of the Text Content Graph Convolutional Network (SCGCN) with the Text Knowledge Graph Convolutional Network (SKGCN), resulting in the graph knowledge representation vector V of the source post. sks ;
[0017] Step B5: Use a cross-attention mechanism to process the graph knowledge representation vector V obtained in step B4. sks and sentence representation vector U st The fusion yields a knowledge-enhanced sentence-level representation vector E. sd To further improve the model's ability to extract information; then, through a multi-head self-attention mechanism, E sd Further strengthening yields sentence representation E that aggregates word-level information. mtThen, a gating mechanism is used to reduce noise from non-standard sentences, resulting in the source post sentiment representation vector E. sf ;
[0018] Step B6: Convert the average pooled comment sentence representation vector corresponding to the source post. and average pooling text content augmentation representation vector The inputs are fed into a multi-head cross-attention mechanism, and the comprehensive semantic representation C of the comment content is obtained through average pooling. sr Then, average pooling is used to enhance the text content representation vector. The comprehensive semantic representation of the comment content C sr The input is fed into the fusion gating mechanism to obtain the fine-grained semantic representation vector V of the source post. t ;
[0019] Step B7: Convert the sentiment representation vector E obtained in step B5 into... sf The fine-grained semantic representation vector V of the source post obtained in step B6 t By combining these, we obtain the final representation vector E. f Then E f Input the fully connected layer and the softmax function to obtain the prediction results; then, based on the target loss function, use the backpropagation method to calculate the gradient of each parameter in the deep learning network model, and use the stochastic gradient descent method to update each parameter;
[0020] Step B8: When the iterative change of the loss value generated by the deep learning network model N is less than the given threshold, or when the maximum number of iterations is reached, the training process of the deep learning network model N is terminated.
[0021] Step B1 includes the following steps;
[0022] Step B11: Traverse the training set DT, segment the text content and comment content of the source posts and remove stop words. Each training sample in DT is represented as dt = (st, rt, l); where st is the text content of the source post, rt is the comment content corresponding to the source post, and l is the authenticity label corresponding to the source post, l∈{general facts, rumors, unverified rumors, debunked rumors}.
[0023] The text content 'st' in the source post is represented as:
[0024]
[0025] in, Let be the i-th word in the text content st, where i = 1, 2, ..., n, and n is the number of words in the source post text content st;
[0026] The comments in the original post are represented as follows:
[0027]
[0028] in, Let be the j-th word in the comment content rt, where i = 1, 2, ..., m, and m is the number of words in the comment content rt;
[0029] Step B12: Obtain the text content from step B11 Encode the text content st to obtain the initial representation vector T. st ;T st Expressed as:
[0030]
[0031] Among them, in the pre-trained word vector matrix It can be found in the middle For the i-th word The corresponding word vector, d represents the dimension of the word vector, and |V| is the number of words in the dictionary V;
[0032] Step B13: Obtain comments from step B11. Encode the initial representation vector T of the comment content rt. rt ;T rt Expressed as:
[0033]
[0034] Among them, in the pre-trained word vector matrix It can be found in the middle Indicates the j-th word The corresponding word vector, d represents the dimension of the word vector, and |V| is the number of words in the dictionary V;
[0035] Step B14: Perform syntactic dependency parsing on the text content st to obtain the corresponding syntactic dependency tree (DTD) and the n-order syntactic adjacency matrix A. st The syntactic dependency tree (DTD) is represented as follows:
[0036]
[0037] in, Words representing text content and text content words There is a syntactic dependency between them.
[0038] Step B2 includes the following steps;
[0039] Step B21: Using each original word node in the syntactic dependency tree (DTD) as the root node, extend the knowledge graph by creating hop layers to generate child nodes. For each layer, select u nodes that are connected to the nodes of the previous layer by edges in the knowledge graph as nodes of that layer. That is, each seed node has... By expanding the child nodes, we finally obtain a syntactic knowledge subgraph SK with a total number of nodes z = n + n*q, and a z-order adjacency matrix A. SK The syntactic knowledge subgraph SK is represented as follows:
[0040]
[0041] in, Knowledge node words It is a word in the text content. The expansion nodes, Knowledge node words It is a knowledge node word Knowledge extension sub-nodes Words representing text content and text content words There is a syntactic dependency between them, u is the number of nodes selected in the knowledge graph, and hop is the number of layers in the topology;
[0042] Step B22: Encode the nodes of the syntactic knowledge subgraph SK using knowledge graph embedding to obtain its node knowledge representation vector. make As the initial input to the text knowledge graph convolutional network SKGCN; in the pre-trained knowledge word vector matrix It can be found in the middle For the i-th word The corresponding knowledge word vector, where d represents the dimension of the knowledge word vector, and |V| is the number of words embedded in the knowledge word V.
[0043] Step B3 includes the following steps;
[0044] Step B31: Initialize the representation vector of the text content. The forward and backward layers of the first bidirectional long short-term memory network are input sequentially to obtain the state vector sequences of the forward hidden layer and the backward hidden layer, respectively. and in i = 1, 2, ..., n, f is the activation function; after concatenation, a context-enhanced text content representation vector is obtained. in, i = 1, 2, ..., n, ":" indicates a vector concatenation operation; H st That is, U st ;
[0045] Step B32: Initialize the representation vector T of the text content st st The initial representation vector T of the comment content rt rt The text is fed into a multi-head cross-attention mechanism to obtain a comment representation vector P based on the text content. sr , which is calculated as follows:
[0046] P sr =MultiHead(T st , T rt , T rt Formula 7;
[0047] MultiHead(Q′,K′,V′)=Concat(head1,head2,…,head h )W o Formula 8;
[0048] head i =Attention(Q′W) i Q , K′W i K ,V′W i v Formula Nine;
[0049]
[0050] Where MultiHead represents the multi-head attention mechanism, Q′, K′, and V′ represent the input vectors of the multi-head attention mechanism, and T represents the initial representation vector of the text content. st As matrix Q′, the initial representation vector T of the corresponding comment content rt is... rt As K′ and V′; head i The output vector is calculated by applying the Attention (·) mechanism to the i-th subvector of Q′, K′, V′, where h is the number of heads in the multi-head attention mechanism, and W is the number of heads in the multi-head attention mechanism. o For the training parameters of the multi-head attention mechanism, W i Q W i K , It is the weight matrix of the linear projection. It is a scaling factor;
[0051] Step B33: Initialize the text content representation vector T st The input is fed into a multi-head self-attention mechanism to obtain the text content augmentation representation vector P. s , which is calculated as follows:
[0052] P s =MultiHead(T st T st T st Formula 11;
[0053] MultiHead(Q′,K′,V′)=Concat(head1,head2,…,head h Formula Twelve (W1);
[0054] head i =Attention(Q′W) i Q , K′W i K ,V′W i V Formula Thirteen;
[0055]
[0056] Where MultiHead represents the multi-head attention mechanism, Q′, K′, and V′ represent the input vectors of the multi-head attention mechanism, and T represents the initial representation vector of the text content. st As matrices Q′, K′, and V′; head i The output vector is calculated by applying the Attention (·) mechanism to the i-th subvector of Q′, K′, V′, where h is the number of heads in the multi-head attention mechanism, W1 is the training parameter of the multi-head attention mechanism, and W... i Q , W i K , It is the weight matrix of the linear projection. It is a scaling factor;
[0057] Step B34: Convert the comment representation vector P based on text content sr and text content augmentation representation vector P s The inputs are fed into a pooling layer for average pooling to obtain the average pooled sentence representation vector of the comment content. and average pooling text content augmentation representation vector The calculation formula is as follows:
[0058]
[0059]
[0060] in, MeanPool is the average pooling function.
[0061] Step B4 includes the following steps;
[0062] Step B41: Convert the subgraph node knowledge representation vector G obtained in step B22 into... SK,0 The SKGCN knowledge graph convolutional network is a first-layer graph convolutional network that takes text as input and uses an adjacency matrix A. SK Update the vector representation of each subgraph node and output G. SK ,1 And it serves as the input to the next layer of the graph convolutional network;
[0063] Among them, G SK,1 Represented as:
[0064] in, It is the output of node i in the first layer of the graph convolutional network. The calculation formula is as follows:
[0065]
[0066]
[0067] in, For bias term; W SK b SK All of these are learnable parameters. Let be the weight matrix, and ReLU be the activation function; node i in SKGCN is related to the i-th word in the comment content. Correspondingly, the edges between nodes represent knowledge connections between words, d i Let d represent the degree of node i. To prevent errors caused by node i having a degree of 0, we choose d. i +1 is used as the divisor;
[0068] Step B42: For the Text Content Graph Convolutional Network (SCGCN), use the context-enhanced text content representation vector U obtained in step B31. st Input the first layer of the SCGCN graph convolutional network, and use the adjacency matrix A SK Update the vector representation of each word and output U. st,1 ,
[0069] Among them, U st,1 Represented as:
[0070] in, It is the output of node i in the first layer of the graph convolutional network. The calculation formula is as follows:
[0071]
[0072] Among them, Wst , All of these are learnable parameters. This is the weight matrix. The term is the bias term; ReLU is the activation function; node i in the graph convolutional network is related to the i-th word in the comment content. Correspondingly, in a graph convolutional network, the edges between nodes represent the syntactic dependencies between words in the comment content, d i Let d represent the degree of node i. To prevent errors caused by node i having a degree of 0, we choose d. i +1 is used as the divisor;
[0073] Regarding the knowledge-guided mechanism, the first-layer output G of SKGCN... SK,1 Discarding all content except for the words in the current comment sentence, we obtain the first-level knowledge representation of the text content. Next, we use a cross-attention mechanism to combine it with the first-layer output U of SCGCN. st,1 Combined, to obtain a knowledge-based comment content sentence representation G SD,1 And serve as the input for the next layer of SCGCN.
[0074] Among them, G SD,1 Expressed as:
[0075] In the first layer of the SCGCN graph convolutional network, the output of node i through the knowledge-guided mechanism is: The calculation formula is as follows:
[0076]
[0077]
[0078]
[0079] in,(·) T Indicates the transpose operation, α i It is the attention weight of the knowledge related to the i-th word in the comment content s;
[0080] Step B43: The input to the next layer of graph convolutional networks after SKGCN and SCGCN is G. SK,1 and G SD,1 Repeat steps B41 and B42;
[0081] For SKGCN, The output of the k-th layer graph convolutional network is used as the input of the (k+1)-th layer graph convolutional network. After iteration, the graph convolution representation vector is obtained. For SCGCN, The output of the k-th layer graph convolutional network is used to transfer U through a knowledge interaction mechanism. st,k With G SD,k As the input to the (k+1)th layer of the graph convolutional network, after continuous iteration, the final result is the graph convolutional representation vector. Where 1≤k≤K, and K is the number of layers in the graph convolutional network.
[0082] Step B5 includes the following steps;
[0083] Step B51: Render the context-enhanced text content representation vector U obtained in step B31... st And V obtained in step B43 sks The input is fed into an attention network, which selects important knowledge information to obtain a knowledge-enhanced sentence-level representation vector E. sd The calculation formula is as follows:
[0084]
[0085]
[0086]
[0087] in,(·) T Indicates the transpose operation, ε i It is the attention weight of the i-th word in the comment content s;
[0088] Step B52: Convert the knowledge-enhanced sentence-level representation vector E obtained in step 51 into... sd In the multi-head self-attention mechanism, the sentence representation vector E, which aggregates word-level information, is obtained. mt ,
[0089] E mt =MuliHead(E sd E sd E sd Formula 29;
[0090] Step B53: To address the noise introduced to the model by non-standard sentences, aggregate the sentence representation vector E containing word-level information. mt The input gating function filters out irrelevant information, resulting in vector E. sda Then, it is fed into a multilayer perceptron (MLP) to obtain the sentiment representation vector E of the source post. sf The specific calculation process is as follows:
[0091]
[0092]
[0093] in, and All of these are learnable parameters. and This is the weight matrix. and This is a bias term.
[0094] Step B6 includes the following steps;
[0095] Step B61: Generate the sentence representation vectors of all average pooled comments corresponding to the source post. and average pooling text content augmentation representation vector The inputs are fed into a multi-head cross-attention mechanism, and the comprehensive semantic representation C of the comment content is obtained through average pooling. sr The calculation process is as follows:
[0096]
[0097] C sr =MeanPool(C′) Formula 33;
[0098] in, MeanPool is the average pooling function;
[0099] Step B62: Enhance the representation vector of the average pooled text content The comprehensive semantic representation of the comment content C sr The inputs are combined into a fusion gating mechanism to obtain the fine-grained semantic representation vector V of the source post. t The calculation process is as follows:
[0100]
[0101]
[0102] in, It is the sigmoid activation function, w1, and It represents the learnable parameters in the fusion gating mechanism, and ⊙ represents the dot product operation.
[0103] Step B7 includes the following steps;
[0104] Step B71: Convert the source post sentiment representation vector E obtained in step B53 into a single vector. sf And V obtained in step B62 t By performing a concatenation, the final representation vector E is obtained. f The calculation formula is as follows:
[0105] E f =Concat(E sf Vt Formula Thirty-Six;
[0106] in, Concat is a vector concatenation operation.
[0107] Step B72: Final representation vector E f The input is fed into a fully connected layer and normalized using softmax. The probability of the text content belonging to each category is calculated using the following formula:
[0108] y = W3E f Formula Thirty-Seven;
[0109] p c (y) = softmax(y) Formula 38;
[0110] Where y is the output vector of the fully connected layer. This is the weight matrix of the fully connected layer. p is the bias term for the fully connected layer. c (y) is the probability that the text content corresponds to category c, 0≤p c (y)≤1, c∈{general facts, rumors, unverified rumors, debunked rumors};
[0111] Step B73: Calculate the loss value using cross-entropy as the loss function, update the learning rate using the Adam gradient optimization algorithm, and iteratively update the model parameters using backpropagation to train the model by minimizing the loss function; the formula for minimizing the loss function is as follows:
[0112]
[0113] in, λ is the L2 regularization term, θ is the learning rate, θ contains all parameters, and c is the realism label corresponding to the text content.
[0114] A rumor detection system integrating sentiment analysis, employing the rumor detection method described above, wherein the social network media is Weibo, and the rumor detection system includes the following modules:
[0115] Data collection module: used to extract the text content and comments of source posts in Weibo, label the authenticity of source posts, and build a training set;
[0116] Preprocessing module: Used to preprocess the training samples in the training set, including word segmentation and stop word removal;
[0117] Encoding module: Used to find word vectors of words in preprocessed text content and comment content in the pre-trained word vector matrix to obtain the initial representation vector of text content and the initial representation vector of comment content; and to find word vectors of nodes in the syntactic knowledge subgraph in the pre-trained knowledge graph word vector matrix to obtain the initial representation vector of the syntactic knowledge subgraph related to the comment content.
[0118] Network training module: It is used to input the initial representation vector of the text content, the initial representation vector of the comment content, and the initial representation vector of the syntactic knowledge subgraph into the deep learning network to obtain the final representation vector and use it to train the deep learning network. The probability of the representation vector belonging to a certain category and the labels in the training set are used as the loss. The goal is to minimize the loss to train the entire deep learning network and obtain a deep learning network model based on multi-level attention and knowledge graph.
[0119] Rumor detection module: Using NLP tools, semantic and sentiment information is extracted from the input source post text and comments. Then, a trained deep learning network model based on multi-level attention and knowledge graph is used to analyze and process the input source post text and comments, and output the predicted source post authenticity label.
[0120] Compared with existing technologies, this invention has the following advantages: This invention utilizes knowledge graphs and subgraph generation strategies to obtain syntactic knowledge subgraphs for corresponding comment sentences. Then, it encodes the comment content and text content separately. Simultaneously, it learns syntactic dependencies and external knowledge within the comment content through two graph convolutional networks and a knowledge-guided mechanism, and uses a gating mechanism to filter sentence noise to enhance the representation of the comment sentences. This invention also utilizes a multi-level attention mechanism to learn fine-grained semantic information between the text content and the comment content. Compared to previous methods, this invention can utilize fine-grained semantic information and rich sentiment information to enhance the feature representation of rumors, thereby further improving the accuracy and robustness of rumor detection. Attached Figure Description
[0121] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments:
[0122] Appendix Figure 1 This is a schematic diagram of the method implementation process according to an embodiment of the present invention;
[0123] Appendix Figure 2 This is a schematic diagram of the model architecture in an embodiment of the present invention;
[0124] Appendix Figure 3 This is a schematic diagram of the system structure according to an embodiment of the present invention. Detailed Implementation
[0125] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0126] It should be noted that the following detailed descriptions are exemplary and intended to provide further explanation of this application. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains.
[0127] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments according to this application. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0128] As shown in the figure, a rumor detection method integrating sentiment mining is described, the method comprising the following steps;
[0129] Step A: Collect and extract the text content and comments of source posts from social media, and manually label the source posts with real tags to form the training dataset DT;
[0130] Step B: Using the training dataset DT, train a deep learning network model N based on multi-level attention and knowledge graph. The training content includes analyzing the authenticity of source posts and predicting the authenticity labels of source posts.
[0131] Step C: Input the text content and comments of the source post into the trained deep learning network model N to obtain the authenticity label of the source post.
[0132] Step B includes the following steps;
[0133] Step B1: Encode each training sample in the training dataset DT to obtain the initial representation vector T of the text content. st The initial representation vector T of the comment content rt and the syntactic adjacency matrix A st ;
[0134] Step B2: Based on the syntactic knowledge subgraph construction algorithm, generate the corresponding syntactic knowledge subgraph SK of the text content from the knowledge graph and the syntactic dependency graph, and obtain its adjacency matrix A. SK Then, its nodes are encoded to obtain the node knowledge representation vector H of the syntactic knowledge subgraph SK. SK ;
[0135] Step B3: Convert the initial text content representation vector T obtained in Step B1 into a vector. st The input is fed into a bidirectional long short-term memory network (Bi-LSTM) to obtain a context-enhanced text content representation vector H.st , let U st =H st Then, the representation vector T st and the initial representation vector T of the comment content rt The data is fed into a multi-head cross-attention mechanism to obtain a comment representation vector P based on the text content. sr At the same time, the representation vector T st The input is fed into a multi-head self-attention mechanism to obtain the text content augmentation representation vector P. s Then, by transforming the text-content-based comment representation vector P... sr and text content augmentation representation vector P s The inputs are fed into a pooling layer for average pooling to obtain the average pooled sentence representation vector of the comment content. and average pooling text content augmentation representation vector
[0136] Step B4: Represent the node knowledge vector H of subgraph SK SK and the representation vector U obtained in step B3 st The inputs are fed into two graph convolutional networks with K layers, denoted as Text Knowledge Graph Convolutional Network (SKGCN) and Text Content Graph Convolutional Network (SCGCN), respectively, to learn external knowledge information and extract syntactic information. Simultaneously, a knowledge guidance mechanism is used to guide each layer node of the Text Content Graph Convolutional Network (SCGCN) with the Text Knowledge Graph Convolutional Network (SKGCN), resulting in the graph knowledge representation vector V of the source post. sks ;
[0137] Step B5: Use a cross-attention mechanism to process the graph knowledge representation vector V obtained in step B4. sks and sentence representation vector U st The fusion yields a knowledge-enhanced sentence-level representation vector E. sd To further improve the model's ability to extract information; then, through a multi-head self-attention mechanism, E sd Further strengthening yields sentence representation E that aggregates word-level information. mt Then, a gating mechanism is used to reduce noise from non-standard sentences, resulting in the source post sentiment representation vector E. sf ;
[0138] Step B6: Convert the average pooled comment sentence representation vector corresponding to the source post. and average pooling text content augmentation representation vector The inputs are fed into a multi-head cross-attention mechanism, and the comprehensive semantic representation C of the comment content is obtained through average pooling. sr Then, average pooling is used to enhance the text content representation vector. The comprehensive semantic representation of the comment content Csr The input is fed into the fusion gating mechanism to obtain the fine-grained semantic representation vector V of the source post. t ;
[0139] Step B7: Convert the sentiment representation vector E obtained in step B5 into... sf The fine-grained semantic representation vector V of the source post obtained in step B6 t By combining these, we obtain the final representation vector E. f Then E f Input the fully connected layer and the softmax function to obtain the prediction results; then, based on the target loss function, use the backpropagation method to calculate the gradient of each parameter in the deep learning network model, and use the stochastic gradient descent method to update each parameter;
[0140] Step B8: When the iterative change of the loss value generated by the deep learning network model N is less than the given threshold, or when the maximum number of iterations is reached, the training process of the deep learning network model N is terminated.
[0141] Step B1 includes the following steps;
[0142] Step B11: Traverse the training set DT, segment the text content and comment content of the source posts and remove stop words. Each training sample in DT is represented as dt = (st, rt, l); where st is the text content of the source post, rt is the comment content corresponding to the source post, and l is the authenticity label corresponding to the source post, l∈{general facts, rumors, unverified rumors, debunked rumors}.
[0143] The text content 'st' in the source post is represented as:
[0144]
[0145] in, Let be the i-th word in the text content st, where i = 1, 2, ..., n, and n is the number of words in the source post text content st;
[0146] The comments in the original post are represented as follows:
[0147]
[0148] in, Let be the j-th word in the comment content rt, where i = 1, 2, ..., m, and m is the number of words in the comment content rt;
[0149] Step B12: Obtain the text content from step B11 Encode the text content st to obtain the initial representation vector T. st ;T st Expressed as:
[0150]
[0151] Among them, in the pre-trained word vector matrix It can be found in the middle For the i-th word The corresponding word vector, d represents the dimension of the word vector, and |V| is the number of words in the dictionary V;
[0152] Step B13: Obtain comments from step B11. Encode the initial representation vector T of the comment content rt. rt ;T rt Expressed as:
[0153]
[0154] Among them, in the pre-trained word vector matrix It can be found in the middle Indicates the j-th word The corresponding word vector, d represents the dimension of the word vector, and |V| is the number of words in the dictionary V;
[0155] Step B14: Perform syntactic dependency parsing on the text content st to obtain the corresponding syntactic dependency tree (DTD) and the n-order syntactic adjacency matrix A. st The syntactic dependency tree (DTD) is represented as follows:
[0156]
[0157] in, Words representing text content and text content words There is a syntactic dependency between them.
[0158] Step B2 includes the following steps;
[0159] Step B21: Using each original word node in the syntactic dependency tree (DTD) as the root node, extend the knowledge graph by creating hop layers to generate child nodes. For each layer, select u nodes that are connected to the nodes of the previous layer by edges in the knowledge graph as nodes of that layer. That is, each seed node has... By expanding the child nodes, we finally obtain a syntactic knowledge subgraph SK with a total number of nodes z = n + n*q, and a z-order adjacency matrix A. SK The syntactic knowledge subgraph SK is represented as follows:
[0160]
[0161] in, Knowledge node words It is a word in the text content. The expansion nodes, Knowledge node words It is a knowledge node word Knowledge extension sub-nodes Words representing text content and text content words There is a syntactic dependency between them, u is the number of nodes selected in the knowledge graph, and hop is the number of layers in the topology;
[0162] Step B22: Encode the nodes of the syntactic knowledge subgraph SK using knowledge graph embedding to obtain its node knowledge representation vector. make As the initial input to the text knowledge graph convolutional network SKGCN; in the pre-trained knowledge word vector matrix It can be found in the middle For the i-th word The corresponding knowledge word vector, where d represents the dimension of the knowledge word vector, and |V| is the number of words embedded in the knowledge word V.
[0163] Step B3 includes the following steps;
[0164] Step B31: Initialize the representation vector of the text content. The forward and backward layers of the first bidirectional long short-term memory network are input sequentially to obtain the state vector sequences of the forward hidden layer and the backward hidden layer, respectively.
[0165] in i = 1, 2, ..., n, f is the activation function; after concatenation, a context-enhanced text content representation vector is obtained. in, i = 1, 2, ..., n, ":" indicates a vector concatenation operation; H st That is, U st ;
[0166] Step B32: Initialize the representation vector T of the text content st st The initial representation vector T of the comment content rt rt The text is fed into a multi-head cross-attention mechanism to obtain a comment representation vector P based on the text content. sr , which is calculated as follows:
[0167] P sr =MultiHead(T st , T rt , T rt Formula 7;
[0168] MultiHead(Q′,K′,V′)=Concat(head1,head2,…,head h )W o Formula 8;
[0169] head i =Attention(Q′W) i Q , K′W i K ,V′W i V Formula Nine;
[0170]
[0171] Where MultiHead represents the multi-head attention mechanism, Q′, K′, and V′ represent the input vectors of the multi-head attention mechanism, and T represents the initial representation vector of the text content. st As matrix Q′, the initial representation vector T of the corresponding comment content rt is... rt As K′ and V′; head i The output vector is calculated by applying the Attention (·) mechanism to the i-th subvector of Q′, K′, V′, where h is the number of heads in the multi-head attention mechanism, and W is the number of heads in the multi-head attention mechanism. o For the training parameters of the multi-head attention mechanism, It is the weight matrix of the linear projection. It is a scaling factor;
[0172] Step B33: Initialize the text content representation vector T st The input is fed into a multi-head self-attention mechanism to obtain the text content augmentation representation vector P. s , which is calculated as follows:
[0173] P s =MultiHead(T st , T st , T st Formula 11;
[0174] MultiHead(Q 1 , K′, V′)=Concat(head1, head2,..., head h Formula Twelve (W1);
[0175] head i =Attention(Q′W) i Q , K′W i K ,V′W iV Formula Thirteen;
[0176]
[0177] Where MultiHead represents the multi-head attention mechanism, Q′, K′, and V′ represent the input vectors of the multi-head attention mechanism, and T represents the initial representation vector of the text content. st As matrices Q′, K′, and V′; head i Let h be the output vector obtained by applying the attention mechanism Attention(·) to the i-th subvector of Q′, K′, and V′, where h is the number of heads in the multi-head attention mechanism, and W1 is the training parameter of the multi-head attention mechanism. It is the weight matrix of the linear projection. It is a scaling factor;
[0178] Step B34: Convert the comment representation vector P based on text content sr and text content augmentation representation vector P s The inputs are fed into a pooling layer for average pooling to obtain the average pooled sentence representation vector of the comment content. and average pooling text content augmentation representation vector The calculation formula is as follows:
[0179]
[0180]
[0181] in, MeanPool is the average pooling function.
[0182] Step B4 includes the following steps;
[0183] Step B41: Convert the subgraph node knowledge representation vector G obtained in step B22 into... SK,0 The SKGCN knowledge graph convolutional network is a first-layer graph convolutional network that takes text as input and uses an adjacency matrix A. SK Update the vector representation of each subgraph node and output G. SK ,1 And it serves as the input to the next layer of the graph convolutional network;
[0184] Among them, G SK,1 Represented as:
[0185] in, It is the output of node i in the first layer of the graph convolutional network. The calculation formula is as follows:
[0186]
[0187]
[0188] in, For bias term; W SK b SK All of these are learnable parameters. Let be the weight matrix, and ReLU be the activation function; node i in SKGCN is related to the i-th word in the comment content. Correspondingly, the edges between nodes represent knowledge connections between words, d i Let d represent the degree of node i. To prevent errors caused by node i having a degree of 0, we choose d. i +1 is used as the divisor;
[0189] Step B42: For the Text Content Graph Convolutional Network (SCGCN), use the context-enhanced text content representation vector U obtained in step B31. st Input the first layer of the SCGCN graph convolutional network, and use the adjacency matrix A SK Update the vector representation of each word and output U. st,1 ,
[0190] Among them, U st,1 Expressed as:
[0191] in, It is the output of node i in the first layer of the graph convolutional network. The calculation formula is as follows:
[0192]
[0193] Among them, W st , All of these are learnable parameters. This is the weight matrix. The term is the bias term; ReLU is the activation function; node i in the graph convolutional network is related to the i-th word in the comment content. Correspondingly, in a graph convolutional network, the edges between nodes represent the syntactic dependencies between words in the comment content, d i Let d represent the degree of node i. To prevent errors caused by node i having a degree of 0, we choose d. i +1 is used as the divisor;
[0194] Regarding the knowledge-guided mechanism, the first-layer output G of SKGCN... SK,1 Discarding all content except for the words in the current comment sentence, we obtain the first-level knowledge representation of the text content. Next, we use a cross-attention mechanism to combine it with the first-layer output U of SCGCN.st,1 Combined, to obtain a knowledge-based comment content sentence representation G SD,1 And serve as the input for the next layer of SCGCN.
[0195] Among them, G SD,1表 As shown:
[0196] In the first layer of the SCGCN graph convolutional network, the output of node i through the knowledge-guided mechanism is: The calculation formula is as follows:
[0197]
[0198]
[0199]
[0200] in,(·) T Indicates the transpose operation, α i It is the attention weight of the knowledge related to the i-th word in the comment content s;
[0201] Step B43: The input to the next layer of graph convolutional networks after SKGCN and SCGCN is... SK,1 and G SD,1 Repeat steps B41 and B42;
[0202] For SKGCN, The output of the k-th layer graph convolutional network is used as the input of the (k+1)-th layer graph convolutional network. After iteration, the graph convolution representation vector is obtained. For SCGCN, The output of the k-th layer graph convolutional network is used to transfer U through a knowledge interaction mechanism. st,k With G SD,k As the input to the (k+1)th layer of the graph convolutional network, after continuous iteration, the final result is the graph convolutional representation vector. Where 1≤k≤K, and K is the number of layers in the graph convolutional network.
[0203] Step B5 includes the following steps;
[0204] Step B51: Render the context-enhanced text content representation vector U obtained in step B31... st And V obtained in step B43 sks The input is fed into an attention network, which selects important knowledge information to obtain a knowledge-enhanced sentence-level representation vector E. sd The calculation formula is as follows:
[0205]
[0206]
[0207]
[0208] in,(·) T Indicates the transpose operation, ε i It is the attention weight of the i-th word in the comment content s;
[0209] Step B52: Convert the knowledge-enhanced sentence-level representation vector E obtained in step 51 into... sd In the multi-head self-attention mechanism, the sentence representation vector E, which aggregates word-level information, is obtained. mt ,
[0210] E mt =MuliHead(E sd E sd E sd Formula 29;
[0211] Step B53: To address the noise introduced to the model by non-standard sentences, aggregate the sentence representation vector E containing word-level information. mt The input gating function filters out irrelevant information, resulting in vector E. sda Then, it is fed into a multilayer perceptron (MLP) to obtain the sentiment representation vector E of the source post. sf The specific calculation process is as follows:
[0212]
[0213]
[0214] in, and All of these are learnable parameters. and This is the weight matrix. and This is a bias term.
[0215] Step B6 includes the following steps;
[0216] Step B61: Generate the sentence representation vectors of all average pooled comments corresponding to the source post. and average pooling text content augmentation representation vector The inputs are fed into a multi-head cross-attention mechanism, and the comprehensive semantic representation C of the comment content is obtained through average pooling. sr The calculation process is as follows:
[0217]
[0218] C sr=MeanPool(C′) Formula 33;
[0219] in, MeanPool is the average pooling function;
[0220] Step B62: Enhance the representation vector of the average pooled text content The comprehensive semantic representation of the comment content C sr The inputs are combined into a fusion gating mechanism to obtain the fine-grained semantic representation vector V of the source post. t The calculation process is as follows:
[0221]
[0222]
[0223] in, It is the sigmoid activation function, w1, and It represents the learnable parameters in the fusion gating mechanism, and ⊙ represents the dot product operation.
[0224] Step B7 includes the following steps;
[0225] Step B71: Convert the source post sentiment representation vector E obtained in step B53 into a single vector. sf And V obtained in step B62 t By performing a concatenation, the final representation vector E is obtained. f The calculation formula is as follows:
[0226] E f =Concat(E sf V t Formula Thirty-Six;
[0227] in, Concat is a vector concatenation operation.
[0228] Step B72: Final representation vector E f The input is fed into a fully connected layer and normalized using softmax. The probability of the text content belonging to each category is calculated using the following formula:
[0229] y = W3E f Formula Thirty-Seven;
[0230] p c (y) = softmax(y) Formula 38;
[0231] Where y is the output vector of the fully connected layer. This is the weight matrix of the fully connected layer. p is the bias term for the fully connected layer.c (y) is the probability that the text content corresponds to category c, 0≤p c (y)≤1, c∈{general facts, rumors, unverified rumors, debunked rumors};
[0232] Step B73: Calculate the loss value using cross-entropy as the loss function, update the learning rate using the Adam gradient optimization algorithm, and iteratively update the model parameters using backpropagation to train the model by minimizing the loss function; the formula for minimizing the loss function is as follows:
[0233]
[0234] in, λ is the L2 regularization term, θ is the learning rate, θ contains all parameters, and c is the realism label corresponding to the text content.
[0235] A rumor detection system integrating sentiment analysis, employing the rumor detection method described above, wherein the social network media is Weibo, and the rumor detection system includes the following modules:
[0236] Data collection module: used to extract the text content and comments of source posts in Weibo, label the authenticity of source posts, and build a training set;
[0237] Preprocessing module: Used to preprocess the training samples in the training set, including word segmentation and stop word removal;
[0238] Encoding module: Used to find word vectors of words in preprocessed text content and comment content in the pre-trained word vector matrix to obtain the initial representation vector of text content and the initial representation vector of comment content; and to find word vectors of nodes in the syntactic knowledge subgraph in the pre-trained knowledge graph word vector matrix to obtain the initial representation vector of the syntactic knowledge subgraph related to the comment content.
[0239] Network training module: It is used to input the initial representation vector of the text content, the initial representation vector of the comment content, and the initial representation vector of the syntactic knowledge subgraph into the deep learning network to obtain the final representation vector and use it to train the deep learning network. The probability of the representation vector belonging to a certain category and the labels in the training set are used as the loss. The goal is to minimize the loss to train the entire deep learning network and obtain a deep learning network model based on multi-level attention and knowledge graph.
[0240] Rumor detection module: Using NLP tools, semantic and sentiment information is extracted from the input source post text and comments. Then, a trained deep learning network model based on multi-level attention and knowledge graph is used to analyze and process the input source post text and comments, and output the predicted source post authenticity label.
[0241] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.
Claims
1. A rumor detection method integrating sentiment analysis, characterized in that: The method includes the following steps; Step A: Collect and extract the text content and comments of source posts from social media, and manually label the source posts with real tags to form the training dataset DT; Step B: Using the training dataset DT, train a deep learning network model N based on multi-level attention and knowledge graph. The training content includes analyzing the authenticity of source posts and predicting the authenticity labels of source posts. Step C: Input the text content and comments of the source post into the trained deep learning network model N to obtain the authenticity label of the source post; Step B includes the following steps; Step B1: Encode each training sample in the training dataset DT to obtain the initial representation vector T of the text content. st The initial representation vector T of the comment content rt and the syntactic adjacency matrix A st ; Step B2: Based on the syntactic knowledge subgraph construction algorithm, generate the corresponding syntactic knowledge subgraph SK of the text content from the knowledge graph and the syntactic dependency graph, and obtain its adjacency matrix A. SK Then, its nodes are encoded to obtain the node knowledge representation vector H of the syntactic knowledge subgraph SK. SK ; Step B3: Convert the initial text content representation vector T obtained in Step B1 into a vector. st The input is fed into a bidirectional long short-term memory network (Bi-LSTM) to obtain a context-enhanced text content representation vector H. st , let U st =H st ; Then, the representation vector T st and the initial representation vector T of the comment content rt The data is fed into a multi-head cross-attention mechanism to obtain a comment representation vector P based on the text content. sr At the same time, the representation vector T st The input is fed into a multi-head self-attention mechanism to obtain the text content augmentation representation vector P. s Then, by transforming the text-content-based comment representation vector P... sr and text content augmentation representation vector P s The inputs are fed into a pooling layer for average pooling to obtain the average pooled sentence representation vector of the comment content. and average pooling text content augmentation representation vector Step B4: Represent the node knowledge vector H of subgraph SK SK and the representation vector U obtained in step B3 st The inputs are fed into two graph convolutional networks with K layers, denoted as Text Knowledge Graph Convolutional Network (SKGCN) and Text Content Graph Convolutional Network (SCGCN), respectively, to learn external knowledge information and extract syntactic information. Simultaneously, a knowledge guidance mechanism is used to guide each layer node of the Text Content Graph Convolutional Network (SCGCN) with the Text Knowledge Graph Convolutional Network (SKGCN), resulting in the graph knowledge representation vector V of the source post. sks .
2. The rumor detection method integrating sentiment mining according to claim 1, characterized in that: Step B further includes the following steps; Step B5: Use the cross-attention mechanism to transform the graph knowledge representation vector V obtained in step B4 into a graph knowledge representation vector. sks and sentence representation vector U st The fusion yields a knowledge-enhanced sentence-level representation vector E. sd To further improve the model's ability to extract information; then, through a multi-head self-attention mechanism, E sd Further strengthening yields sentence representation E that aggregates word-level information. mt Then, a gating mechanism is used to reduce noise from non-standard sentences, resulting in the source post sentiment representation vector E. sf ; Step B6: Convert the average pooled comment sentence representation vector corresponding to the source post. and average pooling text content augmentation representation vector The inputs are fed into a multi-head cross-attention mechanism, and the comprehensive semantic representation C of the comment content is obtained through average pooling. sr Then, average pooling is used to enhance the text content representation vector. The comprehensive semantic representation of the comment content C sr The input is fed into the fusion gating mechanism to obtain the fine-grained semantic representation vector V of the source post. t ; Step B7: Convert the sentiment representation vector E obtained in step B5 into... sf The fine-grained semantic representation vector V of the source post obtained in step B6 t By combining these, we obtain the final representation vector E. f Then E f Input the fully connected layer and the softmax function to obtain the prediction results; then, based on the target loss function, use the backpropagation method to calculate the gradient of each parameter in the deep learning network model, and use the stochastic gradient descent method to update each parameter; Step B8: When the iterative change of the loss value generated by the deep learning network model N is less than the given threshold, or when the maximum number of iterations is reached, the training process of the deep learning network model N is terminated.
3. The rumor detection method integrating sentiment mining according to claim 2, characterized in that: Step B1 includes the following steps; Step B11: Traverse the training set DT, segment the text content and comment content of the source posts and remove stop words. Each training sample in DT is represented as dt = (st, rt, l); where st is the text content of the source post, rt is the comment content corresponding to the source post, and l is the authenticity label corresponding to the source post, l∈{general facts, rumors, unverified rumors, debunked rumors}. The text content 'st' in the source post is represented as: in, Let be the i-th word in the text content st, where i = 1, 2, ..., n, and n is the number of words in the source post text content st; The comments in the original post are represented as follows: in, Let be the j-th word in the comment content rt, where i = 1, 2, ..., m, and m is the number of words in the comment content rt; Step B12: Obtain the text content from step B11 Encode the text content st to obtain the initial representation vector T. st ;T st Expressed as: Among them, in the pre-trained word vector matrix It can be found in the middle For the i-th word The corresponding word vector, d represents the dimension of the word vector, and |V| is the number of words in the dictionary V; Step B13: Obtain comments from step B11. Encode the initial representation vector T of the comment content rt. rt ;T rt Represented as: Among them, in the pre-trained word vector matrix It can be found in the middle Indicates the j-th word The corresponding word vector, d represents the dimension of the word vector, and |V| is the number of words in the dictionary V; Step B14: Perform syntactic dependency parsing on the text content st to obtain the corresponding syntactic dependency tree (DTD) and the n-order syntactic adjacency matrix A. st The syntactic dependency tree (DTD) is represented as follows: in, Words representing text content and text content words There is a syntactic dependency between them.
4. The rumor detection method integrating sentiment mining according to claim 3, characterized in that: Step B2 Includes the following steps; Step B21: Using each original word node in the syntactic dependency tree (DTD) as the root node, extend the knowledge graph by creating hop layers to generate child nodes. For each layer, select u nodes that are connected to the nodes of the previous layer by edges in the knowledge graph as nodes of that layer. That is, each seed node has... By expanding the child nodes, we finally obtain a syntactic knowledge subgraph SK with a total number of nodes z = n + n*q, and a z-order adjacency matrix A. SK ; The syntactic knowledge subgraph SK is represented as follows: in, Knowledge node words It is a word in the text content. The expansion nodes, Knowledge node words It is a knowledge node word Knowledge extension sub-nodes Words representing text content and text content words There is a syntactic dependency between them, u is the number of nodes selected in the knowledge graph, and hop is the number of layers in the topology; Step B22: Encode the nodes of the syntactic knowledge subgraph SK using knowledge graph embedding to obtain its node knowledge representation vector. make As the initial input to the text knowledge graph convolutional network SKGCN; in the pre-trained knowledge word vector matrix It can be found in the middle For the i-th word W i kg The corresponding knowledge word vector, where d represents the dimension of the knowledge word vector, and |V| is the number of words embedded in V.
5. The rumor detection method integrating sentiment mining according to claim 4, characterized in that: Step B3 includes the following steps; Step B31: Initialize the representation vector of the text content. The forward and backward layers of the first bidirectional long short-term memory network are input sequentially to obtain the state vector sequences of the forward hidden layer and the backward hidden layer, respectively. and in f is the activation function; after concatenation, the resulting vector is a context-enhanced text content representation. in, ":" indicates a vector concatenation operation; H st That is, U st ; Step B32: Initialize the representation vector T of the text content st st The initial representation vector T of the comment content rt rt The text is fed into a multi-head cross-attention mechanism to obtain a comment representation vector P based on the text content. sr , which is calculated as follows: P sr =MultiHead(T st , T rt , T rt Formula 7; MultiHead(Q′,K′,V′)=Concat(head1,head2,…,head h )W o Official 8; Where MultiHead represents the multi-head attention mechanism, Q′, K′, and V′ represent the input vectors of the multi-head attention mechanism, and T represents the initial representation vector of the text content. st As matrix Q′, the initial representation vector T of the corresponding comment content rt is... rt As K′ and V′; head i The output vector is calculated by applying the Attention (·) mechanism to the i-th subvector of Q′, K′, V′, where h is the number of heads in the multi-head attention mechanism, and W is the number of heads in the multi-head attention mechanism. o For the training parameters of the multi-head attention mechanism, It is the weight matrix of the linear projection. It is a scaling factor; Step B33: Initialize the text content representation vector T st The input is fed into a multi-head self-attention mechanism to obtain the text content augmentation representation vector P. s The calculation formula is as follows: P s =MultiHead(T st , T st , T st Formula 11; MultiHead(Q′,K′,V′)=Concat(head1,head2,…,head h Formula Twelve (W1); Where MultiHead represents the multi-head attention mechanism, Q′, K′, and V′ represent the input vectors of the multi-head attention mechanism, and T represents the initial representation vector of the text content. st As matrices Q′, K′, and V′; head i Let h be the output vector obtained by applying the attention mechanism Attention(·) to the i-th subvector of Q′, K′, and V′, where h is the number of heads in the multi-head attention mechanism, and W1 is the training parameter of the multi-head attention mechanism. It is the weight matrix of the linear projection. It is a scaling factor; Step B34: Convert the comment representation vector P based on text content sr and text content augmentation representation vector P s The inputs are fed into a pooling layer for average pooling to obtain the average pooled sentence representation vector of the comment content. and average pooling text content augmentation representation vector The calculation formula is as follows: in, MeanPool is the average pooling function.
6. The rumor detection method integrating sentiment mining according to claim 5, characterized in that: Step B4 includes the following steps; Step B41: Convert the subgraph node knowledge representation vector G obtained in step B22 into... SK,0 The SKGCN knowledge graph convolutional network is a first-layer graph convolutional network that takes text as input and uses an adjacency matrix A. SK Update the vector representation of each subgraph node and output G. SK,1 And it serves as the input to the next layer of the graph convolutional network; Among them, G SK,1 Represented as: in, It is the output of node i in the first layer of the graph convolutional network. The calculation formula is as follows: in, For bias term; W SK b SK All of these are learnable parameters. Let be the weight matrix, and ReLU be the activation function; node i in SKGCN is related to the i-th word in the comment content. Correspondingly, the edges between nodes represent knowledge connections between words, d i Let d represent the degree of node i. To prevent errors caused by node i having a degree of 0, we choose d. i +1 is used as the divisor; Step B42: For the Text Content Graph Convolutional Network (SCGCN), use the context-enhanced text content representation vector U obtained in step B31. st Input the first layer of the SCGCN graph convolutional network, and use the adjacency matrix A SK Update the vector representation of each word and output U. st,1 , Among them, U st,1 Represented as: in, It is the output of node i in the first layer of the graph convolutional network. The calculation formula is as follows: Among them, W st , All of these are learnable parameters. This is the weight matrix. The term is the bias term; ReLU is the activation function; node i in the graph convolutional network is related to the i-th word in the comment content. Correspondingly, in a graph convolutional network, the edges between nodes represent the syntactic dependencies between words in the comment content, d i Let d represent the degree of node i. To prevent errors caused by node i having a degree of 0, we choose d. i +1 is used as the divisor; Regarding the knowledge-guided mechanism, the first-layer output G of SKGCN... SK,1 Discarding all content except for the words in the current comment sentence, we obtain the first-level knowledge representation of the text content. Next, we use a cross-attention mechanism to combine it with the first-layer output U of SCGCN. st,1 Combined, to obtain a knowledge-based comment content sentence representation G SD,1 And serve as the input for the next layer of SCGCN. Among them, G SD,1 Represented as: In the first layer of the SCGCN graph convolutional network, the output of node i through the knowledge-guided mechanism is: The calculation formula is as follows: in,(·) T Indicates the transpose operation, α i It is the attention weight of the knowledge related to the i-th word in the comment content s; Step B43: The input to the next layer of graph convolutional networks after SKGCN and SCGCN is G. SK,1 and G SD,1 Repeat steps B41 and B42; For SKGCN, The output of the k-th layer graph convolutional network is used as the input of the (k+1)-th layer graph convolutional network. After iteration, the graph convolution representation vector is obtained. For SCGCN, The output of the k-th layer graph convolutional network is used to transfer U through a knowledge interaction mechanism. st,k With G SD,k As the input to the (k+1)th layer of the graph convolutional network, after continuous iteration, the final result is the graph convolutional representation vector. Where 1≤k≤K, and K is the number of layers in the graph convolutional network.
7. The rumor detection method integrating sentiment mining according to claim 6, characterized in that: Step B5 includes the following steps; Step B51: Render the context-enhanced text content representation vector U obtained in step B31... st And V obtained in step B43 sks The input is fed into an attention network, which selects important knowledge information to obtain a knowledge-enhanced sentence-level representation vector E. sd The calculation formula is as follows: in,(·) T Indicates the transpose operation, ε i It is the attention weight of the i-th word in the comment content s; Step B52: Convert the knowledge-enhanced sentence-level representation vector E obtained in step 51 into... sd In the multi-head self-attention mechanism, the sentence representation vector E, which aggregates word-level information, is obtained. mt , E mt =MuliHead(E sd E sd E sd Formula 29; Step B53: To address the noise introduced to the model by non-standard sentences, aggregate the sentence representation vector E containing word-level information. mt The input gating function filters out irrelevant information, resulting in vector E. sda Then, it is fed into a multilayer perceptron (MLP) to obtain the sentiment representation vector E of the source post. sf The specific calculation process is as follows: in, and All of these are learnable parameters. and This is the weight matrix. and This is a bias term.
8. The rumor detection method integrating sentiment mining according to claim 7, characterized in that: Step B6 includes the following steps; Step B61: Generate the sentence representation vectors of all average pooled comments corresponding to the source post. and average pooling text content augmentation representation vector The inputs are fed into a multi-head cross-attention mechanism, and the comprehensive semantic representation C of the comment content is obtained through average pooling. sr The calculation process is as follows: C sr =MeanPool(C′) Formula 33; in, MeanPool is the average pooling function; Step B62: Enhance the representation vector of the text content using average pooling. The comprehensive semantic representation of the comment content C sr The inputs are combined into a fusion gating mechanism to obtain the fine-grained semantic representation vector V of the source post. t The calculation process is as follows: in, It is the sigmoid activation function. and It represents the learnable parameters in the fusion gating mechanism, and ⊙ represents the dot product operation.
9. The rumor detection method integrating sentiment mining according to claim 8, characterized in that: Step B7 includes the following steps; Step B71: Convert the source post sentiment representation vector E obtained in step B53 into a single vector. sf And V obtained in step B62 t By performing a concatenation, the final representation vector E is obtained. f The calculation formula is as follows: E f =Concat(E sf V t Formula Thirty-Six; in, Concat is a vector concatenation operation; Step B72: Final representation vector E f The input is fed into a fully connected layer and normalized using softmax. The probability of the text content belonging to each category is calculated using the following formula: y = W3E f +b Official thirty-seven; p c (y) = softmax(y) Formula 38; Where y is the output vector of the fully connected layer. This is the weight matrix of the fully connected layer. p is the bias term for the fully connected layer. c (y) is the probability that the text content corresponds to category c, 0≤p c (y)≤1, c∈{general facts, rumors, unverified rumors, debunked rumors}; Step B73: Calculate the loss value using cross-entropy as the loss function, update the learning rate using the Adam gradient optimization algorithm, and iteratively update the model parameters using backpropagation to train the model by minimizing the loss function; the formula for minimizing the loss function is as follows: in, λ is the L2 regularization term, θ is the learning rate, θ contains all parameters, and c is the realism label corresponding to the text content.
10. A rumor detection system integrating sentiment analysis, employing the rumor detection method described in any one of claims 1 to 9, characterized in that: The social network media mentioned is Weibo, and the rumor detection system includes the following modules: Data collection module: used to extract the text content and comments of source posts in Weibo, label the authenticity of source posts, and build a training set; Preprocessing module: Used to preprocess the training samples in the training set, including word segmentation and stop word removal; Encoding module: Used to find word vectors of words in preprocessed text content and comment content in the pre-trained word vector matrix to obtain the initial representation vector of text content and the initial representation vector of comment content; and to find word vectors of nodes in the syntactic knowledge subgraph in the pre-trained knowledge graph word vector matrix to obtain the initial representation vector of the syntactic knowledge subgraph related to the comment content. Network training module: It is used to input the initial representation vector of the text content, the initial representation vector of the comment content, and the initial representation vector of the syntactic knowledge subgraph into the deep learning network to obtain the final representation vector and use it to train the deep learning network. The probability of the representation vector belonging to a certain category and the labels in the training set are used as the loss. The goal is to minimize the loss to train the entire deep learning network and obtain a deep learning network model based on multi-level attention and knowledge graph. Rumor detection module: Using NLP tools, semantic and sentiment information is extracted from the input source post text and comments. Then, a trained deep learning network model based on multi-level attention and knowledge graph is used to analyze and process the input source post text and comments, and output the predicted source post authenticity label.
Citation Information
Patent Citations
Emotion early warning method based on public person public opinion knowledge graph and XGBoost multi-feature fusion
CN112905800A
Rumor detection method and system based on dynamic multi-hop graph attention network
CN114706977A