Rumor detection method and system based on dynamic heterogeneous graph and multi-level attention
By constructing a deep learning network model based on dynamic heterogeneous graphs and multi-level attention, the problem that existing rumor detection methods cannot fully learn the propagation graph structure information is solved, the accuracy of rumor detection is improved, and it is suitable for rumor detection in social media.
Patent Information
- Application Number
- CN202211340799.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-29
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2042-10-29
AI Technical Summary
Existing rumor detection methods are unable to fully learn the structural information in the propagation graph, ignore the information specific to the node type in the heterogeneous propagation graph, and cannot capture the evolutionary pattern of the dynamic propagation of rumors, resulting in no significant improvement in model performance.
A deep learning network model based on dynamic heterogeneous graphs and multi-level attention is adopted. By constructing a training dataset, multi-head cross-attention mechanism, multi-head self-attention mechanism, multi-layer graph neural network and rotational memory unit are used to capture the dynamic propagation characteristics of post text content, comment content and user information, construct a heterogeneous propagation graph snapshot, and enhance the accuracy of rumor detection.
It improves the accuracy of rumor detection, can effectively analyze the authenticity of posts and predict their authenticity labels, and has strong practicality and broad application prospects.
Smart Images

Figure CN115659966B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of natural language processing, and specifically relates to a rumor detection method and system based on dynamic heterogeneous graphs and multi-level attention. Background Art
[0002] Rumor detection, also known as fake news detection, is a key task in the field of natural language processing (NLP). With the rapid development of the internet, social media platforms such as Weibo and Twitter have become indispensable communication tools in people's lives. Simultaneously, due to the rapid speed and wide reach of social media, rumors have also become a major focus of public attention. On social media, a rumor is an unverified statement of information that is widely disseminated through certain channels. It often uses false or fabricated images and inflammatory language to mislead readers and spread rapidly. The emergence of rumors often causes serious harm to society and significant economic losses. Although various social media organizations have launched rumor-refuting platforms to strengthen rumor control, these platforms still rely on manually collected information to verify rumor authenticity, which is extremely time-consuming and labor-intensive. Therefore, there is an urgent need for an automated method that can effectively detect rumors.
[0003] With the continuous advancement of deep learning research, many researchers have applied deep learning models to rumor detection. The most commonly used neural networks are convolutional neural networks (CNNs) and recurrent neural networks (RNNs). CNNs can capture local semantic information from text, leading some researchers to apply them to content-based rumor detection. However, these networks cannot fully learn the contextual information within a sentence, which is crucial for modeling the overall semantic relationships of a text. As a result, the performance of CNN-based rumor detection models is limited in this task. To address this issue, many researchers have adopted RNNs, such as long short-term memory (LSTM) and gated recurrent units (GRU), to extract contextual semantic information from text. Unlike CNNs, RNNs view a sentence as a sequence of words, taking each word in chronological order and using the output of one hidden layer as the input to the next hidden layer, continuously learning contextual information from the sequence data. However, these methods only utilize text content information for rumor detection and ignore the topological relationships that influence rumor propagation.
[0004] Therefore, some researchers have studied rumor detection methods based on text semantic information and its propagation structure. By modeling the propagation structure of posts, constructing a propagation graph, and using graph neural networks to aggregate the features of neighboring nodes, the propagation structure characteristics of rumors are captured. Ma et al. used top-down and bottom-up tree-shaped recursive neural networks to capture the semantic information and propagation characteristics of rumors. Khoo et al. used the multi-head attention mechanism in the Transformer network to model long-distance interactions between posts and proposed a post-level attention model. Bian et al. used a bidirectional graph convolutional network to learn the propagation pattern of rumors and capture the structure of rumor diffusion. Wu et al. constructed a propagation graph for each rumor and used a gated graph neural network to exchange information between adjacent nodes on the relationship path, update the node representation, and thus enhance the node representation of the propagation graph.
[0005] In addition, some researchers have attempted to construct heterogeneous graphs to provide a new perspective for modeling rumor propagation, achieving excellent performance. Yuan et al. modeled the global relationships between tweets, retweets, and users into a heterogeneous graph, then captured local semantic information and global structural information from the content of posts and the propagation relationships between users. Huang et al. constructed a tweet-word-user heterogeneous graph and used a meta-path-based heterogeneous graph attention network to capture the global semantic relationships of text content and the global structural information of tweet propagation. Ran et al. proposed a multi-channel graph attention network that models the relationships between source tweets and their comments, between source tweets and their words, and between source tweets and their related users, constructing three subgraphs. The network also designed an event sharing module to learn common features in rumors about different events. However, existing rumor detection methods based on heterogeneous graphs typically use conventional homogeneous graph neural networks, which fail to fully learn the structural information in the propagation graph and ignore the type-specific information of nodes in the heterogeneous propagation graph. Furthermore, they ignore the dynamic process of rumor propagation and fail to capture the evolutionary patterns of rumor dynamics. As a result, the model performance improvement is not significant. Summary of the Invention
[0006] The purpose of the present invention is to provide a rumor detection method and system based on dynamic heterogeneous graph and multi-level attention, which are conducive to improving the accuracy of rumor detection.
[0007] To achieve the above objectives, the present invention adopts a technical solution: a rumor detection method based on dynamic heterogeneous graph and multi-level attention, comprising the following steps:
[0008] Step A: Collect posts from social platforms, extract the text content, comments, and related user information from the posts, and annotate the authenticity labels of the posts to construct the training dataset DE;
[0009] Step B: Use the training dataset DE to train a deep learning network model based on dynamic heterogeneous graph and multi-level attention. This model is used to analyze the authenticity of the post and predict the authenticity label of the post.
[0010] Step C: Input the text content, comment content, and related user information of the post to be tested into the trained deep learning network model to obtain the authenticity label of the post.
[0011] Furthermore, the step B specifically includes the following steps:
[0012] Step B1: Initially encode all training samples in the training dataset DE to obtain the initial representation vector E of the text content s , the initial representation vector E of the comment content r and the user's initial representation vector E u ;
[0013] Step B2: The initial text content representation vector E obtained in step B1 s and the initial representation vector E of the comment content r At the same time, it is input into a multi-head cross attention mechanism to obtain the word-level representation vector C of the comment content r , and then the text content initial representation vector E s Input into the multi-head self-attention mechanism to obtain the word-level representation vector C of the text content s ; Then, by taking the word-level representation vector C of the comment content r And the word-level representation vector C of the text content s Input them into the pooling layer for average pooling operation to obtain the sentence-level representation vector of the comment content and sentence-level representation vectors of text content
[0014] Step B3: Sentence-level representation vectors of all comments corresponding to the post Splice them together to get the sentence-level representation matrix T of the comment content r , and the sentence-level representation vector of the text content Copy m times to get the sentence-level representation matrix T of the text content s ; Then the sentence-level representation matrix T of the review content r And the sentence-level representation matrix T of the text content s The comments are input into the multi-head cross attention mechanism together, and the comprehensive semantic representation vector of the comment content is obtained by average pooling. Then the sentence-level representation vector of the text content and the comprehensive semantic representation vector of the comment content Input into the fusion gating mechanism to obtain the post's comment-based text fine-grained semantic representation vector X sr ;
[0015] Step B4: Construct T heterogeneous propagation graph snapshots G1, ..., G according to the time when the user forwards or comments. t ,...,G T ; Input any heterogeneous communication graph snapshot into the multi-layer graph neural network HGN, first obtain the attention distribution vector A of the post node and the adjacent user node HGN and the information representation vector I of the adjacent user nodes HGN ; Then, the attention distribution is used as the weight to aggregate the information of the adjacent user nodes to obtain the information representation vector of the post node in the tth heterogeneous communication graph snapshot And after L layers of HGN, we get the post node s i Propagation structure information representation vector
[0016] Step B5: Snapshot all heterogeneous propagation graphs G1, ..., G t ,...,G T Through step B4 respectively, the node representation vector set of each heterogeneous propagation graph snapshot is obtained Then the node representation vector set of each snapshot is Input them into the rotation memory unit RUM respectively to obtain the snapshot memory representation vector set h t ; Then the post node s i The memory representation vectors in each snapshot are concatenated to obtain the post node s i The memory representation vector matrix H i ; Then H i Input into the temporal attention and obtain the post node s through the pooling operation i Dynamic information representation vector B s ;
[0017] Step B6: The fine-grained semantic representation vector X of the post based on the comments obtained in step B3 sr The dynamic information representation vector B of the post obtained in step B5 s Splice them together to get the final representation vector V of the post f ; Then V f Input the fully connected layer and softmax function to obtain the prediction result; then, according to the target loss function, the gradient of each parameter in the deep learning network model is calculated by backpropagation method, and the parameters are updated using stochastic gradient descent method;
[0018] Step B7: When the loss value change generated by each iteration of the deep learning network model is less than a given threshold or reaches the maximum number of iterations, the training process of the deep learning network model is terminated.
[0019] Furthermore, the step B1 specifically includes the following steps:
[0020] Step B11: traverse the training dataset DE, perform word segmentation on the text content of the post and the comment content, and remove special symbols and stop words. Each training sample in DE is represented by de=(s i , R i , U i , c); where s i is the text content of the post, R i For posts i The corresponding review set, R i ={r1, ..., r m},U i To participate in forwarding or commenting on posts i A collection of user information, p is the authenticity label corresponding to the post, c∈{non-rumor, false rumor, true rumor, unconfirmed rumor};
[0021] The text content of the post i Expressed as:
[0022]
[0023] in, For post text content i The tth word in the post, t = 1, 2, ..., n, n is the post text content s i The number of words;
[0024] Comments on the post j Expressed as:
[0025]
[0026] in, For comment content j The tth word in, i = 1, 2, ..., m, m is the comment content r j The number of words;
[0027] Step B12: Get the text content of step B11 Encode and get the text content s i The initial characterization vector E s ;E s Expressed as:
[0028]
[0029] in, Represents the word vector matrix from pre-training The word embedding representation vector obtained by looking up in For the tth word The corresponding word embedding representation vector, d represents the dimension of the word embedding representation vector, |V| represents the number of words in the dictionary V;
[0030] Step B13: Get the comments content of step B11 Encode and get the comment content r j The initial characterization vector E r ;E r Expressed as:
[0031]
[0032] in, Represents the word vector matrix from pre-training The word embedding representation vector obtained by looking up in Represents the jth word The corresponding word embedding representation vector, d represents the dimension of the word embedding representation vector, |V| is the number of words in the dictionary V;
[0033] Step B14: Using the number of fans, number of followers, and whether it is officially certified as user features, the user information u obtained in step B11 is calculated. k Encode and obtain the user's initial representation vector Where d is the dimension of the feature vector.
[0034] Furthermore, the step B2 specifically includes the following steps:
[0035] Step B21: Convert the text content to i The initial characterization vector E s As the matrix Q′, the post corresponding comment content set R i ={r1, ..., r m}'s initial representation vector E r As K′ and V′, for each comment r of the post j Perform multi-head cross attention to obtain the word-level representation vector C of the comment content r , the calculation process is as follows:
[0036] C r =MultiHead(E s , E r , E r )
[0037] MultiHead(Q′,K′,V′)=Concat(head1,…,head h )W o
[0038]
[0039]
[0040] Among them, MultiHead represents the multi-head attention mechanism, h is the number of parallel heads, is the weight matrix of the linear projection, is the scale factor, head i represents the output of the i-th attention function, i∈[1,h];
[0041] Step B22: Initially represent the text content vector E s As matrices Q′, K′ and V′, they are input into the multi-head self-attention mechanism to obtain the word-level representation vector C of the text content. s , the calculation process is as follows:
[0042] C s =MultiHead(E s , E s , E s )
[0043] MultiHead(Q′,K′,V′)=Concat(head1,…,head h )W o
[0044]
[0045]
[0046] Among them, MultiHead represents the multi-head attention mechanism, h is the number of parallel heads, is the weight matrix of the linear projection, is the scale factor, head i represents the output of the i-th attention function, i∈[1,h];
[0047] Step B23: Combine the word-level representation vector Cr of the comment content and the word-level representation vector C of the text content s Input them into the pooling layer for average pooling operation to obtain the sentence-level representation vector of the comment content and sentence-level representation vectors of text content The calculation process is as follows:
[0048]
[0049]
[0050] in, MeanPool(·) represents the average pooling function.
[0051] Furthermore, the step B3 specifically includes the following steps:
[0052] Step B31: Sentence-level representation vectors of all comments corresponding to the post Perform splicing to obtain the sentence-level representation matrix T of the comment content r , and the sentence-level representation vector of the text content Copy m times to get the sentence-level representation matrix T of the text content s , the calculation process is as follows:
[0053]
[0054] Among them, the matrix Represents the sentence-level representation vector of the t-th comment;
[0055] Step B32: Transform the sentence-level representation matrix T of the text content into s As Q′, the sentence-level representation matrix T of the review content r As matrices K′ and V′, they are input into the multi-head cross attention mechanism together, and the comprehensive semantic representation vector of the comment content is obtained by average pooling The calculation process is as follows:
[0056]
[0057] T′=MultiHead(T s , T r , T r )
[0058] MultiHead(Q′,K′,V′)=Concat(head1,…,head h )W o
[0059]
[0060]
[0061] Among them, MeanPool(·) represents the average pooling function, MultiHead represents the multi-head attention mechanism, h is the number of parallel heads, is the weight matrix of the linear projection, is the scale factor, headi represents the output of the i-th attention function, i∈[1,h];
[0062] Step B33: Transform the sentence-level representation vector of the text content into and the comprehensive semantic representation vector of the comment content Commonly input into the fusion gating mechanism to obtain post s i Comment-based text fine-grained semantic representation vector X sr , the calculation process is as follows:
[0063]
[0064]
[0065] Where σ(·) is the sigmoid activation function, and is a learnable parameter in the fusion gating mechanism.
[0066] Furthermore, the step B4 specifically includes the following steps:
[0067] Step B41: According to the time when the user forwards or comments, set T snapshot time points and construct T heterogeneous propagation graphs G1, ..., G t ,...,G T Among them, G t =(V t , E t ) is represented as the tth heterogeneous propagation graph snapshot, the node set V t Contains all post nodes, user nodes that publish posts, and user nodes that forward or comment on posts in the dataset DE at time point t, and the edge set V t Contains the publishing, forwarding and commenting relationships; and the initial representation vector E of the text content obtained in step B1 s and the user's initial representation vector E u As the initial representation vector of each node;
[0068] Step B42: Take the tth heterogeneous propagation graph snapshot G t =(V t , E t ) is input into the multi-layer graph neural network HGN, which provides corresponding linear mapping functions for different types of nodes and edges, models the distribution differences of different types of nodes to the greatest extent, captures the semantic associations between different node pairs, and obtains the post node s i Attention distribution vector A of adjacent user nodes HGN and the information representation vector I of the adjacent user nodes HGN , the calculation process is as follows:
[0069]
[0070]
[0071]
[0072]
[0073] A HGN =Softmax(Concat(head 1 ,…,head k ))
[0074] I HGN =Concat(Info_head 1 (u, e, s i ),…,Info_head H (u, e, s i ))
[0075] Among them, k∈[1,H],τ(s i ) represents node s i The type of edge e, φ(e) represents the type of edge e, They are expressed as τ(s i ) and τ(u) type nodes, represents the linear mapping function of τ(u) type nodes, represents the weight matrix of φ(e) type edge, Concat(·) is the concatenation function, and H is the number of parallel heads;
[0076] Step B43: Post s i Attention distribution vector A of all adjacent user nodes HGN As the weighted aggregation of the information representation vector I of all adjacent user nodes HGN , get the post node s in the tth heterogeneous propagation graph snapshot i Information representation vector And get node s through root node enhancement i Enhanced information representation vector Finally, after L layers of HGN, we get the post node s i Propagation structure information representation vector The calculation process is as follows:
[0077] P u =A HGN I HGN
[0078]
[0079]
[0080] in, It represents mapping the post node back to the feature distribution space of the corresponding category, and σ(·) is a nonlinear activation function.
[0081] Furthermore, the step B5 specifically includes the following steps:
[0082] Step B51: snapshot all heterogeneous propagation graphs G1, ..., Gt, . .., G T Through step B4 respectively, the node representation vector set of each heterogeneous propagation graph snapshot is obtained Where t represents the t-th snapshot, i represents the i-th post node, and d is the dimension of each node embedding; at each time step t, the node representation vector set As z t Input into the rotation memory unit RUM to obtain the snapshot memory representation vector set The calculation process is as follows:
[0083]
[0084]
[0085] u t =sigmoid(u′ t )
[0086]
[0087]
[0088]
[0089]
[0090]
[0091]
[0092]
[0093]
[0094]
[0095]
[0096] Where σ(·) is a nonlinear activation function, ⊙ is an element-wise matrix multiplication operation, is a trainable parameter, λ and η are configurable coefficients, d is the dimension of the input vector, l is the number of hidden layer neurons, and ||·|| is the L2 regularization operation;
[0097] Step B52: Post node s i The memory representation vectors in each snapshot are concatenated to obtain the post node s i The memory representation vector matrix H i , Then H i Input into the temporal attention and obtain the post node s through the pooling operation i Dynamic information representation vector B s , the calculation process is as follows:
[0098]
[0099] B s =MeanPool(Z i )
[0100] Among them, MeanPool(·) represents the average pooling function, is a trainable parameter, Represents the mask matrix; if M u,v =-∞, it means that the attention coefficient is not recorded from time u to v; when time u≤v, set M u,v =0; otherwise M u,v =--∞.
[0101] Furthermore, the step B6 specifically includes the following steps:
[0102] Step B61: The text fine-grained semantic representation vector X obtained in step B33 is sr and the dynamic information characterization vector B obtained in step B52 s Connect and get the final representation vector V f , the calculation formula is as follows:
[0103] V f =Concat(X sr , B s )
[0104] Step B62: The final representation vector V f The input is fed into the fully connected layer and normalized using softmax to calculate the probability that the post text content belongs to each category. The calculation formula is as follows:
[0105] y=W o Vf +b
[0106] p c (y) = softmax(y)
[0107] Among them, y is the output vector of the fully connected layer, is the weight matrix of the fully connected layer, b is the bias term of the fully connected layer, and p c (y) is the probability of predicting that the text content corresponds to category c, 0≤p c (y)≤1, c∈{non-rumor, false rumor, true rumor, unconfirmed rumor};
[0108] Step B63: Use cross entropy as the loss function to calculate the loss value, update the learning rate through the gradient optimization algorithm Adam, and use back propagation to iteratively update the model parameters to minimize the loss function to train the model; the calculation formula for minimizing the loss function loss is as follows:
[0109]
[0110] in, is the L2 regularization term, λ is the learning rate, and θ is all the parameters contained in the model.
[0111] The present invention also provides a rumor detection system based on dynamic heterogeneous graph and multi-level attention using the above method, comprising:
[0112] The data collection module is used to extract the text content, comments and related user information of posts on social platforms, annotate the authenticity of posts, and build a training dataset;
[0113] The text processing module is used to preprocess the training samples in the training data set;
[0114] The text encoding module is used to search the word vectors of the pre-processed text content and the words in the comment content in the pre-trained word vector matrix to obtain the initial representation vectors of the text content and the initial representation vectors of the comment content;
[0115] A user encoding module is used to encode user information according to multiple user characteristics to obtain an initial user representation vector;
[0116] The diffusion graph construction module is used to construct multiple heterogeneous diffusion graph snapshots based on the time when users forward or comment, and use the initial representation vector of the text content and the user's initial representation vector as the initial representation vector of each node;
[0117] The network model training module is used to input the initial representation vectors of the text content, the initial representation vectors of the comment content, and the snapshot of the heterogeneous propagation graph into the deep learning network to obtain the final representation vector of the post. This representation vector is used to predict the probability of belonging to a certain category. The loss is calculated by comparing it with the true category labels in the training dataset. The entire deep learning network is trained with the goal of minimizing the loss, resulting in a deep learning network model based on dynamic heterogeneous graphs and multi-level attention.
[0118] The rumor detection module is used to detect the authenticity of posts. It uses a trained deep learning network model based on dynamic heterogeneous graphs and multi-level attention to analyze and process the input posts to be detected, extract the textual semantic information based on comments and the structural and dynamic information in the heterogeneous propagation graph, and output the predicted post authenticity label.
[0119] Compared with the existing technology, the present invention has the following beneficial effects: it provides a rumor detection method and system based on dynamic heterogeneous graphs and multi-level attention. This method and system analyzes the authenticity of posts and predicts the authenticity labels of posts by constructing a deep learning network model based on dynamic heterogeneous graphs and multi-level attention, which can effectively improve the accuracy of rumor detection and has strong practicality and broad application prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0120] Figure 1 is a flowchart of a method implementation of an embodiment of the present invention;
[0121] Figure 2 This is a model architecture diagram in an embodiment of the present invention;
[0122] Figure 3 Schematic diagram of the system structure of an embodiment of the present invention. DETAILED DESCRIPTION
[0123] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0124] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present application belongs.
[0125] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or combinations thereof.
[0126] like Figure 1 As shown, this embodiment provides a rumor detection method based on dynamic heterogeneous graph and multi-level attention, including the following steps:
[0127] Step A: Collect posts on social platforms, extract the text content, comments and related user information in the posts, and annotate the authenticity labels of the posts to construct the training dataset DE.
[0128] Step B: Use the training dataset DE to train a deep learning network model based on dynamic heterogeneous graph and multi-level attention, and obtain Figure 2 The deep learning network model shown is used to analyze the authenticity of the post and predict the authenticity label of the post.
[0129] Step C: Input the text content, comment content, and related user information of the post to be tested into the trained deep learning network model to obtain the authenticity label of the post.
[0130] In this embodiment, step B specifically includes the following steps:
[0131] Step B1: Initially encode all training samples in the training dataset DE to obtain the initial representation vector E of the text content s , the initial representation vector E of the comment content r and the user's initial representation vector E u The step B1 specifically includes the following steps:
[0132] Step B11: traverse the training dataset DE, perform word segmentation on the text content of the post and the comment content, and remove special symbols and stop words. Each training sample in DE is represented by de=(s i , R i , U i , c); where s i is the text content of the post, R i For posts i The corresponding review set, R i ={r1, ..., r m},U i To participate in forwarding or commenting on posts i A collection of user information, p is the authenticity label corresponding to the post, c∈{non-rumor, false rumor, true rumor, unconfirmed rumor};
[0133] The text content of the post i Expressed as:
[0134]
[0135] in, For post text content i The tth word in the post, t = 1, 2, ..., n, n is the post text content s i The number of words.
[0136] Comments on the post j Expressed as:
[0137]
[0138] in, For comment content j The tth word in, i = 1, 2, ..., m, m is the comment content r j The number of words.
[0139] Step B12: Get the text content of step B11 Encode and get the text content s i The initial characterization vector E s ;E s Expressed as:
[0140]
[0141] in, Represents the word vector matrix from pre-training The word embedding representation vector obtained by looking up in For the tth word The corresponding word embedding representation vector, d represents the dimension of the word embedding representation vector, and |V| represents the number of words in the dictionary V.
[0142] Step B13: Get the comments content of step B11 Encode and get the comment content r j The initial characterization vector E r ;E r Expressed as:
[0143]
[0144] in, Represents the word vector matrix from pre-training The word embedding representation vector obtained by looking up in Represents the jth word The corresponding word embedding representation vector, d represents the dimension of the word embedding representation vector, and |V| is the number of words in the dictionary V.
[0145] Step B14: By taking the number of fans, number of followers, whether it is officially certified, etc. as user features, the user information u obtained in step B11 is calculated. kEncode and obtain the user's initial representation vector Where d is the dimension of the feature vector.
[0146] Step B2: The initial text content representation vector E obtained in step B1 s and the initial representation vector E of the comment content r At the same time, it is input into a multi-head cross attention mechanism to obtain the word-level representation vector C of the comment content r , and then the text content initial representation vector E s Input into the multi-head self-attention mechanism to obtain the word-level representation vector C of the text content s ; Then, by taking the word-level representation vector C of the comment content r And the word-level representation vector C of the text content s Input them into the pooling layer for average pooling operation to obtain the sentence-level representation vector of the comment content and sentence-level representation vectors of text content The step B2 specifically includes the following steps:
[0147] Step B21: Convert the text content to i The initial characterization vector E s As the matrix Q′, the post corresponding comment content set R i ={r1, ..., r m}'s initial representation vector E r As K′ and V′, for each comment r of the post j Perform multi-head cross attention to obtain the word-level representation vector C of the comment content r , the calculation process is as follows:
[0148] C r =MultiHead(E s , E r , E r )
[0149] MultiHead(Q′,K′,V′)=Concat(head1,…,head h )W o
[0150]
[0151]
[0152] Among them, MultiHead represents the multi-head attention mechanism, h is the number of parallel heads, is the weight matrix of the linear projection, is the scaling factor, headi represents the output of the i-th attention function, i∈[1,h].
[0153] Step B22: Initially represent the text content vector E s As matrices Q′, K′ and V′, they are input into the multi-head self-attention mechanism to obtain the word-level representation vector C of the text content. s , the calculation process is as follows:
[0154] C s =MultiHead(E s , E s , E s )
[0155] MultiHead(Q′,K′,V′)=Concat(head1,…,head h )W o
[0156]
[0157]
[0158] Among them, MultiHead represents the multi-head attention mechanism, h is the number of parallel heads, is the weight matrix of the linear projection, is the scaling factor, headi represents the output of the i-th attention function, i∈[1,h].
[0159] Step B23: Transform the word-level representation vector C of the comment content r And the word-level representation vector C of the text content s Input them into the pooling layer for average pooling operation to obtain the sentence-level representation vector of the comment content and sentence-level representation vectors of text content The calculation process is as follows:
[0160]
[0161]
[0162] in, MeanPool(·) represents the average pooling function.
[0163] Step B3: Sentence-level representation vectors of all comments corresponding to the post Splice them together to get the sentence-level representation matrix T of the comment content r , and the sentence-level representation vector of the text content Copy m times to get the sentence-level representation matrix T of the text content s ; Then the sentence-level representation matrix T of the review content rAnd the sentence-level representation matrix T of the text content s The comments are input into the multi-head cross attention mechanism together, and the comprehensive semantic representation vector of the comment content is obtained by average pooling. Then the sentence-level representation vector of the text content and the comprehensive semantic representation vector of the comment content Input into the fusion gating mechanism to obtain the post's comment-based text fine-grained semantic representation vector X sr The step B3 specifically includes the following steps:
[0164] Step B31: Sentence-level representation vectors of all comments corresponding to the post Perform splicing to obtain the sentence-level representation matrix T of the comment content r , and the sentence-level representation vector of the text content Copy m times to get the sentence-level representation matrix T of the text content s , the calculation process is as follows:
[0165]
[0166] Among them, the matrix Represents the sentence-level representation vector of the t-th review.
[0167] Step B32: Transform the sentence-level representation matrix T of the text content into s As Q′, the sentence-level representation matrix T of the review content r As matrices K′ and V′, they are input into the multi-head cross attention mechanism together, and the comprehensive semantic representation vector of the comment content is obtained by average pooling The calculation process is as follows:
[0168]
[0169] T′=MultiHead(T s , T r , T r )
[0170] MultiHead(Q′,K′,V′)=Concat(head1,…,head h )W o
[0171]
[0172]
[0173] Among them, MeanPool(·) represents the average pooling function, MultiHead represents the multi-head attention mechanism, h is the number of parallel heads, is the weight matrix of the linear projection, is the scale factor, head i represents the output of the i-th attention function, i∈[1,h].
[0174] Step B33: Transform the sentence-level representation vector of the text content into and the comprehensive semantic representation vector of the comment content Commonly input into the fusion gating mechanism to obtain post s i Comment-based text fine-grained semantic representation vector X sr , the calculation process is as follows:
[0175]
[0176]
[0177] Where σ(·) is the sigmoid activation function, and is a learnable parameter in the fusion gating mechanism.
[0178] Step B4: Construct T heterogeneous propagation graph snapshots G1, ..., G according to the time when the user forwards or comments. t ,...,G T ; Input any heterogeneous communication graph snapshot into the multi-layer graph neural network HGN, first obtain the attention distribution vector A of the post node and the adjacent user node HGN and the information representation vector I of the adjacent user nodes HGN ; Then, the attention distribution is used as the weight to aggregate the information of the adjacent user nodes to obtain the information representation vector of the post node in the tth heterogeneous communication graph snapshot And after L layers of HGN, we get the post node s i Propagation structure information representation vector The step B4 specifically includes the following steps:
[0179] Step B41: According to the time when the user forwards or comments, set T snapshot time points and construct T heterogeneous propagation graphs G1, ..., G t,. .., G T Among them, G t =(V t , E t ) is represented as the tth heterogeneous propagation graph snapshot, the node set V t Contains all post nodes, user nodes that publish posts, and user nodes that forward or comment on posts in the dataset DE at time point t, and the edge set Vt Contains the publishing, forwarding and commenting relationships; and the initial representation vector E of the text content obtained in step B1 s and the user's initial representation vector E u As the initial representation vector of each node.
[0180] Step B42: Take the tth heterogeneous propagation graph snapshot G t =(V t , E t ) is input into the multi-layer graph neural network HGN, which provides corresponding linear mapping functions for different types of nodes and edges, models the distribution differences of different types of nodes to the greatest extent, captures the semantic associations between different node pairs, and obtains the post node s i Attention distribution vector A of adjacent user nodes HGN and the information representation vector I of the adjacent user nodes HGN , the calculation process is as follows:
[0181]
[0182]
[0183]
[0184]
[0185] A HGN =softmax(Concat(head 1 ,…,head k ))
[0186] I HGN =Concat(Info_head 1 (u, e, s i ),…,Info_head H (u, e, s i ))
[0187] Among them, k∈[1,H],τ(s i ) represents node s i The type of edge e, φ(e) represents the type of edge e, They are expressed as τ(s i ) and τ(u) type nodes, represents the linear mapping function of τ(u) type nodes, represents the weight matrix of φ(e) type edges, Concat(·) is the concatenation function, and H is the number of parallel heads.
[0188] Step B43: Post si Attention distribution vector A of all adjacent user nodes HGN As the weighted aggregation of the information representation vector I of all adjacent user nodes HGN , get the post node s in the tth heterogeneous propagation graph snapshot i Information representation vector And get node s through root node enhancement i Enhanced information representation vector Finally, after L layers of HGN, we get the post node s i Propagation structure information representation vector The calculation process is as follows:
[0189] P u =A HGN I HGN
[0190]
[0191]
[0192] in, It represents mapping the post node back to the feature distribution space of the corresponding category, and σ(·) is a nonlinear activation function.
[0193] Step B5: Snapshot all heterogeneous propagation graphs G1, ..., G t ,...,G T Through step B4 respectively, the node representation vector set of each heterogeneous propagation graph snapshot is obtained Then the node representation vector set of each snapshot is Input them into the rotation memory unit RUM respectively to obtain the snapshot memory representation vector set h t ; Then the post node s i The memory representation vectors in each snapshot are concatenated to obtain the post node s i The memory representation vector matrix H i ; Then H i Input into the temporal attention and obtain the post node s through the pooling operation i Dynamic information representation vector B s The step B5 specifically includes the following steps:
[0194] Step B51: Snapshot all heterogeneous propagation graphs G1, ..., G t ,...,G T Through step B4 respectively, the node representation vector set of each heterogeneous propagation graph snapshot is obtained Where t represents the t-th snapshot, i represents the i-th post node, and d is the dimension of each node embedding; at each time step t, the node representation vector set As z t Input into the rotation memory unit RUM to obtain the snapshot memory representation vector set The calculation process is as follows:
[0195]
[0196]
[0197] u t =sigmoid(u′ t )
[0198]
[0199]
[0200]
[0201]
[0202]
[0203]
[0204]
[0205]
[0206]
[0207]
[0208] Where σ(·) is a nonlinear activation function, ⊙ is an element-wise matrix multiplication operation, is a trainable parameter, λ and η are configurable coefficients, d is the dimension of the input vector, l is the number of hidden layer neurons, and ||·|| is the L2 regularization operation.
[0209] Step B52: Post node s i The memory representation vectors in each snapshot are concatenated to obtain the post node s i The memory representation vector matrix H i , Then H i Input into the temporal attention and obtain the post node s through the pooling operation i Dynamic information representation vector B s , the calculation process is as follows:
[0210]
[0211] B s =MeanPool(Z i )
[0212] Among them, MeanPool(·) represents the average pooling function, is a trainable parameter, Represents the mask matrix; if M u,v =-∞, it means that the attention coefficient is not recorded from time u to v; when time u≤v, set M u,v =0; otherwise M u,v =-∞.
[0213] Step B6: The fine-grained semantic representation vector X of the post based on the comments obtained in step B3 sr The dynamic information representation vector B of the post obtained in step B5 s Splice them together to get the final representation vector V of the post f ; Then V f Input the fully connected layer and softmax function to obtain the prediction result; then, based on the target loss function, calculate the gradient of each parameter in the deep learning network model through the backpropagation method, and use the stochastic gradient descent method to update each parameter. Step B6 specifically includes the following steps:
[0214] Step B61: The text fine-grained semantic representation vector X obtained in step B33 is sr and the dynamic information characterization vector B obtained in step B52 s Connect and get the final representation vector V f , the calculation formula is as follows:
[0215] V f =Concat(X sr , B s )
[0216] Step B62: The final representation vector V f The input is fed into the fully connected layer and normalized using softmax to calculate the probability that the post text content belongs to each category. The calculation formula is as follows:
[0217] y=W o V f +b
[0218] p c (y) = softmax(y)
[0219] Among them, y is the output vector of the fully connected layer, is the weight matrix of the fully connected layer, b is the bias term of the fully connected layer, and p c(y) is the probability of predicting that the text content corresponds to category c, 0≤p c (y)≤1, c∈{non-rumor, false rumor, true rumor, unconfirmed rumor}.
[0220] Step B63: Use cross entropy as the loss function to calculate the loss value, update the learning rate through the gradient optimization algorithm Adam, and use back propagation to iteratively update the model parameters to minimize the loss function to train the model; the calculation formula for minimizing the loss function loss is as follows:
[0221]
[0222] in, is the L2 regularization term, λ is the learning rate, and θ is all the parameters contained in the model.
[0223] Step B7: When the loss value change generated by each iteration of the deep learning network model is less than a given threshold or reaches the maximum number of iterations, the training process of the deep learning network model is terminated.
[0224] like Figure 3 As shown, this embodiment also provides a rumor detection system based on dynamic heterogeneous graph and multi-level attention using the above method, including a data collection module, a text processing module, a text encoding module, a user encoding module, a propagation graph construction module, a network model training module and a rumor detection module.
[0225] The data collection module is used to extract the text content, comment content and related user information of posts on the social platform, and to mark the authenticity of the posts to construct a training data set.
[0226] The text processing module is used to pre-process the training samples in the training data set, including word segmentation, removal of stop words, etc.
[0227] The text encoding module is used to search the word vectors of the words in the pre-processed text content and the comment content in the pre-trained word vector matrix to obtain the initial representation vector of the text content and the initial representation vector of the comment content.
[0228] The user encoding module is used to encode user information according to multiple user characteristics to obtain an initial user representation vector.
[0229] The propagation graph construction module is used to construct multiple heterogeneous propagation graph snapshots according to the time when the user forwards (or comments), and uses the initial representation vector of the text content and the user's initial representation vector as the initial representation vector of each node.
[0230] The network model training module is used to input the initial representation vector of the text content, the initial representation vector of the comment content and the heterogeneous propagation graph snapshot into the deep learning network to obtain the final representation vector of the post, use the representation vector to predict the probability of belonging to a certain category, and calculate the loss by comparing with the true category annotation in the training data set. The entire deep learning network is trained with the goal of minimizing the loss to obtain a deep learning network model based on dynamic heterogeneous graph and multi-level attention.
[0231] The rumor detection module is used to detect the authenticity of posts. It uses a trained deep learning network model based on dynamic heterogeneous graphs and multi-level attention to analyze and process the input posts to be detected, extract the text semantic information based on comments and the structural and dynamic information in the heterogeneous propagation graph, and output the predicted post authenticity label.
[0232] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0233] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0234] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0235] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.
[0236] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any other manner. Any person skilled in the art may utilize the above-disclosed technical content to modify or modify the present invention into equivalent embodiments. However, any simple modifications, equivalent variations, and modifications to the above embodiments that do not depart from the technical content of the present invention and are based on the technical essence of the present invention remain within the scope of protection of the present invention.
Claims
1. A rumor detection method based on dynamic heterogeneous graph and multi-level attention, characterized in that: The following steps are involved: Step A: Collect posts from social platforms, extract the text content, comments, and related user information from the posts, and annotate the authenticity labels of the posts to construct the training dataset DE; Step B: Use the training dataset DE to train a deep learning network model based on dynamic heterogeneous graph and multi-level attention. This model is used to analyze the authenticity of the post and predict the authenticity label of the post. Step C: Input the text content, comments, and related user information of the post to be tested into the trained deep learning network model to obtain the authenticity label of the post; Described step B comprises the following steps: Step B1: Initially encode all training samples in the training dataset DE to obtain the initial representation vector E of the text content s , the initial representation vector E of the comment content r and the user's initial representation vector E u ; Step B2: The initial text content representation vector E obtained in step B1 s and the initial representation vector E of the comment content r At the same time, it is input into a multi-head cross attention mechanism to obtain the word-level representation vector C of the comment content r , and then the text content initial representation vector E s Input into the multi-head self-attention mechanism to obtain the word-level representation vector C of the text content s ; Then, by taking the word-level representation vector C of the comment content r And the word-level representation vector C of the text content s Input them into the pooling layer for average pooling operation to obtain the sentence-level representation vector of the comment content and sentence-level representation vectors of text content Step B3: Sentence-level representation vectors of all comments corresponding to the post Splice them together to get the sentence-level representation matrix T of the comment content r , and the sentence-level representation vector of the text content Copy m times to get the sentence-level representation matrix T of the text content s ; Then the sentence-level representation matrix T of the review content r And the sentence-level representation matrix T of the text content s The comments are input into the multi-head cross attention mechanism together, and the comprehensive semantic representation vector of the comment content is obtained by average pooling. Then the sentence-level representation vector of the text content and the comprehensive semantic representation vector of the comment content Input into the fusion gating mechanism to obtain the post's comment-based text fine-grained semantic representation vector X sr ; Step B4: Construct T heterogeneous propagation graph snapshots G1,…,G according to the time when the user forwards or comments. t ,…,G T ; Input any heterogeneous communication graph snapshot into the multi-layer graph neural network HGN, first obtain the attention distribution vector A of the post node and the adjacent user node HGN and the information representation vector I of the adjacent user nodes HGN ; Then, the attention distribution is used as the weight to aggregate the information of the adjacent user nodes to obtain the information representation vector of the post node in the tth heterogeneous communication graph snapshot And after L layers of HGN, we get the post node s i Propagation structure information representation vector 2. The rumor detection method based on dynamic heterogeneous graph and multi-level attention according to claim 1 is characterized in that The step B further comprises the following steps: Step B5: Snapshot all heterogeneous propagation graphs G1,…,G t ,…,G T Through step B4 respectively, the node representation vector set of each heterogeneous propagation graph snapshot is obtained Then the node representation vector set of each snapshot is Input them into the rotation memory unit RUM respectively to obtain the snapshot memory representation vector set h t ; Then the post node s i The memory representation vectors in each snapshot are concatenated to obtain the post node s i The memory representation vector matrix H i ; Then H i Input into the temporal attention and obtain the post node s through the pooling operation i Dynamic information representation vector B s ; Step B6: The fine-grained semantic representation vector X of the post based on the comments obtained in step B3 sr The dynamic information representation vector B of the post obtained in step B5 s Splice them together to get the final representation vector V of the post f ; Then V f Input the fully connected layer and softmax function to obtain the prediction result; then, according to the target loss function, the gradient of each parameter in the deep learning network model is calculated by backpropagation method, and the parameters are updated using stochastic gradient descent method; Step B7: When the loss value change generated by each iteration of the deep learning network model is less than a given threshold or reaches the maximum number of iterations, the training process of the deep learning network model is terminated.
3. The rumor detection method based on dynamic heterogeneous graph and multi-level attention according to claim 2 is characterized in that The step B1 specifically includes the following steps: Step B11: traverse the training dataset DE, perform word segmentation on the text content of the post and the comment content, and remove special symbols and stop words. Each training sample in DE is represented by de=(s i ,R i ,U i ,c); where s i is the text content of the post, R i For posts i The corresponding review set, R i ={r1,…,r m },U i To participate in forwarding or commenting on posts i A collection of user information, p is the authenticity label corresponding to the post, c∈{non-rumor, false rumor, true rumor, unconfirmed rumor}; The text content of the post i Expressed as: in, For post text content i The tth word in the post, t=1,2,…,n, n is the post text content s i The number of words; Comments on the post j Expressed as: in, For comment content j The tth word in, i=1,2,…,m, m is the comment content r j The number of words; Step B12: Get the text content of step B11 Encode and get the text content s i The initial characterization vector E s ;E s Expressed as: in, Represents the word vector matrix from pre-training The word embedding representation vector obtained by looking up in For the tth word The corresponding word embedding representation vector, d represents the dimension of the word embedding representation vector, |V| represents the number of words in the dictionary V; Step B13: Get the comments content of step B11 Encode and get the comment content r j The initial characterization vector E r ;E r Expressed as: in, Represents the word vector matrix from pre-training The word embedding representation vector obtained by looking up in Represents the jth word The corresponding word embedding representation vector, d represents the dimension of the word embedding representation vector, |V| is the number of words in the dictionary V; Step B14: Using the number of fans, number of followers, and whether it is officially certified as user features, the user information u obtained in step B11 is calculated. k Encode and obtain the user's initial representation vector Where d is the dimension of the feature vector.
4. The rumor detection method based on dynamic heterogeneous graph and multi-level attention according to claim 3 is characterized in that The step B2 specifically includes the following steps: Step B21: Convert the text content to i The initial characterization vector E s As the matrix Q′, the post corresponding comment content set R i ={r1,…,r m }'s initial representation vector E r As K′ and V′, for each comment r of the post j Perform multi-head cross attention to obtain the word-level representation vector C of the comment content r , the calculation process is as follows: C r =MultiHead(E s ,HAVE BEEN r ,HAVE BEEN r ) MultiHead(Q′,K′,V′)=Concat(head1,…,head h )W o Among them, MultiHead represents the multi-head attention mechanism, h is the number of parallel heads, is the weight matrix of the linear projection, is the scale factor, head i represents the output of the i-th attention function, i∈[1,h]; Step B22: Initially represent the text content vector E s As matrices Q′, K′ and V′, they are input into the multi-head self-attention mechanism to obtain the word-level representation vector C of the text content. s , the calculation process is as follows: C s =MultiHead(E s ,HAVE BEEN s ,HAVE BEEN s ) MultiHead(Q′,K′,V′)=Concat(head1,…,head h )W o Among them, MultiHead represents the multi-head attention mechanism, h is the number of parallel heads, is the weight matrix of the linear projection, is the scale factor, head i represents the output of the i-th attention function, i∈[1,h]; Step B23: Transform the word-level representation vector C of the comment content r And the word-level representation vector C of the text content s Input them into the pooling layer for average pooling operation to obtain the sentence-level representation vector of the comment content and sentence-level representation vectors of text content The calculation process is as follows: in, MeanPool(·) represents the average pooling function.
5. The rumor detection method based on dynamic heterogeneous graph and multi-level attention according to claim 4 is characterized in that The step B3 specifically includes the following steps: Step B31: Sentence-level representation vectors of all comments corresponding to the post Perform splicing to obtain the sentence-level representation matrix T of the comment content r , and the sentence-level representation vector of the text content Copy m times to get the sentence-level representation matrix T of the text content s , the calculation process is as follows: Among them, the matrix Represents the sentence-level representation vector of the t-th comment; Step B32: Transform the sentence-level representation matrix T of the text content into s As Q′, the sentence-level representation matrix T of the review content r As matrices K′ and V′, they are input into the multi-head cross attention mechanism together, and the comprehensive semantic representation vector of the comment content is obtained by average pooling The calculation process is as follows: T′=MultiHead(T s ,T r ,T r ) MultiHead(Q′,K′,V′)=Concat(head1,…,head h )W o Among them, MeanPool(·) represents the average pooling function, MultiHead represents the multi-head attention mechanism, h is the number of parallel heads, is the weight matrix of the linear projection, is the scale factor, head i represents the output of the i-th attention function, i∈[1,h]; Step B33: Transform the sentence-level representation vector of the text content into and the comprehensive semantic representation vector of the comment content Commonly input into the fusion gating mechanism to obtain post s i Comment-based text fine-grained semantic representation vector X sr , the calculation process is as follows: Where σ(·) is the sigmoid activation function, and is a learnable parameter in the fusion gating mechanism.
6. The rumor detection method based on dynamic heterogeneous graph and multi-level attention according to claim 5 is characterized in that The step B4 specifically includes the following steps: Step B41: According to the time when the user forwards or comments, set T snapshot time points and construct T heterogeneous propagation graphs G1,…,G t ,…,G T Among them, G t =(V t ,E t ) is represented as the tth heterogeneous propagation graph snapshot, the node set V t Contains all post nodes, user nodes that publish posts, and user nodes that forward or comment on posts in the dataset DE at time point t, and the edge set V t Contains the publishing, forwarding and commenting relationships; and the initial representation vector E of the text content obtained in step B1 s and the user's initial representation vector E u As the initial representation vector of each node; Step B42: Take the tth heterogeneous propagation graph snapshot G t =(V t ,E t ) is input into the multi-layer graph neural network HGN, which provides corresponding linear mapping functions for different types of nodes and edges, models the distribution differences of different types of nodes to the greatest extent, captures the semantic associations between different node pairs, and obtains the post node s i Attention distribution vector A of adjacent user nodes HGN and the information representation vector I of the adjacent user nodes HGN , the calculation process is as follows: A HGN =Softmax(Concat(head 1 ,…,head k )) I HGN =Concat(Info_head 1 (u,e,s i ),…,Info_head H (u,e,s i )) Among them, k∈[1,H], τ(s i ) represents node s i The type of edge e, φ(e) represents the type of edge e, They are expressed as τ(s i ) and τ(u) type nodes, represents the linear mapping function of τ(u) type nodes, represents the weight matrix of φ(e) type edge, Concat(·) is the concatenation function, and H is the number of parallel heads; Step B43: Post s i Attention distribution vector A of all adjacent user nodes HGN As the weighted aggregation of the information representation vector I of all adjacent user nodes HGN , get the post node s in the tth heterogeneous propagation graph snapshot i Information representation vector And get node s through root node enhancement i Enhanced information representation vector Finally, after L layers of HGN, we get the post node s i Propagation structure information representation vector The calculation process is as follows: P u =A HGN ·I HGN in, It represents mapping the post node back to the feature distribution space of the corresponding category, and σ(·) is a nonlinear activation function.
7. The rumor detection method based on dynamic heterogeneous graph and multi-level attention according to claim 6 is characterized in that: The step B5 specifically includes the following steps: Step B51: snapshot G1,…,G of all heterogeneous propagation graphs t ,…,G T Through step B4 respectively, the node representation vector set of each heterogeneous propagation graph snapshot is obtained Where t represents the t-th snapshot, i represents the i-th post node, and d is the dimension of each node embedding; at each time step t, the node representation vector set As z t Input into the rotation memory unit RUM to obtain the snapshot memory representation vector set The calculation process is as follows: u t =sigmoid(u′ t ) Where σ(·) is a nonlinear activation function, ⊙ is an element-wise matrix multiplication operation, is a trainable parameter, λ and η are configurable coefficients, d is the dimension of the input vector, l is the number of hidden layer neurons, and ||·|| is the L2 regularization operation; Step B52: Post node s i The memory representation vectors in each snapshot are concatenated to obtain the post node s i The memory representation vector matrix H i , Then H i Input into the temporal attention and obtain the post node s through the pooling operation i Dynamic information representation vector B s , the calculation process is as follows: B s =MeanPool(Z i ) Among them, MeanPool(·) represents the average pooling function, is a trainable parameter, Represents the mask matrix; if M u,v =-∞, it means that the attention coefficient is not recorded from time u to v; when time u≤v, set M u,v =0; otherwise M u,v =-∞.
8. The rumor detection method based on dynamic heterogeneous graph and multi-level attention according to claim 7 is characterized in that: The step B6 specifically includes the following steps: Step B61: The text fine-grained semantic representation vector X obtained in step B33 is sr and the dynamic information characterization vector B obtained in step B52 s Connect and get the final representation vector V f , the calculation formula is as follows: V f =Concat(X sr ,B s ) Step B62: The final representation vector v f The input is fed into the fully connected layer and normalized using softmax to calculate the probability that the post text content belongs to each category. The calculation formula is as follows: y=W o v f +b p c (y)=softmax(y) Among them, y is the output vector of the fully connected layer, is the weight matrix of the fully connected layer, b is the bias term of the fully connected layer, and p c (y) is the probability of predicting that the text content corresponds to category c, 0≤p c (y)≤1, c∈{non-rumor, false rumor, true rumor, unconfirmed rumor}; Step B63: Use cross entropy as the loss function to calculate the loss value, update the learning rate through the gradient optimization algorithm Adam, and use back propagation to iteratively update the model parameters to minimize the loss function to train the model; the calculation formula for minimizing the loss function loss is as follows: in, is the L2 regularization term, λ is the learning rate, and θ is all the parameters contained in the model.
9. A rumor detection system based on dynamic heterogeneous graph and multi-level attention using the method according to any one of claims 1 to 8, characterized in that: include: The data collection module is used to extract the text content, comments and related user information of posts on social platforms, annotate the authenticity of posts, and build a training dataset; The text processing module is used to preprocess the training samples in the training data set; The text encoding module is used to search the word vectors of the pre-processed text content and the words in the comment content in the pre-trained word vector matrix to obtain the initial representation vectors of the text content and the initial representation vectors of the comment content; A user encoding module is used to encode user information according to multiple user characteristics to obtain an initial user representation vector; The diffusion graph construction module is used to construct multiple heterogeneous diffusion graph snapshots based on the time when users forward or comment, and use the initial representation vector of the text content and the user's initial representation vector as the initial representation vector of each node; The network model training module is used to input the initial representation vectors of the text content, the initial representation vectors of the comment content, and the snapshot of the heterogeneous propagation graph into the deep learning network to obtain the final representation vector of the post. This representation vector is used to predict the probability of belonging to a certain category. The loss is calculated by comparing it with the true category labels in the training dataset. The entire deep learning network is trained with the goal of minimizing the loss, resulting in a deep learning network model based on dynamic heterogeneous graphs and multi-level attention. The rumor detection module is used to detect the authenticity of posts. It uses a trained deep learning network model based on dynamic heterogeneous graphs and multi-level attention to analyze and process the input posts to be detected, extract the textual semantic information based on comments and the structural and dynamic information in the heterogeneous propagation graph, and output the predicted post authenticity label.
Citation Information
Patent Citations
Social media rumor detection method and system based on graph attention network
CN113268675A
Rumor detection method and system based on dynamic multi-hop graph attention network
CN114706977A