Supervision model prediction result error correction method and device, equipment, storage medium and product

By generating a rule base and using a large language model to correct the prediction results of the supervision model, the traditional supervision model lacks flexibility and low prediction accuracy in event extraction tasks are solved, and more efficient event extraction tasks are achieved.

CN119005165APending Publication Date: 2024-11-22NAT UNIV OF DEFENSE TECH
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202410806263.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-21
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

The traditional supervision model lacks flexibility in event extraction tasks and cannot adjust the prediction results based on user feedback, resulting in low prediction accuracy.

Method used

By obtaining the rule base and trigger word dictionary, using the prediction results and label information of the supervision model to generate feedback information, combining the large language model to correct the prediction results of the supervision model, generate a more accurate rule base, and then adjust the prediction results.

Benefits of technology

It improves the accuracy of the prediction results of the event extraction task, enhances the flexibility of the supervision model, and can adjust the prediction results based on user feedback, improving task performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119005165A_ABST
    Figure CN119005165A_ABST
Patent Text Reader

Abstract

The invention discloses a supervision model prediction result error correction method and device, equipment, a storage medium and a product. The method comprises the steps of obtaining a rule base and a trigger word dictionary; wherein the rule base comprises rules of different event types, and the rules are used for generating feedback information; predicting each sample in the test set by using a supervision model to obtain a first prediction result; triggering a word dictionary to select a proper rule from the rule base according to the samples in the test set and the first prediction result of the samples; and inputting the samples in the test set, the first prediction result of the samples and the selected rule into a large language model to obtain a final prediction result. According to the method, the excellent prediction performance of the supervision model and the capability of instruction learning and flexible feedback information receiving of the large language model can be better exerted, and the precision of a prediction result is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and specifically to a method, device, equipment, storage medium and product for correcting errors in prediction results of a supervised model based on a large language model. Background Art

[0002] Events are the basic units of human activities and interactions, and contain rich information that is crucial to downstream applications. They are generally divided into two subtasks: event detection (such as trigger word recognition and trigger word classification) and argument extraction (such as argument recognition and argument role classification). The event detection task refers to extracting event trigger words and corresponding event types from unstructured text, and argument extraction refers to extracting event arguments and their corresponding roles.

[0003] However, it is still challenging to develop a highly practical and flexible event extraction system. Currently, the more mature implementation method is to use supervised models to complete the extraction task, which can be divided into four categories:

[0004] (1) Classification methods, such as DMCNN (Reference: ChenY, Xu L, Liu K, et al. Eventextraction via dynamic multi-pooling convolutional neural networks [C] / / Proceedings of the 53rdAnnual Meeting of theAssociation for ComputationalLinguistics and the 7th International Joint Conference onNatural LanguageProcessing(Volume 1:Long Papers).2015:167-176.), DMBERT (Reference: Wang X, Han ShortPapers).2019:998-1008.) and CLEVE (Reference: Wang Z, Wang X, Han X, et al.CLEVE:contrastive pre-training for event extraction[J].arXivpreprint arXiv:2105.14485,2021), extracting events and argument candidates by classifying them into appropriate types;

[0005] (2) Sequence labeling methods, such as BiLSTM+CRF (reference: Wang X, Wang Z, Han X, et al. MAVEN: Amassive general domain event detection dataset [J]. arXiv preprint arXiv: 2004.13590, 2020.) and BERT+CRF (reference: Wang X, Wang Z, Han X, et al. MAVEN: Amassive general domain event detection dataset [J]. arXiv preprint arXiv: 2004.13590, 2020.), use BIO format to label sequences to obtain event information;

[0006] (3) Span prediction methods, including EEQA (Reference: Du X, Cardie C. Event extraction by answering (almost) natural questions [J]. arXiv preprint arXiv:2004.13625, 2020.), complete the event extraction task by predicting events and proving the boundaries of spans;

[0007] (4) Conditional generation methods, such as Text2Event (Reference: LuY, Lin H, Xu J, et al. Text2Event: Controllable sequence-to-structure generation for end-to-endevent extraction[J]. arXiv preprint arXiv:2106.09232, 2021.), directly generate event extraction results.

[0008] Even on the most commonly used ACE 2005 dataset, the F1 score (F1 score is defined as the harmonic mean of precision and recall) of the existing state-of-the-art models for event extraction tasks only reaches 57.9%, reference: Lu, Di, et al. "Event extraction as question generation and answering." arXiv preprint arXiv:2307.05567(2023).; it is far from meeting actual needs. One way to overcome this challenge is to explore the use of powerful large language models. For example, by converting the information extraction task into a structured code generation task, combined with a retrieval enhancement strategy to guide the large language model to complete the extraction (reference: Guo, Yucan, et al. "Retrieval-augmented code generation for universal information extraction." arXiv preprint arXiv:2311.02962(2023).). Although the large language model has the ability to learn from instructions and learn from feedback, its performance in event extraction tasks is far inferior to that of the supervised model, and the current F1 score is only 21.3%; for example, by combining the information of the annotation guide to guide the large language model to better understand the definition of the event pattern, the effect of the event extraction task can be improved (reference: Pang C, Cao Y, Ding Q, et al. Guideline learning for in-context information extraction[J]. arXiv preprint arXiv:2310.05066,2023.) and so on.

