News event behavior prediction method and equipment based on big language model knowledge distillation
Through the large language model knowledge distillation method, we build a news event behavior sequence transfer network and a thinking chain template, which improves the accuracy of news event behavior prediction, solves the problems of low accuracy and information fragmentation of existing models, and realizes the prediction of news events. A new exploration of behavior.
Patent Information
- Application Number
- CN202410574021.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-09
- Publication Date
- 2024-08-23
Smart Images

Figure CN118536596A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of event prediction and reasoning, and in particular to a news event behavior prediction method and device based on large language model knowledge distillation. Background Art
[0002] At present, the research on news event behavior prediction mainly takes event chains or event pairs as background knowledge. By constructing different neural network models, the event semantic features and event chains are integrated to complete the news event behavior prediction. However, news event behavior prediction only considers the co-occurrence between event pairs and ignores the changes in the order between events.
[0003] Moreover, more and more studies have begun to shift from constructing event evolution graphs to using pre-trained models. This shift shows that pre-trained models can provide richer semantic features. However, both event chains and event evolution graphs have certain limitations. Event chains and event evolution graphs only give answers, but do not provide explanations for the answers. Event chains and event evolution graphs will change with time and social rules, resulting in the disadvantages of fragmented event behavior information, variable event behavior evolution paths, and weak background knowledge of event behavior prediction models in the news event behavior prediction process. As the amount of original news data increases or decreases, it has a significant impact on the accuracy of models based on event chains or event pairs, reducing the accuracy of news event behavior prediction models. Summary of the invention
[0004] The purpose of the present invention is to provide a news event behavior prediction method and device based on large language model knowledge distillation to solve the problem of low accuracy of news event behavior prediction models in the prior art.
[0005] To achieve the above object, the present invention provides the following solutions:
[0006] A news event behavior prediction method based on large language model knowledge distillation, including:
[0007] Determine news event behavior based on the information elements of the news event;
[0008] According to the news event behavior, determining a news event behavior sequence transfer network;
[0009] Determine a news event behavior data set according to the news event behavior sequence transfer network; the news event behavior data set includes the news event, a candidate event behavior set and a candidate answer;
[0010] Based on the thought chain template, and according to the news event behavior data set, a new news event behavior data set is determined;
[0011] Inputting the news events and candidate event behavior sets in the new news event behavior data set into the large language model, and determining the explanation and answer output by the large language model;
[0012] Determine a news event behavior dataset in a new data format according to the new news event behavior dataset and the explanation and answer output by the large language model;
[0013] The information elements of the news event to be tested are input into the trained small model, and the news event behavior prediction result of the news event to be tested is output; the trained small model is trained by taking the news event behavior data set in the new data format as input and the news event behavior prediction result corresponding to the news event behavior data set in the new data format as output; the news event behavior prediction result includes the explanation and answer output by the trained small model; the parameters of the small model are less than the parameters of the large language model.
[0014] Optionally, determining the news event behavior according to the information elements of the news event specifically includes:
[0015] According to the information elements of the news event, using formula s i ={(e1,e2,r),(se),(topic),(intent)}, determine the news event behavior;
[0016] Among them, s i is the ith news event behavior, i = 1, 2, ..., L, L is the total number of news event behaviors, e1 and e2 are the entities of the news event, r is the relationship between the entities of the news event, se is the news event behavior element, topic is the topic of the news event, and intent is the intention of the news event.
[0017] Optionally, determining a news event behavior sequence transition network according to the news event behavior specifically includes:
[0018] Using the formula Convert the co-occurrence times between the news event behaviors into transition probabilities;
[0019] According to the transition probability, determining a news event behavior sequence transition network;
[0020] Among them, c(v j |v i ) is the news event behavior v i and news event behavior j The transition probability between the two, count is the co-occurrence function between the news event behaviors, count(v i ,v j ) is the news event behavior v iand news event behavior j The number of co-occurrences of k count(v i ,v k ) is related to the news event behavior v i The total number of co-occurrences of k related nodes.
[0021] Optionally, determining a news event behavior data set according to the news event behavior sequence transfer network specifically includes:
[0022] According to the news event behavior sequence transition network, determine the graph structure data of the news event behavior; the graph structure data includes the news event behavior; the graph structure data is the graph structure data based on the co-occurrence relationship of words;
[0023] Based on the graph structure data, selecting nodes of the news event behavior sequence transition network directly associated with the graph structure data as a candidate event behavior set;
[0024] A news event behavior data set is determined based on the news event and the candidate event behavior set.
[0025] Optionally, the news events and candidate event behavior sets in the new news event behavior data set are input into the large language model to determine the explanation and answer output by the large language model, which also includes:
[0026] According to the development process of the news event behavior, the sequence of news events is determined.
[0027] Optionally, the news events and candidate event behavior sets in the new news event behavior data set are input into the large language model, and the explanation and answer output by the large language model are determined, specifically including:
[0028] The new news event behavior dataset is input into the large language model, and the formula Interp, Answer is used. LLM =LLM(Template(S,C)), determine the explanation and answer of the large language model output;
[0029] Among them, Interp is the explanation output by the large language model, S is the sequence of news events, C is the set of candidate event behaviors, Template is the thinking chain template, LLM is the large language model, and Answer LLM The answer output by the large language model.
[0030] Optionally, the news event behavior prediction result is:
[0031] Ration text ,E label =T5(Data);
[0032] Among them, T5 is a small model, Data is a news event behavior dataset in a new data format, Ration text is the explanation of the small model output, E label The answer output by the small model.
[0033] Optionally, the trained small model is obtained by taking the news event behavior data set in the new data format as input and the news event behavior prediction result corresponding to the news event behavior data set in the new data format as output, and specifically includes:
[0034] Taking the news event behavior dataset in the new data format as input and the news event behavior prediction result corresponding to the news event behavior dataset in the new data format as output, a multi-task loss function is used to train the small model to obtain a trained small model.
[0035] Optionally, the formula of the multi-task loss function is:
[0036] loss Interp =θ(T5(x i ),Interp);
[0037] loss Answer =θ(T5(xi),Answer);
[0038] loss = α * loss Answer +β*loss Interp ;
[0039] Among them, loss Answer is the loss function value for predicting news event behavior, loss Interp is the loss function value of the explanation of the small model output, α and β are parameter coefficients, θ is the loss function, and loss is based on loss Answer and loss Interp The loss function value of T5 is a small model, x i It is a news event behavior dataset in a new data format, Interp is the explanation output by the large language model, and Answer is the candidate answer.
[0040] A computer device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the news event behavior prediction method based on large language model knowledge distillation.
[0041] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:
[0042] The news event behavior prediction method based on the knowledge distillation of a large language model provided by the present invention determines the news event behavior sequence transfer network through the news event behavior determined by the information elements of the news event to determine the news event behavior data set; then the news event and the candidate event behavior set in the new news event behavior data set determined based on the thinking chain template are input into the large language model to determine the explanation and answer output by the large language model; then according to the new news event behavior data set, the news event behavior data set in the new data format is further determined; the information elements of the news event to be tested are input into the news event behavior data set in the new data format as input, and the news event behavior prediction result corresponding to the news event behavior data set in the new data format is trained as output to obtain the trained small model, and the news event behavior prediction result of the news event to be tested is output. The present invention extracts background knowledge from the large language model, and is guided by the reasoning logic of the large language model. The large language model can not only determine the answer according to the news event behavior data set, but also determine the explanation of the answer, and uses knowledge distillation to construct a small model, and uses the small model to learn the reasoning ability of the large language model, thereby improving the accuracy of news event behavior prediction and realizing a new exploration of news event behavior prediction methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0044] Figure 1 A flowchart of a news event behavior prediction method based on large language model knowledge distillation provided by the present invention;
[0045] Figure 2 A process flow chart of the news event behavior prediction method based on large language model knowledge distillation provided by the present invention for predicting news event behavior. DETAILED DESCRIPTION
[0046] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0047] The purpose of the present invention is to provide a news event behavior prediction method and device based on large language model knowledge distillation, aiming to extract background knowledge from a large language model, guided by the reasoning logic of the large language model, so that the large language model can not only determine the answer but also the explanation of the answer according to the news event behavior data set, and use knowledge distillation to build a small model, and use the small model to learn the reasoning ability of the large language model, thereby improving the accuracy of news event behavior prediction.
[0048] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0049] Example 1
[0050] like Figure 1 As shown, the present invention provides a news event behavior prediction method based on large language model knowledge distillation, comprising:
[0051] Step 101, determining the news event behavior according to the information elements of the news event. The information elements of the news event include: entities of the news event, relationships between entities of the news event, news event behavior elements, topics of the news event, and intentions of the news event.
[0052] Step 102, determining a news event behavior sequence transition network according to the news event behavior.
[0053] Step 103, determining a news event behavior data set based on the news event behavior sequence transfer network; the news event behavior data set includes news events, candidate event behavior sets and candidate answers.
[0054] Step 104, based on the thought chain template and the news event behavior data set, a new news event behavior data set is determined.
[0055] Step 105, input the news events and candidate event behavior sets in the new news event behavior data set into the large language model to determine the explanation and answer output by the large language model.
[0056] Step 106, determining a news event behavior dataset in a new data format based on the new news event behavior dataset and the explanation and answer output by the large language model.
[0057] Step 107, input the information elements of the news event to be tested into the trained small model, and output the news event behavior prediction result of the news event to be tested; the trained small model is trained with the news event behavior data set in the new data format as input, and the news event behavior prediction result corresponding to the news event behavior data set in the new data format as output; the news event behavior prediction result includes the explanation and answer output by the trained small model; the parameters of the small model are less than the parameters of the large language model.
[0058] Further, step 101 specifically includes: according to the information elements of the news event, using formula s i ={(e1,e2,r),(se),(topic),(intent)}, determine the news event behavior; where s i is the ith news event behavior, i = 1, 2, ..., L, L is the total number of news event behaviors, e1 and e2 are the entities of the news event, r is the relationship between the entities of the news event, se is the news event behavior element, topic is the topic of the news event, and intent is the intention of the news event.
[0059] Further, step 102 specifically includes: using the formula The co-occurrence times between news event behaviors are converted into transition probabilities; based on the transition probabilities, the news event behavior sequence transition network is determined; where c(v j |v i ) is the news event behavior v i and news event behavior j The transition probability between the two, count is the co-occurrence function between the news event behaviors, count(v i ,v j ) is the news event behavior v i and news event behavior j The number of co-occurrences of k count(v i ,v k ) is related to the news event behavior v i The total number of co-occurrences of k related nodes.
[0060] Furthermore, step 103 specifically includes: determining the graph structure data of news event behavior based on the news event behavior sequence transition network, the graph structure data includes news event behavior, and the graph structure data is graph structure data based on word co-occurrence relationship; based on the graph structure data, selecting nodes directly associated with the graph structure data as a set of candidate event behaviors, the nodes are nodes of the news event behavior sequence transition network; and determining the news event behavior data set based on the news event and the candidate event behavior set.
[0061] Furthermore, before step 105, the method further includes: determining a sequence of news events according to the development process of the news event behavior.
[0062] Further, step 105 specifically includes: inputting the new news event behavior dataset into the large language model, using the formula Interp, Answer LLM =LLM(Template(S,C)), determine the explanation and answer of the large language model output; where Interp is the explanation of the large language model output, S is the news event sequence, C is the candidate event behavior set, Template is the thinking chain template, LLM is the large language model, Answer LLM The answer output by the large language model.
[0063] Specifically, the prediction results of news event behavior are: Ration text ,E label =T5(Data); where T5 is a small model, Data is a news event behavior dataset in a new data format, Ration text is the explanation of the small model output, E label The answer output by the small model.
[0064] Furthermore, in step 107, the news event behavior dataset in the new data format is used as input, the news event behavior prediction result corresponding to the news event behavior dataset in the new data format is used as output, and a multi-task loss function is used to train the small model to obtain a trained small model.
[0065] Specifically, the formula of the multi-task loss function is:
[0066] loss Interp =θ(T5(x i ),Interp).
[0067] loss Answer =θ(T5(x i ),Answer).
[0068] loss = α * loss Answer +β*loss Interp .
[0069] Among them, loss Answer is the loss function value for predicting news event behavior, loss Interp is the loss function value of the explanation of the small model output, α and β are parameter coefficients, θ is the loss function, and loss is based on loss Answer and loss Interp The loss function value of T5 is a small model, x iIt is a news event behavior dataset in a new data format, Interp is the explanation output by the large language model, and Answer is the candidate answer.
[0070] Example 2
[0071] A computer device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement a news event behavior prediction method based on knowledge distillation of a large language model.
[0072] like Figure 2 As shown, the specific steps of the news event behavior prediction method based on large language model knowledge distillation provided by the present invention to predict news event behavior are as follows:
[0073] Step 201, defining news event behavior.
[0074] In order to formalize the news event behavior, the news event behavior can be defined as S = {s1, s2, s3, ..., s L}, news event S represents the development process of the news event, that is, s1→s2→s3→...→s i →...→s L-1 →s L This process forms a serialization model, or a topological structure in the graph. In addition, as the basis for constituting events, news event behaviors can be defined as s i ={a0,a1,a2,a3,...,a k ,...,a P}, where a k represents a certain information feature in the news event behavior, which is determined by the structural information of the cognitive hypergraph. News event behavior can be defined as s i ={(e1,e2,r),(se),(topic),(intent)}, where e1 and e2 are entities involved in the news event (entities refer to specific people, companies, groups and other things involved in the development of the event), r is the relationship between entities of the news event, se is the seriousness of the news event behavior, topic is the topic of the news event, and intent is the intention of the news event. Event behavior prediction is mainly based on known events S, and from the candidate event behavior set C = {c1,c2,c3,...,c i ,...,c M} selects the most likely subsequent behavior. Each candidate event c i The format is similar to that of the known event sequence s i In addition, for event behavior, if a certain information feature a is missingk , a blank marker (None) is used instead to serve as a placeholder to ensure the integrity of the information.
[0075] Step 202, constructing a news event behavior sequence transfer network.
[0076] The occurrence of news events will form a series of news event behaviors. In order to fully depict the relationship between news event behaviors, a news event behavior sequence transition network can be constructed. In the process of news event behavior prediction, in order to improve the prediction accuracy, it is necessary to construct a candidate event behavior set in step 201. The news event behavior sequence transition network provides candidates for the news event behavior prediction candidate set. It is a graph structure data based on the co-occurrence relationship of words. The construction of the news event behavior sequence transition network provides a good logical support for news event behavior prediction. To this end, in order to depict the transfer relationship between news event behaviors, it is necessary to calculate the news event behaviors and convert the co-occurrence times between news event behaviors into transition probabilities. The transition probability formula is:
[0077]
[0078] Among them, c(v j |v i ) is the news event behavior v i and news event behavior j The transition probability between the two, count is the co-occurrence function between the news event behaviors, count(v i ,v j ) is the news event behavior v i and news event behavior j The number of co-occurrences of k count(v i ,v k ) is related to the news event behavior v i The total number of co-occurrences of k related nodes.
[0079] Step 203, construct a news event behavior dataset.
[0080] On the basis of step 201 and step 202, the construction of the news event behavior data set is completed.
[0081] Specifically, in step 202, a news event behavior sequence transfer network is constructed to form graph structure data. Then, based on the graph structure data, nodes of news event behaviors directly associated with the news event behaviors are selected as news event behavior candidates. The candidate event behavior set C in step 201 is completed. Further, the news event S in step 201, the candidate event behavior set C constructed in step 203, and the candidate answer Answer form a news event behavior data set P.
[0082] Step 204: Construct a news event behavior thinking chain template.
[0083] Although the scale and parameters of large language models are getting larger and larger, they do not perform well in reasoning and lack good reasoning ability. In order to improve the reasoning ability of large language models, we can use thought chains to solve the limitations of large language models in reasoning tasks. Thought chains can further improve the reasoning ability of large language models. The purpose of building thought chains is to guide large language models to generate ideas and processes for solving problems.
[0084] To this end, a thinking chain template for news event behavior analysis is constructed, see Rule 1 for details.
[0085] Rule 1: The following n known events occur in sequence, event 1, event 2, ..., event n. Please select the most likely event from the following m candidate events as the ninth event, and give a reason, with a word count of no less than 20 and no more than 30. Candidate events: candidate event 1, candidate event 2, ..., candidate event m. And the answer format is, for example, "The correct answer is..., and the reason is..."
[0086] The news event behavior data set P constructed in step 203 is reorganized according to rule 1. The new data set P1 includes four items of data: original event data, data based on rule 1, candidate event behavior set, and candidate answer.
[0087] Step 205: The news event behavior dataset interacts with the large language model to obtain explanations and answers.
[0088] Using the data in the rule 1 in the data set P1 generated in step 204, questions are asked to the large language model. This process can be described in a formula. The specific formula is as follows:
[0089] Interp,Answer LLM =LLM(Template(S,C)).
[0090] Among them, S is the news event sequence, C is the candidate event behavior set, Template is the thinking chain template, LLM is the large language model, Interp is the explanation of the large language model output, Answer LLM The answer output by the large language model.
[0091] Step 206, organize the explanations and answers to form a new data format.
[0092] The data set P1 formed in step 204 and the explanation output by the large language model in step 205 are reorganized to form a data set P2. However, since the large language model itself has strong uncertainty, it cannot completely respond in accordance with the response format required in step 204. Usually, the content output by the large language model mixes the answer and the explanation together. Rule 1 in step 204 describes the format of the large language model's response, that is, "the answer method is such as 'the correct answer is..., the reason is...'". However, the response of the large language model is uncertain. In order to further obtain the explanation content, only the "reason is..." part is retained for processing. Therefore, the data content and format need to be reorganized. On the basis of the data set P1 formed in step 204, an "explanation" item is added to form a data set P2.
[0093] Step 207, construct a small model.
[0094] Build a small model to capture data features. This paper uses the T5 model to predict news event behavior, specifically:
[0095] Ration text ,E label =T5(Data).
[0096] Wherein, T5 is a small model, Data is the data set P2 formed in step 206. Rationtext is the explanation reason of the output of the T5 model, and Elabel is the prediction result of the news event behavior.
[0097] Step 208, construct a multi-task loss function and train a small model.
[0098] In order to improve the accuracy of the small model in step 207, the present invention changes the small model training process from a single-task form to a multi-task learning. The explanations and original data in the data set P2 in step 206 are taken as a whole as the input of the small model in step 207. However, this requires the large language model to generate "explanations" before the small model predicts the news event behavior, which is not friendly to the training of the small model. It is necessary to request the resources of the large language model at all times, which limits the use of the large language model.
[0099] To this end, the present invention regards "explanation" as an additional supervision label, that is, in step 207, the small model is allowed to output the answer Elabel and the explanation Rationtext. The small model T5(x i ) re-establishes the mapping between (Answer, Interp). Let the small model not only predict candidate events, but also generate small model "explanations". The loss function needs to be redesigned, as shown in the following formula:
[0100] loss Interp=θ(T5(x i ),Interp).
[0101] loss Aswer =θ(T5(x i ),Answer).
[0102] loss = α * loss Answer +β*loss Interp .
[0103] Among them, loss Answer is the loss function value for predicting news event behavior, loss Interp is the loss function value of the explanation of the small model output, α and β are parameter coefficients. θ is the loss function, and loss is based on loss Answer and loss Interp The loss function value of T5 refers to the small model, x i is the data set formed in step 207, Interp refers to the explanation of the output of the large language model, and Answer is the candidate answer in the data set P in step 203.
[0104] The following uses the publicly available data sets and the proprietary data sets as implementation cases of the present invention, and conducts an application analysis of the news event behavior prediction method based on large language model knowledge distillation proposed in the present invention.
[0105] The present invention uses two data sets to verify the effect of the proposed large language model. Among them, the English data set comes from the New York Times. It uses the C\&C tool to mark the parts of speech and analyze the dependencies between words. In addition, OpenNLP is used to perform syntactic analysis and coreference resolution on the text information. Each event sequence contains 8 known event behaviors, 5 candidate event prediction behaviors, and the correct sequence number of the most candidate event behavior. The Chinese data set comes from different financial websites, and a certain amount of data sets are obtained using crawler technology. The statistics of the Chinese data set and the English data set are shown in Table 1.
[0106] Table 1 Statistics of Chinese and English datasets
[0107] Dataset Training set Validation set Test Set Chinese dataset 2633 274 133 English dataset 7900 900 1200
[0108] In addition, due to the resource limitations of the large language model, the present invention has trimmed the size of the original English data set (NYT). In addition, in order to ensure the effectiveness and feasibility of the experiment, this paper uses the large language model to explain the data. That is, the present invention assumes that the reasons given by the large language model are correct. The large language model can answer most questions as expected and give the correct results, but the large language model itself has great uncertainty and will produce errors. Therefore, after obtaining the explanation, this paper processes it again, unifies the "explanation" format, and ensures the theoretical rationality of the data.
[0109] The accuracy rate was used to evaluate the effects of various models. Random model, PairLong Short-Term Memory (PairLSTM) model based on long short-term memory network, Subequivariant Graph Neural Networks (SGNN) model, pre-trained natural language processing (Bidirectional Encoder Representation from Transformers, BERT) model and fusion graph neural network and pre-trained natural language processing (GraphBERT) model were used as benchmarks to compare the effects of the small model of the present invention, i.e., the model based on T5 small parameters (T5-small) and the model based on T5 basic parameters (T5-base). The specific comparison results are shown in Table 2.
[0110] Table 2 Comparison of the effects of different models
[0111]
[0112]
[0113] From the comparison of the effects of different models, it can be found that the small model of the present invention is significantly better than other models for the Chinese data set. It proves that the strategy based on knowledge distillation of a large language model can better handle the news event behavior prediction task. At the same time, for the Chinese data set, which is a small sample data set, the experimental results also prove that the small model of the present invention can efficiently solve the problem of news event behavior prediction for a small sample data set.
[0114] For the English dataset, this paper reduced the data size due to the limitation of large language computing resources. The experimental results showed significant differences compared with the experimental results of the Chinese dataset. This is mainly because the original NTY dataset is large in number, which reduces the training data and the degree of correlation between data, which undoubtedly increases the difficulty of predicting news event behavior. As can be seen from Table 2, the small model of the present invention is still better than other models, which further verifies the small model's ability to predict news event behavior for small-scale data.
[0115] 3) In addition, due to the influence of computing resources, this paper adopts a model based on T5 small parameters and a model based on T5 basic parameters. By comparing the experimental results of the two models, it can be found that as the T5 model is expanded, the ability to learn large languages will be enhanced, and the accuracy of news event behavior prediction will be improved. At the same time, it also further verifies that the small model of the present invention learns the logical reasoning ability of the large language model through the knowledge distillation method.
[0116] In order to further verify the accuracy of the prediction of the present invention, the information differences under different models are compared. Case studies were conducted from four English data sets and three Chinese data sets. Due to space limitations, only relevant events and candidate events are displayed. For English data, the knowledge distillation model based on the large language model can effectively predict possible event behaviors. For Chinese data sets, BERT, T5-small, and T5-base can discover the subject of things happening, avoid other inappropriate options, and the accuracy of the Chinese data set is better than that of the English data set, and the T5 model performs well.
[0117] In terms of data, the present invention first takes the knowledge of cognitive hypergraph construction as a premise, maps the hierarchical hypergraph knowledge into the event behavior definition, and standardizes the definition of event sequence and news event behavior, and proposes to complete the construction of the data set based on the event behavior sequence transfer network. In terms of the model, it is proposed to complete the acquisition of reasoning knowledge of the large language model based on the thinking chain, realize a new understanding of the data, and obtain the reasoning knowledge of the large language model for the news event behavior sequence. Further, it is proposed to solve the problem of news event behavior prediction based on knowledge distillation. It is guided by the reasoning logic of the large language model, and uses a small model to realize the learning of the reasoning ability of the large language model, turning the original single task learning into multi-task learning, improving the accuracy of news event behavior prediction, and realizing a new exploration of news event behavior prediction methods. In addition, by constructing a multi-task loss function, the ability of the small model to handle multi-task learning is enhanced. The experimental results also verify the theoretical feasibility of the news event behavior prediction method based on the knowledge distillation of the large language model, and the small model can have a certain reasoning ability of the large language model.
[0118] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0119] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of the present invention. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A news event behavior prediction method based on large language model knowledge distillation, characterized in that: include: Determine news event behavior based on the information elements of the news event; According to the news event behavior, determining a news event behavior sequence transfer network; Determine a news event behavior data set according to the news event behavior sequence transfer network; the news event behavior data set includes the news event, a candidate event behavior set and a candidate answer; Based on the thought chain template, and according to the news event behavior data set, a new news event behavior data set is determined; Inputting the news events and candidate event behavior sets in the new news event behavior data set into the large language model, and determining the explanation and answer output by the large language model; Determine a news event behavior dataset in a new data format according to the new news event behavior dataset and the explanation and answer output by the large language model; The information elements of the news event to be tested are input into the trained small model, and the news event behavior prediction result of the news event to be tested is output; the trained small model is trained by taking the news event behavior data set in the new data format as input and the news event behavior prediction result corresponding to the news event behavior data set in the new data format as output; the news event behavior prediction result includes the explanation and answer output by the trained small model; the parameters of the small model are less than the parameters of the large language model.
2. The news event behavior prediction method based on large language model knowledge distillation according to claim 1 is characterized in that: According to the information elements of the news event, determine the news event behavior, including: According to the information elements of the news event, using formula s i ={(e1,e2,r),(se),(topic),(intent)}, determine the news event behavior; Among them, s i is the ith news event behavior, i = 1, 2, ..., L, L is the total number of news event behaviors, e1 and e2 are the entities of the news event, r is the relationship between the entities of the news event, se is the news event behavior element, topic is the topic of the news event, and intent is the intention of the news event.
3. The news event behavior prediction method based on large language model knowledge distillation according to claim 1 is characterized in that: According to the news event behavior, a news event behavior sequence transfer network is determined, which specifically includes: Using the formula Convert the co-occurrence times between the news event behaviors into transition probabilities; According to the transition probability, determining a news event behavior sequence transition network; Among them, c(v j |v i ) is the news event behavior v i and news event behavior j The transition probability between the two, count is the co-occurrence function between the news event behaviors, count(v i ,v j ) is the news event behavior v i and news event behavior j The number of co-occurrences of k count(v i ,v k ) is related to the news event behavior v i The total number of co-occurrences of k related nodes.
4. The news event behavior prediction method based on large language model knowledge distillation according to claim 1 is characterized in that: According to the news event behavior sequence transfer network, a news event behavior data set is determined, which specifically includes: According to the news event behavior sequence transition network, determine the graph structure data of the news event behavior; the graph structure data includes the news event behavior; the graph structure data is the graph structure data based on the co-occurrence relationship of words; Based on the graph structure data, selecting nodes of the news event behavior sequence transition network directly associated with the graph structure data as a candidate event behavior set; A news event behavior data set is determined based on the news event and the candidate event behavior set.
5. The news event behavior prediction method based on large language model knowledge distillation according to claim 4 is characterized in that: Inputting the news events and candidate event behavior sets in the new news event behavior data set into the large language model, and determining the explanation and answer output by the large language model, the method also includes: According to the development process of the news event behavior, the sequence of news events is determined.
6. The news event behavior prediction method based on large language model knowledge distillation according to claim 5 is characterized in that: Inputting the news events and candidate event behavior sets in the new news event behavior data set into the large language model, and determining the explanation and answer output by the large language model, specifically including: The new news event behavior dataset is input into the large language model, and the formula Interp, Answer LLM =LLM(Template(S, C)), determine the explanation and answer of the large language model output; Among them, Interp is the explanation output by the large language model, S is the sequence of news events, C is the set of candidate event behaviors, Template is the thinking chain template, LLM is the large language model, and Answer LLM The answer output by the large language model.
7. The news event behavior prediction method based on large language model knowledge distillation according to claim 1 is characterized in that: The prediction results of news event behavior are: Ration text ,E label =T5(Data); Among them, T5 is a small model, Data is a news event behavior dataset in a new data format, Ration text is the explanation of the small model output, E label The answer output by the small model.
8. The news event behavior prediction method based on large language model knowledge distillation according to claim 1 is characterized in that: The trained small model is obtained by taking the news event behavior data set in the new data format as input and the news event behavior prediction result corresponding to the news event behavior data set in the new data format as output, and specifically includes: Taking the news event behavior dataset in the new data format as input and the news event behavior prediction result corresponding to the news event behavior dataset in the new data format as output, a multi-task loss function is used to train the small model to obtain a trained small model.
9. The news event behavior prediction method based on large language model knowledge distillation according to claim 8 is characterized in that: The formula of the multi-task loss function is: loss Interp =θ(T5(x i ),Interp); loss Answer =θ(T5(x i ),Answer); loss=α*loss Answer +β*loss Interp ; Among them, loss Answer is the loss function value for predicting news event behavior, loss Interp is the loss function value of the explanation of the small model output, α and β are parameter coefficients, θ is the loss function, and loss is based on loss Answer and loss Interp The loss function value of T5 is a small model, x i It is a news event behavior dataset in a new data format, Interp is the explanation output by the large language model, and Answer is the candidate answer.
10. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the news event behavior prediction method based on large language model knowledge distillation as described in any one of claims 1-9.
Citation Information
Cited By
Multi-view news creation method and system based on media viewpoints
CN118898238A
Secondary research and judgment method, secondary research and judgment device and computer storage medium
CN119296013A
False news detection method and system based on big and small model collaboration
CN120822108A
