A knowledge-enhanced static detection and correction method and system for medical hallucinations

By combining feature extraction and knowledge enhancement methods with the strength of causal association and the timeliness of evidence information, a probability for detecting medical hallucinations is generated and corrected. This solves the problems of accuracy and efficiency caused by human factors in existing technologies, and achieves more efficient detection and correction of medical hallucinations.

CN120911443BActive Publication Date: 2025-12-02SUZHOU HEALTH & FAMILY PLANNING STATISTICS INFORMATION CENT
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511448712.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-11
Publication Date
2025-12-02
Estimated Expiration
2045-10-11

AI Technical Summary

Technical Problem

In existing technologies, the static detection and correction of medical hallucinations mainly rely on human factors, making it difficult to guarantee the accuracy and efficiency of the detection results.

Method used

Feature information is obtained through a feature extraction model. A dynamic knowledge network is constructed using the causal association strength coefficient to determine the causal association strength of the evidence information. A knowledge-enhanced NLI model is used for consistency analysis. Combining the timeliness and confidence of the evidence information, a trained medical hallucination detection model is used to generate detection probabilities. When correction is needed, a medical hallucination correction model is used for correction.

Benefits of technology

It improves the accuracy and efficiency of static detection and correction of medical hallucinations, ensuring the reliability and precision of the test results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120911443B_ABST
    Figure CN120911443B_ABST
Patent Text Reader

Abstract

This invention provides a knowledge-enhanced static detection and correction method and system for medical hallucinations, relating to the field of medical hallucination detection technology. The method includes: obtaining first feature information; determining a causal association strength coefficient; constructing a dynamic knowledge element network; obtaining first evidence information based on the first feature information and the dynamic knowledge element network; obtaining a first consistency coefficient; determining the timeliness coefficient and confidence coefficient of the first evidence information; processing the causal association strength coefficient, the first consistency coefficient, the timeliness coefficient, and the confidence coefficient using a trained medical hallucination detection model to generate a medical hallucination detection probability; determining whether the first feature information needs correction; and, if correction is required, correcting the first feature information using a trained medical hallucination correction model. According to this invention, the accuracy of static detection and correction of medical hallucinations can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical hallucination detection technology, and in particular to a knowledge-enhanced static detection and correction method and system for medical hallucination. Background Technology

[0002] In related technologies, medical hallucinations can be statically detected and corrected through manual testing and correction by professional technicians. However, this method relies heavily on human factors, resulting in a very large workload. Therefore, excessive reliance on human factors may make it difficult to guarantee the accuracy and efficiency of the detection and correction results.

[0003] The information disclosed in the background section of this application is intended only to enhance the understanding of the general background of this application and should not be construed as an admission or in any way implying that the information constitutes prior art known to those skilled in the art. Summary of the Invention

[0004] This invention provides a knowledge-enhanced medical hallucination static detection and correction method and system, which can solve the technical problems that related technologies have difficulty in ensuring the accuracy of detection and correction results and the efficiency of detection and correction.

[0005] According to a first aspect of the present invention, a method for static detection and correction of knowledge-enhanced medical hallucinations is provided, comprising:

[0006] The text to be detected is processed using a feature extraction model to obtain the first feature information;

[0007] Based on the first feature information, determine the causal association strength coefficient;

[0008] Constructing a dynamic knowledge meta-network;

[0009] Based on the first feature information and the dynamic knowledge element network, first evidence information is obtained;

[0010] The first feature information and the first evidence information are processed by a knowledge-enhanced NLI model to obtain a first consistency coefficient;

[0011] Based on the dynamic knowledge element network, determine the timeliness coefficient and confidence coefficient of the first evidence information;

[0012] The causal association strength coefficient, the first consistency coefficient, the timeliness coefficient, and the confidence coefficient are processed by the trained medical hallucination detection model to generate the medical hallucination detection probability.

[0013] Based on the probability of medical hallucination detection, determine whether the first feature information needs to be corrected;

[0014] If correction is required, the first feature information is corrected using a trained medical hallucination correction model.

[0015] According to the present invention, determining the causal correlation strength coefficient based on the first feature information includes:

[0016] Based on the first feature information, obtain the first causal verb;

[0017] Based on the first causal verb, determine the identification results of strong causal verbs, related verbs, and factual verbs;

[0018] The causal association strength coefficient is determined based on the strong causal verb recognition results, the correlation verb recognition results, and the factual verb recognition results.

[0019] According to the present invention, determining the timeliness coefficient and confidence coefficient of the first evidence information based on the dynamic knowledge element network includes:

[0020] Based on the dynamic knowledge element network, the last update time, information source type, and information research sample data of the first evidence information are obtained;

[0021] The timeliness coefficient is determined based on the last update time.

[0022] The confidence coefficient is determined based on the information source type and the information research sample data.

[0023] According to the present invention, determining the confidence coefficient based on the information source type and the information research sample data includes:

[0024] Based on the information source type, determine the highest confidence recognition result, high confidence recognition result, medium confidence recognition result, and low confidence recognition result;

[0025] Based on the highest confidence recognition result, the high confidence recognition result, the medium confidence recognition result, and the low confidence recognition result, the confidence coefficient of the information source is determined;

[0026] Based on the information and sample data, determine the gender sample identification results and the age sample identification results;

[0027] Based on the gender sample identification results and the age sample identification results, determine the information sample confidence coefficient;

[0028] The confidence coefficient is determined based on the confidence coefficient of the information source and the confidence coefficient of the information sample.

[0029] According to the present invention, the training steps of the medical hallucination detection model include:

[0030] Obtain the training sample dataset;

[0031] Based on the training sample dataset, obtain sample feature information and sample evidence information of the sample feature information;

[0032] Determine the sample causal association strength coefficient of the sample feature information;

[0033] Determine the sample consistency coefficient between the sample feature information and the sample evidence information;

[0034] Determine the sample timeliness coefficient and sample confidence coefficient of the sample evidence information;

[0035] The sample causal association strength coefficient, sample consistency coefficient, sample timeliness coefficient, and sample confidence coefficient are processed according to the medical hallucination detection model to determine the sample medical hallucination detection probability of sample feature information;

[0036] The actual medical hallucination detection results obtained by acquiring sample feature information;

[0037] Based on the actual medical hallucination detection results, the sample medical hallucination detection probability, the sample causal association strength coefficient, the sample consistency coefficient, the sample timeliness coefficient, and the sample confidence coefficient, the training loss function of the medical hallucination detection model is determined.

[0038] The medical hallucination detection model is trained using the training loss function of the medical hallucination detection model to obtain the trained medical hallucination detection model.

[0039] According to the present invention, the training loss function of the medical hallucination detection model is determined based on the actual medical hallucination detection results, the sample medical hallucination detection probability, the sample causal association strength coefficient, the sample consistency coefficient, the sample timeliness coefficient, and the sample confidence coefficient, including: according to the formula:

[0040] ,

[0041] Determine the training loss function for the medical hallucination detection model. ,in, The actual medical hallucination detection result for the k-th sample's feature information. , Let be the probability of detecting medical hallucinations for the k-th sample's feature information. The sample causal association strength coefficient is the feature information of the k-th sample. To preset the threshold for the causal correlation strength coefficient, Let be the sample consistency coefficient between the k-th sample feature information and the ith sample evidence information of that sample feature information. To preset the consistency coefficient threshold, The timeliness coefficient of the evidence information of the i-th sample is the feature information of the k-th sample. To preset the timeliness coefficient threshold, The sample confidence coefficient is the feature information of the k-th sample and the evidence information of the ith sample. To pre-set the confidence coefficient threshold, n is the number of sample evidence information of sample feature information, i≤n, K is the number of sample feature information, k≤K, and i, n, k and K are all positive integers.

[0042] According to the present invention, the training steps of the medical hallucination correction model include:

[0043] Obtain the second training sample dataset;

[0044] Based on the second training sample dataset, obtain the second sample feature information and the second sample evidence information of the second sample feature information;

[0045] The second sample feature information and the second sample evidence information are processed according to the medical hallucination correction model to obtain the sample correction feature information;

[0046] The sample correction feature information is processed according to the trained medical hallucination detection model to obtain the sample correction medical hallucination detection probability.

[0047] Based on the sample, the detection probability of medical hallucination is corrected, and the second training loss function of the medical hallucination correction model is determined.

[0048] The medical hallucination detection model is trained using the training loss function of the medical hallucination correction model to obtain the trained medical hallucination correction model.

[0049] According to the present invention, determining the second training loss function of the medical hallucination correction model based on the sample-corrected medical hallucination detection probability includes: according to the formula:

[0050] ,

[0051] Determine the second training loss function for the medical hallucination correction model. ,in, The probability of detecting medical hallucination is the sample correction feature information for the j-th sample, where m is the number of sample correction feature information, j≤m, and j and m are both positive integers.

[0052] According to a second aspect of the present invention, a knowledge-enhanced medical hallucination static detection and correction system is provided, comprising:

[0053] The feature information module is used to process the text to be detected through a feature extraction model to obtain the first feature information;

[0054] The causal strength module is used to determine the causal association strength coefficient based on the first feature information;

[0055] Dynamic knowledge modules are used to construct dynamic knowledge meta-networks;

[0056] The evidence information module is used to obtain first evidence information based on the first feature information and the dynamic knowledge element network;

[0057] The consistency coefficient module is used to process the first feature information and the first evidence information through a knowledge-enhanced NLI model to obtain a first consistency coefficient.

[0058] The evidence coefficient module is used to determine the timeliness coefficient and confidence coefficient of the first evidence information based on the dynamic knowledge element network.

[0059] The detection probability module is used to process the causal association strength coefficient, the first consistency coefficient, the timeliness coefficient and the confidence coefficient through a trained medical hallucination detection model to generate a medical hallucination detection probability.

[0060] The correction module is used to determine whether the first feature information needs to be corrected based on the probability of medical hallucination detection.

[0061] The hallucination correction module is used to correct the first feature information using a trained medical hallucination correction model when correction is required.

