An early rumor detection method and device based on stance features

By establishing a field perception module, a rumor classification module and a strengthened decision-making module in the rumor detection method, combining the graph convolution network and the LSTM network, integrating the position features to identify rumors and provide action plans, the problem of difficulty in early identification and preventing rumors spread in the existing technology is solved, and a high accuracy and timely rumor detection effect is achieved.

CN114896519BActive Publication Date: 2025-04-25NANJING YOUHUI XINAN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210588702.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-27
Publication Date
2025-04-25
Estimated Expiration
2042-05-27

AI Technical Summary

Technical Problem

The existing rumor detection methods are difficult to capture the dynamic spread characteristics of rumors in a timely manner during the evolution of comment structure, making it difficult to identify and prevent rumors from spreading in the early stage.

Method used

An early rumor detection method based on position characteristics is proposed. By constructing a field perception module, a rumor classification module and a reinforced decision-making module, combining a graph convolution network and an LSTM network, the stance features are integrated to identify rumors and provide action plans to prevent their spread.

Benefits of technology

It improves the accuracy and timeliness of rumors identification, and can determine more than 80% of events within 6 hours after rumors spread, which significantly improves the efficiency of preventing rumors spread.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114896519B_ABST
    Figure CN114896519B_ABST
Patent Text Reader

Abstract

The present invention discloses an early rumor detection method and device based on stance features, which can timely and accurately identify rumors. The present invention is divided into a stance perception module, a rumor classification module and a reinforcement decision module. The stance perception module can extract stance features from comments. The rumor classification module is used to identify rumor events, and divides the rumor propagation process into a series of sub-comment structures. Then, the reinforcement decision module selects appropriate actions for the encoding of the sub-comment structures in turn according to the characteristics of the dynamic propagation of rumors, that is, whether to supplement subsequent comment data, so as to achieve the purpose of timely detection. Both the rumor classification module and the reinforcement decision module incorporate stance features to enhance the ability of each module to extract features. According to the characteristics of the dynamic propagation of rumors, the present invention can identify rumors in the early stages of their propagation, thereby preventing the spread of rumors in a timely manner.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an early rumor detection method and device based on stance features, belonging to the technical field of information security and artificial intelligence. Background Art

[0002] With the development of computer information and communication technology, the Internet has gradually penetrated into people's daily production and life, greatly promoting the development of human society. Among them, social media, as a product of the Internet era, such as Weibo, Twitter, Facebook, etc., has become an important information exchange medium in human social life. Users can express their opinions, exchange experiences and interact with others at any time through mobile phones and computers.

[0003] The rapid development of social media platforms has simplified the way people communicate with each other, and also provided a very convenient way for people to collect information and news. However, the rumors generated by social media should not be underestimated. In recent years, more and more scholars at home and abroad have devoted themselves to the research of rumor detection and proposed many new detection models and theoretical methods. Traditional rumor detection methods use artificially extracted features as input and use some machine learning methods such as support vector machines, decision trees and random forests to judge rumors. Such methods are cumbersome and time-consuming in the feature engineering stage. At the same time, the artificially constructed features are highly subjective and lack high-order feature representation, so they cannot effectively extract the deep features of rumors. With the successful application of deep learning models in various fields, deep learning models based on RNN and CNN have also been gradually applied to the field of rumor detection, relying on their back propagation algorithms to extract the deep features of rumors. Ma et al. proposed a rumor detection method based on recursive neural network (RNN) by modeling the temporal relationship between microblogs in an event. Liu Zheng et al. proposed a rumor detection method based on convolutional neural network based on the connection between microblogs. However, these methods ignore the structural relationship between comments (comment structure) and cannot capture the propagation characteristics of rumors. The emergence of structural network models such as TreeLSTM and GNN provides new solutions for accurately predicting rumors. These methods model the structural relationship between comments in the process of rumor propagation and effectively obtain the propagation structural characteristics of rumors. Ma et al. modeled the rumor propagation path and proposed a rumor detection method RvNN based on tree structure. Huang et al. comprehensively considered the content, users and propagation of rumor detection and proposed a rumor detection method based on graph convolutional neural network. Tian et al. proposed a rumor detection method based on bidirectional graph convolutional network structure (Bi-GCN). This method explored the upward and downward propagation patterns of social media texts and combined with key features in the source text to improve the accuracy of rumor detection.

[0004] However, although the existing rumor detection methods have made some research progress, they still have shortcomings. Given the characteristics of rumors spreading quickly and influencing a wide range, being able to quickly identify rumors in a timely manner is of great significance to maintaining the health of the network ecology and maintaining social stability. Although the existing rumor detection methods based on graph structures can extract the propagation structure characteristics of rumors during the evolution of comment structures, they do not take into account the characteristics of the dynamic propagation of rumors, making it difficult to prevent the spread of rumors in a timely manner. Therefore, there is still a lot of room for development in the direction of early rumor detection. Summary of the invention

[0005] In view of the problems existing in the prior art, the present invention proposes an early rumor detection method and device based on stance features, which can detect rumors in a timely manner during the rumor propagation process. The method of the present invention covers the entire process of social media rumor detection, mainly including data set construction and feature processing, construction of stance perception module, construction of rumor classification module, construction of enhanced decision-making module, prediction of unknown posts, etc., so as to identify rumors in the early stage of their propagation, thereby preventing the spread of rumors in a timely manner.

[0006] The present invention is divided into three modules: stance perception, rumor classification and enhanced decision-making. First, the stance perception module can extract stance features from comments. Next, the rumor classification module divides the rumor into a series of sub-comment structures based on the graph structure according to the propagation process, encodes each sub-structure using a graph convolutional network and inputs it into the LSTM neural network in conjunction with the stance features to identify the rumor event. Then, the enhanced decision-making module integrates the stance features to provide an action plan for early detection effects based on the characteristics of the dynamic propagation of rumors, that is, whether to supplement subsequent comment data, so as to detect rumors in a timely manner. Finally, the rumor classification module completes the final prediction based on the actions to be taken, thereby avoiding the spread of rumors.

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

[0008] An early rumor detection method based on stance features includes the following steps:

[0009] Step 1: Dataset construction and feature processing: collect and organize rumor datasets, and perform feature engineering analysis and feature processing on the data;

[0010] Step 2: Build a stance perception module and perform stance detection tasks on the existing stance dataset to obtain a feature extraction model that can extract stance features from comments.

[0011] Step 3: Construct a rumor classification module to divide the rumor propagation process into a series of sub-comment structures based on graph structures. According to the characteristics of dynamic rumor propagation, the coding of the sub-comment structures is used to classify rumors.

[0012] Step 4: Build a reinforced decision-making module to provide an action plan for early detection effects by integrating stance features, i.e., whether to supplement follow-up comment data, so as to detect rumors in a timely manner;

[0013] Step 5: Collect the social media posts to be detected and make predictions.

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

[0015] Firstly, typical rumor detection datasets are collected and organized, including Twitter15, Twitter16 and Weibo. Then, the TF-IDF word vector model is used to select 5,000 words with higher frequency in the data from the perspective of word frequency to encode each post and use them as the initial feature vector. Finally, for each rumor event, a comment structure based on graph structure is constructed.

[0016] Furthermore, the step 2 specifically includes the following process:

[0017] The stance perception module designed in the present invention uses the RoBERTa model to perform stance detection tasks, thereby obtaining a feature extraction model, where the " <cls>The vector representation of the position output is the stance feature that needs to be integrated in the whole method. In view of the fact that the present invention conducts experimental tests on two datasets, Weibo and Twitter, the input of the stance perception module has two types. For the Weibo dataset, the input is the target topic (#Topic) and the microblog text (Raw Text), while for the Twitter dataset, the input is the source post (source), comment text 1 (comment1) and comment text 2 (comment2) that replies to comment text 1. Then the stance perception module tokenizes the input text, that is, the input sentence is tokenized using " <cls>"and" <sep>"Identifiers are separated, where " <cls>" should be placed at the beginning of the first sentence, " <sep>" is the separator between sentences. Therefore, the input information will appear in the form of [<CLS>, A, <SEP>, B, <SEP>...], where A and B represent the first and second sentences respectively. Each token in the sentence is input into the Pre-trained RoBERTa model one by one, and after being encoded by multiple Transformer layers, the deep representation of each token is obtained. The calculation formula is:

[0018] E=RoBERTa([<CLS>,A,<SEP>,B,<SEP>...])

[0019] Extract from the feature representation E after RoBERTa encoding" <cls>"The vector E at the position cls As the extracted stance features and stance classification, the calculation formula is:

[0020]

[0021] The present invention adopts two fully connected layers Opposition characteristics E cls Encode and input the encoded data into the softmax(·) classifier to obtain a triple value Represent the probabilities of approval, neutrality and opposition respectively. The cross entropy loss function is used to optimize the position perception module, and the calculation formula is:

[0022]

[0023] Where N stance is the number of samples, c stance is the number of stance categories, and They represent the true and predicted probabilities of the jth class of the ith sample, respectively.

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

[0025] Sub-step 3-1, graph comment structure division, according to the characteristics of rumor dynamic propagation, the graph comment structure S is divided according to the time of comment release, from the sub-comment structure S based on the graph structure (1) At the beginning, each time a comment is added to form the next sub-comment structure, until the number of comments reaches n-1 to form the last sub-structure, where n-1 is the number of comments. Finally, the comment structure S of event c is represented as {S (1) ,S (2) ,...,S (T) }, for each sub-comment structure S (t) , which can be written as where n (t) -1 is S (t) The number of comments in

[0026] Sub-step 3-2, graph comment structure encoding and prediction, uses a graph convolutional neural network (GCN) to mine the global features of the sub-comment structure. The present invention uses two layers of graph convolutional layers to perform convolution operations on the features of graph nodes, and averages the output vector mean(·) of the last graph convolutional layer to obtain the global features. Then the rumor classification module integrates the stance features extracted by the stance perception module The feature representation of the enhanced sub-comment structure is calculated as:

[0027]

[0028]

[0029] Where W G and W cls is a learnable parameter matrix used to unify and The size of the dimension, b G is an offset term. Therefore, the sub-comment structure S (t) After combination, the feature representation H is obtained. (t) , and then get the feature representation H of the entire comment structure S, the calculation formula is:

[0030] H=concat([H (1) ,H (2) ,...,H (t′) ])

[0031] Where t′ represents the moment when the reinforcement decision module selects the action of "stop". Since each sub-comment structure based on the graph structure has a mutual dependence on the time scale, the LSTM network is used to further encode each sub-comment structure, and the calculation formula is:

[0032] h t =LSTM(H)

[0033] where h t is the output vector of the LSTM network at time t, representing the sub-comment structure S (t) The final encoding feature representation. Before the reinforcement decision module makes a "stop" action, the output vector of the LSTM network at any time will be used as a feature vector for rumor prediction. The present invention uses the softmax (·) activation function to classify rumors, and the calculation formula is:

[0034]

[0035] Where W p is the training matrix, b p is the offset term, is the probability of predicting each category of rumors;

[0036] Sub-step 3-3, rumor classification loss function. The present invention uses the cross entropy loss function to optimize the rumor classification module. The calculation formula is:

[0037]

[0038] Where N rumor is the number of samples in the rumor dataset, c rumor is the number of rumor categories, and They represent the true and predicted probabilities of the jth class of the ith sample, respectively.

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

[0040] Sub-step 4-1, setting the state, strengthening the decision module to fuse the stance features and the feature representation extracted from the current sub-comment structure as the state of the module The calculation formula is:

[0041]

[0042] where h t Is the sub-comment structure S (t) The encoded feature representation is is the stance feature, extracted by the stance perception module, W stance is the learnable parameter matrix, b state is the offset term;

[0043] Sub-step 4-2, set the action, let A = {a1, a2, ...} be the action set, where a t ∈{0,1}. In early rumor detection, the present invention sets two actions, namely, continue to supplement the subsequent comment data (continue) and stop supplementing and detecting (stop). t = 0, the reinforcement decision module will continue to input the encoding of the next sub-comment structure, and when a t =1, the module will not input the code of the next moment. No matter which action is selected, the rumor classification module will predict the event. The calculation formula is:

[0044]

[0045] Sub-step 4-3, set the reward, let R = {r1, r2, ...} represent the interactive reward of the reinforcement decision module, where the reward value r of each state t By the reward function In order to improve the accuracy of rumor detection, the present invention uses the results of rumor detection to give corresponding rewards or penalties to the reinforcement decision module. Therefore, the reward function includes three possible situations, namely "continue", "stop_correct" and "stop_incorrect". "Continue" means a t =0, that is, continue to supplement the subsequent comment data. At this time, the module needs to make classification predictions and also input the encoding representation of the sub-comment structure at the next moment; "stop_correct" refers to a t = 1 and the predicted result is correct; "stop_incorrect" means a t =1 but the predicted result is wrong. For the "continue" case, it indicates that the enhanced decision module cannot stop the spread of rumors in time, and a slight penalty of -ε will be given; for the "stop_correct" case, the enhanced decision module will give a larger reward value to drive the method in the right direction; and for "stop_incorrect", a larger penalty value will be given to punish its wrong judgment. Considering that the number of comments may affect the effect of rumor detection, for example, the number of comments is too small for the rumor classification module to classify rumors, the present invention designs the comment coefficient λ (t) Used to balance the reward function, the calculation formula is:

