A rumor detection method based on a graph attention network
By combining the BERT pre-trained model with the graph attention network CNN and utilizing the improved GATv2 network, the textual representation and propagation structure of rumors in social networks are fused, solving the problem of insufficient information fusion in existing methods and achieving more efficient rumor detection results.
Patent Information
- Application Number
- CN202311073027.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-24
- Publication Date
- 2026-01-13
- Estimated Expiration
- 2043-08-24
AI Technical Summary
Existing methods for detecting rumors on social networks struggle to effectively integrate structural information with information about the nodes themselves. Furthermore, deep learning methods rely on manual feature extraction, which is costly in terms of manpower and resources and lacks robustness.
We employ a combination of a BERT pre-trained model and a graph attention network (CNN). By constructing global and local relational graph networks, we integrate text representation and information propagation structure, and use an improved graph attention network (GATv2) for rumor detection.
It improves the accuracy and generalization ability of rumor detection, enhances the model's representation ability, and performs particularly well in early rumor detection and long text processing.
Smart Images

Figure CN117112786B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of image processing, and particularly relates to a rumor detection method based on a graph attention network. BACKGROUND
[0002] After entering the 21st century, the Internet industry has developed very rapidly, and domestic and foreign social media such as microblog and Twitter have developed rapidly. Social media has facilitated our life, and people can quickly receive various information, but a large amount of unreliable information has appeared in the phenomenon of spreading in social media. Through rumor detection of social media, it is timely to find out which tweet is a rumor, and to take measures such as taking down the tweet to curb the large-scale spread of rumors and minimize the spread of rumors as much as possible.
[0003] According to the definition of rumor by A. Zubiaga et al., "rumor is a circulating information which is not determined to be true at the time of publishing and needs to be verified". This paper considers that rumor is a false information which spreads freely in social media, is not verified by official channels and brings adverse consequences to society. Rumor detection, as a branch of sentiment analysis, has been extended from computer science to management science and social science. Chen Yanfang et al. of Renmin University of China summarized and analyzed the research progress of social network rumor detection, and they mainly researched the work flow of rumor detection, and introduced and analyzed each stage of data collection, data labeling, model selection and model training in social network rumor detection. Zubiaga et al. of WarWick University in the United Kingdom divided the social network rumor detection into four stages of rumor detection, tracking, stance classification and accuracy classification, and summarized and concluded the current situation and development of the application technology in the four stages. Cao et al. paid more attention to the application and development of deep learning in social network rumor detection on the basis of the previous work, and introduced and analyzed the current important social network rumor data set.
[0004] In the previous research, scholars paid more attention to the information content contained in the text itself, but in the actual situation, the comments of each source post also contain certain information. The structural relationship between the source post and the comments often affects the spread of rumors, so one of the problems to be solved is to integrate the structural information and the information of the node itself for rumor detection. Bian et al. proposed a bidirectional graph convolutional neural network, but this method ignores the influence of irrelevant node noise. Generally, there are many comments under a source tweet, and not every comment is related to the source tweet. In the related comments, the size of the relevance also has certain difference.
[0005] Aiming at the problem of rumor flooding in social networks, the academic community has carried out a lot of research and exploration. Existing rumor detection in social networks mainly includes: rumor detection method based on user features and network features, detection method based on machine learning and deep learning, and rumor detection based on propagation features. Artificial detection method has high accuracy, but it cannot adapt to the massive data in social networks. Machine learning method regards rumor detection problem as a binary classification problem, effectively making up for the shortcomings of artificial detection method, but rumor detection based on machine learning relies on manual feature extraction and selection, which consumes a lot of manpower, material resources and time, and the robustness of the feature vector obtained is not enough. Compared with machine learning method, deep learning method no longer obtains feature data through feature engineering. This has better and more essential representation of the original data, so as to achieve better classification effect.
[0006] Rumor detection based on user features and network features, according to the different characteristics of rumor information, researchers select different features for rumor detection work, and summarize the features of network rumor detection. Liang et al. studied the features of message original users and message reader users. Analysis found that ordinary users have higher daily post volume than rumor users. The author trained five classifiers such as support vector machine, and the experimental results showed that compared with other baseline methods, the accuracy and F1 value of rumor detection model based on user features increased by 13.14% and 16.68% respectively. Qazvinian et al. proposed to use network features for rumor detection. When user UserB forwards the message Message published by user UserA, if the forwarding user UserB or the original user UserA has published or forwarded rumors before, the message Message is very likely to be a rumor. The experimental results show that the average precision of rumor detection based on network features is more than 90%, and the average recall is more than 70%. Analysis shows that the introduction of network features can improve the performance of rumor detection.
[0007] Based on traditional machine learning and deep learning methods for rumor detection, Kwon et al. proposed a Random Forest Classifier (RFC) using three parameters to fit the random tweet curve and established three classifiers based on decision tree, random forest, and SVM, respectively, which acted on time, structure, and language features. Experiments showed that the random forest classifier performed best, with an accuracy of 93.5%. With the continuous development of deep learning, Ma et al. proposed using a recurrent neural network (RNN) to detect microblog rumors and conducted experiments on Twitter and microblog datasets, respectively, and compared them with SVM-TS and other manually crafted feature models. Experimental results show that the proposed model is superior to all baseline methods on Twitter and microblog datasets, with GRU-2 achieving an accuracy of 88.1% and 91.0% on Twitter and microblog datasets, respectively. Liu et al. used a convolutional neural network (CNN) to detect microblog rumors, and the model contained a convolutional layer and a pooling layer. Compared with the RNN model, the accuracy of the model increased by 10.2%. As can be seen, the CNN model constructs features by discovering the relationship between microblog rumor events, which is more suitable for rumor detection than the RNN model. Ma et al. proposed learning the distinctive features of tweet content by following the non-sequential propagation structure of tweet content and generating a more powerful representation to identify different types of rumors. Two tree-recursive neural network models based on bottom-up and top-down are proposed in the paper for rumor representation learning and classification, which conform to the propagation layout of tweets.
[0008] Rumor detection based on propagation features, the process of rumor propagation is often accompanied by the propagation of the relationship, which is helpful for rumor detection, Ma et al. Propagation tree kernel (PTK) method, researchers pay more attention to the propagation of the structure rather than the time characteristics. Since the propagation tree kernel ignores the clues outside the subtree, the author proposes a context-sensitive PTK (cPTK). GCN can better capture the global structure features from the graph or tree. Inspired by the success of CNN in computer vision, GCN has shown advanced performance in various tasks using graph data. Bian et al. proposed a new bidirectional graph model called bidirectional graph convolutional network, which uses a top-down directed graph GCN to learn the pattern of rumor propagation, and a rumor diffusion graph GCN with the opposite direction to capture the rumor diffusion structure. Wei et al. try to explore the propagation uncertainty in rumor detection. Specifically, a novel edge-enhanced Bayesian graph convolutional network is proposed to capture robust structural features. Lin et al. in order to essentially strengthen the interaction of user opinions, while reducing the negative impact of irrelevant posts, first represent the conversation thread as an undirected interaction graph, and propose a statement-oriented hierarchical graph attention network for rumor classification, which enhances the representation learning of responsive posts, considers the whole social environment, and focuses on the posts that can infer the target statement semantically. Yuan et al. proposed a new global-local attention network (GLAN), which jointly encodes local semantic information and global structure information for rumor detection. First, a better integrated representation is generated for each source tweet by fusing the relevant retweet semantic information and attention mechanism. Then, the global relationship between all source tweets, retweet tweets and users is modeled as a heterogeneous graph to capture rich structural information for rumor detection.
[0009] These methods only consider the text representation aspect and ignore the information contained in the information propagation, or only consider the structure information between information and ignore the representation ability of the text. The model proposed in this paper considers both aspects, combines the improvement of text representation and the exploration of information propagation structure information, and better performs rumor detection. SUMMARY
[0010] In order to solve the above problems, the present application provides: a rumor detection method based on a graph attention network, combining a BERT pre-training model and a graph attention network CNN, constructing the relationship between information, and assisting rumor detection with propagation information. The model is divided into four parts, which are tweet encoding representation, local tweet relationship encoding, global relationship encoding and rumor detection.
[0011] The tweet coding representation part processes data using a BERT pre-training model, and then performs feature representation through a CNN to complete mapping from word embedding to semantic space.
[0012] The local tweet relationship coding learns a combined representation of each source tweet and related forwarding from each source tweet corresponding forwarding by improving a graph attention network GATv2.
[0013] The global relationship coding indicates how to encode the global structure into the node representation.
[0014] The rumor detection module learns a classification function to predict the label of the original tweet.
[0015] The beneficial effects of the present application are:
[0016] 1. The original data is processed using a BERT pre-training method, the context information is fully considered, the context information is fused through a bidirectional language model, the representation ability of the model is improved, and a global and local relationship graph network is constructed according to the relationship among users, texts and forwarding.
[0017] 2. In the global relationship embedding, the beneficial information contained in the user node is considered, combined with the content node, the feature is further expressed, the different attention weights between nodes are given through edges, the information of adjacent nodes is collected, and the global relationship is coded into node representation.
[0018] 3. A series of experiments are carried out on three real data sets of Twitter15, Twitter16 and Weibo, and the results show that the proposed model has good performance in rumor detection and has certain improvement compared with the previous model. DETAILED DESCRIPTION
[0019] Figure 1 It is the overall model framework of the present application.
[0020] Figure 2 It is the early rumor detection model accuracy line graph of the present application.
[0021] Figure 3 It is the early rumor detection model F1 value line graph of the present application.
[0022] Figure 4 It is the GATv2 different head number influence line graph of the present application.
[0023] Figure 5 It is the different data length experimental result comparison graph of the present application.
[0024] Figure 6 It is the attention weight value graph of the present application on different models. DETAILED DESCRIPTION
[0025] To solve the above problems, the rumor detection model combining the pre-training model (Bidirectional Encoder Representation from Transformers, BERT) and the graph attention network is proposed based on the fusion of rumor text information and its propagation structure information. A global heterogeneous graph is constructed, different weights are assigned to the edges between nodes to distinguish the importance between nodes, and finally the global relationship is encoded into node representation to complete the detection of rumors, providing a rumor detection method based on graph attention network.
[0026] The model in this paper mainly combines the BERT pre-training model and the graph attention network, and fully utilizes the propagation information to better assist rumor detection through the construction of the relationship between information.
[0027] The model is divided into four parts, which are tweet encoding representation, local tweet relationship encoding, global relationship encoding and rumor detection. Specifically, the tweet encoding representation part uses the BERT pre-training model to process microblog, tweet and other data, and then uses the CNN feature representation to complete the mapping from word embedding to semantic space; the local tweet relationship encoding learns the combined representation of each source tweet and related retweets from each source tweet corresponding to the retweets by improving the graph attention network GATv2; the global relationship encoding explains how to encode the global structure into the node representation; finally, the rumor detection module learns a classification function to predict the label of the original tweet. After using BERT and CNN to process the data together, the feature expression of the data is more accurate, and then GATv2 and self-attention mechanism are used to make the global and local relationship encoding better expressed. The overall structure is shown in Figure 1
[0028] Tweet encoding representation
[0029] In the encoding representation part of the source tweet, first, the BERT pre-training method is used to process the original data to generate word vectors, and then the word vectors are processed by CNN to obtain the feature representation of the tweet.
[0030] BERT pre-training method is a pre-training model representation model proposed by Google. It no longer uses the traditional one-way language model or the method of shallowly splicing two one-way language models for pre-training, but uses a new Masked Language Model (MLM) to generate deep bidirectional language representation. The structure of the previous pre-training model is limited by the one-way language model, which limits the representation ability of the model and makes it only obtain single-direction context information. BERT uses a deep bidirectional Transformer component to build the model, so it finally generates a deep bidirectional language representation that can integrate context information.
[0031] First, the original data is processed using BERT. The first step is to use the tokenizer provided by BERT to tokenize the original data. Then a fixed length L is set, because the number of words in each tweet is different, so when the length of the tweet is less than L, 0 is filled at the end of the document, and if the length of the tweet is greater than L, the data is truncated at the end position. Then the processed tweet is converted into corresponding id according to the BERT vocabulary, and finally the word vector is trained through the BERT pre-training model. Where we define x j ∈R d is the d-dimensional word embedding, and m j represents the jth word in the tweet. The final sentence with a length of L is represented as: x 1:j =[x1;x2;...;x T ], where ";" represents the link operation.
[0032] Convolutional neural network
[0033] Here, CNN is used to learn the text semantic representation from the word embedding. First, we have converted the tweet word index sequence to word embedding by BERT pre-training model where: represents the embedding set of each word of the first data.
[0034] Then, the obtained word embedding is operated through the convolutional layer. The convolutional layer calculation formula is:
[0035]
[0036] The feature map e = [e1, e2,..., e L-h+1 ]∈ RL-h+1 is extracted through the convolution operation, where W ∈ R h×d is the convolution kernel with size h, and σ(.) is a nonlinear transformation function. After one convolution operation, the obtained feature map is operated using max pooling:
[0037]
[0038] Through the above operation, a feature will be extracted from a filter. CNN layers will use filters (the size of the convolution kernel is h e {3, 4, 5}) to obtain multiple features. Then we concatenate the outputs of multiple filters, and the result after concatenation is m j ∈R d is the representation of the jth microblog m j . In the same way, we can get the text representation of each retweet r i (i e [1, n]), and superimpose each retweet to form the retweet matrix R = [r1; r2;...; r n ] e R n×d . Finally, the representation of the tweet is obtained through the operation of the convolutional neural network.
[0039] Local tweet representation
[0040] In previous studies, more recursive neural networks are used to capture semantic relationships, but it is difficult to parallelize processing. In recent years, attention mechanisms have shown stronger attention to capture semantic relationships.
[0041] Multi-head self-attention mechanism
[0042] The multi-head attention is used to learn the information representation of the context. This module has three inputs, respectively: where n q , n k , n v represent the number of words in each sentence, and d represents the dimension of the embedding.
[0043] In the attention module, first, each word in Q and the words in K are calculated through the Scaled Dot-Product attention, and then the attention weight obtained is applied to the sentence of V:
[0044]
[0045] Then the items of V are linearly combined with the weight to form the new representation of Q. Let K = V, so that a word in Q is represented by its most similar word in V. Q, K and V are assigned to h heads. Each reflects the relationship between Q, K and V from a different aspect and corresponds to a scaled dot-product attention module. Finally, the output of each head is:
[0046] Head i = Attention(QW i Q , KWi K ,VW i V ) (4)
[0047] where W i Q ,W i K ,W i V ∈R d×d / h is a linear transformation matrix. Finally, the outputs of multiple heads are concatenated together and then transformed into the final output by a linear transformation matrix, which is:
[0048] O = [Z1; Z2;... ; Z h ]W O (5)
[0049] where W o ∈R d×d is a linear transformation matrix.
[0050] Representation of local context
[0051] This part is mainly to establish the internal relationship between the source tweet and the retweets. First, we use multi-head attention to refine the representation of each retweet, which is expressed as:
[0052]
[0053] where Through the self-attention mechanism, each tweet can pay attention to each other, so that the semantic relationship between different retweets can be encoded. Then we establish the relationship between the source tweet and the retweets. We take the source tweet m as the key value, and then use it to combine with the retweet to calculate the attention score corresponding to each retweet.
[0054]
[0055]
[0056] where S ∈ R n×1 is an attention score. In order to distinguish the importance between new tweets and original tweets, we introduce a fusion gate here to combine the two representations.
[0057] α = σ(w1m + w2r + b) (9)
[0058]
[0059] where σ(.) is the Sigmoid activation function, w1, w2 ∈ R n×1and b e R are some parameters learned in the fusion gate. is the final output after the tweet is fused with the retweet relationship.
[0060] Global relation encoding representation
[0061] Graph Attention Networks (GAT) is an improvement based on Graph Convolutional Networks (GCN), which adds an attention mechanism to the original GCN. It enhances the representation of adjacent nodes and gives different importance to adjacent nodes. Using GAT for modeling can reduce the influence of irrelevant noise.
[0062] However, GAT only calculates a limited "static" form of attention: for any query node, the attention function is monotonic with respect to neighbor (key) scores. That is, the ordering of attention coefficients is the same for all nodes in the graph and is not restricted by the query node. To this end, a simple modification is made by changing the order of internal operations in GAT, and GATv2
[21] is proposed to calculate dynamic attention. The calculation process of GATv2 is roughly divided into two parts:
[0063] 1. Calculate attention coefficients
[0064] The core improvement of GATv2 is to change the order of operations in calculating attention coefficients, moving LeakyReLU to between the two linear operations a T and W, where a T is a simple feedforward neural network.
[0065] For vertex i, calculate the correlation coefficient between him and each adjacent node. The following is a comparison between GAT and GATv2 in calculating coefficients:
[0066] j GAT: ei T = LeakyReLU(a i ([Wh j || Wh j ]) (11)
[0067] GATv2: ei T = a i LeakyReLU(W[h j || h i ]) (12)
[0068] W in the formula is a weight to increase the dimension of the features of the nodes, which is a common feature enhancement method. [·||·] is a concatenation of the transformed features of nodes i and j; finally, a(·) maps the concatenated features to a real number. With the correlation coefficient between the nodes, the correlation coefficient can be normalized to obtain the final attention coefficient. The Softmax function is used in the process of calculating the attention coefficient.
[0069]
[0070] LeakReLU(·) is used in the formula to prevent the value of ReLU from being 0 when x is less than 0.
[0071] 2. Weighted sum
[0072] After calculating the attention coefficient in the first step, the features are weighted and summed according to the attention coefficient obtained.
[0073]
[0074] h′ i is the new feature of each node that integrates neighborhood information. σ(.) is an activation function. Attention can achieve result enhancement through multi-head attention calculation.
[0075]
[0076] Global structure encoding
[0077] In this part, a global heterogeneous graph is constructed, which mainly contains two types of nodes: text nodes combined with source tweets and forwarding relationships, and user nodes. First, the composition of the two types of nodes is clarified:
[0078]
[0079]
[0080] where m 0 ∈R d , is a dynamic vector that can be updated according to gradient descent, and is a static vector. u f is some behavioral features or user profile data (such as the number of friends, the number of followers, the number of statuses, etc.).
[0081] Because the semantic spaces of user nodes and text nodes are different, they are transformed into the same semantic space for subsequent operations, which can be represented as:
[0082] m′ j = Wm m' j (18)
[0083] u' i = W u u' i (19)
[0084] where W m ∈ R d×d , are learned parameters.
[0085] Then, a graph attention network is adopted to learn the distributed representation of each node in the graph by focusing on the adjacent nodes. Here, a variant of GAT model, GATv2, is used. As can be seen from the structure graph, there are mainly two kinds of relationships in the graph: (1) user-centered relationship, (2) tweet-centered relationship. In order to encode the two kinds of relationships into the nodes, two kinds of attention mechanisms are defined for the two kinds of relationships. The definitions are as follows:
[0086] a' ji = softmax(a T LeakyReLU(W ji [m' j ; u' i ])) (20)
[0087] b' jt = softmax(c T LeakyReLU(W jt [u' i ; m' t ])) (21)
[0088] where a, c ∈ R 2d×1 are nonlinear parameters, and W ji , W jt are learned parameters.
[0089] In order to capture multiple representations from different relationships, the attention mechanism is extended to a multi-head attention-like paradigm. Specifically, K independent attention mechanisms are set to transform, and then the features of each of them are spliced to obtain the final output result:
[0090]
[0091]
[0092] where || represents the concatenation operation, and σ(·) represents the ELU activation function.
[0093] The calculation process mainly takes a graph as input, generates a representation of each node, obtains the weight of each neighbor node using an attention mechanism, and obtains information from neighbor nodes in each iteration. The importance of neighbor nodes can be distinguished through the obtained weight, and finally the weighted average of the neighborhood embedding is taken as the representation of the current node.
[0094] Rumor detection
[0095] Through the above operations, the representation of the source tweet and the transformation relationship is obtained and the fusion of user node relationship and text relationship Both of these representations are very important for the final rumor detection, so they are linked together through a fully connected layer to obtain the final probability. The probability calculation process is as follows:
[0096]
[0097] where W ∈ R 2d×|c| is the weight parameter, and b ∈ R is the bias term. Finally, the cross-entropy loss is taken as the optimization objective function of rumor detection:
[0098]
[0099] where y i is the probability of rumor, and θ represents all model parameters.
[0100] Experimental results and analysis
[0101] Dataset
[0102] The proposed model was evaluated on three real datasets: Twitter15, Twitter16, and Weibo.
[0103] In the three datasets, the original data was processed using the pre-trained BERT model for Chinese and English. For each dataset, a heterogeneous graph was constructed from the source tweet and related retweets and related users. The Twitter15 and Twitter16 datasets contain four labels: non-rumor (NR), false rumor (FR), true rumor (TR), and unverified rumor (UR). The Weibo dataset contains two labels: true rumor and non-rumor. It is important to note that the "true rumor" label is used to indicate that the tweet is false. The statistics of the three datasets are shown in Table 1:
[0104] Table 1 Dataset Statistics
[0105]
[0106] Evaluation metrics and parameter settings
[0107] Evaluation index
[0108] The F1 value and the accuracy rate Accuracy will be used as evaluation indexes in this experiment, wherein the calculation formula of the accuracy rate is shown in (26):
[0109]
[0110] wherein N represents the size of the test set data, yi represents the real label of the data, represents the predicted label of the data.
[0111] The precision rate (Precision), also called the accuracy rate or the accuracy, describes the proportion of the true positive class in all the predicted positive classes, as shown in (27):
[0112] wherein TP represents the predicted true sample and the actual true sample, and FP represents the predicted true sample and the actual false sample.
[0113] The recall rate (Recall), also called the recall rate, describes the proportion of the true positive class found by the classifier in the true positive class, as shown in (28).
[0114] wherein FN represents the predicted false sample and the actual true sample.
[0115] The calculation of the F1 value comprehensively considers the accuracy rate and the recall rate of the classification model, and can be regarded as the weighted average of the two indexes. The F1 value, like the accuracy rate and the recall rate, is between 0 and 1, and the greater the value, the better the model performance. The calculation formula is shown in (29).
[0116] wherein P represents the precision rate, and R represents the recall rate.
[0117] Parameter setting
[0118] The model is realized by using pytorch, and the Adam algorithm is used to update the parameters. The β1 and β2 parameters in Adam are 0.98 and 0.988 respectively, and the initial value of the learning rate is 1 e -3 The size of the convolution kernel is set to (3, 4, 5), the number of heads in GATv2 is set to 8, and the training batch size of the training set is 32.
[0119] Analysis or discussion
[0120] The method proposed in this paper is compared with some advanced models, including:
[0121] DTC: A rumor detection method that uses a decision tree classifier based on various hand-crafted features to obtain information credibility.
[0122] DTR: A decision tree fake news detection ranking method based on query phrases.
[0123] SVM-RBF: An SVM-based model with an RBF kernel using hand-crafted features based on post overall statistics.
[0124] SVM-TS: A linear SVM classifier that uses hand-crafted features to build a time series model.
[0125] RFC: An SVM classifier with a propagation tree kernel based on rumor propagation structure.
[0126] GRU-RNN: An RNN-based model that can learn temporal language patterns from user comments.
[0127] RvNN: A rumor detection method based on a tree-structured recurrent neural network with GRU units that learn the representation of rumors through propagation structure.
[0128] PPC: A new model for detecting fake news by combining recurrent and convolutional networks.
[0129] GLAN: A rumor detection model that combines graph attention mechanisms and Transormer to process heterogeneous graphs.
[0130] Bi-GCN: A model that simultaneously processes rumor propagation and diffusion and operates on Top-down and Bottom-up graph structures.
[0131] DDGCN: A dynamic directed graph convolutional network that can adaptively learn spatio-temporal associations and model temporal and spatial sequence information.
[0132] For comparison, we randomly divided the dataset into 5 parts and performed 5-fold cross-validation to evaluate the accuracy (Accuracy), precision (Precision), recall (Recall), and F1 measure (F1) on four classes on the Twitter15 and Twitter16 datasets. The final accuracy and F1 values for the four classes in both datasets were obtained. On the Weibo dataset, we evaluated the accuracy, precision, recall, and F1 values for two classes. The experimental results are shown in Table 2:
[0133] Table 2 Comparison of experimental results on Twitter15
[0134]
[0135] Table 3 Twitter 16 experiment results comparison
[0136]
[0137]
[0138] Table 4 Weibo experiment results comparison
[0139]
[0140] Tables 2, 3 and 4 show the comparison of the proposed model and some current baseline models. From the tables, we can see that our proposed model outperforms other models on three datasets, and some performances are comparable to GLAN and some performances are better than GLAN.
[0141] The accuracy of the proposed model on Twitter 15, Twitter 16 and Weibo datasets are 90.5%, 91.7%, 94.9% respectively. It shows that our model performs well on different datasets, especially on Twitter 16, the model effect is improved obviously.
[0142] According to the effect of each baseline model in the table, we can find that the performance of the model based on manual features (DTC, DTR, SVM-RBF, SVM-TK, SVM-TS) is obviously poor, mainly because the generalization ability of the method based on manual features is poor, and it is difficult to capture useful features. However, the performance of SVM-TS and RFC is relatively good among the methods based on manual features, because they use additional time or structural characteristics.
[0143] For the deep learning method, GRU and PPC are better than the method based on manual features, which shows that the deep neural network has strong ability to automatically learn potential features, and the generalization ability is strong. And we can find that the effect of PPC is better than that of GRU, mainly because PPC combines the features of users, and PPC combines CNN and RNN to better capture the changes of features.
[0144] In the method based on propagation tree, we find that the method of RvNN is better than the method based on manual features and GRU, mainly because the method based on propagation tree uses deep neural network to obtain features, which is stronger than the method based on manual features in capturing key features; GRU is a sequence deep neural network model, while RvNN considers the structural features in the data, so the model based on propagation tree is better than the general neural network model, but the tree-based method will lose too much information in modeling the propagation process, because the message is propagated through the graph structure instead of the tree structure.
[0145] In summary, the performance of the proposed model is better than the method based on manual features, and the performance of the model is greatly improved. Specifically, compared with the advanced model GLAN, on the Twitter15 dataset, the accuracy of the model is equal to that of GLAN, but the F1 value on four rumor categories is higher than that of GLAN; on the Twitter16 dataset, the accuracy of the model is improved by 0.9% compared with GLAN, and the F1 value on three rumor categories is higher than that of GLAN; on the Weibo dataset, the accuracy of the model is improved by 0.2% compared with GLAN, and the precision on two rumor categories and the recall on some categories are higher than those of GLAN. The results show that using the BERT pre-training processing model to process the word vector on the basis of GLAN and using GATv2 instead of GAT are effective for improving the performance of rumor detection.
[0146] Ablation experiment
[0147] In order to determine the importance of each module of the proposed model, we perform ablation experiments on different parts of the model, and the experimental results are shown in Table 6.
[0148] Our Model uses BERT pre-training model and GATv2 to construct the model for rumor detection
[0149] w / o GATv2: use BERT pre-training processing model and GAT to construct the model, verify the effectiveness of GATv2
[0150] w / o BERT: use Word2vec to obtain word vector, verify the effectiveness of BERT pre-training processing model
[0151] w / o Local Relation: remove the local encoding module, prove the effectiveness of local encoding
[0152] Table 5 Ablation experiment results on Twitter15, Twitter16 and Weibo datasets
[0153]
[0154] The effectiveness of the BERT pre-training model, GATv2, and the local encoding module is compared respectively. First, the word vector is processed using BERT, and the attention is obtained using GAT to verify the effectiveness of GATv2. We can see that after using GAT, the accuracy of the model on the Twitter15, Twitter16 and Weibo datasets decreases by 0.3%, 0.9% and 0.7% respectively. Although the accuracy changes are small, it can be proved that GATv2 is more effective than GAT, which fully shows that the dynamic attention obtained by GATv2 is better than the static attention obtained by GAT.
[0155] Secondly, we use Word2vec to process the word vector and use GATv2 to obtain attention to verify the effectiveness of BERT. We can observe that the accuracy on the Twitter15, Twitter16 and Weibo datasets decreases by 1.8%, 2.0% and 2.6% respectively, which fully shows that the BERT pre-training model is more effective than Word2vec and is more suitable as a method for processing word vectors, mainly because BERT obtains dynamic word vectors that can fully consider the semantic information of the context.
[0156] Finally, the local encoding module is removed, and the accuracy of the model is compared on three datasets. From Table 5, we can find that after removing the local encoding module, the performance of the model on the three datasets decreases. This is mainly because the local encoding part better represents the relationship between nodes, thus helping to improve the performance of the model, and again showing the importance of the propagation relationship between tweets for rumor detection.
[0157] The combination of BERT and GATv2 with the local encoding module is found to be superior to the removal of one of the modules in the experimental results on the three datasets, indicating that the use of the three modules is more conducive to rumor detection.
[0158] 4.5 Early rumor detection
[0159] In rumor detection, the most critical goal is to discover rumors as early as possible to facilitate timely intervention. By setting the rumor detection delay time, the accuracy of each model and the average F1 value (F1 Average) of different categories at different times are calculated to evaluate the performance of each model in early rumor detection. Because the number of rumors will continue to increase over time, the performance of the model is evaluated by adding test data to obtain the accuracy of the model.
[0160] By changing the time, the accuracy and F1 value of each model are as follows Figure 2, 3, in the first few hours of the rumor, when the rumor data is small, but the model proposed and GLAN have shown good performance in terms of accuracy and F1 value, significantly better than other rumor detection classification methods. It shows that the model has superior rumor detection performance in early rumor detection, and when the accuracy of other models tends to rise, the model has stabilized. In the 2-4 hours of rumor detection, the accuracy and F1 value of the model on the Weibo dataset are about 94.9%, 93.0%, on Twitter15 about 89.5%, 90.0%, and on Twitter16 about 91.0%, 90.0%, much faster than other models except GLAN.
[0161] But as time goes on, the amount of data increases, and the observation Figure 2 It can be found that the accuracy of the model is not always rising, but slightly declining. This is mainly because, as the amount of tweet data increases, the text structure information, content information and semantic information also increase, resulting in more and more noise, which ultimately affects the experimental results of the model.
[0162] At the same time, the experiment shows that the model has good experimental results on the three datasets, slightly better than GLAN, and has a certain effect on improving the performance of rumor detection.
[0163] Parameter analysis
[0164] By increasing the number of GAT attention mechanism heads, the amount of calculation of the model also increases, which may affect the results of the model. The number of GATv2 heads is set from 1 to 10 for experiments, and the influence of different head numbers on the performance of the model is calculated. Figure 4 It can be found that on the three experimental datasets, as the number of heads increases, the performance of the model also increases, although the model has fluctuations in the middle process, but when the number of heads is 8, it reaches a maximum value and tends to be stable, indicating that the increase of the number of heads and the increase of the amount of calculation have a certain positive effect on the performance of the model.
[0165] By setting the number of GATv2 heads to 1 and 8 and the number of GAT heads to 1 and 8 for comparison, the experimental results are shown in Table 6. It can be found that when GAT and GATv2 are both set to 8, the experimental results of GATv2 are better, but the experimental results of GATv2 with 1 head are slightly lower than those of GAT with 8 heads, indicating that multi-head GAT is better than single-head GATv2, and thus single-head GATv2 is slightly lacking in type calculation.
[0166] Table 6 Comparison of GATv2 and GAT with different heads
[0167]
[0168] Error analysis
[0169] The data with length L (L = 10, 20, 30, 40, 50, 60, 70, 80, 90, 100) is input into the GLAN model, and the verification is carried out on the three data sets of Twitter15, Twitter16 and Weibo respectively. It is found that the performance decreases when the text is longer. The main reason is that the long text contains more context information. The GLAN uses Word2vec to process the data to obtain static word embedding and uses CNN to learn the semantic representation of the text. Therefore, the learned context semantic information is insufficient, resulting in the loss of semantic information of long text and affecting the final prediction result. The model proposed in the experiment uses the pre-training method of BERT to process data, which can fully combine the context information before and after the long text and has certain advantages in processing long text data. By comparing the experimental results of long text on the two models, it is found that the results obtained by the experimental model in processing long text data are slightly better than GLAN, as shown in Figure 5
[0170] Example analysis
[0171] Five tweets are input into the GLAN model and the model proposed in the experiment respectively, and the tweet ids are 4225, 3115, 3065, 1247 and 3835 for prediction. Among them, the data with id 4225, 3115 and 1247 are incorrect in the prediction result of the GLAN model, while the prediction result of the proposed model is correct. By analyzing the difference between the models, and expressing the attention weight of the five examples in the form of heat map in the two models, as shown in Figure 6 The deeper the color, the greater the attention coefficient. By comparing the attention coefficients of the five examples in the two models, it is found that the weight of the proposed model is better than that of GLAN on the example data, so that the correlation between nodes is more obvious, and the construction method of global relationship is optimized. It is further illustrated that the node attention weight obtained by using dynamic GATv2 instead of GAT is better, thereby improving the performance of the model and making the prediction result of the proposed model more accurate.
[0172] A rumor detection model combining pre-training processing model and graph attention mechanism is proposed in this paper. The source tweet and related forwarding are combined to form local attention text information, and then the text information and related user information are fused into the node, and finally the local attention and global attention are combined to form a heterogeneous graph. In this paper, the pre-training processing method of BERT is used to process the original data to obtain dynamic feature representation, and in terms of obtaining global relationship representation, GATv2 model is used to calculate the weight of the edge between nodes. Experiments on Twitter15, Twitter16 and Weibo data sets show that the proposed method of combining BERT and GATv2 has certain improvement.
[0173] In future work, more pre-training processing models and other models will be explored to help the model, and information related to tweets will be added to improve the heterogeneous graph. External knowledge base is used to process data to improve the accuracy of rumor detection.
[0174] The above describes only the preferred specific embodiments of the present application, but the protection scope of the present application is not limited thereto, any skilled person in the art can make equivalent replacement or change according to the technical solution and concept of the present application within the technical range disclosed by the present application, which should be covered within the protection scope of the present application.
Claims
1. A rumor detection method based on graph attention networks, characterized in that, Combining the BERT pre-trained model with the graph attention network CNN, the model assists in rumor detection by constructing relationships between information and leveraging propagated information. The model is divided into four parts: tweet encoding representation, local tweet relationship encoding, global relationship encoding, and rumor detection. The tweet encoding representation part uses the BERT pre-trained model to process the data, and then uses the feature representation of CNN to complete the mapping from word embedding to semantic space; Local tweet relation encoding learns a combined representation of each source tweet and related retweets from the retweets corresponding to each source tweet by improving the graph attention network GATv2. Global relation encoding describes how to encode the global structure into a node representation; The rumor detection module learns a classification function to predict the tags of the original tweets; The BERT pre-training method uses the masked language model MLM to generate deep bidirectional language representations, and uses deep bidirectional Transformer components to build the model to generate deep bidirectional language representations that can integrate contextual information. First, BERT is used to process the raw data. The first step is to use BERT's built-in word segmenter to segment the raw data, setting a fixed length L. When the length of a tweet is less than L, zeros are padded at the end of the document; if the length of a tweet is greater than L, the data is truncated at the end. The processed tweets are then converted into corresponding IDs based on the BERT vocabulary. Finally, word vectors are trained using a BERT pre-trained model, where the following definition is used: For a d-dimensional word embedding, the j-th word in the corresponding tweet is represented as: The final sentence of length L is represented as: The semicolon ";" indicates a link operation. CNNs learn semantic representations of text from word embeddings, using the word index sequence of a tweet. Transformed into word embeddings using a BERT pre-trained model ,in: This represents the embedding set of each word in the first data entry. The convolutional layer operates on the obtained word embeddings. The convolutional layer calculation formula is as follows: (1) Feature maps are extracted through convolution operations. ,in It is a convolution kernel of size h. It is a non-linear transformation function that uses max pooling to operate on the obtained feature map after one convolution operation: (2) Through the above operations, a feature is extracted from a filter. The CNN layer uses filters to obtain multiple features. The outputs of the multiple filters are concatenated, and the concatenated result is... As the jth microblog The representation is that each forward is obtained in the same way. ( The text representation of the forwarding is used to stack each forwarding message together to form a forwarding matrix. Finally, the tweet is represented by a convolutional neural network.
2. The rumor detection method based on graph attention networks as described in claim 1, characterized in that, In the encoding representation of the source tweet, the BERT pre-training method is first used to process the raw data to generate word vectors, and then the word vectors are processed by CNN to obtain the feature representation of the tweet.
3. The rumor detection method based on graph attention networks as described in claim 1, characterized in that, Multi-head attention is used to learn contextual information representations. This module has three inputs: , ,in Let Q and K represent the number of words in each sentence, respectively, and d represent the embedding dimension. In the attention module, each word in Q and each word in K are first calculated using scaled dot product attention, that is, the inner product is used to describe the relationship between deliberate and unintentional information. Then, the resulting attention weights are applied to the sentence V. (3) Then, the terms of V are linearly combined with the weights to form a new representation of Q. Let K = V, and a word in Q is represented by the word most similar to it in V. Q, K, and V are assigned to h heads; each reflects the relationship between Q, K, and V from one aspect and corresponds to a scaled dot product attention module. Ultimately, each head... The output is: (4) in This is a linear transformation matrix that concatenates the output features from multiple heads and then transforms them into the final output through a linear transformation matrix, with the following form: (5) in It is a linear transformation matrix; The internal relationship between the source tweet and retweets is established using local context representation. First, multi-head attention is used to refine the representation of each retweet, and its expression is as follows: (6) in By employing a self-attention mechanism to ensure that each tweet follows the others, semantic relationships between different retweets are encoded, establishing a relationship between the source tweet and the retweets. The source tweet 'm' is used as a key, and then it is used in conjunction with the retweets. By combining these factors, the attention score corresponding to each repost can be calculated. (7) (8) in It is an attention score, and a fusion gate is introduced to distinguish the importance between the new tweet and the original tweet, combining the two representations. (9) (10) in It is the Sigmoid activation function. These are the trainable weights in the fusion gate. It is a trainable bias. It is the final output of the tweet after incorporating the retweet relationship.
4. The rumor detection method based on graph attention networks as described in claim 3, characterized in that, A simple modification is made by changing the order of operations within the attention network GAT, and a computational GATv2 for dynamic attention is proposed. The computation process of GATv2 consists of two parts: (1) Calculate the attention coefficient GATv2 reverses the order of operations in calculating the attention coefficient, moving LeakyReLU to... and Between two linear operations, where It is a simple feedforward neural network, for vertices It calculates the correlation coefficient between him and each of his neighboring nodes. A comparison between GAT and GATv2 in terms of coefficient calculation: (11) (12) In the formula This is used as a weight to increase the dimensionality of the node's features, which is a common feature enhancement method. It is for nodes and nodes The transformed features are then concatenated; finally... The concatenated features are mapped to a real number, and the correlation coefficient between nodes is normalized to obtain the final attention coefficient. The Softmax function is used in the calculation of the attention coefficient. (13) in the formula To prevent the ReLU value from being 0 when x is less than 0; (2) Weighted summation After calculating the attention coefficients in the first step, the features are weighted and summed based on the obtained attention coefficients. (14) That is, on each node New features that integrate neighborhood information It is an activation function; Attention enhances the results through multi-head attention calculation. (15) Construct a global heterogeneous graph containing two types of nodes: text nodes combining source tweets and retweet relationships, and user nodes. First, clarify the characteristics of these two types of nodes. composition: (16) (17) in The dynamic vector can be updated based on gradient descent, while It is a static vector. These are behavioral characteristics or user profile data; User nodes and text nodes have different semantic spaces. Converting them to the same semantic space, they can be represented as follows: (18) (19) in These are the learned parameters. Next, a graph attention network is used to learn the distributed representation of each node in the graph by focusing on its neighboring nodes. There are two types of node relationships: user-centric relationships and tweet-centric relationships. These two types of relationships are encoded into the nodes, and the attention mechanism for these two relationships is defined as follows: (20) (21) in Represented as a nonlinear parameter, This represents the learned parameters; By capturing multiple representations from different relationships, the attention mechanism is extended to a paradigm similar to multi-head attention. K independent attention mechanisms are set up for transformation, and then each feature is concatenated to obtain the final output. (22) (23) in Indicates a connection operation. This represents the ELU activation function. The calculation process takes a graph as input, generates a representation for each node, and uses an attention mechanism to obtain the weights of each neighboring node. In each iteration, the current node obtains information from its neighbors. By using the obtained weights, the importance of the neighbors is distinguished. Finally, the weighted average of the neighborhood embeddings is used as the representation of the current node.
5. The rumor detection method based on graph attention networks as described in claim 4, characterized in that, The representation combining the source tweet and the conversion relationship. And the integration of user node relationships and text relationships The final probability is obtained through a fully connected layer. The probability calculation process is as follows: (24) in These are weight parameters. This is a bias term. Finally, cross-entropy loss is used as the optimization objective function for rumor detection. (25) of which The probability that it is a rumor. Represents all model parameters.