[0062] Technical effect: According to the present invention, the text to be detected can be divided into multiple first feature information, and the causal correlation strength of the first feature information, the consistency between the first feature information and the corresponding first evidence information, as well as the timeliness and confidence of the first evidence information can be accurately analyzed. The above analysis results are processed by a medical hallucination detection model to obtain the medical hallucination detection probability. Based on the medical hallucination detection probability, it is determined whether the first feature information needs to be corrected. If the first feature information needs to be corrected, the first feature information is corrected by a medical hallucination correction model, thereby improving the accuracy of static detection and correction of medical hallucination. When determining the training loss function, it can be based on the actual medical hallucination detection results, sample medical hallucination detection probabilities, sample causal association strength coefficient, sample consistency coefficient, sample timeliness coefficient, and sample confidence coefficient. During calculation, the potential impact of these coefficients on the medical hallucination detection results can be considered to determine the error influence of the above data on the sample medical hallucination detection probability. Based on this influence and the error in the sample medical hallucination detection probability, the training loss function can be set, reducing it during training and more effectively improving the accuracy of the medical hallucination detection model. When determining the second training loss function, it can be based on the sample-corrected medical hallucination detection probability to determine the second training loss function for the medical hallucination correction model. During training, this can improve the accuracy of the corrected feature information of the samples processed by the medical hallucination correction model, thus improving the performance of the medical hallucination correction model.

[0063] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the invention. Other features and aspects of the invention will become clearer from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Attached Figure Description

[0064] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other embodiments can be obtained based on these drawings without creative effort.

[0065] Figure 1 An exemplary flowchart of a knowledge-enhanced medical hallucination static detection and correction method according to an embodiment of the present invention is shown.

[0066] Figure 2 An exemplary schematic diagram illustrating the determination of the causal correlation strength coefficient according to an embodiment of the present invention is shown;

[0067] Figure 3 An exemplary schematic diagram illustrates the determination of the timeliness coefficient and confidence coefficient of first evidence information according to an embodiment of the present invention;

[0068] Figure 4 A block diagram of a knowledge-enhanced medical hallucination static detection and correction system according to an embodiment of the present invention is shown as an example. Detailed Implementation

[0069] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0070] The technical solution of the present invention will be described in detail below with reference to specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0071] Figure 1 An exemplary flowchart illustrates a static detection and correction method for knowledge-enhanced medical hallucinations according to an embodiment of the present invention, the method comprising:

[0072] Step S1: Process the text to be detected using a feature extraction model to obtain the first feature information;

[0073] Step S2: Determine the causal association strength coefficient based on the first feature information;

[0074] Step S3: Construct a dynamic knowledge meta-network;

[0075] Step S4: Obtain first evidence information based on the first feature information and the dynamic knowledge element network;

[0076] Step S5: Process the first feature information and the first evidence information using a knowledge-enhanced NLI model to obtain a first consistency coefficient;

[0077] Step S6: Determine the timeliness coefficient and confidence coefficient of the first evidence information based on the dynamic knowledge element network;

[0078] Step S7: The causal association strength coefficient, the first consistency coefficient, the timeliness coefficient, and the confidence coefficient are processed by the trained medical hallucination detection model to generate the medical hallucination detection probability.

[0079] Step S8: Determine whether the first feature information needs to be corrected based on the medical hallucination detection probability;

[0080] Step S9: If it is determined that correction is needed, the first feature information is corrected using the trained medical hallucination correction model.

[0081] According to an embodiment of the present invention, the knowledge-enhanced static detection and correction method for medical hallucinations can divide the text to be detected into multiple first feature information, accurately analyze the causal correlation strength of the first feature information, the consistency between the first feature information and the corresponding first evidence information, and the timeliness and confidence of the first evidence information, and process the above analysis results through a medical hallucination detection model to obtain the medical hallucination detection probability. Based on the medical hallucination detection probability, it is determined whether the first feature information needs to be corrected. If the first feature information needs to be corrected, the first feature information is corrected through a medical hallucination correction model, thereby improving the accuracy of static detection and correction of medical hallucinations.

[0082] According to an embodiment of the present invention, in step S1, the text to be detected is processed by a feature extraction model to obtain first feature information.

[0083] For example, the complete medical text generated by LLM (e.g., a diagnostic suggestion), i.e., the text to be tested, is input into the feature extraction model. The text to be tested is decomposed into independent and verifiable first feature information. For example, if the content of the text to be tested is "Patients can take ibuprofen (200mg, three times a day) to relieve pain and inflammation, but should be aware of its gastrointestinal side effects, and it is recommended to take it with food", the feature extraction model processes the text to be tested and obtains multiple first feature information, such as "ibuprofen, used to relieve pain", "ibuprofen, used to relieve inflammation", "ibuprofen, has side effects, gastrointestinal irritation", etc.

[0084] According to an embodiment of the present invention, in step S2, a causal correlation strength coefficient is determined based on the first feature information.

[0085] Figure 2 An exemplary schematic diagram illustrating the determination of the causal correlation strength coefficient according to an embodiment of the present invention is shown.

[0086] According to an embodiment of the present invention, step S2 includes:

[0087] Step S21: Obtain the first causal verb based on the first feature information;

[0088] Step S22: Based on the first causal verb, determine the strong causal verb identification result, the related verb identification result, and the factual verb identification result;

[0089] Step S23: Determine the causal association strength coefficient based on the strong causal verb recognition result, the correlation verb recognition result, and the factual verb recognition result.

[0090] For example, extract causal verbs from the first feature information, i.e., primary causal verbs, such as "treat," "lead to," "inhibit," "accompany," "is," "is," etc.; determine whether the primary causal verb belongs to strong causal verbs (explicit causal verbs that directly assert that an event, behavior, or entity causes, prevents, or changes another event or state, such as treat, lead to, cause, induce, prevent, inhibit, aggravate, alleviate, cure, etc.) or related verbs (causal verbs without explicit assertion, only indicating a statistical relationship or co-occurrence between two things, such as accompanying, coefficient, several). The coefficient of causal association is determined by whether the rate is higher / lower or factual verbs (verbs that claim to describe static, objective attributes, definitions, components, or values, such as "is") are used. If it is a strong causal verb, the coefficient of causal association is 1; otherwise, it is 0. The determination methods for the results of the identification of related verbs and factual verbs are the same as those for the identification of strong causal verbs, and will not be repeated here. If the result of the identification of strong causal verbs is 1, the coefficient of causal association strength is 2; if the result of the identification of related verbs is 1, the coefficient of causal association strength is 1; and if the result of the identification of factual verbs is 1, the coefficient of causal association strength is 3.

[0091] According to one embodiment of the present invention, step S3 involves constructing a dynamic knowledge element network.

[0092] For example, data sources are built by integrating UMLS, DrugBank, clinical guidelines, UpToDate, and the latest literature (continuously crawled via PubMed API). The data sources are stored in a graph database, where edges represent relationships and are accompanied by attributes such as a list of evidence sources and the last update time. Triples are automatically extracted from new literature using NLP information extraction technology. After manual or high-quality model review, these triples are integrated into the graph to achieve real-time updates of the dynamic knowledge meta-network.

[0093] According to an embodiment of the present invention, in step S4, first evidence information is obtained based on the first feature information and the dynamic knowledge element network.

[0094] For example, for the first feature information, a graph query is performed in the dynamic knowledge element network to obtain the relevant evidence graph, and the first evidence information is extracted based on the relevant evidence graph.

[0095] According to an embodiment of the present invention, in step S5, the first feature information and the first evidence information are processed by a knowledge-enhanced NLI model to obtain a first consistency coefficient.

[0096] For example, a natural language reasoning model pre-trained with medical knowledge, i.e., a knowledge-enhanced NLI model, such as MedNLI or an NLI model based on BioBERT / ClinicalBERT, can be used to determine the consistency between the first feature information and the first evidence information, and obtain the first consistency coefficient. The higher the consistency between the first feature information and the first evidence information, the larger the first consistency coefficient.

[0097] According to an embodiment of the present invention, in step S6, the timeliness coefficient and confidence coefficient of the first evidence information are determined based on the dynamic knowledge element network.

[0098] Figure 3 An exemplary schematic diagram illustrates the determination of the timeliness coefficient and confidence coefficient of first evidence information according to an embodiment of the present invention.

[0099] According to an embodiment of the present invention, step S6 includes:

[0100] Step S61: Based on the dynamic knowledge element network, obtain the last update time, information source type, and information research sample data of the first evidence information;

[0101] Step S62: Determine the timeliness coefficient based on the last update time;

[0102] Step S63: Determine the confidence coefficient based on the information source type and the information research sample data.

[0103] For example, by using the information attached to the "edges" in the dynamic knowledge element network, the last update time (the time since the most recent update of the evidence information is now), the information source, and the information research sample data of each piece of primary evidence information can be determined; based on the ratio of the preset update time (which can be set to 6 months) to the last update time, a timeliness coefficient can be determined. The larger the timeliness coefficient, the stronger the timeliness of the primary evidence information; based on the information source type and the information research sample data, the confidence level of the primary evidence information can be evaluated, and a confidence coefficient can be determined.

[0104] According to an embodiment of the present invention, step S63 includes:

[0105] Step S631: Based on the information source type, determine the highest confidence recognition result, high confidence recognition result, medium confidence recognition result, and low confidence recognition result;

[0106] Step S632: Determine the information source confidence coefficient based on the highest confidence recognition result, the high confidence recognition result, the medium confidence recognition result, and the low confidence recognition result;

[0107] Step S633: Based on the information, study the sample data and determine the gender sample identification result and the age sample identification result;

[0108] Step S634: Determine the confidence coefficient of the information sample based on the gender sample identification result and the age sample identification result;

[0109] Step S635: Determine the confidence coefficient based on the confidence coefficient of the information source and the confidence coefficient of the information sample.

[0110] For example, if the information source is an authoritative guideline, systematic review, or meta-analysis, the highest confidence level is identified as 4; otherwise, it is 0. If the information source is a large-scale randomized controlled trial, the high confidence level is identified as 3; otherwise, it is 0. If the information source is an observational study or cohort study, the medium confidence level is identified as 2; otherwise, it is 0. If the information source is a case report or expert opinion, the low confidence level is identified as 1; otherwise, it is 0. The information source confidence coefficient is determined by the sum of the highest, high, medium, and low confidence levels. The higher the information source confidence coefficient, the higher the confidence level of the information source. The higher the score, the better. Based on the information research sample data, determine the gender sample identification result and the age sample identification result. For example, based on the information research sample data, determine the gender covered by the information research sample. If the information research sample covers both males and females, the gender sample identification result is 1, otherwise it is 0. If the information research sample covers all age groups (e.g., children, youth, middle-aged, and elderly), the age sample identification result is 1, otherwise it is not. The age sample identification result is determined by the ratio of the age group covered by the information research sample to the all age groups. For example, if the age group covered by the information research sample is "youth", the corresponding age sample identification result is 1 / 4. The information sample confidence coefficient is determined by the sum of the gender sample identification result and the age sample identification result. The confidence coefficient is determined by the sum of the information source confidence coefficient and the information sample confidence coefficient.

[0111] According to an embodiment of the present invention, in step S7, the causal association strength coefficient, the first consistency coefficient, the timeliness coefficient and the confidence coefficient are processed by the trained medical hallucination detection model to generate the medical hallucination detection probability.

[0112] For example, the medical hallucination detection model is a type of neural network model, which includes: a data preprocessing and input layer, and a feature extraction layer. The medical hallucination detection model is trained using historical data so that it can output the probability of detecting medical hallucinations.

[0113] According to an embodiment of the present invention, the training steps of the medical hallucination detection model include:

[0114] Obtain the training sample dataset;

[0115] Based on the training sample dataset, obtain sample feature information and sample evidence information of the sample feature information;

[0116] Determine the sample causal association strength coefficient of the sample feature information;

[0117] Determine the sample consistency coefficient between the sample feature information and the sample evidence information;

[0118] Determine the sample timeliness coefficient and sample confidence coefficient of the sample evidence information;

[0119] The sample causal association strength coefficient, sample consistency coefficient, sample timeliness coefficient, and sample confidence coefficient are processed according to the medical hallucination detection model to determine the sample medical hallucination detection probability of sample feature information;

[0120] The actual medical hallucination detection results obtained by acquiring sample feature information;

[0121] Based on the actual medical hallucination detection results, the sample medical hallucination detection probability, the sample causal association strength coefficient, the sample consistency coefficient, the sample timeliness coefficient, and the sample confidence coefficient, the training loss function of the medical hallucination detection model is determined.

[0122] The medical hallucination detection model is trained using the training loss function of the medical hallucination detection model to obtain the trained medical hallucination detection model.

[0123] For example, historical data verified by expert testing is obtained as a training sample dataset; from the training sample dataset, sample feature information and sample evidence information of the sample feature information are obtained for training; the sample causal association strength coefficient of the sample feature information is determined, and the method for determining the sample causal association strength coefficient is similar to that for determining the causal association strength coefficient, and will not be repeated here; the sample consistency coefficient of the sample feature information and the sample evidence information is determined, and the method for determining the sample consistency coefficient is similar to that for determining the first consistency coefficient, and will not be repeated here; the sample timeliness coefficient and sample confidence coefficient of the sample evidence information are determined, and the method for determining the sample timeliness coefficient and the sample confidence coefficient is similar to that for determining the timeliness coefficient and the confidence coefficient, and will not be repeated here; based on the medical hallucination detection model, the sample causal association strength coefficient, sample consistency coefficient, sample timeliness coefficient, and sample... The confidence coefficient is processed to determine the probability that the sample feature information belongs to a medical environment, i.e., the probability of detecting medical hallucinations in the sample; the results of whether the sample feature information belongs to medical hallucinations are obtained after expert testing and verification in actual practice, i.e., the actual medical hallucination detection result. When the sample feature information belongs to medical hallucinations, the actual medical hallucination detection result is equal to 1, and when the sample feature information does not belong to medical hallucinations, the actual medical hallucination detection result is equal to 0; based on the actual medical hallucination detection result, the sample medical hallucination detection probability, the sample causal association strength coefficient, the sample consistency coefficient, the sample timeliness coefficient, and the sample confidence coefficient, the training loss function of the medical hallucination detection model is determined; the medical hallucination detection model is trained according to the training loss function of the medical hallucination detection model to improve the accuracy of the medical hallucination detection model in detecting medical environments, and the trained medical hallucination detection model is obtained.

[0124] According to one embodiment of the present invention, determining the training loss function of the medical hallucination detection model based on the actual medical hallucination detection result, the sample medical hallucination detection probability, the sample causal association strength coefficient, the sample consistency coefficient, the sample timeliness coefficient, and the sample confidence coefficient includes: determining the training loss function of the medical hallucination detection model according to formula (1). ,

[0125] (1)

[0126] in, The actual medical hallucination detection result for the k-th sample's feature information.

[0127] , Let be the probability of detecting medical hallucinations for the k-th sample's feature information. The sample causal association strength coefficient is the feature information of the k-th sample. To preset the threshold for the causal correlation strength coefficient, Let be the sample consistency coefficient between the k-th sample feature information and the ith sample evidence information of that sample feature information. To preset the consistency coefficient threshold, The timeliness coefficient of the evidence information of the i-th sample is the feature information of the k-th sample. To preset the timeliness coefficient threshold, The sample confidence coefficient is the feature information of the k-th sample and the evidence information of the ith sample. To pre-set the confidence coefficient threshold, n is the number of sample evidence information of sample feature information, i≤n, K is the number of sample feature information, k≤K, and i, n, k and K are all positive integers.

[0128] According to one embodiment of the present invention, This is the ratio of the sample consistency coefficient between the k-th sample feature information and the i-th sample evidence information of that sample feature information to a preset consistency coefficient threshold. The larger this ratio, the larger the sample consistency coefficient between the k-th sample feature information and the i-th sample evidence information of that sample feature information. The preset consistency coefficient threshold can be set to 0.9. This is the ratio of the sample timeliness coefficient of the i-th sample evidence information of the k-th sample feature information to a preset timeliness coefficient threshold. The larger this ratio, the larger the sample timeliness coefficient of the i-th sample evidence information of the k-th sample feature information. The preset timeliness coefficient threshold can be set to 1. This is the ratio of the sample confidence coefficient of the i-th sample evidence information of the k-th sample feature information to a preset confidence coefficient threshold. The larger this ratio, the larger the sample confidence coefficient of the i-th sample evidence information of the k-th sample feature information. The preset confidence coefficient threshold can be set to 1. This is the ratio of the sample causal association strength coefficient of the k-th sample feature information to a preset causal association strength coefficient threshold. The larger this ratio, the larger the sample causal association strength coefficient of the k-th sample feature information. The preset causal association strength coefficient threshold can be set to 1. The sample consistency coefficient, sample timeliness coefficient, and sample confidence coefficient are negatively correlated with the probability of detecting medical hallucinations, while the sample causal association strength coefficient is positively correlated with the probability of detecting medical hallucinations. For example, the larger the sample consistency coefficient, the higher the consistency between the primary feature information and the primary evidence information, the lower the probability that the primary feature information is a medical hallucination, and the lower the probability of detecting medical hallucinations. The larger the sample timeliness coefficient, the more recent the update time of the primary evidence information, the higher the credibility and strength of the primary evidence information, and the lower the probability that the primary feature information is a medical hallucination, and the lower the probability of detecting medical hallucinations. The larger the sample confidence coefficient, the more authoritative the source of the primary evidence information and the more comprehensive the research sample coverage of the primary evidence information, the higher the credibility and strength of the primary evidence information, and the lower the probability that the primary feature information is a medical hallucination, and the lower the probability of detecting medical hallucinations. The larger the sample causal association strength coefficient, the higher the required strength of evidence for the primary feature information, and the higher the probability that it is judged as a medical hallucination due to insufficient evidence strength, and the higher the probability of detecting medical hallucinations.

[0129] According to one embodiment of the present invention, The error between the actual medical hallucination detection result and the sample medical hallucination detection probability of the k-th sample feature information is used... The training loss function is obtained by weighted summing the errors between the actual medical hallucination detection results and the sample medical hallucination detection probabilities. During training, this training loss function is reduced to improve the accuracy of the medical hallucination detection model in detecting medical environments, thereby enhancing the model's precision.

[0130] In this way, the training loss function of the medical hallucination detection model can be determined based on the actual medical hallucination detection results, the sample medical hallucination detection probability, the sample causal association strength coefficient, the sample consistency coefficient, the sample timeliness coefficient, and the sample confidence coefficient. During the calculation process, the possible impact of the sample causal association strength coefficient, sample consistency coefficient, sample timeliness coefficient, and sample confidence coefficient on the medical hallucination detection results can be used to determine the error impact of the above data on the sample medical hallucination detection probability. Based on this impact and the error of the sample medical hallucination detection probability, the training loss function can be set. During the training process, the training loss function is reduced, and the accuracy of the medical hallucination detection model is improved more effectively.

[0131] According to an embodiment of the present invention, in step S8, it is determined whether the first feature information needs to be corrected based on the medical hallucination detection probability.

[0132] For example, when the probability of detecting medical hallucinations is greater than or equal to 0.9, the determination of the first feature information needs to be corrected.

[0133] According to one embodiment of the present invention, in step S9, if it is determined that correction is needed, the first feature information is corrected by a trained medical hallucination correction model.

[0134] For example, the medical hallucination correction model is a deep learning neural network model such as a convolutional neural network model. It can correct the first feature information detected as medical hallucination based on the first evidence information input. The corrected first feature information may still belong to medical hallucination. Therefore, the medical hallucination correction model can be trained so that the corrected first feature information does not belong to medical hallucination.

[0135] According to an embodiment of the present invention, the training steps of the medical hallucination correction model include:

[0136] Obtain the second training sample dataset;

[0137] Based on the second training sample dataset, obtain the second sample feature information and the second sample evidence information of the second sample feature information;

[0138] The second sample feature information and the second sample evidence information are processed according to the medical hallucination correction model to obtain the sample correction feature information;

[0139] The sample correction feature information is processed according to the trained medical hallucination detection model to obtain the sample correction medical hallucination detection probability.

[0140] Based on the sample, the detection probability of medical hallucination is corrected, and the second training loss function of the medical hallucination correction model is determined.

[0141] The medical hallucination detection model is trained using the training loss function of the medical hallucination correction model to obtain the trained medical hallucination correction model.

[0142] For example, the process involves acquiring various sample feature information and corresponding evidence information that have been detected as medical hallucinations as a second training sample dataset; based on the second training sample dataset, acquiring second sample feature information and second sample evidence information of the second sample feature information; processing the second sample feature information and second sample evidence information according to the medical hallucination correction model to obtain corrected second sample feature information, i.e., sample corrected feature information; processing the sample corrected feature information according to the trained medical hallucination detection model to obtain the probability of the sample corrected feature information being detected as medical hallucination, i.e., sample corrected medical hallucination detection probability; determining the second training loss function of the medical hallucination correction model based on the sample corrected medical hallucination detection probability; and training the medical hallucination detection model according to the training loss function of the medical hallucination correction model to improve the accuracy of the medical hallucination correction model, thus obtaining the trained medical hallucination correction model.

[0143] According to an embodiment of the present invention, determining a second training loss function for a medical hallucination correction model based on the sample-corrected medical hallucination detection probability includes: determining the second training loss function for the medical hallucination correction model according to formula (2). ,

[0144] (2)

[0145] in, The probability of detecting medical hallucination is the sample correction feature information for the j-th sample, where m is the number of sample correction feature information, j≤m, and j and m are both positive integers.