[0009] The above methods have brought promising improvements in the event extraction task, but they still lag significantly behind traditional supervised models. Although supervised models have better performance, they mainly complete event extraction tasks through fine-tuning, lack flexibility, cannot adjust prediction results based on user feedback, and still have significant room for improvement in performance. Existing studies have shown that large language models can effectively adjust their responses based on feedback information, which is beneficial for improving task performance, such as by providing simple "correct", "wrong", and "partially correct" feedback information to improve question-answering systems (reference: Gao G, Chen HT, ArtziY, et al. Continuously Improving Extractive QA via Human Feedback [J]. arXiv preprint arXiv: 2305.12473, 2023.); learning large language models through instructions can better complete related tasks in the field of natural language processing (reference: Yin W, Ye Q, Liu P, et al. LLM-driven Instruction Following: Progresses and Concerns [C] / / Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing: Tutorial Abstracts. 2023: 19-25.).

[0010] Due to the complexity of the event extraction task itself, there is still no relevant research in this area.

[0011] The content of this background technology description is only for facilitating understanding of the relevant technology in this field and is not regarded as an admission of the prior art. Summary of the invention

[0012] Based on the above shortcomings, the present invention provides a supervised model prediction result correction method, device, equipment, storage medium and product to solve the problem that traditional supervised models lack flexibility and cannot adjust prediction results according to user feedback, resulting in low prediction accuracy.

[0013] In a first aspect, the present invention provides a method for correcting errors in prediction results of a supervised model, comprising:

[0014] Acquire a rule base and a trigger word dictionary; wherein the rule base includes rules for different event types, and the rules are used to generate feedback information;

[0015] Use the supervised model to predict each sample in the test set and obtain the first prediction result;

[0016] Selecting appropriate rules from the rule base according to the samples in the test set and the first prediction results thereof and the trigger word dictionary;

[0017] The samples in the test set, their first prediction results, and the selected rules are input into the large language model to obtain the final prediction results.

[0018] Furthermore, the process of generating the rule base specifically includes:

[0019] Using the supervised model to predict each sample in the sample data set, obtaining a second prediction result and a third prediction result; wherein the sample data set includes a training set and a validation set, the second prediction result is the prediction result of the sample in the training set, and the third prediction result is the prediction result of the sample in the validation set;

[0020] According to the second prediction result and the label information corresponding to the second prediction result, selecting correct prediction results and incorrect prediction results of different event types from the second prediction result;

[0021] Design task descriptions, input the correct prediction results and incorrect prediction results of each event type and the task descriptions into the large language model to obtain rules for generating feedback information;

[0022] A rule base is generated according to the rules and the third prediction result.

[0023] Furthermore, the correct prediction results and incorrect prediction results of each event type and the task description are input into the large language model to obtain rules for generating feedback information, specifically including:

[0024] Input the correct prediction results and incorrect prediction results of each event type and the task description into the large language model to obtain the initial rules;

[0025] Obtaining error information in the initial rule; wherein the error information in the initial rule is obtained by the user analyzing the initial rule according to the annotation guide information of the training set;

[0026] Inputting the error information into a large language model, and adjusting the initial rules using the error information to obtain adjusted rules;

[0027] The steps of obtaining error information and adjusting rules are repeated until the obtained rules are consistent with the annotation guide information.

[0028] Further, generating a rule base according to the rule and the third prediction result specifically includes:

[0029] Inputting the rule and the third prediction result into the large language model, and correcting the third prediction result using the rule to obtain a corrected third prediction result;

[0030] Calculate a first F1 score based on all the third prediction results after correction, and calculate a second F1 score based on all the third prediction results before correction;

[0031] If the difference between the first F1 score and the second F1 score is greater than zero, the corresponding rule is added to the rule base, thereby generating a rule base.

[0032] Further, the third prediction result is corrected by using the rule, specifically including:

[0033] Obtaining feedback information according to the rule and the third prediction result;

[0034] It is determined whether the third prediction result is correct according to the feedback information. If so, the third prediction result does not need to be corrected; if not, the third prediction result is corrected according to the feedback information.

[0035] Furthermore, selecting a suitable rule from the rule base according to the sample in the test set and its first prediction result and the trigger word dictionary specifically includes:

[0036] Selecting m1 rules from the rule base according to the event type of the first prediction result;

[0037] Perform keyword matching on the samples in the test set and the trigger word dictionary to obtain candidate trigger words for the samples in the test set;

