CN115688414A - False news detection method with theme embedded multi-mask prompt template - Google Patents
False news detection method with theme embedded multi-mask prompt template Download PDFInfo
- Publication number
- CN115688414A CN115688414A CN202211327335.5A CN202211327335A CN115688414A CN 115688414 A CN115688414 A CN 115688414A CN 202211327335 A CN202211327335 A CN 202211327335A CN 115688414 A CN115688414 A CN 115688414A
- Authority
- CN
- China
- Prior art keywords
- news
- false
- template
- probability
- label
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Machine Translation (AREA)
Abstract
The invention relates to a false news detection method with a theme embedded multi-mask prompt template, and belongs to the field of natural language processing and machine learning. Firstly, making a template for a false news detection task, and respectively designing answer words according to the false nature of a news text and the possibility of news occurrence; then, extracting a news theme word embedding template by using an LDA theme model, and inputting the template and a news text into a pre-training language model to obtain a word vector; and finally, outputting the probability distribution of the answer words by the two word vectors at the mask positions through a multilayer perceptron, inputting the probability distribution of the answer words into a softmax layer to obtain the probability distribution of the false news and the probability distribution of the occurrence probability of the news, and then deciding and outputting the detection result. The invention provides a method for embedding a news theme into a multi-mask prompt template, which utilizes a plurality of perceptrons to fuse decisions and improves the detection precision of false news.
Description
Technical Field
The invention relates to a false news detection method with a theme embedded multi-mask prompt template, and belongs to the field of natural language processing and machine learning.
Background
Early detection of false news using statistical information based text or social context features; or use emotional characteristics and style characteristics in the articles to assist the task of false news detection. The accuracy of statistical-based machine learning methods typically relies on feature engineering.
The deep learning method is widely applied to false news detection by virtue of strong feature extraction capability, and deep learning models commonly used for detecting false news comprise TextCNN, LSTM and the like. To avoid training new models from scratch, many excellent pre-training language models have been generated in recent years, such as BERT, roBERTA base GPT, etc. The models can realize higher detection precision on the false news detection task only by fine adjustment. The accurate true and false judgment of newly-appeared events is a research hotspot in recent years, however, the newly-appeared events are usually accompanied by a series of problems such as few labeled samples, and the existing method cannot effectively detect false news under the condition of few samples. The prompt learning solves the problem, the target task is modeled into a task normal form of the pre-training language model by constructing a prompt template, and the text generation capability of the pre-training language model can be fully exerted by the guidance of the prompt template so as to well complete the task. However, the template prompting effect of the existing method is insufficient, the inherent connection between the news occurrence possibility and the news falseness is ignored, and the detection accuracy is low under the condition of few samples.
Disclosure of Invention
The invention aims to improve the prompting effect of a prompting template, consider the probability and the false and false nature of news, and improve the detection precision of a model under the condition of few samples by using a plurality of perceptrons to fuse decisions.
The design principle of the invention is as follows: firstly, designing a template, wherein the specific format is as follows: here is a piece of news about < the me > with < mask > information, [ sep ] In < the me >, it is < mask2> to happen, and answer words are respectively designed according to the virtual and false characters of news texts and the probability of news occurrence; secondly, extracting the topic information of the news text through an LDA topic model, and embedding the topic information into the < the me > position of the template; then connecting the news text with the template, inputting a pre-training language model, and outputting word vectors; and finally, outputting the probability distribution of the answer words by the two word vectors at the mask positions through a multilayer perceptron, inputting the probability distribution of the answer words into a softmax layer to obtain the probability distribution of the false news and the probability distribution of the occurrence probability of the news, and then deciding and outputting the detection result.
The technical scheme of the invention is realized by the following steps:
step 1, designing a template and label word mapping, and embedding a news theme into the template;
step 1.1, designing a template, wherein the content is as follows: the heres is a piece of news about < the > with < mask1> information, < sep > In < the > and it is < mask2> to happen;
step 1.2, designing news false/news real label word mapping;
step 1.3, designing label word mapping with high news occurrence probability/low news occurrence probability;
step 1.4, inputting the news text into an LDA theme model, outputting the theme of the news text, and embedding the theme into a template;
step 2, inputting the template and the news text into a pre-training language model, and outputting word vectors;
step 2.1, connecting the template embedded with the theme and the news text, inputting the template and the news text into a pre-training language model, and outputting word vectors;
step 3, constructing a loss function training model;
step 4, inputting the news text into the model, and outputting a false news detection result;
step 4.1, inputting the word vector at the position of < mask1> into a multilayer perceptron alpha to obtain the probability distribution of the answer words of the news false-positive label, inputting the probability distribution of the answer words into a softmax layer to obtain the news false-positive probability distribution, and outputting a corresponding label according to the probability distribution;
step 4.2, inputting the word vector at the position of < mask2> into a multilayer perceptron beta to obtain the probability distribution of the answerings of the news occurrence probability labels, inputting the probability distribution of the answerings into a softmax layer to obtain the probability distribution of the news occurrence probability, and outputting corresponding labels according to the probability distribution;
4.3, if the word vector at the position of < mask1> is processed and output news false tags through the step 4.1 or the word vector at the position of < mask2> is processed and output news tags with low probability of occurrence through the step 4.2, the final judgment result of the sample is false news; otherwise, the final judgment result of the sample is real news.
Advantageous effects
Compared with the prior false news detection method, the false news detection method with the theme embedded with the multi-mask prompting template is more suitable for false news detection under the condition of few samples.
Drawings
FIG. 1 is a schematic diagram of a false news detection method with a multi-mask hint template embedded according to the subject matter of the present invention.
Detailed Description
To better illustrate the objects and advantages of the present invention, embodiments of the method of the present invention are described in further detail below with reference to examples.
The invention adopts Accuracy (Accuracy) to evaluate the result of false news detection, and the Accuracy calculation method comprises the following steps:
where TP is the number of predictions of true news, FN is the number of predictions of false news, FP is the number of predictions of false news, and TN is the number of predictions of false news.
The specific process of the invention comprises the following steps:
step 1, designing label word mapping, and embedding the theme of a news article into a template;
step 1.1, designing an effective template with summarization, wherein the template comprises masks < mask1> and < mask2>, the position of < the me > is the embedding position of the subject term output by the LDA subject model, and the content of the template is as follows: the heres is a piece of news about < the > with < mask1> information, < sep > In < the > and it is < mask2> to happen;
step 1.2, mapping news false and news real label words, wherein the specific contents are shown in table 1:
TABLE 1 News true/News false tag answer words
Z label:real Set of reply words being real news tags, Z label:fake A set of reply words that are false news tags;
step 1.3, label word mapping with high news occurrence probability and low news occurrence probability is carried out, and specific contents are shown in a table 2:
TABLE 2. Answer words with higher probability of news occurrence/lower probability of news labels
C label:p Set of answerwords being labels with a high probability of news occurrence, C label:n A set of answer words which are labels with low news occurrence probability;
step 1.4, inputting a news text x into an LDA theme model, taking the first three themes with the highest probability as output, and embedding the news text x into the < same > position of a template;
step 2, inputting the template tm and the news text x into a pre-training language model RoBERTA base Outputting a word vector;
step 2.1, connecting a template tm embedded in a theme and a news text x into x ', x' = [ tm ]; x is the number of]. Inputting x' into a pre-training language model, the invention selects RoBERTA base As a pre-trained language modelOutputting word vectorsWhereinRepresents the ith word vector of the template, m is the length of the template,are respectively at<mask1>、<mask2>The word vector of the position is then calculated,a jth word vector of the input text x;
step 3.1, construct the loss functionTraining models, using parameter omega controlRelative toThe importance of (a) to (b),
whereinRepresenting a false-false true-phase tag of news,representing a news occurrence probability true phase label, wherein theta is a parameter of the whole model, and lambda is an L2 regularization coefficient;
step 4, inputting the news text into the model, and outputting a false news detection result;
step 4.1, mixing<mask1>Word vector of positionThe probability of inputting the multi-layer perceptron alpha and outputting the false-false news tag answer word z isLabel y α The probability distribution of (c) is as follows:
σ α to learn the weight, Z y As a label y α Outputting corresponding labels according to probability distribution;
step 4.2, mixing<mask2>Word vector of positionThe probability of inputting the multi-layer perceptron beta and outputting the news occurrence probability label answer word c isLabel y β The probability distribution of (c) is as follows:
σ β as a learnable weight, C y As a label y β Outputting corresponding labels according to probability distribution;
step 4.3, if the word vector at the < mask1> position is processed to output a false news tag through the step 4.1, or the word vector at the < mask2> position is processed to output a tag with low probability of news occurrence through the step 4.2, the final judgment result of the sample is false news; otherwise, the final judgment result of the sample is real news.
The above detailed description is further intended to illustrate the objects, technical solutions and advantages of the present invention, and it should be understood that the above detailed description is only an example of the present invention and should not be used to limit the scope of the present invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.
Claims (6)
1. The false news detection method for embedding the theme in the multi-mask prompt template is characterized by comprising the following steps of:
step 1, designing label word mapping, and embedding the theme of a news article into a template;
step 2, inputting the template tm and the news text x into a pre-training language model RoBERTA base Outputting a word vector;
and 4, inputting the news text into the model and outputting a false news detection result.
2. The method of claim 1, wherein the method comprises: step 1, inputting a news text x into an LDA theme model, taking the first three themes with the highest probability as output, and embedding the output in the < same > position of a template.
3. The method of claim 1, wherein the method comprises: step 1, mapping label words with low news occurrence probability and high news occurrence probability, wherein the specific contents are as follows:
C label:p set of answerwords being labels with a high probability of news occurrence, C label:n A set of reply words that are less likely to occur news.
4. The method of claim 1, wherein the false news detection is based on a multi-mask hint template embedded in a subject, and comprises: constructing a loss function in step 3Training models, using parameter omega controlRelative toThe importance of (a) to (b),
5. The method of claim 1, wherein the method comprises: in step 4, the<mask2>Word vector of positionThe probability of inputting the multi-layer perceptron beta and outputting the news occurrence probability label answer word c isLabel y β Is distributed in probability of
σ β As a learnable weight, C y As a label y β The set of reply words.
6. The method of claim 1, wherein the method comprises: in step 4, if the word vector at the < mask1> position is output through the multi-layer perceptron alpha and the softmax layer to obtain a false news tag, or the word vector at the < mask2> position is output through the multi-layer perceptron beta and the softmax layer to obtain a tag with low probability of news occurrence, the final judgment result of the sample is false news; otherwise, the final judgment result of the sample is real news.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211327335.5A CN115688414A (en) | 2022-10-27 | 2022-10-27 | False news detection method with theme embedded multi-mask prompt template |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211327335.5A CN115688414A (en) | 2022-10-27 | 2022-10-27 | False news detection method with theme embedded multi-mask prompt template |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115688414A true CN115688414A (en) | 2023-02-03 |
Family
ID=85100041
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211327335.5A Pending CN115688414A (en) | 2022-10-27 | 2022-10-27 | False news detection method with theme embedded multi-mask prompt template |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115688414A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116738298A (en) * | 2023-08-16 | 2023-09-12 | 杭州同花顺数据开发有限公司 | Text classification method, system and storage medium |
CN117669530A (en) * | 2024-02-02 | 2024-03-08 | 中国传媒大学 | False information detection method and system based on prompt learning |
-
2022
- 2022-10-27 CN CN202211327335.5A patent/CN115688414A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116738298A (en) * | 2023-08-16 | 2023-09-12 | 杭州同花顺数据开发有限公司 | Text classification method, system and storage medium |
CN116738298B (en) * | 2023-08-16 | 2023-11-24 | 杭州同花顺数据开发有限公司 | Text classification method, system and storage medium |
CN117669530A (en) * | 2024-02-02 | 2024-03-08 | 中国传媒大学 | False information detection method and system based on prompt learning |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110609891B (en) | Visual dialog generation method based on context awareness graph neural network | |
CN107943784B (en) | Relationship extraction method based on generation of countermeasure network | |
CN110704576B (en) | Text-based entity relationship extraction method and device | |
CN115688414A (en) | False news detection method with theme embedded multi-mask prompt template | |
Alwehaibi et al. | Comparison of pre-trained word vectors for arabic text classification using deep learning approach | |
CN110083682A (en) | It is a kind of to understand answer acquisition methods based on the machine readings for taking turns attention mechanism more | |
Vlad et al. | Sentence-level propaganda detection in news articles with transfer learning and BERT-BiLSTM-capsule model | |
CN110647612A (en) | Visual conversation generation method based on double-visual attention network | |
CN111401061A (en) | Method for identifying news opinion involved in case based on BERT and Bi L STM-Attention | |
Ren et al. | Intention detection based on siamese neural network with triplet loss | |
CN109977416A (en) | A kind of multi-level natural language anti-spam text method and system | |
CN107577662A (en) | Towards the semantic understanding system and method for Chinese text | |
CN110502753A (en) | A kind of deep learning sentiment analysis model and its analysis method based on semantically enhancement | |
CN106407333A (en) | Artificial intelligence-based spoken language query identification method and apparatus | |
CN113283236B (en) | Entity disambiguation method in complex Chinese text | |
CN112699686B (en) | Semantic understanding method, device, equipment and medium based on task type dialogue system | |
CN110516035A (en) | A kind of man-machine interaction method and system of mixing module | |
CN114676255A (en) | Text processing method, device, equipment, storage medium and computer program product | |
CN111949790A (en) | Emotion classification method based on LDA topic model and hierarchical neural network | |
Han et al. | An attention-based neural framework for uncertainty identification on social media texts | |
CN110297986A (en) | A kind of Sentiment orientation analysis method of hot microblog topic | |
CN111914553A (en) | Financial information negative subject judgment method based on machine learning | |
CN109086274A (en) | English social media short text time expression recognition method based on restricted model | |
Liu et al. | Improved Chinese sentence semantic similarity calculation method based on multi-feature fusion | |
CN112183060B (en) | Reference resolution method of multi-round dialogue system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |