False news detection method based on large language model negative reasoning
By applying negative reasoning and knowledge distillation technology on large language models, the problem of difficult knowledge illusion in the existing technology is solved, more efficient fake news detection is achieved, and the detection performance of information authenticity is improved.
Patent Information
- Application Number
- CN202510038995.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-10
- Publication Date
- 2025-05-06
AI Technical Summary
When the existing technology uses large language models to identify fake news, the problem of knowledge hallucinations still cannot be effectively solved. The existing methods can only alleviate and cannot fundamentally eliminate hallucinations.
A fake news detection method based on negative reasoning of large language models is proposed. By designing a prompt template and self-enhanced reasoning correction SR3 method, positive and negative reasoning are generated, and through the knowledge distillation process of teacher model NRFE and student model NRFE-D, the semantic consistency between news and reasoning is learned to achieve more effective fake news detection.
This method can more effectively identify and detect fake news, and provides new ideas and tools for the field of fake news detection in theory and practice, significantly improves detection performance and maintains the authenticity and reliability of information.
Smart Images

Figure CN119940547A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence research, and in particular to a fake news detection method based on negative reasoning of a large language model. Background Art
[0002] Large Language Models (LLMs), such as GPT-4o, Claude 3, and Llama 3.1, have made significant progress in the field of artificial intelligence, especially in natural language processing (NLP). LLMs trained on large amounts of artificially generated text can deeply understand and interpret prompts, and generate comprehensive, coherent, and contextual reasoning for the prompts, which makes them applicable to various NLP downstream tasks, including fake news detection. However, when applying LLMs to identify fake news, some limitations and challenges caused by the "knowledge hallucination" problem are still inevitable. The latest related research is dedicated to removing hallucinations through retrieval-augmented generation (RAG), knowledge graphs, or other techniques. However, whether using hallucinations to do news is possible is a way of thinking.
[0003] Typically, knowledge hallucination is a response generated by LLMs, which contains "false or misleading information presented as fact". The classic use of LLMs in reasoning is to use the rich prior knowledge of LLMs to generate correct understanding (i.e., positive reasoning) and mitigate the impact of knowledge hallucination through the above techniques. Artificial intelligence researchers often use data augmentation and data perturbation techniques to "contaminate" the original data samples to enhance the quality, quantity, and diversity of the training data set, thereby improving the robustness and generalization ability of the model.
[0004] Some of the latest technologies nowadays are trying to avoid the knowledge hallucinations of large language models and try every possible way to improve the problem of knowledge hallucinations. Without using knowledge hallucinations for analysis, there are still some problems of knowledge hallucinations that cannot be solved when applying LLMs for fake news identification. Existing related research is committed to eliminating hallucinations through methods such as retrieval enhancement generation and knowledge graphs, but these methods can only alleviate the problem of knowledge hallucinations, but cannot eliminate them fundamentally. Summary of the invention
[0005] The purpose of the present invention is to overcome the defects of the prior art and provide a fake news detection method based on negative reasoning of a large language model. The negative reasoning generated by the large language model under the state of knowledge hallucination is utilized, which provides new ideas and tools for the field of fake news detection both in theory and practice, and can more effectively identify and detect fake news, which is of great significance for maintaining the authenticity and reliability of information.
[0006] The object of the present invention is achieved by: a method for detecting fake news based on negative reasoning of a large language model, comprising the following steps:
[0007] Step 1) Reasoning generation: After scoring the credibility of the news, select news with real labels as supervision data; design a prompt template to generate corresponding positive and negative reasoning based on the news content and its real labels;
[0008] Step 2) Modify SR using self-enhanced reasoning containing label information 3 Method, check whether the polarity of the reasoning is consistent with the preset, and evaluate whether its impact on the score complies with the limit of confidence change; after multiple iterations of prompts and evaluations, finally generate positive reasoning, negative reasoning and the scores corresponding to each reasoning related to the news and its true label;
[0009] Step 3) Reasoning learning: First, we build a teacher model NRFE, use the pre-trained model to encode news and its positive and negative reasoning, and promote information interaction between news and reasoning through the cross-attention module; then, we use the semantic consistency learning module to obtain the global representation of news and reasoning through the attention layer, and learn the semantic consistency between news and reasoning through the consistency learning module to construct a reasoning representation containing label information;
[0010] Step 4) Introduce the knowledge distillation method to effectively simplify the model. During the knowledge distillation process, the semantic knowledge learned by reasoning in the teacher model is transferred to the student model NRFE-D. The student model inherits the core parameters and knowledge of the teacher model through the distillation process and directly predicts the news content. In the testing phase, the student model NRFE-D uses the knowledge obtained by distillation to complete the classification task, thereby obtaining the final classification result.
[0011] As a further limitation of the present invention, the step 1) specifically comprises:
[0012] Select specific news text and corresponding label data {x|y} from the fake news dataset, where y∈{Real,Fake}; use the locally deployed large language model LLMs to perform an initial credibility score V on the news x initial , the credibility score ranges from 0, Fake to 100, Real, indicating the model's preliminary judgment on the authenticity of the news; then multiple parameters are provided to the large language model through prompts to generate positive and negative inferences. The prompt template Ψ receives the following parameters: news text x; the real label y of the news; the type of inference generated by the request T∈{Positive,Negative}; the non-inference-based news credibility score V initial ; The changing state of credibility score S∈{Increase,Decrease};
[0013] Using the generated prompt template Ψ, send an inference request to the large language model LLMs to generate positive inferences R related to the news x p and negative reasoning R n ; Large language models LLMs output a new credibility score V for each generated inference p and V n , corresponding to the credibility of positive reasoning and negative reasoning respectively; the prompt-based reasoning generation function is shown in formula (1):
[0014] Ψ(x ,y,V initial ,S)= (R,V) ,(R,V)∈{( R p ,V p ),(R n ,V n )} (1), positive reasoning aims to strengthen the authenticity of the news, while negative reasoning aims to weaken the authenticity of the news.
[0015] As a further limitation of the present invention, step 2) specifically includes: designing a self-enhanced reasoning correction SR for effective reasoning generation 3 method:
[0016] Take all inputs and outputs of Ψ as input, including {x,y,V initial ,S} and {R p ,V p ,R n ,V n}; The algorithm first checks the label y of the given news. If the label is fake news, it enters the negative reasoning generation process; if the label is true news, it enters the positive reasoning generation process;
[0017] For positive reasoning, set S to 'decrease', indicating that positive reasoning should reduce the credibility score of fake news; for negative reasoning, set S to 'increase', indicating that negative reasoning should increase the credibility score of fake news;
[0018] And use a 'while' loop to iteratively generate inferences until the following conditions are met:
[0019] The confidence score V of the inference should be lower or higher than the polarity threshold M; the confidence score of the inference changes VV initial Should be greater or less than the expected change in confidence score I;
[0020] In each iteration, the hint template Ψ is used reRegenerate the reasoning and evaluate the new credibility score. If the generated reasoning does not meet the conditions, update the regenerated reasoning and score to the current reasoning and score, and continue to iterate until the maximum number of iterations Max_Iter is reached or the conditions are met; this method can obtain high-quality positive reasoning R p and negative reasoning R n .
[0021] As a further limitation of the present invention, the step 3) specifically comprises:
[0022] Step 3-1) Select two pre-trained BERT models as encoders, one for encoding the news text x and the other for encoding the positive inference R obtained in step 2) p and negative reasoning R n ; They form a positive news reasoning pair (x, R p ) and a negative news inference pair (x,R n ); The encoder inputs the news text x into the news encoder to obtain the news sequence representation F x , and the positive reasoning R p and negative reasoning R n Input into the reasoning encoder to obtain the sequence representation F of positive reasoning and negative reasoning p and F n ; and use the cross-attention module to promote the cooperation between news and reasoning. The cross-attention implementation is shown in formula (2):
[0023]
[0024] Among them, F p→x and F n→x Respectively represent the news text x through positive reasoning R p and negative reasoning R n The enhanced information, F x→p or F x→n Represents positive reasoning R p or negative reasoning R n Information adjusted according to news text x;
[0025] Step 3-2) Align the semantics between news and reasoning through semantic consistency learning. First, pass an attention layer to convert the sequence representation F x ,F p ,F n ,F p→x ,F n→x ,F x→p and F x→n Converted to their global representation f x ,f p ,fn ,f p→x ,f n→x ,f x→p and f x→n ; and set three binary classification tasks to align the semantic representations between news and reasoning:
[0026] Task 1: Predict news x and reasoning-based news representation f p→x and f n→x Semantic consistency between
[0027] Task 2: Predict news x and the news-based positive and negative reasoning representation f x→p and f x→n Semantic consistency between
[0028] Task 3: Predicting news x and reasoning f p and f n Semantic consistency between
[0029] Each task uses an independent multi-layer perceptron MLP classifier, with the input being the news representation f x and one of the other six representations; in these three subtasks, the cosine embedding loss function is used to train these tasks, and the cosine embedding loss function is defined as shown in formula (3):
[0030]
[0031] Where L rc Used to control the news x and reasoning f r The semantic relevance between r ∈{f x ,f r}, d is the preset boundary value; news f x and reasoning-based news representation f r→x ∈{f p→x ,f n→x}L rxc Control, where L rxc As shown in formula (4):
[0032]
[0033] News x and the news-based positive and negative reasoning representation f x→r ∈{f x→p ,f x→n}L xrc Control, where L xrc As shown in formula (5):
[0034]
[0035] Finally, the total loss of semantic consistency learning is L c , which is the sum of the total losses of the three subtasks, is shown in formula (6):
[0036] L c =L rc +L rxc +L xrc , (6),
[0037] Step 3-3) When the semantic similarity module training is completed, the positive example pair {f x ,f p} is input into three well-trained blocks to obtain semantically aligned representations, including the aligned news representation m x , the aligned positive inference representation m p , aligned positive inference based news representation m p→x , and the aligned news-based positive reasoning representation m x→p Finally, through a representation fusion module, these four representations are combined into a complete representation of news and positive reasoning pairs, as shown in formula (7):
[0038]
[0039] Step 3-4) Finally, the teacher model NRFE converts the sequence m final As the input of the multi-layer perceptron MLP classifier, it is compared with the true label y. Formula (8) is as follows:
[0040] L cls = CrossEntropy(y,MLP(m final )) (8).
[0041] As a further limitation of the present invention, the step 4) specifically comprises:
[0042] Step 4-1) Build a student model NRFE-D; Initialize the student model NRFE-D using the news encoder fine-tuned on the teacher model NRFE; The student model NRFE-D only contains the encoder part for processing news text; The student model NRFE-D accepts news content as encoded news F x ′ is represented as the input, and then the news f is obtained through an attention layer x The vectorized global representation of ′ helps the model extract the most important features from the sequence representation through the attention layer;
[0043] f x′After a multi-layer perceptron MLP classifier, the final representation f of the connection is obtained f ' inal ; This representation will be used for subsequent classification tasks;
[0044] The reverse KL divergence loss is used as the loss function of knowledge distillation, which measures the difference between the output distribution of the student model NRFE-D and the output distribution of the teacher model NRFE; the specific formula (9) is as follows:
[0045]
[0046] in is the probability distribution of the teacher model NRFE output, q θ (f f ' inal |x) is the probability distribution of the output of the student model NRFE-D;
[0047] Step 4-2) Use cross entropy loss to train the student model NRFE-D so that it can learn directly from the label y. Formula (10) is as follows:
[0048] L′ cls = CrossEntropy(y,MLP(f f ' inal )) (10),
[0049] The total loss of the student model NRFE-D is the weighted sum of the distillation loss and the classification loss, and formula (11) is as follows:
[0050] L D =L dis +L′ cls (11)
[0051] L D The total loss function combines the knowledge distilled from the teacher model NRFE and the information learned directly from the labels; by minimizing the total loss L D to train the student model NRFE-D; through this process, the NRFE-D model is able to learn the knowledge of the NRFE model while learning directly from the label y, and finally make accurate classification predictions on the test set.
[0052] The present invention adopts the above technical solution, and compared with the prior art, the beneficial effects are as follows: the method of the present invention proposes a new self-enhanced reasoning correction method (SR 3), generating qualified positive and negative inferences through large language model LLMs responses; by deploying a local fake news detection model that conforms to the knowledge distillation design to avoid the influence of supervised reasoning requests, including a teacher model NRFE and a student model NRFE-D; specifically, the NRFE model involves two BERT encoders to obtain news reasoning pairs for semantic consistency learning, while the NRFE-D model is a reasoning-free model that extracts the representation of news from the NRFE model for prediction; the present invention utilizes the negative inferences generated by the large language model under the knowledge hallucination state, which provides new ideas and tools for the field of fake news detection both in theory and practice, and can more effectively identify and detect fake news, which is of great significance for maintaining the authenticity and reliability of information. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 Flowchart of the present invention.
[0054] Figure 2 Schematic diagram of the structures of the NRFE teacher model and the NRFE-D student model in the present invention. DETAILED DESCRIPTION
[0055] like Figure 1 A fake news detection method based on negative inference of a large language model is shown, comprising the following steps:
[0056] Step 1) Reasoning generation: After scoring the credibility of the news, select news with real labels as supervision data; design a prompt template to generate corresponding positive and negative reasoning based on the news content and its real labels;
[0057] Select specific news text and corresponding label data {x|y} from the fake news dataset, where y∈{Real,Fake}; use the locally deployed large language model LLMs to perform an initial credibility score V on the news x initial , the credibility score ranges from 0, Fake to 100, Real, indicating the model's preliminary judgment on the authenticity of the news; then multiple parameters are provided to the large language model through prompts to generate positive and negative inferences. The prompt template Ψ receives the following parameters: news text x; the real label y of the news; the type of inference generated by the request T∈{Positive,Negative}; the non-inference-based news credibility score V initial ; The changing state of credibility score S∈{Increase,Decrease};
[0058] Using the generated prompt template Ψ, send an inference request to the large language model LLMs to generate positive inferences R related to the news x p and negative reasoning R n; Large language models LLMs output a new credibility score V for each generated inference p and V n , corresponding to the credibility of positive reasoning and negative reasoning respectively; the prompt-based reasoning generation function is shown in formula (1):
[0059] Ψ(x ,y,V initial ,S)= (R,V) ,(R,V)∈{( R p ,V p ),(R n ,V n )} (1), positive reasoning aims to strengthen the authenticity of the news, while negative reasoning aims to weaken the authenticity of the news.
[0060] Step 2) Modify SR using self-enhanced reasoning containing label information 3 Method, check whether the polarity of the reasoning is consistent with the preset, and evaluate whether its impact on the score complies with the limit of confidence change; after multiple iterations of prompts and evaluations, finally generate positive reasoning, negative reasoning and the scores corresponding to each reasoning related to the news and its true label;
[0061] Designing a self-enhanced reasoning correction (SR) for efficient reasoning generation 3 method:
[0062] Take all inputs and outputs of Ψ as input, including {x,y,V initial ,S} and {R p ,V p ,R n ,V n}; The algorithm first checks the label y of the given news. If the label is fake news, it enters the negative reasoning generation process; if the label is true news, it enters the positive reasoning generation process; take the label of fake news as an example (the opposite is true for true news):
[0063] For positive reasoning, set S to 'decrease', indicating that positive reasoning should reduce the credibility score of fake news; for negative reasoning, set S to 'increase', indicating that negative reasoning should increase the credibility score of fake news;
[0064] And use a 'while' loop to iteratively generate inferences until the following conditions are met:
[0065] The confidence score V of the inference should be lower or higher than the polarity threshold M; the confidence score of the inference changes VV inial Should be greater or less than the expected change in confidence score I;
[0066] In each iteration, the hint template Ψ is used reRegenerate the reasoning and evaluate the new credibility score. If the generated reasoning does not meet the conditions, update the regenerated reasoning and score to the current reasoning and score, and continue to iterate until the maximum number of iterations Max_Iter is reached or the conditions are met; this method can obtain high-quality positive reasoning R p and negative reasoning R n .
[0067] Step 3) Reasoning learning: First, we build a teacher model NRFE, use the pre-trained model to encode news and its positive and negative reasoning, and promote information interaction between news and reasoning through the cross-attention module; then, we use the semantic consistency learning module to obtain the global representation of news and reasoning through the attention layer, and learn the semantic consistency between news and reasoning through the consistency learning module to construct a reasoning representation containing label information;
[0068] Step 3-1) Select two pre-trained BERT models as encoders, one for encoding the news text x and the other for encoding the positive inference R obtained in step 2) p and negative reasoning R n ; They form a positive news reasoning pair (x, R p ) and a negative news inference pair (x,R n ); The encoder inputs the news text x into the news encoder to obtain the news sequence representation F x , and the positive reasoning R p and negative reasoning R n Input into the reasoning encoder to obtain the sequence representation F of positive reasoning and negative reasoning p and F n ; and use the cross-attention module to promote the cooperation between news and reasoning. The cross-attention implementation is shown in formula (2):
[0069]
[0070] Among them, F p→x and F n→x Respectively represent the news text x through positive reasoning R p and negative reasoning R n The enhanced information, F x→p or F x→n Represents positive reasoning R p or negative reasoning R n Information adjusted according to news text x;
[0071] Step 3-2) Align the semantics between news and reasoning through semantic consistency learning. First, pass an attention layer to convert the sequence representation F x ,F p ,Fn ,F p→x ,F n→x ,F x→p and F x→n Converted to their global representation f x ,f p ,f n ,f p→x ,f n→x ,f x→p and f x→n ; and set three binary classification tasks to align the semantic representations between news and reasoning:
[0072] Task 1: Predict news x and reasoning-based news representation f p→x and f n→x Semantic consistency between
[0073] Task 2: Predict news x and the news-based positive and negative reasoning representation f x→p and f x→n Semantic consistency between
[0074] Task 3: Predicting news x and reasoning f p and f n Semantic consistency between
[0075] Each task uses an independent multi-layer perceptron MLP classifier, with the input being the news representation f x and one of the other six representations; in these three subtasks, the cosine embedding loss function is used to train these tasks, and the cosine embedding loss function is defined as shown in formula (3):
[0076]
[0077] Where L rc Used to control the news x and reasoning f r The semantic relevance between r ∈{f x ,f r}, d is the preset boundary value; news f x and reasoning-based news representation f r→x ∈{f p→x ,f n→x}L rxc Control, where L rxc As shown in formula (4):
[0078]
[0079] Newsx and the news-based positive and negative reasoning representation f x→r ∈{f x→p ,f x→n}L xrc Control, where L xrc As shown in formula (5):
[0080]
[0081] Finally, the total loss of semantic consistency learning is L c , which is the sum of the total losses of the three subtasks, is shown in formula (6):
[0082] L c =L rc +L rxc +L xrc , (6),
[0083] Step 3-3) When the semantic similarity module training is completed, the positive example pair {f x ,f p} is input into three well-trained blocks to obtain semantically aligned representations, including the aligned news representation m x , the aligned positive inference representation m p , aligned positive inference based news representation m p→x , and the aligned news-based positive reasoning representation m x→p Finally, through a representation fusion module, these four representations are combined into a complete representation of news and positive reasoning pairs, as shown in formula (7):
[0084]
[0085] Step 3-4) Finally, the teacher model NRFE converts the sequence m final As the input of the multi-layer perceptron MLP classifier, it is compared with the true label y. Formula (8) is as follows:
[0086] L cls = CrossEntropy(y,MLP(m final )) (8).
[0087] Step 4) Introduce the knowledge distillation method to effectively simplify the model. During the knowledge distillation process, the semantic knowledge learned by reasoning in the teacher model is transferred to the student model NRFE-D. The student model no longer explicitly uses label information or reasoning content. The student model inherits the core parameters and knowledge of the teacher model through the distillation process and directly predicts the news content. In the test phase, the student model NRFE-D uses the knowledge obtained by distillation to complete the classification task, thereby obtaining the final classification result.
[0088] Step 4-1) Build an NRFE-D model that is similar in structure to the NRFE model but without the inference generation part; this means that the NRFE-D model does not include generating positive and negative inferences, but only contains an encoder part for processing news text; initialize the NRFE-D model using the news encoder fine-tuned on the NRFE model; this allows the NRFE-D model to have similar feature extraction capabilities as the NRFE model at the beginning of training;
[0089] Student model NRFE-D receives news content as coded news F x ′ is represented as the input, and then passes through an attention layer (similar to the conversion in the NRFE model) to obtain the news f x The vectorized global representation of ′ helps the model extract the most important features from the sequence representation through the attention layer;
[0090] f x ′After a multi-layer perceptron MLP classifier, the final representation f of the connection is obtained f ' inal ; This representation will be used for subsequent classification tasks;
[0091] The reverse KL divergence loss is used as the loss function of knowledge distillation, which measures the difference between the output distribution of the student model NRFE-D and the output distribution of the teacher model NRFE; the specific formula (9) is as follows:
[0092]
[0093] in is the probability distribution of the teacher model NRFE output, q θ (f f ' inal |x) is the probability distribution of the output of the student model NRFE-D;
[0094] Step 4-2) Use cross entropy loss to train the student model NRFE-D so that it can learn directly from the label y. Formula (10) is as follows:
[0095] L′ cls = CrossEntropy(y,MLP(f f ' inal )) (10),
[0096] The total loss of the student model NRFE-D is the weighted sum of the distillation loss and the classification loss, and formula (11) is as follows:
[0097] L D =L dis +L′ cls(11),
[0098] L D The total loss function combines the knowledge distilled from the teacher model NRFE and the information learned directly from the labels; by minimizing the total loss L D to train the student model NRFE-D; this process involves updating the model’s parameters using the back-propagation algorithm to reduce the difference between the predicted output and the true label while ensuring that the output distribution of the NRFE-D model is close to that of the NRFE model.
[0099] Through this process, the NRFE-D model is able to learn the knowledge of the NRFE model while learning directly from the label y, and finally make accurate classification predictions on the test set.
[0100] The present invention can be further illustrated by the following experiments:
[0101] In order to test the effectiveness of the present invention, the experimental results achieved classification effects on three fake news datasets: PolitiFact, Twitter-15 and Twitter-16. Among them, PolitiFact is a widely used dataset that contains authenticity labels of news articles rated by professional fact checkers. The Twitter-15 dataset contains posts from Twitter that are marked as rumors or non-rumors. It provides a fake news detection scenario on a social platform to evaluate the effectiveness of the model when processing social media data. Twitter-16 is also a dataset containing Twitter posts for fake news detection. It provides additional data to verify the performance of the model at different time points or different dataset divisions.
[0102] The test results of the present invention include the following indicators: (1) Accuracy: It indicates the proportion of samples predicted correctly by the model to the total number of samples, which is a basic indicator for evaluating the performance of the classification model. (2) Macro F1 score: The F1 score is the harmonic mean of precision and recall. The macro F1 score means averaging the F1 scores of all categories without considering the number of samples in each category. (3) PT (Precision-True): The precision of real news, that is, the proportion of real news among all samples predicted to be real news. (4) RT (Recall-True): The recall of real news, that is, the proportion of real news among all samples predicted to be real news. (5) F1-T (F1-True): The F1 score of real news. (6) PF (Precision-Fake): The precision of fake news, that is, the proportion of fake news among all samples predicted to be fake news. (7) RF (Recall-Fake): The recall rate of fake news, that is, the proportion of samples predicted to be fake news among all samples that are actually fake news. (8) F1-F (F1-Fake): The F1 score of fake news.
[0103] In order to show the performance of the test results, we selected open source LLMs: Llama 3, Gemma 2, Mistral, and pre-trained language models based on fine-tuning: BERT, RoBERTa, ALBERT. In addition, some specific task models are also included: HSABLSTM, BiGRU, MUSER. These methods are compared and the results are shown in Tables 1, 2, and 3. The performance is mostly better than other methods.
[0104] Table 1 Experimental results of the politifact dataset
[0105]
[0106] Table 2 Experimental results of twitter-15 dataset
[0107]
[0108]
[0109] Table 1 Experimental results of twitter-16 dataset
[0110]
[0111] The present invention provides a fake news detection method based on negative reasoning of a large language model, and uses a large number of experimental results to show that the method of the present invention has significant performance improvement over other baseline methods on multiple data sets.
[0112] The present invention is not limited to the above-mentioned embodiments. On the basis of the technical solution disclosed in the present invention, technicians in this field can make some substitutions and deformations to some technical features therein according to the disclosed technical content without creative labor, and these substitutions and deformations are all within the protection scope of the present invention.
Claims
1. A fake news detection method based on negative reasoning of a large language model, characterized in that: The following steps are involved: Step 1) Inference generation: After scoring the credibility of the news, select news with real labels as supervision data; Design prompt templates to generate corresponding positive and negative inferences based on news content and its true labels; Step 2) Modify SR using self-enhanced reasoning containing label information 3 Method, check whether the polarity of the reasoning is consistent with the preset, and evaluate whether its impact on the score complies with the limit of confidence change; after multiple iterations of prompts and evaluations, finally generate positive reasoning, negative reasoning and the scores corresponding to each reasoning related to the news and its true label; Step 3) Reasoning learning: First, we build a teacher model NRFE, use the pre-trained model to encode news and its positive and negative reasoning, and promote information interaction between news and reasoning through the cross-attention module; then, we use the semantic consistency learning module to obtain the global representation of news and reasoning through the attention layer, and learn the semantic consistency between news and reasoning through the consistency learning module to construct a reasoning representation containing label information; Step 4) Introduce the knowledge distillation method to effectively simplify the model. During the knowledge distillation process, the semantic knowledge learned by reasoning in the teacher model is transferred to the student model NRFE-D. The student model inherits the core parameters and knowledge of the teacher model through the distillation process and directly predicts the news content. In the testing phase, the student model NRFE-D uses the knowledge obtained by distillation to complete the classification task, thereby obtaining the final classification result.
2. A fake news detection method based on negative reasoning of a large language model according to claim 1, characterized in that: The step 1) specifically includes: Select specific news text and corresponding label data {x|y} from the fake news dataset, where y∈{Real,Fake}; use the locally deployed large language model LLMs to perform an initial credibility score V on the news x initial , the credibility score ranges from 0, Fake to 100, Real, indicating the model's preliminary judgment on the authenticity of the news; then multiple parameters are provided to the large language model through prompts to generate positive and negative inferences. The prompt template Ψ receives the following parameters: news text x; the real label y of the news; the type of inference generated by the request T∈{Positive,Negative}; the non-inference-based news credibility score V initial ; The changing state of credibility score S∈{Increase,Decrease}; Using the generated prompt template Ψ, send an inference request to the large language model LLMs to generate positive inferences R related to the news x p and negative reasoning R n ; Large language models LLMs output a new credibility score V for each generated inference p and V n , corresponding to the credibility of positive reasoning and negative reasoning respectively; the prompt-based reasoning generation function is shown in formula (1): Ψ(x ,y,V initial ,S)= (R,V) ,(R,V)∈{( R p ,V p ),(R n ,V n )} (1), positive reasoning aims to strengthen the authenticity of the news, while negative reasoning aims to weaken the authenticity of the news.
3. The fake news detection method based on negative reasoning of a large language model according to claim 1, characterized in that: The step 2) specifically includes: designing a self-enhanced reasoning correction SR for effective reasoning generation 3 method: Take all inputs and outputs of Ψ as input, including {x,y,V initial ,S} and {R p ,V p ,R n ,V n }; The algorithm first checks the label y of the given news. If the label is fake news, it enters the negative reasoning generation process; if the label is true news, it enters the positive reasoning generation process; For positive reasoning, set S to 'decrease', indicating that positive reasoning should reduce the credibility score of fake news; for negative reasoning, set S to 'increase', indicating that negative reasoning should increase the credibility score of fake news; And use a 'while' loop to iteratively generate inferences until the following conditions are met: The confidence score V of the inference should be lower or higher than the polarity threshold M; the confidence score of the inference changes VV initial Should be greater or less than the expected change in confidence score I; In each iteration, the hint template Ψ is used re Regenerate the reasoning and evaluate the new credibility score. If the generated reasoning does not meet the conditions, update the regenerated reasoning and score to the current reasoning and score, and continue to iterate until the maximum number of iterations Max_Iter is reached or the conditions are met; this method can obtain high-quality positive reasoning R p and negative reasoning R n .
4. The fake news detection method based on negative reasoning of a large language model according to claim 3, characterized in that: The step 3) specifically includes: Step 3-1) Select two pre-trained BERT models as encoders, one for encoding the news text x and the other for encoding the positive inference R obtained in step 2) p and negative reasoning R n ; They form a positive news reasoning pair (x, R p ) and a negative news inference pair (x,R n ); The encoder inputs the news text x into the news encoder to obtain the news sequence representation F x , and the positive reasoning R p and negative reasoning R n Input into the reasoning encoder to obtain the sequence representation F of positive reasoning and negative reasoning p and F n ; and use the cross-attention module to promote the cooperation between news and reasoning. The cross-attention implementation is shown in formula (2): Among them, F p→x and F n→x Respectively represent the news text x through positive reasoning R p and negative reasoning R n The enhanced information, F x→p or F x→n Represents positive reasoning R p or negative reasoning R n Information adjusted according to news text x; Step 3-2) Align the semantics between news and reasoning through semantic consistency learning. First, pass an attention layer to convert the sequence representation F x ,F p ,F n ,F p→x ,F n→x ,F x→p and F x→n Converted to their global representation f x ,f p ,f n ,f p→x ,f n→x ,f x→p and f x→n ; and set three binary classification tasks to align the semantic representations between news and reasoning: Task 1: Predict news x and reasoning-based news representation f p→x and f n→x Semantic consistency between Task 2: Predict news x and the news-based positive and negative reasoning representation f x→p and f x→n Semantic consistency between Task 3: Predicting news x and reasoning f p and f n Semantic consistency between Each task uses an independent multi-layer perceptron MLP classifier, with the input being the news representation f x and one of the other six representations; in these three subtasks, the cosine embedding loss function is used to train these tasks, and the cosine embedding loss function is defined as shown in formula (3): Where L rc Used to control the news x and reasoning f r The semantic relevance between r ∈{f x ,f r }, d is the preset boundary value; news f x and reasoning-based news representation f r→x ∈{f p→x ,f n→x }L rxc Control, where L rxc As shown in formula (4): News x and the news-based positive and negative reasoning representation f x→r ∈{f x→p ,f x→n }L xrc Control, where L xrc As shown in formula (5): Finally, the total loss of semantic consistency learning is L c , which is the sum of the total losses of the three subtasks, is shown in formula (6): L c =L rc +L rxc +L xrc , (6), Step 3-3) When the semantic similarity module training is completed, the positive example pair {f x ,f p } is input into three well-trained blocks to obtain semantically aligned representations, including the aligned news representation m x , the aligned positive inference representation m p , aligned positive inference based news representation m p→x , and the aligned news-based positive reasoning representation m x→p Finally, through a representation fusion module, these four representations are combined into a complete representation of news and positive reasoning pairs, as shown in formula (7): Step 3-4) Finally, the teacher model NRFE converts the sequence m final As the input of the multi-layer perceptron MLP classifier, it is compared with the true label y. Formula (8) is as follows: L cls =CrossEntropy(y,MLP(m final )) (8)。 5. The fake news detection method based on negative reasoning of a large language model according to claim 3, characterized in that: The step 4) specifically includes: Step 4-1) Build a student model NRFE-D; Initialize the student model NRFE-D using the news encoder fine-tuned on the teacher model NRFE; The student model NRFE-D only contains the encoder part for processing news text; The student model NRFE-D accepts news content as encoded news F x ′ The order of is represented as input, and then an attention layer is used to obtain the news f x ′ The vectorized global representation of , helps the model extract the most important features from the sequence representation through the attention layer; f x ′ After a multi-layer perceptron MLP classifier, the final representation f is obtained. f ′ inal ; This representation will be used for subsequent classification tasks; The reverse KL divergence loss is used as the loss function of knowledge distillation, which measures the difference between the output distribution of the student model NRFE-D and the output distribution of the teacher model NRFE; the specific formula (9) is as follows: in is the probability distribution of the teacher model NRFE output, q θ (f f ′ inal |x) is the probability distribution of the output of the student model NRFE-D; Step 4-2) Use cross entropy loss to train the student model NRFE-D so that it can learn directly from the label y. Formula (10) is as follows: L ′ cls =CrossEntropy(y,MLP(f f ′ inal )) (10), The total loss of the student model NRFE-D is the weighted sum of the distillation loss and the classification loss, and formula (11) is as follows: L D =L dis +L ′ cls (11), L D The total loss function combines the knowledge distilled from the teacher model NRFE and the information learned directly from the labels; by minimizing the total loss L D to train the student model NRFE-D; through this process, the NRFE-D model is able to learn the knowledge of the NRFE model while learning directly from the label y, and finally make accurate classification predictions on the test set.
Citation Information
Cited By
Emergency distortion information identification method and system
CN120744342A