A Method and System for Detecting Rumors in Low-Resource Environments
Through the method of fusion of adversarial networks and multi-view feature, mutual adversarial training between generators and discriminators solves the problem of poor rumor detection in low-resource environments, and achieves efficient rumor detection and recognition.
Patent Information
- Application Number
- CN202411231406.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2044-09-04
AI Technical Summary
The existing rumor detection algorithm has significantly reduced its detection effect in low-resource environments, making it difficult to effectively identify and filter false information.
Adversarial networks are adopted to generate confusing data to improve the accuracy of rumor detection through mutual adversarial training between generators and discriminators, combined with feature extraction methods of multi-view feature fusion.
Efficient detection of rumors is achieved in a low-resource environment, improving the robustness and adaptability of the model, and enhancing the ability to identify rumors.
Smart Images

Figure CN119204021B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of natural language processing, and in particular to a rumor detection method and system in a low-resource environment. Background Art
[0002] The spread of rumors has caused many kinds of harm to society. For example:
[0003] Public misleading: Rumors may lead to public misunderstanding of events, policies and people, affecting public decision-making. Social panic: Exaggerated false information may cause public panic and unrest. Political unrest: Rumors may be used as a political tool to influence election results and undermine social stability. Economic losses: False information may cause serious economic losses to companies and markets. Therefore, the development of effective rumor detection technology is of great significance to maintaining social stability and information health.
[0004] Low-resource rumor detection refers to a technology that can identify and filter false rumors using limited information and resources under conditions of scarce labeled data, data imbalance, or limited computing resources. Traditional rumor detection relies on a large amount of labeled data and powerful computing resources, but these conditions are often difficult to meet in practical applications, especially in resource-poor environments.
[0005] Existing rumor detection methods include methods based on transfer learning, methods based on prompt learning, methods based on unsupervised learning, methods based on weakly supervised learning, and methods based on data and auxiliary knowledge enhancement.
[0006] Among them, the transfer learning method pre-trains the model on a large-scale corpus and then fine-tunes it on the target task to improve the performance of the model in a low-resource environment. Common pre-training models include BERT, GPT, etc. This method requires a large amount of pre-training data and computing resources. The pre-trained model may not be well adapted to the rumor detection task in a specific field.
[0007] The prompt-based learning method converts the input into a specific prompt input by designing task-specific prompts to guide the pre-trained model to perform the target task. It requires designing appropriate prompt templates for different tasks. It is highly dependent on the capabilities of the pre-trained model and the design quality of the prompts.
[0008] The method based on unsupervised learning mainly uses unlabeled data for training and detects rumors by capturing the intrinsic structure of the data. Common methods include cluster analysis and dimensionality reduction, which lack the guidance of labeled data and have low detection accuracy and reliability of the model. Unsupervised methods are often difficult to explain the detection results, which increases the difficulty of practical application.
[0009] The method based on weakly supervised learning is to improve the detection ability of the model through training with a small amount of labeled data and a large amount of weakly labeled data (such as data generated by heuristic rules). The quality of its weakly labeled data is low, which may affect the performance of the model. It is necessary to design complex rules and heuristic methods to generate weakly labeled data.
[0010] Methods based on data and auxiliary knowledge enhancement mainly improve rumor detection effects by increasing data and introducing auxiliary knowledge (such as knowledge base). The methods include data enhancement (such as back translation, synonym replacement) and knowledge base utilization. Its data enhancement method may not cover all situations and is highly dependent on the quality and coverage of the external knowledge base.
[0011] In summary, existing rumor detection algorithms usually perform well in model training with sufficient data support in the same field, but when faced with low-resource environments, that is, lack of large-scale training data, the effectiveness of these methods decreases significantly. Summary of the invention
[0012] In order to solve the technical problem that the detection effect of the existing rumor detection algorithm is significantly reduced in a low-resource environment, an embodiment of the present invention provides a low-resource environment rumor detection method and system.
[0013] The technical solution of the embodiment of the present invention is achieved as follows:
[0014] An embodiment of the present invention provides a method for detecting rumors in a low-resource environment, the method comprising: obtaining original data within a recent preset time from social media, the original data comprising user post content, user post comments and user information; performing data enhancement and generator generation processing on the original data to obtain generated data; forming a data set with the original data and the generated data, extracting user emotion feature vectors and user information feature vectors from the data in the data set, and performing feature fusion on the user emotion feature vector and the user information feature vector using an attention mechanism to obtain fusion features; inputting the data set and its corresponding fusion features into a discriminator for training, training the discriminator to perform rumor discrimination on the original data and the generated data based on the fusion features; obtaining a trained discriminator, and using the trained discriminator to detect rumors.
[0015] In one embodiment, the original data is subjected to data enhancement and generator generation processing to obtain generated data, including: performing data enhancement by antonym replacement or causal reversal on the original data to obtain enhanced data; performing data processing on the enhanced data using a dual generator to obtain generated data;
[0016] Among them, the function expression of the dual generator is:
[0017]
[0018] Among them, X′ y To generate data, X y To enhance the data, GN→R is the generating function of the first generator, which is used to generate doubtful or opposing remarks about non-rumors; GR→N is the generating function of the second generator, which is used to generate supportive remarks about rumors. y represents the label of the original data, N is the non-rumor label, and R is the rumor label.
[0019] In one embodiment, user sentiment feature vectors are extracted from the data in the data set, including: inputting each tweet of each user in the data set into a first model to obtain a text feature vector of each tweet of each user; averaging the text feature vectors of all tweets of each user to obtain a text feature vector of each user in the data set; calling a Chinese sentiment analysis library to divide each tweet of each user in the data set into sentiment words, and counting the frequency of all sentiment words in all tweets of each user, and determining the maximum sentiment word of each user based on the frequency; counting the number of question marks and exclamation marks in all tweets of each user in the data set; determining a vector composed of the frequency of the maximum sentiment word, the number of question marks, and the number of exclamation marks as the sentiment feature of each user in the data set; horizontally splicing the text feature vector of each user in the data set and the sentiment feature of each user in the data set to form a user sentiment preference feature vector of each user in the data set;
[0020] The first model is a BERT model, and the expression of the first model is:
[0021] [M nt =BERT([CLS U nt SEP])] Calculation formula (2)
[0022] Among them, M nt represents the tth tweet U recently posted by user n nt The text feature vector, U nt represents the tth tweet recently posted by user n, BERT(...) is the BERT model, [CLS] and [SEP] are specific identifiers of the BERT original corpus;
[0023] The text feature vectors of all tweets for each user are averaged using the following formula:
[0024]
[0025] Among them, U t is the text feature vector of each user in the dataset, M ntrepresents the text feature vector of the tth tweet recently posted by user n, where T is the number of tweets recently posted by user n;
[0026] The text feature vector of each user in the data set and the sentiment feature of each user in the data set are horizontally spliced using the following formula:
[0027]
[0028] Among them, U p is the user sentiment preference feature vector of each user in the dataset, U t is the text feature vector of each user in the dataset, U s is the sentiment feature of each user in the dataset, Represents a vector concatenation operation.
[0029] In one embodiment, extracting a user information feature vector from the data in the data set includes: calculating the user information completeness, user platform authentication index, user activity, user social breadth and user authority of each user according to the data in the data set; determining a vector composed of the user information completeness, the user platform authentication index, the user activity, the user social breadth and the user authority as a user feature vector of each user in the data set; using a two-layer fully connected network to learn and fuse the user feature vector of each user in the data set to obtain a user information feature vector;
[0030] The following formula is used to calculate the completeness of each user's user information:
[0031]
[0032] Among them, I(u) is the completeness of user information, v i ∈v,v=(v1,v2,…,v n ) represents the filling of the user's basic information, and n represents the dimension of the vector v;
[0033] Use the following formula to calculate the user platform authentication index for each user:
[0034]
[0035] Among them, P(u) is the user platform authentication index;
[0036] Use the following formula to calculate the user activity of each user:
[0037]
[0038] Among them, A(u) is the user activity, Num(u) represents the number of posts published by the user in time period t, and t is the number of days from user registration to data acquisition;
[0039] Use the following formula to calculate the user social breadth of each user:
[0040]
[0041] Among them, C(u) is the user's social breadth, ω1 and ω2 are weight coefficients, P fans (u) represents the number of pure fans of the user who have not followed back, M fans (u) represents the number of mutual fans of the user, Fans(u) represents the total number of fans of the user, and Att(u) represents the number of followers of the user;
[0042] Use the following formula to calculate the user authority of each user:
[0043] [A u (u)=(I(u),A(u),P(u),C(u))×μ T ] Calculation formula (9)
[0044] Among them, A u (u) represents the user authority, I(u) is the user information completeness, A(u) is the user activity, P(u) is the user platform certification index, C(u) is the user communication breadth, μ is the weight vector obtained by the hierarchical analysis method, and T represents the transposed matrix;
[0045] The output expression of the two-layer fully connected network is:
[0046] [U i ′=ReLU(W u1 V u +b u1 )] Calculation formula (10)
[0047] [U i =ReLU(W u2 U′+b u2 )] Calculation formula (11)
[0048] Among them, W u1 and W u2 Represent the weight matrices of the first and second layers of the fully connected network respectively; b u1 and b u2 Represent the corresponding offset terms, U i Represents the intermediate vector of the first layer of fully connected network output, U i represents the user information feature vector output by the second layer of the fully connected network, [V u =(v p , va , v c , v i , v r )],v p , v a , v c , v i , v r Each value corresponds to the platform certification index, activity, communication breadth, information completeness and authority.
[0049] In one embodiment, the user emotion feature vector and the user information feature vector are feature-fused using an attention mechanism, including: calculating an attention weight, and based on the attention weight, using an attention mechanism to feature-fuse the user emotion feature vector and the user information feature vector;
[0050] Among them, the calculation formula of the attention weight is:
[0051]
[0052] Among them, α i is the attention weight of the ith feature, N is the number of features, where N = 2, e i is the attention score of the i-th feature, [e i =w T tanh(W f f i +W q q)],w、W f and W q is a learnable parameter matrix / vector, q is a query vector (can be a preset vector or a learnable vector), f i ∈(f1, f2), f1, f2 represent the user emotion feature vector and user information feature vector respectively;
[0053] The calculation expression for feature fusion using the attention mechanism is:
[0054]
[0055] Among them, Um represents the fusion feature, f i ∈(f1, f2), f1, f2 represent the user emotion feature vector and user information feature vector respectively, α i is the attention weight of the i-th feature, and N is the number of features, where N=2.
[0056] In one embodiment, the data set and its corresponding fusion features are input into a discriminator for training, and the discriminator is trained to perform rumor discrimination on the original data and the generated data based on the fusion features, including: classifying the data in the data set according to the publishing time of the post to obtain input data corresponding to different time steps; outputting the input data to a second model of the discriminator to obtain the output of the second model; processing the output of the second model using a gated recurrent unit of the discriminator to obtain the hidden state of the data in the data set; inputting the hidden state of the data in the data set and the fusion features into the linear layer of the discriminator to obtain a predicted probability vector output by the linear layer; the predicted probability vector represents the discrimination result of the discriminator in discriminating rumors;
[0057] The second model is a Transformer model, and the expression of the second model is:
[0058] [x' y = Transformer(x y )] Calculation formula (14)
[0059] Among them, x y ,x' y are the input and output of the second model at time step t, Transformer(...) is the Transformer model;
[0060] The processing expression of the gated recurrent unit is:
[0061] [s t =GRU(x' y ,s t-1 θ d )] Calculation formula (15)
[0062] Among them, s t is the hidden state of the data in the dataset, x' y is the output of the second model at time step t, s t-1 is the hidden state of the previous time step, θ d are the parameters of all gated recurrent units in the discriminator, GRU(...) is a gated recurrent unit;
[0063] The processing expression of the linear layer is:
[0064]
[0065] in, is the predicted probability vector, W v is the weight matrix of the classification layer, s tis the hidden state of the data in the dataset, Um is the fusion feature, (b y ) is a trainable bias vector and softmax(...) is a linear layer.
[0066] In one embodiment, before the original data and the generated data are combined into a data set, the method further comprises: processing the generated data using a reconstruction function, and using the processed data as new generated data;
[0067] The expression of the reconstruction function is:
[0068]
[0069] Among them, X″ y is the data processed by the reconstruction function, X y To enhance the data, GN→R is the generation function of the first generator, which is used to generate doubtful or opposing comments on non-rumors; GR→N is the generation function of the second generator, which is used to generate supportive comments on rumors. y represents the label of the original data, N is the non-rumor label, and R is the rumor label.
[0070] Among them, the reconstruction loss of the reconstruction function is:
[0071]
[0072] Among them, L Rec is the reconstruction loss, T is the length of the post sequence, and x t and x t ” are the representations of the t-th unit in the original batch and the reconstructed batch, respectively.
[0073] In one embodiment, the loss function of the discriminator is:
[0074]
[0075] in, is the loss function of the discriminator, is the predicted probability vector, is the true category probability distribution, Θ D is the parameter of the discriminator, λ is the trade-off coefficient;
[0076] The adversarial loss of the generator is:
[0077]
[0078] Among them, LAdv is the adversarial loss of the generator, is the loss function of the discriminator.
[0079] In one embodiment, the overall loss function of the generator and the discriminator is:
[0080]
[0081] Among them, α is the balance coefficient, Θ G is the parameter of the generator, Θ D is the parameter of the discriminator, LAdv is the adversarial loss of the generator, and L Rec is the reconstruction loss.
[0082] An embodiment of the present invention also provides a rumor detection system in a low-resource environment, comprising: a processor and a memory for storing a computer program that can be run on the processor; wherein, when the processor is used to run the computer program, it executes the steps of any one of the above methods.
[0083] The low-resource environment rumor detection method and system provided by the embodiments of the present invention have the following beneficial effects:
[0084] (1) Using the adversarial network approach, the generator and the discriminator are trained against each other to obtain a rumor detection model with better recognition effect. The generator is used to generate controversial data, and the discriminator is used to identify whether the data is a rumor. Through the adversarial training between the generator and the discriminator, the system can continuously improve its ability to detect rumors and enhance the system's robustness and adaptability in identifying rumors.
[0085] (2) A feature extraction method based on multi-perspective feature fusion is adopted, which comprehensively utilizes text features, sentiment features, user sentiment preference features, user information features, etc. to comprehensively extract features from multiple perspectives and assist the discriminator in making judgments. This solves the problem that in low-resource scenarios, feature learning may become difficult due to data scarcity and the model extracts features that are easily entangled.
[0086] (3) The two-step method is used to obtain generated data. The generated data is more confusing, more controversial, and more difficult to distinguish. It can force the discriminator to capture deeper and more subtle features, thereby further assisting the discriminator to improve its identification ability.
[0087] This embodiment can achieve efficient rumor detection in a low-resource environment and has excellent performance and generalization capabilities. BRIEF DESCRIPTION OF THE DRAWINGS
[0088] Figure 1 Schematic diagram of the process of a method for detecting rumors in a low-resource environment according to an embodiment of the present invention;
[0089] Figure 2 1 is a diagram showing the internal structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0090] The present invention will be described in further detail below with reference to the accompanying drawings and embodiments.
[0091] The embodiment of the present invention provides a method for detecting rumors in a low-resource environment. Figure 1 As shown, the method includes:
[0092] Step 101: Acquire raw data from social media within a recent preset time period, wherein the raw data includes user post content, user post comments, and user information;
[0093] Step 102: performing data enhancement and generator generation processing on the original data to obtain generated data;
[0094] Step 103: The original data and the generated data are combined into a data set, a user emotion feature vector and a user information feature vector are extracted from the data in the data set, and the user emotion feature vector and the user information feature vector are fused by using an attention mechanism to obtain fused features;
[0095] Step 104: inputting the data set and its corresponding fusion features into a discriminator for training, and training the discriminator to perform rumor discrimination on the original data and the generated data based on the fusion features;
[0096] Step 105: Obtain a trained discriminator, and use the trained discriminator to perform rumor detection.
[0097] This embodiment can achieve efficient rumor detection and has excellent performance and generalization ability in a small number of sample scenarios.
[0098] This embodiment adopts the adversarial network approach, using the mutual adversarial training between the generator and the discriminator to obtain a rumor detection model with better recognition effect. The generator is used to generate controversial data, and the discriminator is used to identify whether the data is a rumor. Through the mutual adversarial training between the generator and the discriminator, the system can continuously improve its ability to detect rumors.
[0099] Specifically, this embodiment can collect raw data from a variety of sources (social media, news websites, etc.). Specifically, the following information can be collected: all historical posts recently published by the user, the user's information (user name, educational background, occupation, number of followers and followers, etc.). Here, it is worth noting that due to the limitation of the platform, only data within a recent period of time is allowed to be accessed, and earlier historical data cannot be obtained, so only a small amount of data is obtained in this embodiment. In addition, in order to realize the subsequent training of the discriminator, after obtaining the raw data, this embodiment will identify the true and false rumors of the raw data and attach labels. The labels are used to characterize the data as non-rumors and rumors.
[0100] After obtaining the raw data, the raw data will be cleaned, for example, removing noise, punctuation, HTML tags, stop words, etc., to ensure the purity of the data.
[0101] After cleaning the original data, operations such as data augmentation and generator generation processing can be used to generate confusing posts to further increase the complexity of the data and provide controversial data that is difficult to distinguish.
[0102] Specifically, in one embodiment, data enhancement and generator generation processing are performed on the original data to obtain generated data, including: performing data enhancement by antonym replacement or causal inversion on the original data to obtain enhanced data; and performing data processing on the enhanced data using a dual generator to obtain generated data.
[0103] This embodiment adopts a two-step method to obtain generated data (i.e. controversial data that is difficult to distinguish). The first step is to perform data enhancement methods such as antonym replacement or causal reversal to achieve a preliminary rumor blurring process on the original data; the second step is to use the generator to further generate data with more rumor ambiguity based on the preliminary blurring.
[0104] Specifically, this embodiment uses a dual generator to generate data. The function expression of the dual generator is:
[0105]
[0106] Among them, X′ y To generate data, X y To enhance the data, GN→R is the generating function of the first generator, which is used to generate doubtful or opposing remarks about non-rumors; GR→N is the generating function of the second generator, which is used to generate supportive remarks about rumors. y represents the label of the original data, N is the non-rumor label, and R is the rumor label.
[0107] The dual generators in this embodiment can generate more diverse forms of expression, thereby better simulating controversial content in the real world. The two generators in this embodiment, one is used to distort non-rumors to make them look like rumors, and the other is used to "bleach" rumors to make them look like non-rumors. This embodiment can generate a large number of new rumors based on a small number of existing samples through data enhancement and generator processing methods, and change the content of the instance to make it closer to another type of typical instance in terms of features. For example, non-rumors are transformed into statements that look like rumors, and voices that doubt or oppose non-rumor statements are generated. This interference makes it impossible for a discriminator that simply relies on high-frequency features to easily determine the category of the instance, thereby forcing the discriminator to capture deeper and more subtle features.
[0108] Here, it should be noted that since a series of rumor blurring operations will be performed during data augmentation and generator processing, corresponding labels will be attached to the generated data based on the actual situation of the data, rather than simply using the labels of the original data.
[0109] In addition to using the two-step method to obtain controversial generated data to increase the difficulty of recognition, this embodiment also extracts multiple features as much as possible in terms of feature extraction to assist the discriminator in making strong judgments and enhance the discriminator's discrimination ability.
[0110] Specifically, this embodiment mainly extracts as many features as possible from two aspects: the actual content of the post and the identity of the posting user. The features extracted from these two aspects in this embodiment are user emotion feature vectors and user information feature vectors.
[0111] Among them, the extraction process of the user emotion feature vector is as follows: input each tweet of each user in the data set into the first model to obtain the text feature vector of each tweet of each user; average the text feature vectors of all tweets of each user to obtain the text feature vector of each user in the data set; call the Chinese emotion analysis library to divide each tweet of each user in the data set into emotion words, and count the frequency of all emotion words in all tweets of each user, and determine the maximum emotion word of each user based on the frequency; count the number of question marks and exclamation marks in all tweets of each user in the data set; determine the vector composed of the frequency of the maximum emotion word, the number of question marks, and the number of exclamation marks as the emotion feature of each user in the data set; horizontally splice the text feature vector of each user in the data set and the emotion feature of each user in the data set to form a user emotion preference feature vector of each user in the data set.
[0112] Here, the first model is a BERT model, and the expression of the first model is:
[0113] [M nt =BERT([CLS U nt SEP])] Calculation formula (2)
[0114] Among them, M nt represents the tth tweet U recently posted by user n nt The text feature vector, U nt represents the tth tweet recently posted by user n, BERT(...) is the BERT model, and [CLS] and [SEP] are specific identifiers of the BERT original corpus.
[0115] Specifically, this embodiment uses the following formula to average the text feature vectors of all tweets of each user:
[0116]
[0117] Among them, U t is the text feature vector of each user in the dataset, M nt represents the text feature vector of the tth tweet recently posted by user n, and T is the number of tweets recently posted by user n.
[0118] In this embodiment, when calling the Chinese sentiment analysis library cnsenti to classify each tweet of each user in the data set into seven emotions, the emotions are mainly classified into good, happy, sad, angry, fearful, evil, and surprised. The frequencies of the seven emotion words are counted, and the emotion word with the largest frequency is found from the frequency list, which is used as the main emotion representative of the post, and the statistical value is recorded as n. s In addition, the number of question marks and exclamation marks in the published posts will be counted as n q and n e Finally, use the vector U s =(n s ,n q ,n e ) indicates emotional characteristics.
[0119] In addition, this embodiment uses the following formula to horizontally splice the text feature vector of each user in the data set and the emotional feature of each user in the data set to obtain the user emotional preference feature vector:
[0120]
[0121] Among them, U p is the user sentiment preference feature vector of each user in the dataset, U t is the text feature vector of each user in the dataset, U s is the sentiment feature of each user in the dataset, Represents a vector concatenation operation.
[0122] Corresponding to the extraction process of the user emotion preference feature vector, the extraction process of the user information feature vector in this embodiment is: according to the data in the data set, the user information completeness, user platform authentication index, user activity, user communication breadth and user authority of each user are calculated respectively; the vector composed of the user information completeness, the user platform authentication index, the user activity, the user communication breadth and the user authority is determined as the user feature vector of each user in the data set; and the user feature vector of each user in the data set is learned and integrated using a two-layer fully connected network to obtain a user information feature vector.
[0123] Here, this embodiment uses the following calculation formula to calculate the user information completeness of each user:
[0124]
[0125] Among them, I(u) is the completeness of user information, v i ∈v,v=(v1,v2,…,v n ) represents the filling of the user's basic information, and n represents the dimension of the vector v;
[0126] Use the following formula to calculate the user platform authentication index for each user:
[0127]
[0128] Among them, P(u) is the user platform authentication index;
[0129] Use the following formula to calculate the user activity of each user:
[0130]
[0131] Among them, A(u) is the user activity, Num(u) represents the number of posts published by the user in time period t, and t is the number of days from user registration to data acquisition;
[0132] Use the following formula to calculate the user social breadth of each user:
[0133]
[0134] Among them, C(u) is the user's social breadth, ω1 and ω2 are weight coefficients, P fans (u) represents the number of pure fans of the user who have not followed back, M fans (u) represents the number of mutual fans of the user, Fans(u) represents the total number of fans of the user, and Att(u) represents the number of followers of the user;
[0135] Use the following formula to calculate the user authority of each user:
[0136] [A u (u)=(I(u),A(u),P(u),C(u))×μ T ] Calculation formula (9)
[0137] Among them, A u (u) represents the user authority, I(u) is the user information completeness, A(u) is the user activity, P(u) is the user platform certification index, C(u) is the user communication breadth, μ is the weight vector obtained by the hierarchical analysis method, and T represents the transposed matrix;
[0138] In addition, the output expression of the two-layer fully connected network in this embodiment is:
[0139] [U i ′=ReLU(W u1 V u +b u1 )] Calculation formula (10)
[0140] [U i =ReLU(W u2 U′+b u2 )] Calculation formula (11)
[0141] Among them, W u1 and W u2 Represent the weight matrices of the first and second layers of the fully connected network respectively; b u1 and b u2 Represent the corresponding offset terms, U i ′ represents the intermediate vector output by the first layer of the fully connected network, U i represents the user information feature vector output by the second layer of the fully connected network, [V u =(v p ,v a ,v c ,v i ,v r )],v p ,v a ,v c ,v i ,v r Each value corresponds to the platform certification index, activity, communication breadth, information completeness and authority.
[0142] After obtaining the user emotion feature vector and the user information feature vector, this embodiment uses an attention mechanism to perform feature fusion on the user emotion feature vector and the user information feature vector. Here, the specific process of feature fusion is: calculating the attention weight, and performing feature fusion on the user emotion feature vector and the user information feature vector using the attention mechanism based on the attention weight.
[0143] Among them, the calculation formula of the attention weight is:
[0144]
[0145] Among them, α i is the attention weight of the ith feature, N is the number of features, where N = 2, e i is the attention score of the i-th feature, [e i =w T tanh(W f f i+W q q)],w、W f and W q is a learnable parameter matrix / vector, q is a query vector (can be a preset vector or a learnable vector), f i ∈(f1, f2), f1, f2 represent the user emotion feature vector and user information feature vector respectively;
[0146] The calculation expression for feature fusion using the attention mechanism is:
[0147]
[0148] Among them, Um represents the fusion feature, f i ∈(f1, f2), f1, f2 represent the user emotion feature vector and user information feature vector respectively, α i is the attention weight of the i-th feature, and N is the number of features, where N=2.
[0149] In addition to using the fused features obtained by feature fusion using the attention mechanism to assist the discriminator in identifying rumors, this embodiment also uses the features of the data in the time dimension to further assist the discriminator in making judgments.
[0150] Specifically, the discriminator's discriminant process is as follows: classify the data in the data set according to the posting time of the posts to obtain input data corresponding to different time steps; output the input data to the second model of the discriminator to obtain the output of the second model; use the gated recurrent unit of the discriminator to process the output of the second model to obtain the hidden state of the data in the data set; input the hidden state of the data in the data set and the fusion features into the linear layer of the discriminator to obtain the predicted probability vector output by the linear layer; the predicted probability vector represents the discrimination result of the discriminator in judging rumors.
[0151] Here, the second model is a Transformer model, and the expression of the second model is:
[0152] [x' y = Transformer(x y )]Calculation formula (14)
[0153] Among them, x y ,x' y are the input and output of the second model at time step t, and Transformer(...) is the Transformer model.
[0154] The processing expression of the gated recurrent unit is:
[0155] [st =GRU(x' y ,s t-1 θ d )] Calculation formula (15)
[0156] Among them, s t is the hidden state of the data in the dataset, x' y is the output of the second model at time step t, s t-1 is the hidden state of the previous time step, θ d are the parameters of all gated recurrent units in the discriminator, GRU(...) is a gated recurrent unit.
[0157] The processing expression of the linear layer is:
[0158]
[0159] in, is the predicted probability vector, W v is the weight matrix of the classification layer, s t is the hidden state of the data in the dataset, Um is the fusion feature, (b y ) is a trainable bias vector and softmax(...) is a linear layer.
[0160] In this embodiment, the discriminator combines the fusion features and the features in the time dimension (i.e., the hidden state s t ) to distinguish the generated rumors from the real news samples, enhance the adversarial ability, and continuously improve the rumor detection ability through the adversarial training of the generator and the discriminator. The discriminator in this embodiment can capture the key features that help distinguish rumors from non-rumors, including low-frequency but discriminative features. In addition, the discriminator in this embodiment is designed to distinguish between news and rumors in real data, rather than distinguishing between real data and generated data like the standard GAN.
[0161] This embodiment optimizes the rumor detection model by conducting adversarial training between the generator and the discriminator, that is, the optimization process of the rumor detection model is performed alternately in iterative training. This embodiment first guides the generator to generate more deceptive samples by minimizing the loss of the generator to confuse the discriminator. Then, the discriminator's ability to distinguish the generator samples is enhanced by maximizing its loss. In this process, the generator and the discriminator are trained alternately, thereby gradually improving the performance of the model.
[0162] In addition, in the actual application process, some unexpected situations may occur when the generator generates data. For example, in the process of blurring data, the original data may be blurred in an unexpected direction. For example, 'Flash floods broke out recently, and citizens rushed to buy supplies' may be blurred into 'water levels rose, and there are too many water resources'. This is irrelevant and unhelpful. To avoid this situation, this embodiment introduces a reconstruction mechanism to make the generation process reversible. The idea is that voices with opinions can be reversible through two generators in opposite directions, thereby minimizing the loss of information fidelity.
[0163] Here, in one embodiment, the generated data is processed using a reconstruction function, and the processed data is used as new generated data.
[0164] The expression of the reconstruction function is:
[0165]
[0166] Among them, X″ y is the data processed by the reconstruction function, X y To enhance the data, GN→R is the generation function of the first generator, which is used to generate doubtful or opposing comments on non-rumors; GR→N is the generation function of the second generator, which is used to generate supportive comments on rumors. y represents the label of the original data, N is the non-rumor label, and R is the rumor label.
[0167] Among them, the reconstruction loss of the reconstruction function is:
[0168]
[0169] Among them, L Rec is the reconstruction loss, T is the length of the post sequence, and x t and x t ” are the representations of the t-th unit in the original batch and the reconstructed batch, respectively.
[0170] In addition, this embodiment also defines a loss function for training the discriminator. The loss function measures the gap between the predicted category probability distribution and the true category probability distribution, and adds an L2 regularization term to prevent overfitting. Specifically, the loss function of the discriminator is defined as the square error between the predicted category probability distribution and the true category probability distribution plus an L2 regularization term. The loss function is:
[0171]
[0172] in, is the loss function of the discriminator, is the predicted probability vector, is the true category probability distribution, ΘD is the parameter of the discriminator, λ is the trade-off coefficient;
[0173] In order to encourage the generator to generate examples that can confuse the discriminator, the adversarial loss of the generator in this embodiment is set to the negative discriminator loss, that is, the adversarial loss of the generator is:
[0174]
[0175] Among them, LAdv is the adversarial loss of the generator, is the loss function of the discriminator.
[0176] In the min-max process, this embodiment first minimizes the adversarial loss L Adv (i.e., maximize the discriminator loss and the reconstruction loss L Rec To optimize the generator parameter Θ G , to generate deceptive but reversible samples; then, by maximizing the adversarial loss L Adv (i.e., minimizing the discriminator loss To optimize the discriminator parameters Θ D Here, it should be noted that the reconstruction loss L Rec and the discriminator parameter Θ D Not relevant.
[0177] Based on the above, the overall loss function of the rumor detection model in this embodiment is:
[0178]
[0179] Among them, α is the balance coefficient, Θ G is the parameter of the generator, Θ D is the parameter of the discriminator, LAdv is the adversarial loss of the generator, and L Rec is the reconstruction loss.
[0180] This embodiment achieves efficient detection and interpretation of rumors in a low-resource environment through multi-view feature fusion and generative adversarial network (GAN).
[0181] The low-resource environment rumor detection method and system provided by the embodiments of the present invention have the following beneficial effects:
[0182] (1) Using the adversarial network approach, the generator and the discriminator are trained against each other to obtain a rumor detection model with better recognition effect. The generator is used to generate controversial data, and the discriminator is used to identify whether the data is a rumor. Through the adversarial training between the generator and the discriminator, the system can continuously improve its ability to detect rumors and enhance the system's robustness and adaptability in identifying rumors.
[0183] (2) A feature extraction method based on multi-perspective feature fusion is adopted, which comprehensively utilizes text features, sentiment features, user sentiment preference features, user information features, etc. to comprehensively extract features from multiple perspectives and assist the discriminator in making judgments. This solves the problem that in low-resource scenarios, feature learning may become difficult due to data scarcity and the model extracts features that are easily entangled.
[0184] (3) The two-step method is used to obtain generated data. The generated data is more confusing, more controversial, and more difficult to distinguish. It can force the discriminator to capture deeper and more subtle features, thereby further assisting the discriminator to improve its identification ability.
[0185] This embodiment can achieve efficient rumor detection in a low-resource environment and has excellent performance and generalization capabilities.
[0186] In order to implement the method of an embodiment of the present invention, an embodiment of the present invention also provides a low-resource environment rumor detection system, including: a processor and a memory for storing a computer program that can be run on the processor; wherein, when the processor is used to run the computer program, the steps of any one of the above methods are executed.
[0187] The above-mentioned system provided in this embodiment belongs to the same concept as the above-mentioned method embodiment. The specific implementation process thereof is detailed in the method embodiment and will not be repeated here.
[0188] In order to implement the method of the embodiment of the present invention, the embodiment of the present invention also provides a computer program product, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps of the above method.
[0189] Based on the hardware implementation of the above program modules, and in order to implement the method of the embodiment of the present invention, the embodiment of the present invention also provides an electronic device (computer device). Specifically, in one embodiment, the computer device can be a terminal, and its internal structure diagram can be as follows: Figure 2As shown. The computer device includes a processor A01, a network interface A02, a display screen A04, an input device A05 and a memory (not shown in the figure) connected through a system bus. Among them, the processor A01 of the computer device is used to provide computing and control capabilities. The memory of the computer device includes an internal memory A03 and a non-volatile storage medium A06. The non-volatile storage medium A06 stores an operating system B01 and a computer program B02. The internal memory A03 provides an environment for the operation of the operating system B01 and the computer program B02 in the non-volatile storage medium A06. The network interface A02 of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor A01, the method of any one of the above embodiments is implemented. The display screen A04 of the computer device can be a liquid crystal display or an electronic ink display, and the input device A05 of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0190] Those skilled in the art will understand that Figure 2 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0191] The device provided by the embodiment of the present invention includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, the method of any one of the above embodiments is implemented.
[0192] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0193] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0194] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0195] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0196] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0197] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0198] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0199] It can be understood that the memory of the embodiment of the present invention can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM, SyncLink Dynamic Random Access Memory), and direct RAM bus random access memory (DRRAM, Direct Rambus Random Access Memory).The memories described in the embodiments of the present invention are intended to include, but are not limited to, these and any other suitable types of memories.
[0200] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0201] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A method for detecting rumors in a low-resource environment, characterized in that: The method comprises: Acquire raw data from social media within a recent preset time, wherein the raw data includes user post content, user post comments, and user information; Performing data enhancement and generator generation processing on the original data to obtain generated data; The original data and the generated data are combined into a data set, a user emotion feature vector and a user information feature vector are extracted from the data in the data set, and the user emotion feature vector and the user information feature vector are fused by using an attention mechanism to obtain a fused feature; Inputting the data set and its corresponding fusion features into a discriminator for training, and training the discriminator to perform rumor discrimination on the original data and the generated data based on the fusion features; Obtaining a trained discriminator, and using the trained discriminator to perform rumor detection; Performing data enhancement and generator generation processing on the original data to obtain generated data includes: Performing antonym replacement or causal reversal data enhancement on the original data to obtain enhanced data; Using a dual generator to process the enhanced data to obtain generated data; Among them, the function expression of the dual generator is: Among them, X′ y To generate data, X y To enhance the data, GN→R is the generating function of the first generator, which is used to generate doubtful or opposing remarks about non-rumors; GR→N is the generating function of the second generator, which is used to generate supportive remarks about rumors. y represents the label of the original data, N is the non-rumor label, and R is the rumor label.
2. The low-resource environment rumor detection method according to claim 1, characterized in that: Extracting user emotion feature vectors from the data in the data set includes: Input each tweet of each user in the data set into the first model to obtain a text feature vector of each tweet of each user; average the text feature vectors of all tweets of each user to obtain a text feature vector of each user in the data set; Calling the Chinese sentiment analysis library to divide each tweet of each user in the data set into sentiment words, and counting the frequency of all sentiment words in all tweets of each user, and determining the maximum sentiment word of each user based on the frequency; counting the number of question marks and exclamation marks in all tweets of each user in the data set; determining a vector composed of the frequency of the maximum sentiment word, the number of question marks, and the number of exclamation marks as the sentiment feature of each user in the data set; horizontally concatenating the text feature vector of each user in the data set and the emotional feature of each user in the data set to form a user emotional preference feature vector of each user in the data set; The first model is a BERT model, and the expression of the first model is: [M nt =BERT([CLS U nt SEP])] Calculation formula (2) Among them, M nt represents the tth tweet U recently posted by user n nt The text feature vector, U nt represents the tth tweet recently posted by user n, BERT(...) is the BERT model, [CLS] and [SEP] are specific identifiers of the BERT original corpus; The text feature vectors of all tweets for each user are averaged using the following formula: Among them, U t is the text feature vector of each user in the dataset, M nt represents the text feature vector of the tth tweet recently posted by user n, where T is the number of tweets recently posted by user n; The text feature vector of each user in the data set and the sentiment feature of each user in the data set are horizontally spliced using the following formula: Among them, U p is the user sentiment preference feature vector of each user in the dataset, U t is the text feature vector of each user in the dataset, U s is the sentiment feature of each user in the dataset, Represents a vector concatenation operation.
3. The low-resource environment rumor detection method according to claim 1, characterized in that: Extracting user information feature vectors from the data in the data set includes: Calculate the user information completeness, user platform authentication index, user activity, user communication breadth and user authority of each user according to the data in the data set; Determine a vector composed of the user information completeness, the user platform authentication index, the user activity, the user communication breadth and the user authority as a user feature vector for each user in the data set; Using a two-layer fully connected network to learn and fuse the user feature vector of each user in the data set to obtain a user information feature vector; The following formula is used to calculate the completeness of each user's user information: Among them, I(u) is the completeness of user information, v i ∈v,v=(v1,v2,…,v n ) represents the filling of the user's basic information, and n represents the dimension of the vector v; Use the following formula to calculate the user platform authentication index for each user: Among them, P(u) is the user platform authentication index; Use the following formula to calculate the user activity of each user: Among them, A(u) is the user activity, Num(u) represents the number of posts published by the user in time period t, and t is the number of days from user registration to data acquisition; Use the following formula to calculate the user social breadth of each user: Among them, C(u) is the user's social breadth, ω1 and ω2 are weight coefficients, P fans (u) represents the number of pure fans of the user who have not followed back, M fans (u) represents the number of mutual fans of the user, Fans(u) represents the total number of fans of the user, and Att(u) represents the number of followers of the user; Use the following formula to calculate the user authority of each user: [A u (u)=(I(u),A(u),P(u),C(u))×μ T ]Calculation formula(9) Among them, A u (u) represents the user authority, I(u) is the user information completeness, A(u) is the user activity, P(u) is the user platform certification index, C(u) is the user communication breadth, μ is the weight vector obtained by the hierarchical analysis method, and T represents the transposed matrix; The output expression of the two-layer fully connected network is: [U i ′ =ReLU(W u1 V u +b u1 )]Calculation formula (10) [U i = ReLU(W u2 U i ′ +b u2 )] Calculation formula (11) Among them, W u1 and W u2 Represent the weight matrices of the first and second layers of the fully connected network respectively; b u1 and b u2 Represent the corresponding offset terms, U i ′ Represents the intermediate vector of the first layer of the fully connected network output, U i represents the user information feature vector output by the second layer of the fully connected network, [V u =(v p ,v a ,v c ,v i ,v r )],v p ,v a ,v c ,v i ,v r Each value corresponds to the platform certification index, activity, communication breadth, information completeness and authority.
4. The low-resource environment rumor detection method according to claim 1, characterized in that: The user emotion feature vector and the user information feature vector are subjected to feature fusion by using an attention mechanism, including: Calculating an attention weight, and performing feature fusion on the user emotion feature vector and the user information feature vector using an attention mechanism based on the attention weight; Among them, the calculation formula of the attention weight is: Among them, α i is the attention weight of the ith feature, N is the number of features, where N = 2, e i is the attention score of the i-th feature, [e i =w T tanh(W f f i +W q q)],w、W f and W q is a learnable parameter matrix / vector, q is a query vector, which is a preset vector or a learnable vector, and f i ∈(f1, f2), f1, f2 represent the user emotion feature vector and user information feature vector respectively; The calculation expression for feature fusion using the attention mechanism is: Among them, Um represents the fusion feature, f i ∈(f1, f2), f1, f2 represent the user emotion feature vector and user information feature vector respectively, α i is the attention weight of the i-th feature, and N is the number of features, where N=2.
5. The low-resource environment rumor detection method according to claim 1, characterized in that: Inputting the data set and its corresponding fusion features into a discriminator for training, and training the discriminator to perform rumor discrimination on the original data and the generated data based on the fusion features, including: Classifying the data in the data set according to the publishing time of the posts to obtain input data corresponding to different time steps; Outputting the input data to the second model of the discriminator to obtain an output of the second model; Processing the output of the second model using the gated recurrent unit of the discriminator to obtain the hidden state of the data in the data set; Inputting the hidden state of the data in the data set and the fusion feature into the linear layer of the discriminator to obtain a prediction probability vector output by the linear layer; the prediction probability vector represents the discrimination result of the discriminator in discriminating rumors; The second model is a Transformer model, and the expression of the second model is: [x' y = Transformer(x y )]Calculation formula (14) Among them, x y ,x' y are the input and output of the second model at time step t, Transformer(...) is the Transformer model; The processing expression of the gated recurrent unit is: [s t =GRU(x' y ,s t-1 θ d )]Calculation formula (15) Among them, s t is the hidden state of the data in the dataset, x' y is the output of the second model at time step t, s t-1 is the hidden state of the previous time step, θ d are the parameters of all gated recurrent units in the discriminator, GRU(...) is a gated recurrent unit; The processing expression of the linear layer is: in, is the predicted probability vector, W v is the weight matrix of the classification layer, s t is the hidden state of the data in the dataset, Um is the fusion feature, (b y ) is a trainable bias vector and softmax(...) is a linear layer.
6. The low-resource environment rumor detection method according to claim 1, characterized in that: Before forming the original data and the generated data into a data set, the method further comprises: Processing the generated data using a reconstruction function, and using the processed data as new generated data; The expression of the reconstruction function is: Among them, X″ y is the data processed by the reconstruction function, X y To enhance the data, GN→R is the generation function of the first generator, which is used to generate doubtful or opposing comments on non-rumors; GR→N is the generation function of the second generator, which is used to generate supportive comments on rumors. y represents the label of the original data, N is the non-rumor label, and R is the rumor label. Among them, the reconstruction loss of the reconstruction function is: Among them, L Rec is the reconstruction loss, T is the length of the post sequence, and x t and x t ” are the representations of the t-th unit in the original batch and the reconstructed batch, respectively.
7. The low-resource environment rumor detection method according to claim 6, characterized in that: The loss function of the discriminator is: in, is the loss function of the discriminator, is the predicted probability vector, is the true category probability distribution, Θ D is the parameter of the discriminator, λ is the trade-off coefficient; The adversarial loss of the generator is: Among them, LAdv is the adversarial loss of the generator, is the loss function of the discriminator.
8. The low-resource environment rumor detection method according to claim 7, characterized in that: The overall loss function of the generator and discriminator is: Among them, α is the balance coefficient, Θ G is the parameter of the generator, Θ D is the parameter of the discriminator, LAdv is the adversarial loss of the generator, and L Rec is the reconstruction loss.
9. A low-resource environment rumor detection system, characterized in that: include: A processor and a memory for storing a computer program that can be run on the processor; wherein, when the processor is used to run the computer program, the steps of the method according to any one of claims 1 to 8 are executed.
Citation Information
Patent Citations
Network rumor propagation prediction method based on user short-term emotion and evolutionary game
CN115470991A
Depression emotion prediction system based on deep learning and bimodal data
CN116030271A