[0038] m2 rules are selected from the rule base according to the event type corresponding to the candidate trigger word.

[0039] Furthermore, the samples in the test set and the first prediction results thereof and the selected rules are input into the large language model to obtain the final prediction results, which specifically includes:

[0040] Inputting the sample in the test set and the first prediction result thereof and the selected first rule into the large language model to obtain a corrected prediction result;

[0041] Inputting the samples in the test set and the prediction results of the first correction thereof and the selected second rule into the large language model to obtain the prediction results of the second correction;

[0042] Similarly, the samples in the test set and their m-1 corrected prediction results, as well as the selected m-th rule, are input into the large language model to obtain m corrected prediction results; where m represents the number of selected rules.

[0043] In a second aspect, the present invention further provides a supervised model prediction result error correction device, comprising:

[0044] An acquisition module, used to acquire a rule base and a trigger word dictionary; wherein the rule base includes rules of different event types, and the rules are used to generate feedback information;

[0045] A first prediction module, used to predict each sample in the test set using a supervised model to obtain a first prediction result;

[0046] A first selection module, configured to select a suitable rule from the rule base according to the sample in the test set and its first prediction result and the trigger word dictionary;

[0047] The correction module is used to input the samples in the test set and their first prediction results and the selected rules into the large language model to obtain the final prediction results.

[0048] In a third aspect, the present invention also provides a terminal device comprising a memory, a processor, and a computer program / instructions stored on the memory, wherein the processor executes the computer program / instructions to implement the supervised model prediction result correction method as described in the first aspect.

[0049] In a fourth aspect, the present invention further provides a computer-readable storage medium having a computer program / instruction stored thereon, which, when executed by a processor, implements the supervised model prediction result error correction method as described in the first aspect.

[0050] In a fifth aspect, the present invention further provides a computer program product, comprising a computer program / instruction, which, when executed by a processor, implements the supervised model prediction result error correction method as described in the first aspect.

[0051] The method for correcting the prediction results of a supervised model provided by the present invention uses the prediction results of the supervised model and its label information to obtain rules for generating feedback information, identifies errors in the prediction results of the supervised model based on the rules, and automatically generates error feedback information, and then uses a large language model to correct the prediction results of the supervised model based on the generated error feedback information, thereby better utilizing the excellent prediction performance of the supervised model and the ability of the large language model to learn instructions and flexibly accept feedback information, thereby improving the accuracy of the prediction results.

[0052] When generating a rule base, the present invention allows the user to analyze the initial rules by combining the annotation guide information of the data set, adjust the initial rules using the analysis results and the large language model, and guide the large language model to iteratively optimize the rules to make the obtained rules more accurate, thereby being able to adjust the prediction results based on user feedback.

[0053] Other optional features and technical effects of the embodiments of the present invention are partially described below, and partially can be understood by reading this document. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. The elements shown are not limited to the proportions shown in the accompanying drawings. The same or similar reference numerals in the accompanying drawings represent the same or similar elements, wherein:

[0055] Figure 1 An example flow chart of a method for correcting errors in supervised model prediction results according to an embodiment of the present invention is shown;

[0056] Figure 2 An example diagram of rule generation according to an embodiment of the present invention is shown;

[0057] Figure 3 An example diagram of an error correction process according to an embodiment of the present invention is shown;

[0058] Figure 4 An exemplary structural diagram of an electronic device capable of implementing the method according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0059] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with specific implementation methods and drawings. Here, the exemplary implementation methods of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.

[0060] As used herein, the term "including" and its variations mean open inclusion, i.e., "including but not limited to". Unless otherwise stated, the term "or" means "and / or". The term "based on" means "based at least in part on". The terms "an example embodiment" and "an embodiment" mean "at least one example embodiment". The term "another embodiment" means "at least one additional embodiment". The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may also be included below.

[0061] The present invention provides a method for correcting the prediction results of a supervised model, which uses the ability of a large language model (LLM) to correct errors according to error feedback information to correct the prediction results output by the supervised model and improve the accuracy of the prediction results.

[0062] The ability of the large language model to correct errors based on error feedback information can be verified by designing feedback information of different granularities. The specific verification process includes:

[0063] Step A1: Input the sentence sample into the existing supervised model to obtain the prediction result output by the supervised model; for the event detection task, the prediction result is the trigger word; for the event argument extraction task, the prediction result is the trigger word and the event argument.

[0064] Step A2: Construct feedback information of different granularities based on the comparison results of the prediction results output by the supervision model in step A1 and the label information of the corresponding sentence samples.

[0065] In the embodiment of the present invention, feedback information of four granularities is constructed, specifically including simple "incorrect" label information, error type and its corresponding quantity information, error element information, and specific error information.

[0066] Sample sentence: "His parents married in 1998 and gave birth to him a year later, but his grandfather died the same year."