[0146] According to one embodiment of the present invention, during the training process of the medical hallucination correction model, Minimize, then Get as close to 1 as possible, so that it can make Minimizing this reduces the probability that the corrected feature information of the samples processed by the medical hallucination correction model will be detected as a medical environment by the trained medical hallucination detection model, thereby improving the accuracy of the corrected feature information of the samples processed by the medical hallucination correction model and enhancing the performance of the medical hallucination correction model.

[0147] In this way, the second training loss function of the medical hallucination correction model can be determined based on the probability of medical hallucination detection corrected by the sample. During the training process, the accuracy of the corrected feature information of the sample after processing by the medical hallucination correction model can be improved, thereby enhancing the performance of the medical hallucination correction model.

[0148] According to an embodiment of the present invention, the knowledge-enhanced static detection and correction method for medical hallucinations can divide the text to be detected into multiple first feature information, accurately analyze the causal correlation strength of the first feature information, the consistency between the first feature information and the corresponding first evidence information, and the timeliness and confidence of the first evidence information, and process the above analysis results through a medical hallucination detection model to obtain the medical hallucination detection probability. Based on the medical hallucination detection probability, it is determined whether the first feature information needs to be corrected. If the first feature information needs to be corrected, the first feature information is corrected through a medical hallucination correction model, thereby improving the accuracy of static detection and correction of medical hallucinations. When determining the training loss function, it can be based on the actual medical hallucination detection results, sample medical hallucination detection probabilities, sample causal association strength coefficient, sample consistency coefficient, sample timeliness coefficient, and sample confidence coefficient. During calculation, the potential impact of these coefficients on the medical hallucination detection results can be considered to determine the error influence of the above data on the sample medical hallucination detection probability. Based on this influence and the error in the sample medical hallucination detection probability, the training loss function can be set, reducing it during training and more effectively improving the accuracy of the medical hallucination detection model. When determining the second training loss function, it can be based on the sample-corrected medical hallucination detection probability to determine the second training loss function for the medical hallucination correction model. During training, this can improve the accuracy of the corrected feature information of the samples processed by the medical hallucination correction model, thus improving the performance of the medical hallucination correction model.

[0149] Figure 4 An exemplary block diagram of a knowledge-enhanced medical hallucination static detection and correction system according to an embodiment of the present invention is shown, the system comprising:

[0150] The feature information module is used to process the text to be detected through a feature extraction model to obtain the first feature information;

[0151] The causal strength module is used to determine the causal association strength coefficient based on the first feature information;

[0152] Dynamic knowledge modules are used to construct dynamic knowledge meta-networks;

[0153] The evidence information module is used to obtain first evidence information based on the first feature information and the dynamic knowledge element network;

[0154] The consistency coefficient module is used to process the first feature information and the first evidence information through a knowledge-enhanced NLI model to obtain a first consistency coefficient.

[0155] The evidence coefficient module is used to determine the timeliness coefficient and confidence coefficient of the first evidence information based on the dynamic knowledge element network.

[0156] The detection probability module is used to process the causal association strength coefficient, the first consistency coefficient, the timeliness coefficient and the confidence coefficient through a trained medical hallucination detection model to generate a medical hallucination detection probability.

[0157] The correction module is used to determine whether the first feature information needs to be corrected based on the probability of medical hallucination detection.

[0158] The hallucination correction module is used to correct the first feature information using a trained medical hallucination correction model when correction is required.

[0159] This invention can be a method, apparatus, system, and / or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of the invention.

[0160] Those skilled in the art should understand that the embodiments of the present invention described above and shown in the accompanying drawings are merely examples and do not limit the present invention. The objectives of the present invention have been fully and effectively achieved. The functions and structural principles of the present invention have been demonstrated and explained in the embodiments, and any variations or modifications may be made to the implementation of the present invention without departing from the stated principles.

Claims

1. A static detection and correction method for knowledge-enhanced medical hallucinations, characterized in that, include: The text to be detected is processed using a feature extraction model to obtain the first feature information; Based on the first feature information, determine the causal association strength coefficient; Constructing a dynamic knowledge meta-network; Based on the first feature information and the dynamic knowledge element network, first evidence information is obtained; The first feature information and the first evidence information are processed by a knowledge-enhanced NLI model to obtain a first consistency coefficient; Based on the dynamic knowledge element network, determine the timeliness coefficient and confidence coefficient of the first evidence information; The causal association strength coefficient, the first consistency coefficient, the timeliness coefficient, and the confidence coefficient are processed by the trained medical hallucination detection model to generate the medical hallucination detection probability. Based on the probability of medical hallucination detection, determine whether the first feature information needs to be corrected; If correction is required, the first feature information is corrected using a trained medical hallucination correction model. The training steps of the medical hallucination detection model include: Obtain the training sample dataset; Based on the training sample dataset, obtain sample feature information and sample evidence information of the sample feature information; Determine the sample causal association strength coefficient of the sample feature information; Determine the sample consistency coefficient between the sample feature information and the sample evidence information; Determine the sample timeliness coefficient and sample confidence coefficient of the sample evidence information; The sample causal association strength coefficient, sample consistency coefficient, sample timeliness coefficient, and sample confidence coefficient are processed according to the medical hallucination detection model to determine the sample medical hallucination detection probability of sample feature information; The actual medical hallucination detection results obtained by acquiring sample feature information; Based on the actual medical hallucination detection results, the sample medical hallucination detection probability, the sample causal association strength coefficient, the sample consistency coefficient, the sample timeliness coefficient, and the sample confidence coefficient, the training loss function of the medical hallucination detection model is determined. The medical hallucination detection model is trained according to the training loss function of the medical hallucination detection model to obtain the trained medical hallucination detection model. Based on the actual medical hallucination detection results, the sample medical hallucination detection probability, the sample causal association strength coefficient, the sample consistency coefficient, the sample timeliness coefficient, and the sample confidence coefficient, the training loss function of the medical hallucination detection model is determined, including: according to the formula: Determine the training loss function for the medical hallucination detection model. ,in, The actual medical hallucination detection result for the k-th sample's feature information. , Let be the probability of detecting medical hallucinations for the k-th sample's feature information. The sample causal association strength coefficient is the feature information of the k-th sample. To preset the threshold for the causal correlation strength coefficient, Let be the sample consistency coefficient between the k-th sample feature information and the ith sample evidence information of that sample feature information. To preset the consistency coefficient threshold, The timeliness coefficient of the evidence information of the i-th sample is the feature information of the k-th sample. To preset the timeliness coefficient threshold, Let be the sample confidence coefficient of the i-th sample evidence information of the k-th sample feature information. To pre-set the confidence coefficient threshold, n is the number of sample evidence information of sample feature information, i≤n, K is the number of sample feature information, k≤K, and i, n, k and K are all positive integers.

