A rumor detection method and device based on dynamic graph attention capsule network

By introducing a dynamic graph attention capsule network into the rumor detection model, the problem of difficulty in capturing the dynamic evolution characteristics of rumor dissemination characteristics and comment structure in the prior art is solved, and a more efficient rumor detection accuracy is achieved.

CN114757185BActive Publication Date: 2025-05-06SOUTHEAST UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210421678.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-21
Publication Date
2025-05-06
Estimated Expiration
2042-04-21

AI Technical Summary

Technical Problem

The prior art is difficult to effectively capture the propagation characteristics of rumors and the characteristics of the comment structure dynamically evolved over time, resulting in limited performance of the rumors detection model.

Method used

The rumor detection model (DYN-GACN) based on the dynamic graph attention capsule network is adopted to divide the comment structure through the dynamic network framework, and each sub-comment structure is encoded using the graph attention capsule network module, and dynamic interaction characteristics are captured in combination with the classification capsule attention mechanism.

Benefits of technology

Effectively explore the deep attribute characteristics of rumor text and the dynamic interactive characteristics of the comment structure, improving the accuracy and performance of rumor detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114757185B_ABST
    Figure CN114757185B_ABST
Patent Text Reader

Abstract

The present invention discloses a rumor detection method and device based on a dynamic graph attention capsule network, which can identify rumors on posts in social media, thereby providing users with a pre-judgment mechanism for detecting rumors. The present invention first uses a dynamic network framework DYN to divide the comments accumulated during the rumor propagation process in chronological order to form multiple static graph-based sub-comment structures; then uses a graph attention capsule network module GACN to encode each sub-comment structure to form a sub-structure classification capsule, thereby mining the attribute characteristics of the rumor text; finally, a classification capsule attention mechanism is designed to integrate each sub-classification capsule to capture the dynamic interaction characteristics of the rumor comment structure during the dynamic evolution over time, thereby obtaining the rumor detection result. The present invention can effectively mine the deep-level attributes of the rumor text and the dynamic interaction characteristics of the comment structure evolving over time, thereby improving the accuracy of the rumor detection task.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a rumor detection method and device based on a dynamic graph attention capsule network, belonging to the technical field of Internet and natural language processing. Background Art

[0002] The rapid development of social media has changed the way people communicate with each other in daily life, but it has also led to the generation of a large number of rumors. Rumors spread quickly and have a wide range of influence. The spread of rumors will seriously pollute the healthy ecology of the social network environment and reduce the possibility of users obtaining high-quality information. Correctly identifying rumors has become an important research task for scholars and even the industry.

[0003] Rumors in social media refer to unfounded statements made by criminals on social media platforms to attract the public in response to events of public concern. Early methods for automatic rumor detection mainly used machine learning technology to detect rumors. This method first extracted features that can effectively characterize data text from rumor datasets, such as user features, text content and propagation mode features, and then input these features into machine learning models such as decision trees, random forests, and support vector machines and trained the models to achieve the purpose of classification. Such methods rely on heavy and time-consuming feature engineering. At the same time, the artificially constructed features are highly subjective and lack high-order feature representations, so they cannot effectively extract the deep features of rumors. In recent years, in order to extract high-order features, many deep learning technologies have been widely used in the field of rumor detection. Based on these deep learning models, such as CNN, RNN, etc., researchers have proposed many rumor detection models. However, these methods ignore the structural relationship between comments and cannot capture the propagation characteristics of rumors. In recent years, graph-based network models such as GCN, GAT, and GraphSage have emerged one after another, attracting widespread attention from a large number of researchers. Huang et al. proposed a rumor detection model based on graph convolutional neural network, which comprehensively considers the content, users and propagation of rumor detection. The model consists of three modules: user feature encoder, propagation tree encoder and connector that integrates the outputs of the two modules. Tian et al. proposed a bidirectional graph convolutional network structure, which combines the upward and downward propagation modes of social media text and effectively captures the global features of rumor structure.