[0067] The prediction results output by the supervised model are: [["married", "Life.Marry"]; label information:

[0068] [["married", "Life.Marry"],["birth", "Life.Be-Born"],["died", "Life.Die"]]. Compare the prediction results with the label information to get the error feedback information. In order to fully exploit the error correction capability of LLM based on error feedback, 4 different granularity levels are designed:

[0069] L1: The feedback information is simply the “incorrect” label.

[0070] The L1 feedback level indicates that the prediction is incorrect, but does not mention how it is incorrect. The LLM knows that the prediction needs to be corrected, but lacks detailed guidance for correction. Correction relies heavily on the LLM's semantic understanding ability.

[0071] L2: The feedback information includes the error type and the number of error types.

[0072] For example, "Prediction Missing": 2, means that two events were missed in the prediction result (i.e. the number of missing error types is 2). In this case, the "Life.Be-Born" event triggered by "birth" and the "Life.Die" event triggered by "died" were missed.

[0073] L3: Feedback information includes providing error element information.

[0074] Element errors indicate incorrect trigger or event information, for example, [["birth","prediction missed"], ["died","prediction missed"]].

[0075] L4: The feedback information includes specific error information.

[0076] The L4 feedback level provides detailed errors in the prediction results, e.g., [[["birth","Life.Be-Born"],"Prediction missed"], [["dead","Life.Die"],"Prediction missed"]].

[0077] Based on the L4 feedback information, the word "birth" should trigger the "Life.Be-Born" event, but it is missed; the word "died" should trigger the "Life.Die" event, but it is also missed.

[0078] Step A3: Input the feedback information of different granularities constructed in step A2 into the large language model to obtain the prediction result output by the large language model.

[0079] Step A4: Evaluate the error correction capability of the large language model according to the prediction result output by the large language model obtained in step A3. Correct the prediction results: add [["birth", "Life.Be-Born"]] to extract birth events; add [["died", "Life.Die"]] to extract death events. This correction process highlights the importance of detailed error feedback information in enhancing event extraction tasks, ensuring more accurate and comprehensive correction of event extraction information from text.

[0080] Through verification, it is found that only by providing feedback information at the L4 granularity can the large language model have better error correction capabilities. Therefore, before using the large language model to correct the prediction results output by the supervised model, it is necessary to first generate rules that can generate feedback information at the L4 granularity, and then use the large language model as a corrector to correct the errors in the prediction results output by the supervised model, thereby improving the accuracy of the supervised model's prediction results.

[0081] Taking the event extraction task as an example, the present invention provides a method for correcting the prediction results of a supervised model. Figure 1 As shown, the method includes two parts, one part is to obtain a rule base for generating feedback information, and the other part is to generate feedback information using the rule base for generating feedback information, and use the feedback information to correct the prediction results output by the supervision model. The error correction method includes the following steps:

[0082] Step S1: Obtain a sample data set and divide the sample data set into a training set and a validation set.

[0083] The prediction task in this embodiment is an event extraction task, and texts can be selected from the ACE 2005 data set to construct a sample data set, so each sample in the sample data set is a text.

[0084] Step S2: Use the existing supervised model to predict the samples in the training set to obtain a second prediction result; use the existing supervised model to predict the samples in the validation set to obtain a third prediction result.

[0085] Using a supervised model to predict text samples and obtain prediction results is an existing technology. Each sample corresponds to a prediction result. In order to distinguish the prediction results of samples in different data sets, each sample in the training set corresponds to a second prediction result, and each sample in the validation set corresponds to a third prediction result.

[0086] Step S3: According to the second prediction result and the label information corresponding to the second prediction result, correct prediction results and incorrect prediction results of different event types are selected from the second prediction result.

[0087] The second prediction results corresponding to all samples in the training set correspond to multiple event types. For each event type, multiple correct prediction results and multiple wrong prediction results are selected from the second prediction results belonging to the event type. For a certain event type B, 4 correct prediction results and 4 wrong prediction results are selected from the second prediction results of samples belonging to event type B, that is, 8 second prediction results of event type B are obtained.

[0088] Step S4: Design task description.

[0089] The task is to analyze the causes of errors based on the correct prediction results and the wrong prediction results of each event type in step S3, and summarize the rules for generating feedback information. Each event type corresponds to at least one rule for generating feedback information.

[0090] Therefore, the task description is: analyze the causes of errors based on the correct prediction results and incorrect prediction results of each event type, and summarize the rules for generating feedback information for this event type.

[0091] Step S5: Input the correct prediction results, incorrect prediction results and task descriptions of each event type into the large language model to obtain the rules for generating feedback information of the event type, so as to automatically generate feedback information according to these rules for identifying and correcting the prediction errors of the supervised model (such as SLMs, statistical language model).

[0092] In a specific embodiment of the present invention, step S5 specifically includes:

[0093] Step S5.1: Input the correct prediction results and incorrect prediction results of each event type and the task description into the large language model to obtain the initial rules;

[0094] Step S5.2: obtaining error information in the initial rule; wherein the error information in the initial rule is obtained by the user analyzing the initial rule according to the annotation guide information of the training set, that is, the user points out the error information in the initial rule according to the annotation guide information of the training set, and then inputs the error information into the large language model to adjust the initial rule;

[0095] Step S5.3: input the error information obtained in step S5.2 into the large language model, and use the error information to adjust the initial rules to obtain adjusted rules;

[0096] Step S5.4: Analyze whether the adjusted rule is consistent with the annotation guide information or whether there is any error information; if not, or there is error information, repeat steps S5.2 and S5.3; if it is consistent or there is no error information, obtain the final rule.

[0097] Rules are refined through human feedback combined with annotation guidance information.

[0098] Step S6: Generate a rule base according to the rules in step S5 and the third prediction result (ie, the prediction result of the samples in the validation set).

[0099] According to the third prediction result, a valid rule is selected from the rules in step S5, thereby generating a rule base for generating feedback information, and each event type corresponds to at least one rule. In a specific embodiment of the present invention, step S6 specifically includes:

[0100] Step S6.1: input the rule obtained in step S5 and each third prediction result into the large language model, and use the rule to correct each third prediction result to obtain a corrected third prediction result;

[0101] Step S6.2: Calculate a first F1 score according to all the third prediction results after correction, and calculate a second F1 score according to all the third prediction results before correction (i.e., the third prediction results obtained in step S2);

[0102] Step S6.3: Calculate the difference between the first F1 score and the second F1 score. If the difference is greater than zero, add the corresponding rule to the rule base, thereby generating a rule base containing rules for different event types; if the difference is less than or equal to zero, discard the corresponding rule.

[0103] In step S6.1, the third prediction result is corrected using rules, specifically including:

[0104] Obtain feedback information according to the rules and the third prediction result; determine whether the third prediction result is correct according to the feedback information, and if so, the third prediction result does not need to be corrected; if not, correct the third prediction result according to the feedback information to obtain a corrected third prediction result.

[0105] Since the rules can generate feedback information, error feedback information of the third prediction result can be generated according to the rules, so as to determine whether the third prediction result is correct and whether it needs to be corrected.

[0106] Figure 2 The rule generation process of the ED task (i.e., event detection task) for the "Contact.Meet" event type is shown. Through error analysis, it was found that in the ED task, the prediction error rate of "Contact.Meet" was high. Eight second prediction results belonging to the "Contact.Meet" event type were selected from the second prediction results of the training set, including correct prediction results and incorrect prediction results. Combined with the definition of "Contact.Meet" in the annotation guide, the user instructs the large language model GPT-4 to analyze the cause of the error and summarize some rules to generate feedback information. In this process, the user will give feedback to the large language model GPT-4, point out the inappropriateness and inaccuracy of the obtained rules, and put forward the user's actual needs to iteratively refine the rules. In the actual application process, it was found that the large language model GPT-4 can well obtain the rules and corresponding prompts for generating feedback information, requiring less human intervention and correction, reducing the burden on humans.

[0107] Steps S1 to S6 complete the first part of the error correction method of the present invention, that is, obtaining a rule base for generating feedback information, and subsequent steps S7 to S10 implement the second part, that is, using the rules of the rule base to guide the large language model to verify whether the prediction results output by the supervision model are correct, and generate feedback information of the erroneous prediction results, and finally guide the large language model to correct the erroneous prediction results output by the supervision model based on these feedback information.

[0108] Step S7: Use the supervised model to predict each sample in the test set to obtain a first prediction result.

[0109] The samples in the training set and validation set have label information, while the samples in the test set have no label information.

[0110] Step S8: Analyze each sample in the training set and construct a trigger word dictionary for different event types.

[0111] Step S9: Select appropriate rules from the rule base according to the samples in the test set and their first prediction results and the trigger word dictionary.

[0112] In order to better identify incorrect prediction results and generate more accurate feedback information, it is necessary to select the most appropriate rules from the rule base. By analyzing the training set data, a trigger word dictionary corresponding to the event type is constructed as keyword information. With the help of the excellent performance of the large language model in keyword matching, the candidate trigger words of the sample can be obtained, and then the event type associated with the candidate trigger words and the rules corresponding to the event type in the rule base are retrieved from the rule base. Therefore, in a specific embodiment of the present invention, appropriate rules are selected from the rule base based on the samples in the test set and their first prediction results and the trigger word dictionary, specifically including:

[0113] Step S9.1: Select m1 rules from the rule base according to the event type of the first prediction result;

[0114] Step S9.2: Perform keyword matching on each sample in the test set and the trigger word dictionary to obtain a candidate trigger word for each sample in the test set;

[0115] Step S9.3: Select m2 rules from the rule base according to the event type corresponding to the candidate trigger word of each sample.

[0116] Therefore, for each sample, the number of selected rules is m = m1 + m2. The combination of event type and candidate trigger words is used to select rules from the rule base, which ensures the integrity of the rules corresponding to each sample and avoids missing rules that lead to prediction result verification errors.

[0117] Step S10: Input the samples in the test set, their first prediction results, and the selected rules into the large language model to obtain the final prediction results.

[0118] In an embodiment of the present invention, the samples in the test set and their first prediction results and the selected rules are input into the large language model to obtain the final prediction results, which specifically includes:

[0119] Step S10.1: Input the sample in the test set and its first prediction result, and the first selected rule into the large language model to obtain a corrected prediction result;

[0120] Step S10.2: Input the samples in the test set and their first-corrected prediction results and the selected second rule into the large language model to obtain the second-corrected prediction results;

[0121] Step S10.3: Similarly, the samples in the test set and their m-1 corrected prediction results, and the selected mth rule are input into the large language model to obtain m corrected prediction results.

[0122] Based on the selected rules, the prediction results of each sample are evaluated in combination with semantic information, and feedback information of L4 granularity is generated through the large language model. If the corresponding rules are not met, the prediction result is verified as incorrect and error feedback information is generated; then the wrong prediction result is corrected based on the error feedback information. The correct prediction result is retained without correction, and finally the prediction result corrected by the large language model can be obtained, which improves the prediction accuracy.

[0123] Figure 3 It is shown that the candidate trigger words and their event types of the sentence are obtained based on the input sentence and the trigger word dictionary obtained from the training set analysis. The results are ["founded", "Business.Start_Position"], ["became", "Personnel.Start_Position"], ["talks", "Contact.Meet"]]. The rules corresponding to the event types of the candidate trigger words and the event types of the predicted results are selected from the rule base. If the selection of the rules fails, the default prediction result is correct. The selected rules are used to verify whether the prediction results are correct, and corresponding feedback information is generated. In this example, "founded" and its corresponding event type "Business.Start_Start" meet the rules for representing the creation of a new company, and the prediction is correct. "became" and its corresponding event type "Personnel.Start_Position" meet the rules and represent the start of a person's work, but it is not in the predicted results, indicating that the omission in the predicted results should be added. "talks" does not meet the relevant rules because it is unclear whether the conversation is face-to-face, but the relevant information is in the predicted results, so it should be removed. Finally, the predicted results are corrected based on the feedback information. The corrected prediction result of the large language model (i.e. the final prediction result) is [["founded", "Business.Start_Position"], ["became", "Personnel.Start_Position"]].