[0046]

[0047] Where n is the total number of texts (including source posts and comments) in the comment structure based on the graph structure, n (t) Represents the sub-comment structure S (t) Combined with the comment coefficient, the complete reward function is as follows:

[0048]

[0049] Where M and P are both normal quantities;

[0050] Sub-step 4-4, reinforcement learning loss function, uses the Actor-Critic algorithm to make decisions for early rumor detection. Actor-Critic consists of two neural networks, including the Actor network and the Critic network. The calculation steps for the Actor network and the Critic network to generate actions and values ​​are as follows:

[0051]

[0052]

[0053] The present invention uses a two-layer fully connected network and Extraction status The features of the action are obtained The value of the action selected under the state Where σ is the activation function, generally the sigmoid function is used. Critic network learning state value function By time difference error TD (t) Optimize. (t) It is obtained by the value of the current state, the value of the next state, and the reward value fed back after selecting the action. The calculation formula is:

[0054]

[0055] Among them, ε is the decay factor, which represents the decay weight of the state value at the next moment. The Critic network uses TD (t) The square value of is used as the loss function to update the gradient of parameter w. The calculation formula is:

[0056] Loss critic =(TD (t) ) 2

[0057] The Actor network directly learns the action strategy using TD (t) The weighted cross entropy is used as the loss function to optimize the parameters, and the calculation formula is:

[0058]

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

[0060] For the post to be detected, the present invention collects the relevant information of the post through the official API interface, including the source post and the comment information below; then uses the TF-IDF word vector model to encode each text content and obtain its vectorized representation; then, relying on the structural relationship between the comments, all the texts are modeled into a data structure based on a graph structure, which serves as the input of the model; finally, the trained early rumor detection model is used to predict it and the results are fed back.

[0061] The present invention also provides an early rumor detection device based on stance features, 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 early rumor detection method based on stance features is implemented.

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

[0063] 1. Compared with other rumor detection methods based on graph neural networks, this invention can capture the structural characteristics of rumor propagation and take into account the dynamic propagation characteristics of rumors, so that the accuracy of rumor recognition is higher. In addition, in terms of the timeliness of early rumor detection, the present invention can judge rumors for more than 80% of events within 6 hours after they are propagated, and its rumor recognition speed is relatively fast, thereby preventing the spread of rumors in a timely manner.

[0064] 2. The present invention models the relationship between comments during the process of rumor propagation, which conforms to the dynamic propagation characteristics of rumors. The method also integrates stance characteristics, which can significantly reflect the user's emotional orientation towards posts, and improves the timeliness and accuracy of detection.

[0065] 3. The rumor classification module designed by the present invention can deeply mine the global features of rumor text based on graph structure by using graph convolutional network. Combining the stance features as the input of LSTM network is conducive to capturing the propagation characteristics of rumors. This feature effectively highlights the propagation law of rumors and greatly enhances the performance of rumor detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] Figure 1 The overall framework diagram of an early rumor detection method based on stance features provided by the present invention;

[0067] Figure 2 The framework of the stance perception module involved in the embodiment of the present invention;

[0068] Figure 3 This is the update process of the Actor network and the Critic network involved in the embodiment of the present invention. DETAILED DESCRIPTION

[0069] 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.

[0070] Embodiment 1: An early rumor detection method based on stance features, the overall framework of which is as follows Figure 1 As shown, the method comprises the following steps:

[0071] Step 1: Dataset construction and feature processing. First, we collect and organize typical rumor detection datasets, including Twitter15, Twitter16, and Weibo. Then, we use the TF-IDF word vector model to select 5,000 words with higher frequency in the data from the perspective of word frequency to encode each post and use them as the initial feature vector. Finally, for each rumor event, we construct a comment structure based on a graph structure.

[0072] Step 2: Construct a stance perception module. This module performs stance detection tasks on existing stance datasets to obtain a feature extraction model that can extract stance features from comments. The stance perception module designed in the present invention uses the RoBERTa model to perform stance detection tasks to obtain a feature extraction model, where " <cls>The vector representation of the position output is used as the stance feature that needs to be integrated in the entire method. Figure 2 The framework of the stance-aware module is shown. Since the present invention conducts experimental tests on two datasets, Weibo and Twitter, the input of the stance-aware module has two types. For the Weibo dataset, the input is the target topic (#Topic) and the microblog text (Raw Text), while for the Twitter dataset, the input is the source post (source), comment text 1 (comment1), and comment text 2 (comment2) that replies to comment text 1. Then the stance-aware module tokenizes the input text, that is, the input sentence is tokenized using " <cls>"and" <sep>"Identifiers are separated, where " <cls>" should be placed at the beginning of the first sentence, " <sep>" is the separator between sentences. Therefore, the input information will appear in the form of [<CLS>, A, <SEP>, B, <SEP>...], where A and B represent the first and second sentences respectively. Each token in the sentence is input into the Pre-trained RoBERTa model one by one, and after being encoded by multiple Transformer layers, the deep representation of each token is obtained. The calculation formula is:

[0073] E=RoBERTa([<CLS>,A,<SEP>,B,<SEP>...])

[0074] Extract from the feature representation E after RoBERTa encoding" <cls>"The vector E at the position cls As the extracted stance features and stance classification, the calculation formula is:

[0075]

[0076] The present invention adopts two fully connected layers Opposition characteristics E cls Encode and input the encoded data into the softmax(·) classifier to obtain a triple value Represent the probabilities of approval, neutrality and opposition respectively. The cross entropy loss function is used to optimize the position perception module, and the calculation formula is:

[0077]

[0078] Where N stance is the number of samples, c stance is the number of stance categories, and They represent the true and predicted probabilities of the jth class of the ith sample, respectively.

[0079] Step 3: Build a rumor classification module to divide the rumor propagation process into a series of sub-comment structures based on graph structures. According to the characteristics of dynamic rumor propagation, the coding of the sub-comment structure is used to classify rumors. The implementation process of this step is divided into three sub-steps:

[0080] Sub-step 3-1, graph comment structure division, according to the characteristics of rumor dynamic propagation, the graph comment structure S is divided according to the time of comment release, from the sub-comment structure S based on the graph structure (1) At the beginning, each time a comment is added to form the next sub-comment structure, until the number of comments reaches n-1 to form the last sub-structure, where n-1 is the number of comments. Finally, the comment structure S of event c is represented as {S (1) ,S (2) ,...,S (T) }, for each sub-comment structure S (t) , which can be written as where n (t) -1 is S (t) The number of comments in

[0081] Sub-step 3-2, graph comment structure encoding and prediction, uses a graph convolutional neural network (GCN) to mine the global features of the sub-comment structure. The present invention uses two layers of graph convolutional layers to perform convolution operations on the features of graph nodes, and averages the output vector mean(·) of the last graph convolutional layer to obtain the global features. Then the rumor classification module integrates the stance features extracted by the stance perception module The feature representation of the enhanced sub-comment structure is calculated as:

[0082]

[0083]

[0084] Where W G and W cls is a learnable parameter matrix used to unify and The size of the dimension, b G is an offset term. Therefore, the sub-comment structure S (t) After combination, the feature representation H is obtained. (t) , and then get the feature representation H of the entire comment structure S, the calculation formula is:

[0085] H=concat([H (1) ,H (2) ,...,H (t′) ])

[0086] Where t′ represents the moment when the reinforcement decision module selects the action of "stop". Since each sub-comment structure based on the graph structure has a mutual dependence on the time scale, the LSTM network is used to further encode each sub-comment structure, and the calculation formula is:

[0087] h t =LSTM(H)

[0088] where h t is the output vector of the LSTM network at time t, representing the sub-comment structure S (t) The final encoding feature representation. Before the reinforcement decision module makes a "stop" action, the output vector of the LSTM network at any time will be used as a feature vector for rumor prediction. The present invention uses the softmax (·) activation function to classify rumors, and the calculation formula is:

[0089]

[0090] Where W p is the training matrix, b p is the offset term, is the probability of predicting each category of rumors;

[0091] Sub-step 3-3, rumor classification loss function. The present invention uses the cross entropy loss function to optimize the rumor classification module. The calculation formula is:

[0092]

[0093] Where N rumor is the number of samples in the rumor dataset, c rumor is the number of rumor categories, and They represent the true and predicted probabilities of the jth class of the ith sample, respectively.

[0094] Step 4: Build a reinforced decision-making module to provide an action plan for early detection by integrating stance features, i.e. whether to supplement follow-up comment data, so as to detect rumors in a timely manner. The implementation process of this step is divided into 4 sub-steps:

[0095] Sub-step 4-1, setting the state, strengthening the decision module to fuse the stance features and the feature representation extracted from the current sub-comment structure as the state of the module The calculation formula is:

[0096]

[0097] where h t Is the sub-comment structure S (t) The encoded feature representation is is the stance feature, extracted by the stance perception module, W stance is the learnable parameter matrix, b state is the offset term;

[0098] Sub-step 4-2, set the action, let A = {a1, a2, ...} be the action set, where a t ∈{0,1}. In early rumor detection, the present invention sets two actions, namely, continue to supplement the subsequent comment data (continue) and stop supplementing and detecting (stop). t = 0, the reinforcement decision module will continue to input the encoding of the next sub-comment structure, and when a t =1, the module will not input the code of the next moment. No matter which action is selected, the rumor classification module will predict the event. The calculation formula is:

[0099]

[0100] Sub-step 4-3, set the reward, let R = {r1, r2, ...} represent the interactive reward of the reinforcement decision module, where the reward value r of each state t By the reward function In order to improve the accuracy of rumor detection, the present invention uses the results of rumor detection to give corresponding rewards or penalties to the reinforcement decision module. Therefore, the reward function includes three possible situations, namely "continue", "stop_correct" and "stop_incorrect". "Continue" means a t =0, that is, continue to supplement the subsequent comment data. At this time, the module needs to make classification predictions and also input the encoding representation of the sub-comment structure at the next moment; "stop_correct" refers to a t = 1 and the predicted result is correct; "stop_incorrect" means a t =1 but the predicted result is wrong. For the "continue" case, it indicates that the enhanced decision module cannot stop the spread of rumors in time, and a slight penalty of -ε will be given; for the "stop_correct" case, the enhanced decision module will give a larger reward value to drive the method in the right direction; and for "stop_incorrect", a larger penalty value will be given to punish its wrong judgment. Considering that the number of comments may affect the effect of rumor detection, for example, the number of comments is too small for the rumor classification module to classify rumors, the present invention designs the comment coefficient λ (t) Used to balance the reward function, the calculation formula is:

[0101]

[0102] Where n is the total number of texts (including source posts and comments) in the comment structure based on the graph structure, n (t) Represents the sub-comment structure S (t) Combined with the comment coefficient, the complete reward function is as follows:

[0103]

[0104] Where M and P are both normal quantities;

[0105] Sub-step 4-4, reinforcement learning loss function, adopts Actor-Critic algorithm to make decisions on early rumor detection. Actor-Critic consists of two neural networks, including Actor network and Critic network. Figure 3 The update process of the two networks is shown. The calculation steps for the Actor network and the Critic network to generate actions and values ​​are as follows:

[0106]

[0107]

[0108] The present invention uses a two-layer fully connected network and Extraction status The features of the action are obtained The value of the action selected under the state Where σ is the activation function, generally the sigmoid function is used. Critic network learning state value function By time difference error TD (t) Optimize. (t) It is obtained by the value of the current state, the value of the next state, and the reward value fed back after selecting the action. The calculation formula is:

[0109]

[0110] Among them, ε is the decay factor, which represents the decay weight of the state value at the next moment. The Critic network uses TD (t) The square value of is used as the loss function to update the gradient of parameter w. The calculation formula is:

[0111] Loss critic =(TD (t) ) 2

[0112] The Actor network directly learns the action strategy using TD (t) The weighted cross entropy is used as the loss function to optimize the parameters, and the calculation formula is:

[0113]

[0114] Step 5, collect the social media posts to be detected and make predictions. For the posts to be detected, the present invention collects the relevant information of the posts through the official API interface, including the source posts and the comment information below; then uses the TF-IDF word vector model to encode each text content and obtain its vectorized representation; then, relying on the structural relationship between the comments, all texts are modeled into a data structure based on a graph structure, which is used as the input of the model; finally, the trained early rumor detection model is used to predict it and the results are fed back.

[0115] In summary, the present invention includes three parts: a stance perception module, a rumor classification module and a stance perception module. First, a stance perception module based on the RoBERTa model is designed, which can extract stance features from comments. Then, based on the structural relationship between comments, a rumor classification module is designed to divide the rumor propagation process into a series of sub-comment structures based on graph structures, encode using a graph convolutional network and fuse stance features into the LSTM network to identify rumor events. Then, based on the Actor-Crtic reinforcement learning algorithm, a reinforcement decision module is designed. This module integrates stance features according to the characteristics of dynamic propagation of rumors to provide an action solution for early detection effects, that is, whether to supplement subsequent comment data to detect rumors in a timely manner. Finally, the rumor classification module completes the final prediction based on the action results.

[0116] The inventive concept of Example 2 is an early rumor detection device based on stance features disclosed in the embodiment of the present invention, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the above-mentioned early rumor detection method based on stance features when loaded into the processor.

[0117] 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.< / cls> < / sep> < / cls> < / sep> < / cls> < / cls> < / cls> < / sep> < / cls> < / sep> < / cls> < / cls>