[0004] Nowadays, graph neural networks have been widely used in the field of rumor detection and have achieved good detection performance. However, for rumors that contain rich text attribute features, when the rumor propagation structure is learned from graph neural networks to graph embedding, each text node is considered to learn multiple separate scalar features, rather than a feature vector with interdependent relationships. Therefore, they are not enough to effectively express the deeper attribute features of each graph node and rumor text, such as text location information and local information. At the same time, considering that most of the current rumor detection work only focuses on a single graph propagation structure, for rumor texts that are greatly affected by time factors, this structure cannot effectively capture the dynamic interaction characteristics of the rumor comment structure in the dynamic evolution over time, which in turn limits the improvement of the rumor detection model performance. Summary of the invention

[0005] In view of the problems existing in the prior art, the present invention proposes a rumor detection method and device based on a dynamic graph attention capsule network. The rumor detection model based on the dynamic graph attention capsule network (DYN-GACN) can effectively mine the deep-level attribute features of each graph node and graph structure, thereby improving the representation ability of rumor text. At the same time, the dynamic network framework enables the model to capture the dynamic interaction features of the rumor comment structure evolving over time. The method of the present invention covers the entire process of social media rumor detection, mainly including data set construction and feature processing, model training, rumor classification of unknown posts, etc., so as to effectively mine the deep-level attributes of rumor text and the dynamic interaction features of the comment structure evolving over time, thereby improving the accuracy of rumor detection.

[0006] The present invention first uses the dynamic network framework DYN to divide the comments accumulated during the rumor propagation process in chronological order to form multiple static graph-based sub-comment structures; then uses the graph attention capsule network module GACN to encode each sub-comment structure to form a sub-structure classification capsule, thereby mining the attribute characteristics of the rumor text; finally, a classification capsule attention mechanism is designed to integrate each sub-classification capsule to capture the dynamic interaction characteristics of the rumor comment structure in the process of dynamic evolution over time, thereby obtaining the rumor detection results.

[0007] In order to achieve the above object, the present invention provides the following technical solutions:

[0008] A rumor detection method based on dynamic graph attention capsule network includes the following steps:

[0009] Step 1: Dataset construction and feature processing: First, a rumor detection dataset is constructed, and then data preprocessing and data encoding operations are performed on the text in the dataset;

[0010] Step 2: Build a graph attention capsule network module, apply the graph attention network GAT to the graph-based sub-comment structure of rumors for aggregation calculation, and obtain the global feature representation of each text node; then combine the source text features to strengthen the graph node representation, so as to obtain the primary capsule; then use the node normalization method to generate normalized primary capsules to pay attention to the importance information in the capsule; finally, use the dynamic routing mechanism in the capsule network to generate sub-classification capsules;

[0011] Step 3: Build a dynamic network framework. First, divide the comments accumulated during the rumor propagation process in chronological order to form multiple static sub-comment structures. Then apply each sub-structure to the graph capsule attention network module to obtain the sub-structure classification capsule. Finally, design the classification capsule attention mechanism to focus on the importance information of each sub-structure classification capsule, so as to complete the final prediction.

[0012] Step 4: Training the rumor detection model. Use the margin-loss function to train the model. When the training results are stable, the prediction model is obtained.

[0013] Step 5: Collect the social media posts to be tested and perform model prediction.

[0014] Furthermore, the step 1 specifically includes the following process:

[0015] Firstly, we collect and organize the data from Twitter15 and Twitter16, two mainstream rumor detection datasets. Then, we use TF-IDF technology to build a dictionary for the texts in the dataset, and select a certain number of words with higher frequency in the text to encode each post according to the word frequency. Finally, for each rumor event, we construct a data structure based on graph structure.

[0016] Furthermore, the step 2 specifically includes the following sub-steps:

[0017] Sub-step 2-1, global characterization of rumor graph structure nodes. For each rumor event c, it depends on the response relationship between comments and between comments and source posts, and is constructed on S (t) Graph-based sub-comment structure in state <V (t) ,E (t) >, among which, represents a node in the graph, x r is the node of the source post, x i is the comment node, E (t) A set of edges representing the relationships between nodes. n (t) -1 means S (t)The total number of comments; the TF-IDF model is used to select a certain number of words with higher frequency in the text according to the word frequency to encode the nodes and use them as the initial feature vector; the graph attention network GAT is used to obtain global features Where p is the number of layers of the graph attention network, N is the number of graph nodes, and d m is the size of the hidden vector dimension after encoding by each graph attention layer;

[0018] Sub-step 2-2, rumor source post encoding, for each word in the source post text, use the Glove model to generate the word vector for each word Where n r Represents the number of words in the source post text; the multi-head attention mechanism in Transformer is used to measure the importance of words. The calculation formula is:

[0019]

[0020]

[0021] Where n r Indicates the number of words in the source post text, h r It is the result after being encoded by the Transformer Encoder module. Then the mean(·) function is used to average the hidden vector representations of all its words to obtain the final source post text feature representation vector where d r is the size of the feature dimension of the source post;

[0022] Sub-step 2-3, forming a substructure classification capsule, merging the source post feature r extracted by Transformer with the global feature of each node obtained by GAT to strengthen the representation of each graph node, thereby obtaining the enhanced node feature representation The calculation formula is:

[0023] A=concat(H,r)

[0024] H′=Conv1d(A)

[0025] The feature values ​​at the same position of different graph network layers are concatenated to obtain the primary capsule in vector form. where q is the number of initial capsules, d cis the dimension of the initial capsule; the one-dimensional convolution layer Conv1d(*) function is used to aggregate feature information. The primary capsule generated by each graph node reflects the graph network layer information with different aggregation degrees, so that the node representation can better reflect the essential characteristics of the rumor text; in order to measure the importance between primary capsules, the node normalization method is used to generate the attention value α on the graph network layer and apply it to the primary capsule, thereby obtaining the normalized primary capsule U, the formula is as follows:

[0026] α=FC2(FC1(H′))

[0027] U=α*H′

[0028] The attention value α of the node in each layer is obtained by training with two layers of fully connected functions FC2(FC1(·)) and applied to the original primary capsule H′ to obtain the normalized primary capsule

[0029] The dynamic routing algorithm in capsule network is used to transform the normalized primary capsules into substructured classification capsules;

[0030] Furthermore, the dynamic routing algorithm includes the following process:

[0031] For the training parameter b i Initialize and obtain the coupling coefficient weight m i , which represents the contribution of primary capsule i to each substructure classification capsule, and the calculation is as follows:

[0032] b ij =b ij +u j|i *v j

[0033] m i =softmax(b i )

[0034] Where i is the unit in the initial capsule layer, j is the unit in the substructure classification capsule layer;

[0035] The primary capsule U is weighted by w ij Get the prediction vector u j|i , using the initialized capsule weight to obtain the capsule output s j ; Squashing s through the activation function j Calculate to obtain the substructure classification capsule output v of the lower layer j ; Then predict the vector u j|i and capsule output v j Iteratively update capsule weight m ij ; The calculation formula is as follows:

[0036] u j|i =w ij U

[0037] s j =∑m ij *u j|i

[0038]

[0039] Furthermore, the step 3 specifically includes the following sub-steps:

[0040] Sub-step 3-1, divide the comment structure, divide the overall graph-based comment structure according to the release time of the comment text: separate all the comments under each source post by equal numbers, and divide the graph-based sub-comment structure from S (1) Start by increasing each time The number of comments is used as the next sub-comment structure, where n-1 is the number of comments and T is the number of divisions, until the number of comments increases to Form the last sub-comment structure; finally, the number of comments contained in each comment structure is The comment structure S of event c is represented as:

[0041] S={S (1) ,S (2) ,...,S (T)}

[0042] Sub-step 3-2, using the classification capsule attention mechanism, obtains the classification capsule vector G = [v1, v2, ..., v a ] After that, the classification capsule attention mechanism is designed. The capsules belonging to the same category in all modules are combined into a matrix and used as the common value of the query vector Q, key vector K and value vector V. The classification capsule of each sub-review structure after the self-attention mechanism is calculated. The dimension of the key vector is d k It is used to stabilize the gradient; the final classification capsule is obtained by averaging all substructure classification capsule vectors Where k is the number of categories, f is the dimension of the capsule, and the calculation formula is as follows:

[0043]

[0044]

[0045] Where T represents the number of divided sub-comment structures.

[0046] Furthermore, in step 4, the loss function formula is as follows:

[0047]

[0048] Among them, k is the number of rumor categories, ||I k || is the output probability of the capsule of this category, and its value is the length of the capsule vector, T k is the indicator function of the classification, m + is the upper bound, penalizing false positives, i.e. predicting that class k exists but does not actually exist, m - is the lower bound, which penalizes false negatives, that is, predicting that class k does not exist but actually exists, and λ is the proportional coefficient, which adjusts the proportion of the two.

[0049] Furthermore, the step 5 specifically includes the following process:

[0050] For the social media posts to be tested, we first use crawler technology to crawl the relevant data on the platform, including the source posts and the related comments below; then we organize the collected data and use the TF-IDF word vector model to encode each post to form an initial feature vector; then we structure the data, that is, form a comment structure based on a graph structure, which serves as the input of the model; finally, we use the trained model to make classification predictions on the structured data and feedback the detection results.

[0051] The present invention also provides a rumor detection device based on a dynamic graph attention capsule network, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is loaded into the processor, the rumor detection method based on the dynamic graph attention capsule network is implemented.

[0052] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0053] 1. The present invention effectively mines the deep-level attribute characteristics of rumors. Compared with other detection models based on graph neural networks, the semantic representation of rumor text extracted by the present invention is deeper and more accurate, thus improving the accuracy of rumor detection.

[0054] 2. The present invention models the relationship between comments during the process of rumor propagation, which conforms to the characteristics of rumor propagation and effectively captures the dynamic interaction characteristics of the rumor comment structure during its dynamic evolution over time, thereby improving the performance of rumor detection. It can be used to identify rumors in posts on social media, thereby providing users with a good rumor prediction mechanism. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 The overall framework diagram of a rumor detection method based on a dynamic graph attention capsule network provided by the present invention;

[0056] Figure 2The Transformer_Encoder model involved in the embodiment of the present invention;

[0057] Figure 3 Converting the graph features involved in the embodiment of the present invention into a capsule-shaped graph;

[0058] Figure 4 Schematic diagram of the attention mechanism in GACN involved in an embodiment of the present invention;

[0059] Figure 5 A dynamic routing algorithm diagram according to an embodiment of the present invention;

[0060] Figure 6 Schematic diagram of the classification capsule attention mechanism involved in an embodiment of the present invention. DETAILED DESCRIPTION

[0061] The technical solution provided by the present invention will be described in detail below in conjunction with specific embodiments. It should be understood that the following specific implementation methods are only used to illustrate the present invention and are not used to limit the scope of the present invention.

[0062] The present invention provides a rumor detection method based on dynamic graph attention capsule network, and its overall framework is as follows: Figure 1 As shown, the method comprises the following steps:

[0063] Step 1: Dataset construction and feature processing. First, we collect and organize the data from the current mainstream rumor detection datasets Twitter15 and Twitter16; then we use TF-IDF technology to build a dictionary for the text in the dataset, and select the 5,000 most frequent words in the text to encode each post based on the word frequency; finally, for each rumor event, we construct a data structure based on a graph structure.