[0124] An embodiment of the present invention also provides a supervised model prediction result error correction device, including: an acquisition module, a first prediction module, a first selection module and a correction module.

[0125] The acquisition module is used to acquire a rule base and a trigger word dictionary; wherein the rule base includes rules of different event types, and the rules are used to generate feedback information.

[0126] The first prediction module is used to predict each sample in the test set by using the supervised model to obtain a first prediction result.

[0127] The first selection module (ie, rule retriever) is used to select appropriate rules from the rule base according to the samples in the test set and their first prediction results and the trigger word dictionary.

[0128] The correction module (including a verifier and a corrector) is used to input the samples in the test set and their first prediction results and the selected rules into the large language model to obtain the final prediction results.

[0129] The acquisition module specifically includes a second prediction module, a second selection module, a rule generation module, a rule base generation module and a construction module.

[0130] The second prediction module is used to use the existing supervised model to predict each sample in the sample data set to obtain a second prediction result and a third prediction result; wherein the sample data set includes a training set and a validation set, the second prediction result is the prediction result obtained by the supervised model predicting the samples in the training set, and the third prediction result is the prediction result obtained by the supervised model predicting the samples in the validation set.

[0131] The second selection module is used to select correct prediction results and incorrect prediction results of different event types from the second prediction results according to the second prediction results and label information corresponding to the second prediction results.