Claims

1. An early rumor detection method based on stance features, characterized in that: The method comprises the following steps: Step 1: Dataset construction and feature processing: collect and organize rumor datasets, and perform feature engineering analysis and feature processing on the data; Step 2: Build a stance perception module and perform stance detection tasks on the existing stance dataset to obtain a feature extraction model that can extract stance features from comments. Step 3: Construct a rumor classification module to divide the rumor propagation process into a series of sub-comment structures based on graph structures. According to the characteristics of dynamic rumor propagation, the coding of the sub-comment structures is used to classify rumors. Step 4: Build a reinforced decision-making module to provide an action plan for early detection effects by integrating stance features, i.e., whether to supplement follow-up comment data, so as to detect rumors in a timely manner; Step 5, collect the social media posts to be detected and make predictions; Wherein, the step 4 specifically includes the following sub-steps: Sub-step 4-1, setting the state, strengthening the decision module to fuse the stance features and the feature representation extracted from the current sub-comment structure as the state of the module The calculation formula is: where h t Is the sub-comment structure S (t) The encoded feature representation is is the stance feature, extracted by the stance perception module, W stance is the learnable parameter matrix, b state is the offset term; Sub-step 4-2, set the action, let A = {a1, a2, ...} be the action set, where a t ∈{0,1}, in the early stage of rumor detection, two actions are set, namely, continue to supplement the follow-up comment data continue and stop to supplement the detection stop. t = 0, the reinforcement decision module will continue to input the encoding of the next sub-comment structure, and when a t =1, the module will not input the code of the next moment. No matter which action is selected, the rumor classification module will predict the event. The calculation formula is: Sub-step 4-3, set the reward, let R = {r1, r2, ...} represent the interactive reward of the reinforcement decision module, where the reward value r of each state t By the reward function The result of rumor detection is used to give corresponding rewards or penalties to the reinforcement decision module. Therefore, the reward function includes three cases, namely "continue", "stop_correct" and "stop_incorrect", where "continue" means a t =0, that is, continue to supplement the subsequent comment data. At this time, the module needs to make classification predictions and also input the encoding representation of the sub-comment structure at the next moment; "stop_correct" refers to a t = 1 and the predicted result is correct; "stop_incorrect" means a t =1 but the predicted result is wrong. For the "continue" case, it indicates that the reinforcement decision module cannot stop the spread of rumors in time, and a slight penalty of -ε will be given; for the "stop_correct" case, the reinforcement decision module will give a larger reward value to drive the method in the right direction; and for "stop_incorrect", a larger penalty value will be given to punish its wrong judgment. The design comment coefficient λ (t) Used to balance the reward function, the calculation formula is: Where n is the total number of texts in the comment structure based on the graph structure, including source posts and comments, n (t) Represents the sub-comment structure S (t) The number of Chinese texts, combined with the comment coefficient, the complete reward function is as follows: Where M and P are both normal quantities; Sub-step 4-4, reinforcement learning loss function, uses the Actor-Critic algorithm to make decisions on early rumor detection. Actor-Critic consists of two neural networks, including the Actor network and the Critic network. The calculation steps for the Actor network and the Critic network to generate actions and values ​​are as follows: Use a two-layer fully connected network and Extraction status The features of the action are obtained The value of the action selected under the state Where σ is the activation function, using the sigmoid function, the Critic network learns the state value function By time difference error TD (t) Optimize, TD (t) It is obtained by the value of the current state, the value of the next state, and the reward value fed back after selecting the action. The calculation formula is: Among them, ε is the decay factor, which represents the decay weight of the state value at the next moment. The Critic network uses TD (t) The square value of is used as the loss function to update the gradient of parameter w. The calculation formula is: Loss critic =(TD (t) ) 2 The Actor network directly learns the action strategy using TD (t) The weighted cross entropy is used as the loss function to optimize the parameters, and the calculation formula is:

2. The early rumor detection method based on stance features according to claim 1 is characterized in that: The step 1 specifically includes the following process: First, we collect and organize typical rumor detection datasets, including Twitter15, Twitter16, and Weibo. Then, we use the TF-IDF word vector model to select the 5,000 most frequent words in the data from the perspective of word frequency to encode each post and use them as the initial feature vector. Finally, for each rumor event, a comment structure based on the graph structure is constructed.