[0064] Step 2, construct a graph attention capsule network module to extract deep attribute features of rumor text. In this module, the present invention applies the graph attention network GAT to the graph-based sub-comment structure of the rumor for aggregation calculation to obtain a global feature representation of each text node; then, the graph node representation is enhanced in combination with the source text features to obtain primary capsules; then, the node normalization method is used to generate normalized primary capsules to focus on the importance information in the capsule; finally, sub-classification capsules are generated with the help of the dynamic routing mechanism in the capsule network. The implementation process of this step is divided into 3 sub-steps:

[0065] Sub-step 2-1, rumor graph structure node global characterization representation, for each rumor event c, depending on the response relationship between comments and between comments and source posts, the present invention constructs a (t) Graph-based sub-comment structure in state <V (t) ,E (t)>, among which, Represents the nodes in the graph, including x r is the node of the source post, x i is the comment node, E (t) Represents the set of edges between nodes and n (t) -1 means S (t) The present invention uses the TF-IDF model to select 5000 words with higher frequency in the text according to the word frequency to encode the node and use it as the initial feature vector, and uses the graph attention network GAT to obtain the global feature Where p is the number of layers of the graph attention network, N is the number of graph nodes, and d m is the size of the hidden vector dimension after encoding by each graph attention layer;

[0066] Sub-step 2-2, rumor source post encoding, for each word in the source post text, use the Glove model to generate the word vector for each word Where n r Represents the number of words in the source post text. The multi-head attention mechanism in Transformer is used to measure the importance of words. The calculation formula is:

[0067]

[0068]

[0069] Where n r represents the number of words in the source post text, h r It is the result after being encoded by the Transformer Encoder module. Then the mean(·) function is used to average the hidden vector representations of all its words to obtain the final source post text feature representation vector where d r is the size of the feature dimension of the source post, such as Figure 2 shown.

[0070] Sub-step 2-3, forming a substructure classification capsule, the present invention uses the concat(*) function to fuse the source post feature r extracted by Transformer with the global feature of each node obtained by GAT to enhance the representation of each graph node, thereby obtaining an enhanced node feature representation The calculation formula is:

[0071] A=concat(H,r)

[0072] H′=Conv1d(A)

[0073] The feature values ​​at the same position of different graph network layers are concatenated to obtain the primary capsule in vector form. where q is the number of initial capsules, d c is the dimension of the initial capsule. The present invention uses a one-dimensional convolutional layer Conv1d(*) function to aggregate feature information. The primary capsule generated by each graph node reflects the graph network layer information of different aggregation degrees, so that the node representation can better reflect the essential characteristics of the rumor text. Figure 3 The process of converting graph features into capsule form is shown. In order to measure the importance between primary capsules, the node normalization method is used to generate attention values ​​on the graph network layer and apply them to the primary capsules, thereby obtaining the normalized primary capsule U. Figure 4 The formation process of the attention mechanism is shown. The formula is as follows:

[0074] α=FC2(FC1(H′))

[0075] U=α*H'

[0076] The present invention obtains the attention value α of the node in each layer through two-layer fully connected function FC2(FC1(·)) training, and applies it to the original primary capsule H′ to obtain the normalized primary capsule

[0077] In order to obtain deeper attribute characteristics of rumors, the dynamic routing mechanism in the capsule network is used to convert the normalized primary capsules into substructured classification capsules. In the dynamic routing algorithm, the training parameter b i Initialize and obtain the coupling coefficient weight m i , which means the contribution of primary capsule i to each substructure classification capsule, Figure 5 The dynamic routing algorithm is shown. The calculation is as follows:

[0078] b ij =b ij +u j|i *v j

[0079] m i =softmax(b i )

[0080] where i is the unit in the initial capsule layer, j is the unit in the substructure classification capsule layer, and b ij is the training parameter for normalizing primary capsule i to substructure classification capsule j.