[0132] The rule generation module is used to input the correct prediction results and incorrect prediction results of each event type and the obtained task description into the large language model to obtain rules for generating feedback information.

[0133] The rule base generation module is used to generate a rule base according to the rules and the third prediction result.

[0134] The construction module is used to analyze each sample in the training set and build a trigger word dictionary for different event types.

[0135] In some embodiments, the supervised model prediction result correction device can be combined with the method features of the supervised model prediction result correction method of any embodiment, and vice versa, which will not be repeated here.

[0136] In an embodiment of the present invention, an electronic device is provided, comprising: a memory, a processor, and a computer program / instructions stored in the memory, wherein the processor executes the computer program / instructions to implement the supervised model prediction result error correction method as described above.

[0137] Figure 4A schematic diagram of an electronic device 1000 that can implement a method or implement an embodiment of the present invention is shown, and in some embodiments, more or fewer electronic devices than shown may be included. In some embodiments, it can be implemented using a single or multiple electronic devices. In some embodiments, it can be implemented using cloud or distributed electronic devices.

[0138] like Figure 4 As shown, the electronic device 1000 includes a processor 1001, which can perform various appropriate operations and processes according to the programs and / or data stored in the read-only memory (ROM) 1002 or the programs and / or data loaded from the storage part 1008 to the random access memory (RAM) 1003. Processor 1001 can be a multi-core processor, or it can include multiple processors. In some embodiments, processor 1001 can include a general main processor and one or more special coprocessors, such as a central processing unit (CPU), a graphics processing unit (GPU), a neural network processor (NPU), a digital signal processor (DSP), etc. In RAM 1003, various programs and data required for the operation of electronic device 1000 are also stored. Processor 1001, ROM 1002 and RAM 1003 are connected to each other via bus 1004. Input / output (I / O) interface 1005 is also connected to bus 1004.