2. The method for static detection and correction of knowledge-enhanced medical hallucinations according to claim 1, characterized in that, Based on the first feature information, the causal association strength coefficient is determined, including: Based on the first feature information, obtain the first causal verb; Based on the first causal verb, determine the identification results of strong causal verbs, related verbs, and factual verbs; The causal association strength coefficient is determined based on the strong causal verb recognition results, the correlation verb recognition results, and the factual verb recognition results.

3. The method for static detection and correction of knowledge-enhanced medical hallucinations according to claim 1, characterized in that, Based on the dynamic knowledge element network, the timeliness coefficient and confidence coefficient of the first evidence information are determined, including: Based on the dynamic knowledge element network, the last update time, information source type, and information research sample data of the first evidence information are obtained; The timeliness coefficient is determined based on the last update time. The confidence coefficient is determined based on the information source type and the information research sample data.

4. The method for static detection and correction of knowledge-enhanced medical hallucinations according to claim 3, characterized in that, Based on the information source type and the information research sample data, the confidence coefficient is determined, including: Based on the information source type, determine the highest confidence recognition result, high confidence recognition result, medium confidence recognition result, and low confidence recognition result; Based on the highest confidence recognition result, the high confidence recognition result, the medium confidence recognition result, and the low confidence recognition result, the confidence coefficient of the information source is determined; Based on the information and sample data, determine the gender sample identification results and the age sample identification results; Based on the gender sample identification results and the age sample identification results, determine the information sample confidence coefficient; The confidence coefficient is determined based on the confidence coefficient of the information source and the confidence coefficient of the information sample.

5. The method for static detection and correction of knowledge-enhanced medical hallucinations according to claim 1, characterized in that, The training steps for the medical hallucination correction model include: Obtain the second training sample dataset; Based on the second training sample dataset, obtain the second sample feature information and the second sample evidence information of the second sample feature information; The second sample feature information and the second sample evidence information are processed according to the medical hallucination correction model to obtain the sample correction feature information; The sample correction feature information is processed according to the trained medical hallucination detection model to obtain the sample correction medical hallucination detection probability. Based on the sample, the detection probability of medical hallucination is corrected, and the second training loss function of the medical hallucination correction model is determined. The medical hallucination detection model is trained using the training loss function of the medical hallucination correction model to obtain the trained medical hallucination correction model.

6. The method for static detection and correction of knowledge-enhanced medical hallucinations according to claim 5, characterized in that, Based on the corrected probability of medical hallucination detection from the samples, the second training loss function of the medical hallucination correction model is determined, including: according to the formula: Determine the second training loss function for the medical hallucination correction model. ,in, The probability of detecting medical hallucination is the sample correction feature information for the j-th sample, where m is the number of sample correction feature information, j≤m, and j and m are both positive integers.

7. A knowledge-enhanced medical hallucination static detection and correction system, used to execute the method according to any one of claims 1-6, characterized in that, include: The feature information module is used to process the text to be detected through a feature extraction model to obtain the first feature information; The causal strength module is used to determine the causal association strength coefficient based on the first feature information; Dynamic knowledge modules are used to construct dynamic knowledge meta-networks; The evidence information module is used to obtain first evidence information based on the first feature information and the dynamic knowledge element network; The consistency coefficient module is used to process the first feature information and the first evidence information through a knowledge-enhanced NLI model to obtain a first consistency coefficient. The evidence coefficient module is used to determine the timeliness coefficient and confidence coefficient of the first evidence information based on the dynamic knowledge element network. The detection probability module is used to process the causal association strength coefficient, the first consistency coefficient, the timeliness coefficient and the confidence coefficient through a trained medical hallucination detection model to generate a medical hallucination detection probability. The correction module is used to determine whether the first feature information needs to be corrected based on the probability of medical hallucination detection. The hallucination correction module is used to correct the first feature information using a trained medical hallucination correction model when correction is required.

Citation Information

Patent Citations

  • Large model illusion evaluation data generation method

    CN119622001A

  • Model illusion detection method, system and related device

    CN119961389A