3. The early rumor detection method based on stance features according to claim 1 is characterized in that: The step 2 specifically includes the following process: The stance perception module uses the RoBERTa model to perform stance detection tasks, thereby obtaining a feature extraction model, where the " <cls>"The vector representation of the position output is the stance feature that needs to be integrated in the whole method. In view of the experimental test on Weibo and Twitter datasets, there are two types of inputs to the stance-aware module. For the Weibo dataset, the input is the target topic and microblog text, while for the Twitter dataset, the input is the source post, comment text 1, and comment text 2 that replies to comment text 1. Then the stance-aware module tokenizes the input text, that is, the input sentence is tokenized using" <cls>"and" <sep>"Identifiers are separated, where " <cls>" should be placed at the beginning of the first sentence, " <sep> " is the separator between sentences. The input information will appear in the form of [<CLS>, A, <SEP>, B, <SEP>...], where A and B represent the first and second sentences respectively. Each token in the sentence is input into the pre-trained model one by one. After encoding through multiple Transformer layers, the deep representation of each token is obtained. The calculation formula is:< / sep> < / cls> < / sep> < / cls> < / cls> E=RoBERTa([<CLS>,A,<SEP>,B,<SEP>...]) Extract from the feature representation E after RoBERTa encoding" <cls>"The vector E at the position cls As the extracted stance features and stance classification, the calculation formula is:< / cls> Using two fully connected layers Opposition characteristics E cls Encode and input the encoded data into the softmax(·) classifier to obtain a triple value They represent the probabilities of approval, neutrality, and opposition respectively. The cross entropy loss function is used to optimize the position perception module. The calculation formula is: Where N stance is the number of samples, c stance is the number of stance categories, and They represent the true and predicted probabilities of the jth class of the ith sample, respectively.

4. The early rumor detection method based on stance features according to claim 1 is characterized in that: The step 3 specifically includes the following sub-steps: Sub-step 3-1, graph comment structure division, according to the characteristics of rumor dynamic propagation, the graph comment structure S is divided according to the time of comment release, from the sub-comment structure S based on the graph structure (1) At the beginning, each time a comment is added to form the next sub-comment structure, until the number of comments reaches n-1, forming the last sub-structure, where n-1 is the number of comments. Finally, the comment structure S of event c is represented as {S (1) ,S (2) ,...,S (T) }, for each sub-comment structure S (t) , recorded as where n (t) -1 is S (t) The number of comments in Sub-step 3-2, graph comment structure encoding and prediction, uses graph convolutional neural network to mine the global features of sub-comment structure, uses two layers of graph convolutional layers to perform convolution operations on the features of graph nodes, and averages the output vector mean(·) of the last graph convolutional layer to obtain the global features Then the rumor classification module integrates the stance features extracted by the stance perception module The feature representation of the enhanced sub-comment structure is calculated as: Where W G and W cls is a learnable parameter matrix used to unify and The size of the dimension, b G is an offset term, so the sub-comment structure S (t) After combination, the feature representation H is obtained. (t) , and then get the feature representation H of the entire comment structure S, the calculation formula is: H=concat([H (1) ,H (2) ,...,H (t′) ]) Where t′ represents the moment when the reinforcement decision module selects the action of "stop". Since the sub-comment structures based on the graph structure have interdependencies on the time scale, the LSTM network is used to further encode each sub-comment structure. The calculation formula is: h t =LSTM(H) where h t is the output vector of the LSTM network at time t, representing the sub-comment structure S (t) The final encoding feature indicates that before the reinforcement decision module takes the "stop" action, the output vector of the LSTM network at any time will be used as a feature vector for rumor prediction, and the softmax (·) activation function is used to classify rumors. The calculation formula is: Where W p is the training matrix, b p is the offset term, is the probability of predicting each category of rumors; Sub-step 3-3, rumor classification loss function, uses the cross entropy loss function to optimize the rumor classification module. The calculation formula is: Where N rumor is the number of samples in the rumor dataset, c rumor is the number of rumor categories, and They represent the true and predicted probabilities of the jth class of the ith sample, respectively.

5. The early rumor detection method based on stance features according to claim 1 is characterized in that: The step 5 specifically includes the following process: For the post to be tested, the official API interface is used to collect relevant information about the post, including the source post and the comment information below; then the TF-IDF word vector model is used to encode each text content to obtain its vectorized representation; Then, relying on the structural relationship between comments, all texts are modeled into a data structure based on a graph structure as the input of the model; finally, the trained early rumor detection model is used to predict it and the results are fed back.

6. An early rumor detection device based on stance features, 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 early rumor detection method based on stance features as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Microblog rumor standpoint detection method based on hierarchical attention

    CN108804608A

  • Internet rumor detection method based on transmission graph neural network

    CN112732906A