[0139] The processor and the memory are used together to execute the program stored in the memory. When the program is executed by the computer, the methods, steps or functions described in the above embodiments can be implemented.

[0140] The following components are connected to the I / O interface 1005: an input section 1006 including a keyboard, a mouse, a touch screen, etc.; an output section 1007 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN card, a modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the I / O interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1010 as needed, so that a computer program read therefrom is installed into the storage section 1008 as needed. Figure 4 Only some components are schematically shown in the figure, which does not mean that the electronic device 1000 only includes Figure 4 Components shown.

[0141] The systems, devices, modules or units described in the above embodiments may be implemented by a computer or its associated components. The computer may be, for example, a mobile terminal, a smart phone, a personal computer, a laptop computer, a vehicle-mounted human-computer interaction device, a personal digital assistant, a media player, a navigation device, a game console, a tablet computer, a wearable device, a smart TV, an Internet of Things system, a smart home, an industrial computer, a server or a combination thereof.

[0142] Although not shown, in an embodiment of the present invention, a computer-readable storage medium is provided, on which a computer program / instruction is stored, and when the computer program / instruction is executed by a processor, the supervised model prediction result error correction method as described above is implemented.

[0143] Storage media in embodiments of the present invention include permanent and non-permanent, removable and non-removable items that can be used to store information by any method or technology. Examples of storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device.

[0144] The methods, programs, systems, devices, etc. of the embodiments of the present invention may be executed or implemented in a single or multiple networked computers, or may be practiced in a distributed computing environment. In the embodiments of this specification, in these distributed computing environments, tasks may be performed by remote processing devices connected via a communication network.

[0145] Although not shown, an embodiment of the present invention further provides a computer program product, including: a computer program / instruction, which, when executed by a processor, implements the supervised model prediction result error correction method as described above.

[0146] Those skilled in the art should understand that the embodiments of the present specification may be provided as methods, systems or computer program products. Therefore, those skilled in the art may imagine that the functional modules / units or controllers and related method steps described in the above embodiments may be implemented in software, hardware or a combination of software / hardware.

[0147] Unless explicitly stated, the actions or steps of the methods, programs, and embodiments of the present invention do not have to be performed in a specific order and can still achieve the desired results. In some implementations, multitasking and parallel processing are also possible or may be advantageous.

[0148] In this article, multiple embodiments of the present invention are described, but for the sake of brevity, the description of each embodiment is not exhaustive, and the same or similar features or parts between the embodiments may be omitted. In this article, "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" are meant to be applicable to at least one embodiment or example according to the present invention, but not all embodiments. The above terms do not necessarily mean to refer to the same embodiment or example. In the absence of contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples.

[0149] The exemplary systems and methods of the present invention have been specifically shown and described with reference to the above embodiments, which are merely examples of the best modes for implementing the present systems and methods. It will be appreciated by those skilled in the art that various changes may be made to the embodiments of the systems and methods described herein when implementing the present systems and / or methods without departing from the spirit and scope of the present invention as defined in the appended claims.

Claims

1. A method for correcting the prediction results of a supervised model, characterized in that: The error correction method comprises: Acquire a rule base and a trigger word dictionary; wherein the rule base includes rules for different event types, and the rules are used to generate feedback information; Use the supervised model to predict each sample in the test set and obtain the first prediction result; Selecting appropriate rules from the rule base according to the samples in the test set and the first prediction results thereof and the trigger word dictionary; The samples in the test set, their first prediction results, and the selected rules are input into the large language model to obtain the final prediction results.

2. The method for correcting the prediction results of the supervised model according to claim 1, characterized in that: The generation process of the rule base specifically includes: Using the supervised model to predict each sample in the sample data set, obtaining a second prediction result and a third prediction result; wherein the sample data set includes a training set and a validation set, the second prediction result is the prediction result of the sample in the training set, and the third prediction result is the prediction result of the sample in the validation set; According to the second prediction result and the label information corresponding to the second prediction result, selecting correct prediction results and incorrect prediction results of different event types from the second prediction result; Design task descriptions, input the correct prediction results and incorrect prediction results of each event type and the task descriptions into the large language model to obtain rules for generating feedback information; A rule base is generated according to the rules and the third prediction result.