[0081] The primary capsule U is weighted by w ij Get the prediction vector u j|i , using the initialized capsule weight to obtain the capsule output s j. Through the activation function Squashing j Calculate to obtain the substructure classification capsule output v of the lower layer j . Then the prediction vector u j|i and capsule output v j Iteratively update capsule weight m ij The calculation formula is as follows:

[0082] u j|i =w ij U

[0083] s j =∑m ij *u j|i

[0084]

[0085] Step 3: Build a dynamic network framework to capture the dynamic interaction characteristics of the rumor comment structure during its dynamic evolution over time. The framework first divides the comments accumulated during the rumor propagation process in chronological order to form multiple static sub-comment structures; then applies each sub-structure to the graph capsule attention network module to obtain the sub-structure classification capsule; finally, the classification capsule attention mechanism is designed to focus on the importance information of each sub-structure classification capsule, thereby completing the final prediction. The details are as follows:

[0086] Sub-step 3-1, divide the comment structure, divide the overall graph-based comment structure according to the release time of the comment text. Specifically, all comments under each source post are separated by equal numbers. The graph-based sub-comment structure is divided from S (1) Start by increasing each time The number of comments is used as the next sub-comment structure, where n-1 is the number of comments and T is the number of divisions, until the number of comments increases to The last sub-comment structure is formed. Finally, the number of comments contained in each comment structure is The comment structure S of event c is represented as:

[0087] S={S (1) ,S (2) ,...,S (T)}

[0088] Sub-step 3-2, using the classification capsule attention mechanism, obtains the classification capsule vector G = [v1, v2, ..., v a ]After that, the present invention draws on the self-attention idea to design a classification capsule attention mechanism, such as Figure 6In this mechanism, capsules belonging to the same category in all modules are combined into a matrix and used as the common value of the query vector Q, key vector K and value vector V, and the classification capsule of each sub-review structure after the self-attention mechanism is calculated. The dimension of the key vector is d k is used to stabilize the gradient. The final classification capsule I∈R is obtained by taking the average of all substructure classification capsule vectors k*f , where k is the number of categories and f is the dimension of the capsule. The calculation formula is as follows:

[0089]

[0090]

[0091] Where T represents the number of divided sub-comment structures.

[0092] Step 4: rumor detection model training. The present invention uses the loss function margin_loss as the rumor classification loss function to train the model. When the training result tends to be stable, it is used as a prediction model to predict unknown posts. The formula can be expressed as:

[0093]

[0094] Among them, k is the number of rumor categories, ||I k || is the output probability of the capsule of this category, and its value is the length of the capsule vector, T k is the indicator function of the classification (1 if class k exists, 0 if it does not exist), m + is the upper bound, penalizing false positives, that is, predicting that class k exists but does not actually exist. In the experiment, the size is set to 0.9, m - is the lower bound, which penalizes false negatives, that is, predicting that class k does not exist but actually exists. In the experiment, the size is set to 0.1, and λ is the proportional coefficient to adjust the ratio of the two.

[0095] Step 5, collect the social media posts to be tested and perform model prediction. For the social media posts to be tested, the present invention first needs to use crawler technology to crawl the relevant data on the platform, including the source posts and the relevant comments below; then organize the collected data, and use the TF-IDF word vector model to encode each post to form an initial feature vector; then structure the data, that is, form a comment structure based on a graph structure, which is used as the input of the model; finally, use the trained model to make classification predictions on the structured data and feedback the detection results.

[0096] In summary, the present invention includes two parts: the graph attention capsule network module GACN and the dynamic network framework DYN. The model first uses the DYN framework to divide the comments accumulated during the rumor propagation process in chronological order to form multiple static graph-based sub-comment structures; then uses the GACN module to encode each sub-comment structure to form a sub-structure classification capsule, thereby mining the attribute characteristics of the rumor text; finally, the classification capsule attention mechanism is designed to integrate the sub-classification capsules to capture the dynamic interaction characteristics of the rumor comment structure in the dynamic evolution process over time, and then obtain the rumor detection results.

[0097] Based on the same inventive concept, an embodiment of the present invention discloses a rumor detection device based on a dynamic graph attention capsule network, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is loaded into the processor, the rumor detection method based on the dynamic graph attention capsule network is implemented.

[0098] The technical means disclosed in the scheme of the present invention are not limited to the technical means disclosed in the above-mentioned implementation mode, but also include technical schemes composed of any combination of the above-mentioned technical features. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications are also regarded as the protection scope of the present invention.

Claims

1. A rumor detection method based on dynamic graph attention capsule network, characterized in that: The steps include: Step 1: Dataset construction and feature processing: First, a rumor detection dataset is constructed, and then data preprocessing and data encoding operations are performed on the text in the dataset; Step 2: Build a graph attention capsule network module, apply the graph attention network GAT to the graph-based sub-comment structure of rumors for aggregation calculation, and obtain the global feature representation of each text node; then combine the source text features to strengthen the graph node representation, so as to obtain the primary capsule; then use the node normalization method to generate normalized primary capsules to focus on the important information in the capsule; finally, generate sub-classification capsules with the help of the dynamic routing mechanism in the capsule network; specifically, it includes the following sub-steps: Sub-step 2-1, global characterization representation of rumor graph structure nodes; Sub-step 2-2, encoding of rumor source posts; Sub-step 2-3, forming a substructure classification capsule, merging the source post feature r extracted by Transformer with the global feature of each node obtained by GAT to strengthen the representation of each graph node, thereby obtaining the enhanced node feature representation The calculation formula is: A=concat(H,r) H'=Conv1d(A) Among them, H is the global feature; The feature values ​​at the same position of different graph network layers are concatenated to obtain the primary capsule in vector form. where q is the number of initial capsules, d c is the dimension of the initial capsule; the attention value α is generated on the graph network layer using the node normalization method and applied to the primary capsule to obtain the normalized primary capsule U, as follows: α=FC2(FC1(H')) U=α*H' The dynamic routing algorithm in capsule network is used to transform the normalized primary capsules into substructured classification capsules; Step 3: Build a dynamic network framework. First, divide the comments accumulated during the rumor propagation process in chronological order to form multiple static sub-comment structures. Then apply each sub-structure to the graph capsule attention network module to obtain the sub-structure classification capsule. Finally, design the classification capsule attention mechanism to focus on the importance information of each sub-structure classification capsule, so as to complete the final prediction. Step 4: Training the rumor detection model. Use the margin-loss function to train the model. When the training results are stable, the prediction model is obtained. Step 5: Collect the social media posts to be tested and perform model prediction.

2. The rumor detection method based on dynamic graph attention capsule network according to claim 1 is characterized in that: The step 1 specifically includes the following process: Firstly, we collect and organize the data from Twitter15 and Twitter16, two mainstream rumor detection datasets. Then, we use TF-IDF technology to build a dictionary for the texts in the dataset, and select a certain number of words with higher frequency in the text to encode each post according to the word frequency. Finally, for each rumor event, we construct a data structure based on graph structure.

3. The rumor detection method based on dynamic graph attention capsule network according to claim 1 is characterized in that: In the step 2, Sub-step 2-1 specifically includes the following process: For each rumor event c, depending on the response relationship between comments and between comments and source posts, construct (t) Graph-based sub-comment structure in state <V (t) ,E (t) >, among which, represents a node in the graph, x r is the node of the source post, x i is the comment node, E (t) Represents the set of relationship edges between nodes, n (t) -1 means S (t) The total number of comments; the TF-IDF model is used to select a certain number of words with higher frequency in the text according to the word frequency to encode the nodes and use them as the initial feature vector; the graph attention network GAT is used to obtain global features Where p is the number of layers of the graph attention network, N is the number of graph nodes, and d m is the size of the hidden vector dimension after encoding by each graph attention layer; Sub-step 2-2 specifically includes the following process: For each word in the source post text, use the Glove model to generate the word vector {w1,w2,...,w nr }, where n r Represents the number of words in the source post text; the multi-head attention mechanism in Transformer is used to measure the importance of words. The calculation formula is: where n r Indicates the number of words in the source post text, h r It is the result after being encoded by the Transformer Encoder module. Then the mean(·) function is used to average the hidden vector representations of all its words to obtain the final source post text feature representation vector where d r is the size of the source post feature dimension.