3. The method for correcting the prediction results of the supervised model according to claim 2, characterized in that: The correct prediction results and incorrect prediction results of each event type and the task description are input into the large language model to obtain rules for generating feedback information, specifically including: Input the correct prediction results and incorrect prediction results of each event type and the task description into the large language model to obtain the initial rules; Obtaining error information in the initial rule; wherein the error information in the initial rule is obtained by the user analyzing the initial rule according to the annotation guide information of the training set; Inputting the error information into a large language model, and adjusting the initial rules using the error information to obtain adjusted rules; The steps of obtaining error information and adjusting rules are repeated until the obtained rules are consistent with the annotation guide information.

4. The method for correcting the prediction results of the supervised model according to claim 2, characterized in that: Generating a rule base according to the rule and the third prediction result specifically includes: Inputting the rule and the third prediction result into the large language model, and correcting the third prediction result using the rule to obtain a corrected third prediction result; Calculate a first F1 score based on all the third prediction results after correction, and calculate a second F1 score based on all the third prediction results before correction; If the difference between the first F1 score and the second F1 score is greater than zero, the corresponding rule is added to the rule base, thereby generating a rule base.

5. The method for correcting the prediction results of the supervised model according to claim 4, characterized in that: Correcting the third prediction result by using the rule specifically includes: Obtaining feedback information according to the rule and the third prediction result; It is determined whether the third prediction result is correct according to the feedback information. If so, the third prediction result does not need to be corrected; if not, the third prediction result is corrected according to the feedback information.

6. The method for correcting the prediction results of a supervised model according to claim 1, characterized in that: The selecting a suitable rule from the rule base according to the sample in the test set and its first prediction result and the trigger word dictionary specifically includes: Selecting m1 rules from the rule base according to the event type of the first prediction result; Perform keyword matching on the samples in the test set and the trigger word dictionary to obtain candidate trigger words for the samples in the test set; m2 rules are selected from the rule base according to the event type corresponding to the candidate trigger word.

7. The method for correcting the prediction results of a supervised model according to claim 1, characterized in that: The samples in the test set and their first prediction results and the selected rules are input into the large language model to obtain the final prediction results, which specifically includes: Inputting the sample in the test set and the first prediction result thereof and the selected first rule into the large language model to obtain a corrected prediction result; Inputting the samples in the test set and the prediction results of the first correction thereof and the selected second rule into the large language model to obtain the prediction results of the second correction; Similarly, the samples in the test set and their m-1 corrected prediction results, as well as the selected m-th rule, are input into the large language model to obtain m corrected prediction results; where m represents the number of selected rules.

8. A supervised model prediction result correction device, characterized in that: The error correction device comprises: An acquisition module, used to acquire a rule base and a trigger word dictionary; wherein the rule base includes rules of different event types, and the rules are used to generate feedback information; A first prediction module, used to predict each sample in the test set using a supervised model to obtain a first prediction result; A first selection module, configured to select a suitable rule from the rule base according to the sample in the test set and its first prediction result and the trigger word dictionary; The correction module is used to input the samples in the test set and their first prediction results and the selected rules into the large language model to obtain the final prediction results.

9. The supervised model prediction result correction device according to claim 8, characterized in that: The acquisition module specifically includes a second prediction module, a second selection module, a rule generation module, a rule base generation module and a construction module; The second prediction module is used to predict each sample in the sample data set using the supervised model to obtain a second prediction result and a third prediction result; wherein the sample data set includes a training set and a validation set, the second prediction result is the prediction result of the sample in the training set, and the third prediction result is the prediction result of the sample in the validation set; The second selection module is used to select correct prediction results and incorrect prediction results of different event types from the second prediction results according to the second prediction results and label information corresponding to the second prediction results; The rule generation module is used to input the correct prediction results and the wrong prediction results of each event type and the obtained task description into the large language model to obtain rules for generating feedback information; The rule base generation module is used to generate a rule base according to the rule and the third prediction result; The construction module is used to analyze each sample in the training set and construct a trigger word dictionary of different event types.

10. A terminal device comprising a memory, a processor and a computer program / instruction stored in the memory, characterized in that: The processor executes the computer program / instructions to implement the supervised model prediction result error correction method according to any one of claims 1 to 7.

11. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instruction is executed by a processor, the supervised model prediction result error correction method as described in any one of claims 1 to 7 is implemented.

12. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the supervised model prediction result error correction method as described in any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Anti-money laundering risk rule generation method and system based on multi-modal large language model

    CN120598567A

  • Event extraction-oriented labeling guide automatic generation and iterative optimization method

    CN121524707A

  • An Automatic Generation and Iterative Optimization Method for Annotation Guidelines Oriented to Event Extraction

    CN121524707B