4. The rumor detection method based on dynamic graph attention capsule network according to claim 1 is characterized in that: The dynamic routing algorithm includes the following process: For the training parameter b i Initialize and obtain the coupling coefficient weight m i , which represents the contribution of primary capsule i to each substructure classification capsule, and the calculation is as follows: b ij =b ij +u j|i *v j m i =softmax(b i ) Where i is the unit in the initial capsule layer, j is the unit in the substructure classification capsule layer; The primary capsule U is weighted by w ij Get the prediction vector u j|i , using the initialized capsule weight to obtain the capsule output s j ; Squashing s through the activation function j Calculate to obtain the substructure classification capsule output v of the lower layer j ; Then predict the vector u j|i and capsule output v j Iteratively update capsule weight m ij ; The calculation formula is as follows: u j|i =w ij U with j =∑m ij *in j|i 5. The rumor detection method based on dynamic graph attention capsule network according to claim 1 is characterized in that: The step 3 specifically includes the following sub-steps: Sub-step 3-1, divide the comment structure, divide the overall graph-based comment structure according to the release time of the comment text: separate all the comments under each source post by equal numbers, and divide the graph-based sub-comment structure from S (1) Start by increasing each time The number of comments is used as the next sub-comment structure, where n-1 is the number of comments and T is the number of divisions, until the number of comments increases to Form the last sub-comment structure; finally, the number of comments contained in each comment structure is The comment structure S of event c is represented as: S={S (1) ,S (2) ,...,S (T) } Sub-step 3-2, using the classification capsule attention mechanism, obtains the classification capsule vector G = [v1, v2, ..., v a ]After that, the classification capsule attention mechanism is designed to form a matrix of capsules belonging to the same category in all modules and use them as the common values ​​of Q, K and V, and calculate h s(i) , where d k is used to stabilize the gradient; the final classification capsule I∈R is obtained by averaging all substructure classification capsule vectors k*f , where k is the number of categories and f is the dimension of the capsule. The calculation formula is as follows: Where T represents the number of divided sub-comment structures.

6. The rumor detection method based on dynamic graph attention capsule network according to claim 1 is characterized in that: In step 4, the loss function formula is as follows: Among them, k is the number of rumor categories, ||I k || is the output probability of the kth capsule, and its value is the length of the capsule vector, T k is the indicator function of the classification, m + is the upper bound, penalizing false positives, i.e. predicting that class k exists but does not actually exist, m - is the lower bound, which penalizes false negatives, that is, predicting that class k does not exist but actually exists, and λ is the proportional coefficient, which adjusts the proportion of the two.

7. The rumor detection method based on dynamic graph attention capsule network according to claim 1 is characterized in that: The step 5 specifically includes the following process: For the social media posts to be tested, we first use crawler technology to crawl the relevant data on the platform, including the source posts and the related comments below; then we organize the collected data and use the TF-IDF word vector model to encode each post to form an initial feature vector; The data is then structured, that is, a review structure based on a graph structure is formed, which serves as the input of the model; finally, the trained model is used to make classification predictions on the structured data and the detection results are fed back.

8. A rumor detection device based on a dynamic graph attention capsule network, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is loaded into a processor, it implements the rumor detection method based on the dynamic graph attention capsule network described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Social media multi-modal rumor detection method based on propagation heterogeneous graph modeling

    CN112035669A

  • Social media rumor detection method and system based on graph attention network

    CN113268675A