Medical model evaluation method and apparatus, electronic device, and storage medium
Patent Information
- Application Number
- CN202311268190.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-27
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2043-09-27
AI Technical Summary
[0005]本发明提供一种医学模型评估方法、装置、电子设备和存储介质,用以解决现有技术中评估过程中缺乏对医学知识,以及医学模型具体应用场景的针对性考量,以致得出结果的准确性和可靠性不高的缺陷,从多个维度进行考量,通过医学模型在多维度的评估指标下的表现评估模型性能,能够使得评估更具全面性、专业性,评估效果更好
[0060]The medical model evaluation method, apparatus, electronic device, and storage medium provided by this invention process medical data through a medical model to obtain the processing results of the medical data; based on the processing results, the evaluation results of the medical model under various evaluation indicators are determined, including at least two of knowledge depth, knowledge breadth, illusion, harmfulness, and privacy; based on the evaluation results of the medical model under each evaluation indicator, the performance of the medical model is determined. By considering the professional characteristics of the medical field that the medical model addresses, evaluation indicators are designed from multiple dimensions, and the model performance is evaluated based on the performance of the medical model under the multi-dimensional evaluation indicators. This not only achieves a more comprehensive and accurate evaluation, but also makes the evaluation process more professional and the evaluation effect better. It overcomes the shortcomings of current model performance evaluations that lack consideration of medical knowledge and the professionalism of the medical field, resulting in low accuracy and reliability of the results, and achieves effective and reliable performance evaluation.
Smart Images

Figure CN117407682B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of machine learning technology, and in particular to a method, apparatus, electronic device, and storage medium for evaluating medical models. Background Technology
[0002] Model performance evaluation is an indispensable part of the learning workflow of machine learning models, and it is crucial for the establishment, optimization, and subsequent application of machine learning models.
[0003] Currently, there are two main types of methods for evaluating the performance of machine learning models. The first type is manual evaluation, where humans proofread the results generated by the model. The second type is automatic evaluation, which is mainly used in scenarios such as text understanding, text generation, machine translation, and sentiment analysis. Common metrics include accuracy and recall.
[0004] However, for the first type of method mentioned above, when faced with massive amounts of evaluation data, relying solely on manual evaluation inevitably consumes a significant amount of time and energy, increasing time and human resource costs. Furthermore, the evaluation indicators in this method mostly focus on accuracy, thus lacking a unified and comprehensive evaluation system. The second type of method primarily targets the evaluation of large models in general domains. When dealing with large models in specific domains, such as healthcare or education, it often fails to consider the domain's unique characteristics, thus raising concerns about the reliability of the evaluation results obtained. Summary of the Invention
[0005] This invention provides a medical model evaluation method, device, electronic device, and storage medium to address the shortcomings of existing technologies that lack specific consideration of medical knowledge and the specific application scenarios of medical models during the evaluation process, resulting in low accuracy and reliability of the results. By considering multiple dimensions and evaluating the performance of medical models under multi-dimensional evaluation indicators, the evaluation can be more comprehensive, professional, and effective.
[0006] This invention provides a method for evaluating medical models, comprising:
[0007] Identify the medical data to be used for model evaluation;
[0008] The medical data is processed based on a medical model to obtain the processing results of the medical data.
[0009] Based on the processing results, the evaluation results of the medical model under each evaluation indicator are determined. The evaluation indicators include at least two of the following: knowledge depth, knowledge breadth, hallucination, harmfulness, and privacy.
[0010] The performance of the medical model is determined based on the evaluation results of the medical model under each evaluation index.
[0011] According to a medical model evaluation method provided by the present invention, the step of processing the medical data based on the medical model to obtain the processing result of the medical data; and determining the indicator evaluation result of the medical model under each evaluation indicator based on the processing result, including:
[0012] Based on the medical model, the medical data in each evaluation scenario are processed to obtain the processing results of the medical data in each evaluation scenario;
[0013] Based on the processing results of medical data under each evaluation scenario, and the correspondence between each evaluation indicator and each evaluation scenario, the evaluation results of the medical model under each evaluation indicator are determined.
[0014] The process of determining the performance of the medical model based on the evaluation results of the medical model under various evaluation indicators includes:
[0015] Based on the evaluation results of the medical model under each evaluation indicator, and the correspondence between each evaluation indicator and each evaluation scenario, the scenario evaluation results of the medical model under each evaluation scenario are determined.
[0016] Based on the scenario evaluation results of the medical model in various evaluation scenarios, the performance of the medical model is determined; the evaluation scenarios include knowledge scenarios and application scenarios, the evaluation indicators corresponding to the knowledge scenarios include at least one of knowledge depth, knowledge breadth, and hallucination, and the evaluation indicators corresponding to the application scenarios include at least one of hallucination, harmfulness, and privacy.
[0017] According to a medical model evaluation method provided by the present invention, the step of processing medical data under each evaluation scenario based on the medical model to obtain the processing results of the medical data under each evaluation scenario includes:
[0018] Determine the evaluation dataset corresponding to each evaluation scenario;
[0019] The medical data in each evaluation dataset are clustered, and based on each cluster category, medical data are selected from the evaluation dataset as example data.
[0020] Based on the example data of each assessment scenario and the medical data in each assessment dataset, output prompt statements corresponding to each assessment scenario are generated;
[0021] The output prompt statements corresponding to each evaluation scenario are input into the medical model to obtain the processing results of the medical data under each evaluation scenario output by the medical model.
[0022] According to a medical model evaluation method provided by the present invention, when the evaluation indicators include knowledge breadth, the medical data includes input questions, the processing results include question answers, and the step of determining the evaluation results of the medical model under each evaluation indicator based on the processing results includes:
[0023] Match the answer to the question with the correct answer to the input question;
[0024] If the matching result indicates that the answer to the question is related to the correct answer, then the medical model is determined to have answered the input question correctly.
[0025] Otherwise, the medical model is determined to have answered the input question incorrectly;
[0026] The evaluation results of the medical model under the breadth of knowledge are determined based on the number of correctly answered input questions and the number of incorrectly answered input questions.
[0027] According to a medical model evaluation method provided by the present invention, when the evaluation index includes knowledge depth, the medical data includes input questions, and the step of processing the medical data based on the medical model to obtain the processing result of the medical data includes:
[0028] Based on the input question, determine the prompt statement to be generated;
[0029] The generated prompt statement is input into the medical model to obtain the target question corresponding to the input question output by the medical model;
[0030] The generated prompt statement is used to prompt the medical model to generate the target question based on the input question, wherein the difficulty of the target question is higher than that of the input question.
[0031] According to a medical model evaluation method provided by the present invention, the step of determining the evaluation results of the medical model under various evaluation indicators based on the processing results includes:
[0032] Based on the aforementioned target problem, determine the target output prompt statement;
[0033] The target output prompt is input into the medical model to obtain the answer to the target question output by the medical model.
[0034] Match the answer to the question with the correct answer to the target question;
[0035] If the matching result indicates that the answer to the question is related to the correct answer, then the medical model is determined to have answered the target question correctly.
[0036] Otherwise, the medical model is determined to be incorrect in its answer to the target question;
[0037] The evaluation results of the medical model at the knowledge depth are determined based on the number of target questions answered correctly and the number of target questions answered incorrectly.
[0038] According to a medical model evaluation method provided by the present invention, when the evaluation indicators include hazard, the medical data includes the patient's condition, and the processing results include the diagnosis name and / or drug name, the step of determining the evaluation results of the medical model under each evaluation indicator based on the processing results includes:
[0039] Match the diagnostic name and / or drug name with the correct diagnostic name and / or correct drug name corresponding to the patient's condition;
[0040] If the matching result indicates that the diagnosis name and / or the drug name is related to the correct diagnosis name and / or the correct drug name, then the medical model is determined to be correct in diagnosing and / or prescribing the correct medication for the patient's condition; otherwise, the medical model is determined to be incorrect in diagnosing and / or prescribing the wrong medication for the patient's condition.
[0041] The medical model's performance indicators under the stated harmfulness are determined based on the number of patients with correctly diagnosed and / or correctly prescribed medication, and the number of patients with incorrectly diagnosed and / or incorrectly prescribed medication.
[0042] According to a medical model evaluation method provided by the present invention, when hallucination is included in the evaluation indicators, the step of determining the evaluation results of the medical model under each evaluation indicator based on the processing results includes:
[0043] Based on the medical model, triples are extracted from the medical data and its processing results to obtain input knowledge triples and output knowledge triples. The knowledge triples include head entities, tail entities, and entity relationships between the head entities and the tail entities.
[0044] Determine whether the input knowledge triple and the output knowledge triple are consistent, and whether the output knowledge triple is consistent with the medical knowledge graph;
[0045] If the input knowledge triplet and the output knowledge triplet are inconsistent, and / or the output knowledge triplet is inconsistent with the medical knowledge graph, then the processing result output by the medical model is determined to be a hallucination output.
[0046] Otherwise, the processing result output by the medical model is determined to be a normal output;
[0047] The evaluation results of the medical model under the hallucination are determined based on the number of processed results of hallucination output and the number of processed results of normal output.
[0048] According to a medical model evaluation method provided by the present invention, when the evaluation indicators include privacy, the step of determining the indicator evaluation results of the medical model under each evaluation indicator based on the processing results includes:
[0049] Sensitive information is identified from the processing results to obtain sensitive information identification results;
[0050] If the sensitive information identification result indicates that the processing result contains sensitive information, then the privacy anomaly of the processing result output by the medical model is determined.
[0051] Otherwise, the privacy of the processing results output by the medical model is confirmed to be normal.
[0052] Based on the number of privacy-abnormal processing results and the number of privacy-normal processing results, the evaluation results of the medical model under the privacy condition are determined.
[0053] The present invention also provides a medical model evaluation device, comprising:
[0054] The data determination unit is used to determine the medical data used for model evaluation;
[0055] The data processing unit is used to process the medical data based on the medical model to obtain the processing result of the medical data;
[0056] The result determination unit is used to determine the indicator evaluation results of the medical model under each evaluation indicator based on the processing results. The evaluation indicators include at least two of the following: knowledge depth, knowledge breadth, illusion, harmfulness, and privacy.
[0057] The performance evaluation unit is used to determine the performance of the medical model based on the evaluation results of the medical model under various evaluation indicators.
[0058] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the medical model evaluation method as described above.
[0059] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the medical model evaluation method as described above.
[0060] The medical model evaluation method, apparatus, electronic device, and storage medium provided by this invention process medical data through a medical model to obtain the processing results of the medical data; based on the processing results, the evaluation results of the medical model under various evaluation indicators are determined, including at least two of knowledge depth, knowledge breadth, illusion, harmfulness, and privacy; based on the evaluation results of the medical model under each evaluation indicator, the performance of the medical model is determined. By considering the professional characteristics of the medical field that the medical model addresses, evaluation indicators are designed from multiple dimensions, and the model performance is evaluated based on the performance of the medical model under the multi-dimensional evaluation indicators. This not only achieves a more comprehensive and accurate evaluation, but also makes the evaluation process more professional and the evaluation effect better. It overcomes the shortcomings of current model performance evaluations that lack consideration of medical knowledge and the professionalism of the medical field, resulting in low accuracy and reliability of the results, and achieves effective and reliable performance evaluation. Attached Figure Description
[0061] To more clearly illustrate the technical solutions in this 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 some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0062] Figure 1 This is a flowchart illustrating the medical model evaluation method provided by the present invention;
[0063] Figure 2 This is a diagram showing the relationship between the evaluation indicators and evaluation scenarios provided by this invention;
[0064] Figure 3 This is a schematic diagram illustrating the evaluation of the medical model provided by this invention under hallucination.
[0065] Figure 4 This is an overall framework diagram of the medical model evaluation method provided by the present invention.
[0066] Figure 5 This is a schematic diagram of the structure of the medical model evaluation device provided by the present invention;
[0067] Figure 6 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0068] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0069] Medical models are complex, high-performance machine learning models built using advanced technologies such as deep learning in the medical field. These models can extract, analyze, and infer information related to patient diagnosis, treatment, and prediction from large-scale medical data, thus possessing certain capabilities in clinical diagnosis, disease prediction, and treatment plan development. Furthermore, medical models play a crucial role in medical decision-making, providing healthcare professionals with useful knowledge data and important references for medical decisions. Therefore, evaluating the performance and reliability of medical models is essential to ensuring patient safety and treatment quality.
[0070] Currently, the evaluation of large-scale language models in general domains mostly focuses on the model's capabilities in text understanding, text generation, machine translation, and sentiment analysis. The evaluation of medical models is obviously different. The difference lies in the fact that medical models need to consider the application domain, dataset, evaluation metrics, ethics, and other aspects. Furthermore, their evaluation process is more focused on tasks and data in the medical field. The evaluation of general-purpose large models, on the other hand, covers a wider range of tasks in the fields of natural language processing and computer vision. Moreover, there are significant differences between the two in terms of their application scenarios.
[0071] Currently, there are two main types of methods for evaluating large-scale language models: manual evaluation and automated evaluation. Manual evaluation involves manually proofreading the model's results. Automated evaluation is primarily used for evaluating large models in general scenarios, such as text understanding, text generation, machine translation, and sentiment analysis, with common metrics including accuracy and recall. However, the first type of method, when faced with massive amounts of evaluation data, inevitably consumes a significant amount of time and effort through manual evaluation, increasing time and human resource costs. Furthermore, the evaluation metrics in this method are mostly focused on accuracy, thus lacking a unified and comprehensive evaluation system. The second type of method mainly targets the evaluation of large models in general domains. When dealing with large models in specific domains, such as medical models, it cannot consider the special characteristics of the medical field, thus raising concerns about the reliability of the evaluation results.
[0072] In summary, current model performance evaluation methods are extremely time-consuming and labor-intensive, and fail to fully consider the professional specificities of the medical field to which medical models are applied. Relying solely on traditional performance indicators makes it difficult to comprehensively and accurately reflect the model's performance from different perspectives, and lacks multi-perspective evaluation tailored to medical knowledge and medical application scenarios.
[0073] In response, this invention provides a medical model evaluation method that aims to consider multiple dimensions, taking into account the professional characteristics of the medical field that the medical model is dealing with, designing multi-dimensional evaluation indicators, and evaluating the model performance based on the performance of the medical model under the multi-dimensional evaluation indicators. This not only enables a more comprehensive and accurate evaluation, but also makes the evaluation process more professional, the evaluation effect better, and the effectiveness and reliability of the evaluated model performance higher. Figure 1 This is a flowchart illustrating the medical model evaluation method provided by the present invention, as shown below. Figure 1 As shown, the method includes:
[0074] Step 110: Determine the medical data to be used for model evaluation;
[0075] Step 120: Process medical data based on the medical model to obtain the processing results of the medical data;
[0076] Specifically, before evaluating a medical model, it is necessary to first determine the data used for model performance evaluation, which in this case corresponds to medical data. This medical data can include data from various professional fields within the medical field, such as physiological data, pathological data, pharmacological data, traditional Chinese medicine data, clinical medical data, and imaging data.
[0077] Furthermore, considering the significant physiological and pathological differences between individuals, medical models often involve a very deep and extensive range of medical knowledge when providing targeted treatment recommendations to patients. This in-depth medical knowledge can also better help medical models understand the differences between individuals, thereby providing more accurate recommendations. Here, in-depth medical knowledge is often not limited to the medical field; it may involve other disciplines, such as biology, chemistry, statistics, and so on. Therefore, medical data can also include data from multiple disciplines related to medicine, so that models can conduct multi-domain collaborative learning and interdisciplinary knowledge transfer through diverse and in-depth medical data, thereby better understanding and analyzing medical data.
[0078] Here, medical data can originate from medical knowledge question-and-answer databases built from medical data generated during actual medical processes. This means that medical data from multiple departments in actual medical processes, such as surgery, internal medicine, hematology, imaging, and laboratory testing, can be sorted out to form a medical knowledge question-and-answer database. Alternatively, it can originate from large-scale medical literature, symptom descriptions, drug information, medical experiments, case reports, etc. In other words, effective medical data can be obtained from a large number of medical information sources such as medical literature, clinical research reports, and drug databases.
[0079] Furthermore, after obtaining the medical data, it is necessary to determine the processing result of this medical data through a medical model. That is, the medical model can be used to process the medical data to obtain the processing result output by the medical model. Here, it is worth noting that the medical model's processing of the medical data may differ when facing different evaluation indicators. That is, when it is necessary to measure the performance of the medical model on different evaluation indicators, the medical model's processing of the medical data used to measure its performance under different evaluation indicators may differ.
[0080] Here, the evaluation metrics are indicators used to measure the performance of medical models. Common model evaluation metrics include accuracy and recall. However, in this embodiment of the invention, considering the specialized nature of the medical field that the medical model deals with, general evaluation metrics are insufficient to accurately reflect its performance in the medical field. Therefore, for the evaluation metrics of medical models, multiple dimensions are considered. Given the specialized nature of the field, multiple evaluation metrics are proposed, including any two or more of the following: knowledge depth, knowledge breadth, illusion, harmfulness, and privacy. These evaluation metrics more comprehensively and accurately reflect the model's performance under different dimensions of evaluation metrics, thereby better evaluating the model's performance.
[0081] However, the processing and output results of medical models may differ for different evaluation metrics. For example, when evaluating the performance of a medical model under the knowledge breadth metric, the model processes the medical data to output the answer to the question; that is, for the input question, processing allows the model to output the answer. Conversely, when evaluating the performance of a medical model under the knowledge depth metric, the model processes the medical data to output a new question corresponding to the input question; that is, for the input question, processing allows the model to output a new question corresponding to the input question, requiring the new question to involve a broader knowledge base than the input question. Thus, it is evident that medical models differ in their processing and output of medical data for the knowledge depth and knowledge breadth metric.
[0082] Of course, the processing and output results of medical models may be the same for different evaluation indicators. For example, regarding harmfulness and privacy, when evaluating the performance of a medical model under the harmfulness evaluation indicator, the medical model processes the medical data by outputting the diagnosis name and / or drug name corresponding to the condition. That is, for the input condition, the model can output the diagnosis name and / or drug name corresponding to the condition through processing. Similarly, when evaluating the performance of a medical model under the privacy evaluation indicator, the medical model processes the medical data by outputting the diagnosis name, drug name, medical records, etc., corresponding to the condition. That is, for the input condition, the model can output the diagnosis name, drug name, medical records, etc., corresponding to the condition through processing. It can be seen that medical models have commonalities in the processing and results of medical data for the two evaluation indicators of harmfulness and privacy.
[0083] Among these, knowledge breadth measures the breadth of medical knowledge a medical model covers, assessing its ability to handle information across various medical topics and domains; knowledge depth assesses the model's ability to deeply understand and apply medical knowledge, including its capacity to provide information on more complex medical questions; harmfulness focuses on whether the model's output may lead to potential risks or errors in medical decision-making, helping to ensure the model's safety and reliability; illusion focuses on whether the model is susceptible to inaccurate or misleading medical data, enabling early identification and correction of potential problems; and privacy examines whether the model effectively protects patients' privacy and sensitive information when addressing medical issues, meeting healthcare industry privacy regulations and standards.
[0084] Specifically, knowledge breadth, or the coverage of knowledge, can be understood as the scope of knowledge encompassed by the medical model. Since the medical field often includes multiple more specialized areas, such as physiology, pathology, pharmacology, clinical medicine, and imaging, and different medical problems require support from different fields of medical knowledge, a medical model with broad knowledge coverage can better address diverse medical issues. Furthermore, considering that many medical problems are comprehensive and require consideration of multiple factors to provide an accurate answer, a medical model with broad knowledge coverage can provide more comprehensive information, thereby helping relevant personnel to make a more comprehensive and accurate judgment by integrating various factors.
[0085] Knowledge depth refers to the breadth and complexity of the knowledge involved, building upon the breadth of knowledge. Because the medical field encompasses a wide range of complex knowledge, covering multiple levels from biology and physiology to disease diagnosis and treatment, medical models need a deep understanding of this knowledge to accurately analyze, understand, and interpret medical data. Furthermore, considering the significant physiological and pathological differences between individuals, addressing individual variations is crucial in medical decision-making. In-depth medical knowledge helps medical models better understand these individual differences, enabling them to provide more targeted and personalized treatment recommendations for patients. In addition, since medical knowledge is not limited to a single field, but may involve multiple disciplines such as biology, chemistry, and statistics, in-depth medical knowledge can facilitate interdisciplinary knowledge transfer in medical models, leading to a better understanding and analysis of medical data.
[0086] Adverse effects refer to the harm caused by erroneous decisions made by medical models. In the medical field, erroneous decisions by medical models can lead to serious health risks and personal injury, making it essential to assess the adverse effects of medical models. Medical models are commonly used for critical tasks such as disease diagnosis, treatment planning, and risk prediction. If the diagnoses, predictions, or recommendations made by medical models in these critical tasks are incorrect, inaccurate, or based on insufficient data, they are highly likely to have serious negative impacts on patients' health. Therefore, the adverse effects assessment of medical models is crucial.
[0087] Hallucination, or the delusion of a medical model, simply means that the model is "seriously talking nonsense." When a medical model exhibits hallucinations, it will output incorrect or unreliable results with a high degree of confidence. While models can often produce very realistic outputs in specific tasks such as text generation and question answering, this does not mean that the model truly understands the meaning of the generated text. When this phenomenon occurs in the medical field, it is extremely dangerous. Medical models may output inaccurate, absurd, or even dangerous content, leading to misdiagnosis in medicine. Therefore, assessing the hallucinations of medical models is of paramount importance.
[0088] Privacy refers to the sensitivity and privacy assessment of the output content by medical models. Given that medical data constitutes personal privacy, containing sensitive information such as medical records, disease diagnoses, and medication prescriptions, privacy protection is essential. Privacy protection prevents data leaks, misuse, or unauthorized access. Furthermore, in the medical field, protecting patient privacy is crucial for establishing good doctor-patient relationships. Therefore, once privacy is compromised, patients find it difficult to trust doctors and institutions, and may even develop doubts, resisting further diagnosis and treatment, thus delaying disease treatment and hindering medical innovation and progress.
[0089] Step 130: Based on the processing results, determine the evaluation results of the medical model under each evaluation indicator. The evaluation indicators include at least two of the following: knowledge depth, knowledge breadth, hallucination, harmfulness, and privacy.
[0090] Step 140: Determine the performance of the medical model based on the evaluation results of the medical model under each evaluation indicator.
[0091] Specifically, after obtaining the processing results of the medical model on the medical data through steps 110 and 120, steps 130 and 140 can be executed. Based on these processing results, the evaluation results of the medical model under each evaluation index are determined, and the model performance is further evaluated based on these evaluation results. This process specifically includes:
[0092] First, the processing results of the medical data output by the medical model can be used to determine the processing results used to evaluate the performance of the medical model on each evaluation indicator. Specifically, this can be to determine the processing results of the medical model on each evaluation indicator, such as knowledge depth, knowledge breadth, illusion, harmfulness, and privacy.
[0093] Subsequently, based on the processing results corresponding to each selected evaluation indicator, the performance of the medical model on each evaluation indicator can be determined. That is, the evaluation result of the medical model under the evaluation indicator can be determined by comprehensively considering the processing results of the medical data corresponding to the evaluation indicator. Specifically, this can be done by combining the label data (such as the correct answer to the input question), other medical data (such as medical knowledge graphs), or the results obtained by further analysis and identification based on the processing results (such as sensitive information identification results, correlation matching results, consistency matching results, etc.) to determine the evaluation result of the medical model under the evaluation indicator.
[0094] Here, the evaluation result can be a specific score reflecting the performance of the medical model under the corresponding evaluation indicator, such as 50, 80, or 100 points. It can also be a rating level that measures the performance of the medical model under the corresponding evaluation indicator, such as excellent, good, qualified, or unqualified. Alternatively, it can refer to the probability of the medical model exhibiting the performance of the corresponding evaluation indicator, such as 30% for hallucinations, 33% for harm, or 80% for privacy.
[0095] Furthermore, after obtaining the evaluation results of the medical model under each evaluation indicator, the performance of the medical model can be evaluated based on these results. In other words, the performance of the medical model can be comprehensively measured by its performance under each evaluation indicator. This can be achieved by directly reflecting the performance of the medical model under each evaluation indicator, or by further calculating the evaluation results of each indicator, taking into account the medical model's emphasis, focus, or frequency of scenario-related indicators in each evaluation indicator, to obtain the overall performance of the medical model.
[0096] The medical model evaluation method provided by this invention processes medical data through a medical model to obtain the processing results. Based on the processing results, the evaluation results of the medical model under various evaluation indicators are determined. The evaluation indicators include at least two of the following: knowledge depth, knowledge breadth, illusion, harmfulness, and privacy. Based on the evaluation results of the medical model under each evaluation indicator, the performance of the medical model is determined. By considering the professional characteristics of the medical field that the medical model addresses, evaluation indicators are designed from multiple dimensions, and the model performance is evaluated based on the performance of the medical model under the multi-dimensional evaluation indicators. This not only achieves a more comprehensive and accurate evaluation but also makes the evaluation process more professional and the evaluation effect better. It overcomes the shortcomings of current model performance evaluations that lack consideration of medical knowledge and the professionalism of the medical field, resulting in low accuracy and reliability of the results, and achieves effective and reliable performance evaluation.
[0097] Based on the above embodiments, step 120 includes:
[0098] Based on the medical model, the medical data in each assessment scenario are processed to obtain the processing results of the medical data in each assessment scenario;
[0099] Step 130 includes: determining the evaluation results of the medical model under each evaluation indicator based on the processing results of medical data under each evaluation scenario and the correspondence between each evaluation indicator and each evaluation scenario.
[0100] Step 140 includes: determining the scenario evaluation results of the medical model under each evaluation indicator based on the indicator evaluation results of the medical model under each evaluation indicator and the correspondence between each evaluation indicator and each evaluation scenario;
[0101] The performance of the medical model is determined based on the evaluation results of the medical model in various evaluation scenarios. The evaluation scenarios include knowledge scenarios and application scenarios. The evaluation indicators corresponding to knowledge scenarios include at least one of knowledge depth, knowledge breadth, and hallucination. The evaluation indicators corresponding to application scenarios include at least one of hallucination, harmfulness, and privacy.
[0102] Specifically, steps 120 and 130, which involve processing medical data according to the medical model to obtain the processing results, and determining the evaluation results of the medical model under each evaluation indicator based on these results, may include:
[0103] Understandably, when using medical data to evaluate the performance of a medical model, the performance evaluation can be conducted specifically for each evaluation scenario. That is, the medical data in each evaluation scenario can be processed first to obtain the processing results of the medical model for each evaluation scenario. Then, the correspondence between each evaluation indicator and each evaluation scenario can be combined to comprehensively determine the indicator evaluation results of the medical model under each evaluation indicator. Furthermore, based on this, the scenario evaluation results of the medical model can be determined again by combining the above correspondence. Finally, the model performance can be evaluated based on these scenario evaluation results.
[0104] In this embodiment of the invention, by using a calculation method that prioritizes indicators over scenarios, the performance of the medical model under various evaluation indicators can be evaluated by combining the processing results of medical data from multiple scenarios. This allows for a more comprehensive and accurate assessment of the medical model's performance under each evaluation indicator. Consequently, when determining the scenario evaluation results of the medical model in each evaluation scenario based on the evaluation results of each indicator, the results can more accurately and comprehensively reflect the model's performance in each evaluation scenario. Ultimately, this makes the evaluated model performance more complete, comprehensive, accurate, and professional.
[0105] Compared to the approach of directly determining the evaluation results of medical models under evaluation indicators in each evaluation scenario based on the processing results of medical data in each evaluation scenario, and then determining the scenario evaluation results of medical models in each evaluation scenario based on the corresponding relationships, the method in the first step of determining the evaluation results of evaluation indicators in each evaluation scenario limits the determination of evaluation indicator results to the specific evaluation scenario. That is, it only considers the processing results of medical data in this evaluation scenario, without considering that the evaluation indicator may be involved in other evaluation scenarios, and without referring to the processing results of medical data in other evaluation scenarios. As a result, the accuracy and reliability of the corresponding evaluation indicator results are not high, which leads to significant problems in the subsequent scenario evaluation results and the evaluation of medical model performance, resulting in a series of chain reactions. The embodiments of the present invention have better effects in the local evaluation and global evaluation of medical model performance, and achieve more targeted and reliable performance evaluation.
[0106] Specifically, when processing medical data, medical models can process the medical data in each evaluation scenario separately to obtain the processing results for each evaluation scenario. Here, considering that traditional model performance evaluation is mostly based on a single scenario, the evaluation results based on a single scenario often have certain limitations and randomness, and their feasibility is not very high. In short, when a model performs well in a specific scenario, it does not mean that it will perform well in other scenarios. Therefore, the results obtained through a single scenario are not entirely reliable. Therefore, this embodiment of the invention considers multiple different perspectives and multiple practical application scenarios to provide multi-perspective and multi-scenario evaluation methods and channels for the performance evaluation of medical models, so as to achieve more accurate and reliable performance evaluation.
[0107] It is understood that the embodiments of the present invention propose evaluation scenarios for medical models from two levels: knowledge and application. Specifically, these scenarios can include knowledge scenarios and application scenarios. Knowledge scenarios are knowledge-based question answering, while application scenarios can include assisted diagnosis, medication recommendation, case generation, disease prediction, etc. The evaluation indicators corresponding to knowledge scenarios can be any one or more of knowledge depth, knowledge breadth, and hallucination. The evaluation indicators corresponding to application scenarios can be any one or more of harmfulness, privacy, and hallucination.
[0108] Preferably, in this embodiment of the invention, the evaluation scenario and evaluation index are set to a many-to-many relationship. Figure 2 This is a diagram showing the relationship between the evaluation indicators and evaluation scenarios provided by this invention, such as... Figure 2As shown, the assessment indicators for knowledge-based question answering include breadth of knowledge, depth of knowledge, and hallucination; the assessment indicators for auxiliary diagnosis include harmfulness, hallucination, and privacy; the assessment indicators for medication recommendations include harmfulness, hallucination, and privacy; and the assessment indicators for case generation include hallucination and privacy.
[0109] Among them, knowledge question answering, specifically medical knowledge question answering, is a natural language processing task that enables medical models to understand people's questions about the medical field and provide accurate and useful medical knowledge or information as answers. This task typically requires combining medical knowledge and natural language understanding technology to answer various questions related to health, disease, treatment, and drugs; therefore, medical models should possess at least basic medical knowledge question answering capabilities.
[0110] Medical assistance diagnosis, also known as medical diagnostic assistance, refers to the use of medical models to assist doctors or medical professionals in making accurate diagnoses during the medical diagnostic process. In this process, medical models can utilize large-scale medical literature and case data to learn the characteristics and patterns of various diseases, thereby enabling them to assist doctors in making diagnoses.
[0111] Medication recommendation, or medical medication recommendation, is a task that requires providing patients with advice on appropriate drug treatment options. This task necessitates combining clinical knowledge, medical databases, drug information, and the patient's specific circumstances to generate accurate and targeted medication recommendations. During training, the medical model learns from a vast amount of medical information sources, including medical literature, clinical research reports, and drug databases. It acquires knowledge about the characteristics, indications, contraindications, and drug interactions of different drugs, and is capable of analyzing patient medical records, symptom descriptions, laboratory test results, and the patient's medical history. By deeply understanding this information, the medical model can better infer the patient's health status and treatment needs.
[0112] Medical record generation, or patient medical record generation, involves creating medical records or case reports for patients. Medical records are crucial documents in the medical process, containing information such as the patient's medical history, diagnosis, treatment plan, laboratory results, symptom descriptions, and observations and recommendations from healthcare professionals. They are essential for patient management and medical research. Medical models, trained through extensive deep learning, have learned medical knowledge and writing patterns from massive amounts of medical literature, case reports, clinical guidelines, and other medical-related text data, thus acquiring the ability to generate medical records. Therefore, they can provide doctors and healthcare professionals with a powerful tool to improve the quality and efficiency of medical records.
[0113] In other words, medical models can process medical data in both knowledge-based and application-based scenarios, resulting in the processing results for both scenarios. It's important to note that the medical model's processing of medical data differs depending on the evaluation scenario. This is because the model's output varies across different scenarios. For example, in knowledge-based question answering, the model might output the answer to a question or a new question, depending on the specific evaluation metrics. In diagnostic assistance, the model outputs the diagnosis name; in medication recommendation, it outputs the drug name; and in case generation, it outputs a medical record or case report.
[0114] Correspondingly, when facing the same scenario, the medical model may process medical data in the same or different ways. This is because the medical model may process different evaluation indicators in the same evaluation scenario. For example, for hallucination, harmfulness and privacy corresponding to auxiliary diagnosis, the processing result output by the medical model may be knowledge triples, diagnosis name and diagnosis name. It can be seen that the medical model's processing of medical data in the same evaluation scenario is related to the evaluation indicators.
[0115] Furthermore, the evaluation results of the medical model under each evaluation indicator can be determined based on the processing results of the medical data in each evaluation scenario output by the medical model. That is, based on the output results of the medical data in each evaluation scenario, and combined with the correspondence between each evaluation indicator and each evaluation scenario, the evaluation results of the medical model under each evaluation indicator can be obtained. Specifically, this can be done by first extracting the specific evaluation scenarios involved in evaluating the performance of the medical model under each evaluation indicator through the correspondence between each evaluation indicator and each evaluation scenario, and then determining the processing results required to evaluate the performance of the medical model on each evaluation indicator from the processing results of the medical data in each evaluation scenario based on these specific evaluation scenarios, and finally combining these processing results to determine the evaluation results of the medical model under each evaluation indicator.
[0116] Specifically, after obtaining the processing results of medical data under knowledge-based question answering, assisted diagnosis, medication recommendation, and medical record generation, the specific scenarios involved in each assessment indicator can be determined based on the correspondence between the above assessment scenarios and assessment indicators. For example, knowledge breadth and knowledge depth both correspond to knowledge-based question answering, harmfulness corresponds to assisted diagnosis and medication recommendation, hallucination corresponds to knowledge-based question answering, assisted diagnosis, medication recommendation, and medical record generation, and privacy corresponds to assisted diagnosis, medication recommendation, and medical record generation.
[0117] Next, based on the assessment scenarios corresponding to each assessment indicator, the processing results corresponding to each assessment indicator are determined from the processing results of medical data under each assessment scenario. For example, knowledge breadth and knowledge depth both correspond to the processing results of medical data under knowledge question answering, harmfulness corresponds to the processing results of medical data under auxiliary diagnosis and medication recommendation, hallucination corresponds to the processing results of medical data under knowledge question answering, auxiliary diagnosis, medication recommendation and medical record generation, and privacy corresponds to the processing results of medical data under auxiliary diagnosis, medication recommendation and medical record generation.
[0118] Subsequently, for each evaluation indicator, the evaluation results of the medical model under each evaluation indicator can be determined by combining the processing results of medical data under each evaluation scenario. For example, for knowledge breadth and knowledge depth, since they only correspond to the knowledge question-and-answer evaluation scenario, the evaluation results of the medical model under knowledge breadth and knowledge depth can be determined directly based on the processing results of medical data under the knowledge question-and-answer evaluation scenario. For harmfulness, hallucination, and privacy, since these three correspond to multiple evaluation scenarios, the evaluation results of the medical model under these three evaluation indicators can be determined by combining the processing results of medical data under auxiliary diagnosis and medication recommendation. For example, the evaluation results of the medical model under harmfulness can be determined by combining the processing results of medical data under auxiliary diagnosis and medication recommendation.
[0119] Furthermore, based on the evaluation results of the medical model under each evaluation indicator, the evaluation results of the medical model under each evaluation scenario can be determined, i.e., the scenario evaluation results. In this way, the performance of the medical model can be evaluated based on the scenario evaluation results under each evaluation indicator. That is, based on the evaluation results of each evaluation indicator, the correspondence between each evaluation indicator and each evaluation scenario can be used again to determine the scenario evaluation results of the medical model under each evaluation scenario. Finally, the performance of the medical model can be determined based on the scenario evaluation results.
[0120] Specifically, this can be achieved by first identifying the specific evaluation indicators involved in evaluating the performance of the medical model in each evaluation scenario through the correspondence between each evaluation indicator and each evaluation scenario. For example, for knowledge-based question answering, the evaluation indicators required to evaluate the performance of the medical model in this evaluation scenario include knowledge breadth, knowledge depth, and hallucination. For assisted diagnosis, the evaluation indicators required to evaluate the performance of the medical model in this evaluation scenario include harmfulness, hallucination, and privacy.
[0121] Then, the evaluation result of this specific evaluation indicator can be determined from the evaluation results of each evaluation indicator; for example, for knowledge question answering, the evaluation results of knowledge breadth, knowledge depth and hallucination can be determined, and for auxiliary diagnosis, the evaluation results of harmfulness, hallucination and privacy can be determined.
[0122] Then, the evaluation results of this specific evaluation indicator can be combined to determine the scenario evaluation results of the medical model in each evaluation scenario. For example, for knowledge question answering, the evaluation results of knowledge breadth, knowledge depth and hallucination indicators can be combined to determine the scenario evaluation results of the medical model in knowledge question answering. For assisted diagnosis, the evaluation results of harmfulness, hallucination and privacy indicators can be combined to determine the scenario evaluation results of the medical model in assisted diagnosis.
[0123] Here, the scenario evaluation result can be a specific score reflecting the performance of the medical model in the corresponding evaluation scenario, such as 50 points, 80 points, etc.; it can also be a rating level that measures the performance of the medical model in the corresponding evaluation scenario, such as excellent, good, qualified, unqualified, etc.; or it can be an evaluation that directly refers to the performance of the medical model in the corresponding evaluation scenario, such as the medical model performing well in knowledge question answering but poorly in assisted diagnosis.
[0124] Then, the performance of the medical model can be determined based on the scenario evaluation results in each evaluation scenario. That is, the performance of the medical model can be evaluated by comprehensively considering the scenario evaluation results in knowledge question answering, assisted diagnosis, medication recommendation, and medical record generation. Specifically, the performance of the medical model can be comprehensively measured by the performance of the medical model in each of the above evaluation scenarios. Here, the performance of the medical model can be directly reflected by the scenario evaluation results in each evaluation scenario. That is, the performance of the medical model can be directly reflected by the scenario evaluation results in each evaluation scenario. Alternatively, the scenario evaluation results in each evaluation scenario can be further calculated by comprehensively calculating the scenario evaluation results in each evaluation scenario based on the medical model's emphasis, attention, or frequency in each evaluation scenario, thereby obtaining the performance of the medical model.
[0125] In this embodiment of the invention, the performance of medical models is evaluated from multiple perspectives and scenarios, completely overcoming the shortcomings of traditional single-scenario model performance evaluation, which leads to inaccurate evaluation processes and unreliable results. By fully considering multiple different perspectives and various practical application scenarios, a comprehensive evaluation of the performance of medical models is conducted. This not only makes the evaluation process more professional but also makes the evaluated model performance more accurate, reliable, objective, and reasonable, thus enhancing its professionalism and reliability. Furthermore, it helps decision-makers gain a more comprehensive understanding of the actual performance of medical models, enabling targeted optimization and improvement to better meet diverse needs.
[0126] Based on the above embodiments, medical data in each evaluation scenario are processed using a medical model to obtain the processing results of medical data in each evaluation scenario, including:
[0127] Determine the evaluation dataset corresponding to each evaluation scenario;
[0128] The medical data in each evaluation dataset are clustered, and medical data are selected from the evaluation dataset as example data based on each cluster category.
[0129] Based on example data for each assessment scenario and medical data in each assessment dataset, output prompt statements corresponding to each assessment scenario are generated.
[0130] Input the output prompts corresponding to each evaluation scenario into the medical model to obtain the processing results of the medical data under each evaluation scenario output by the medical model.
[0131] Specifically, the process of processing medical data for each assessment scenario based on a medical model to obtain the processing results for each assessment scenario may include:
[0132] Because machine learning models are generative models, their outputs are highly open and diverse. To evaluate medical models in a more automated way, this embodiment of the invention employs contextual learning for all the aforementioned evaluation scenarios. The core of contextual learning lies in learning from task-related analogies, requiring several examples to be demonstrated in a specific format, and then combining the current input with the examples as input to the medical model. Essentially, it utilizes a trained medical model to estimate the probability of the answer based on the demonstrated examples. In short, it uses several complete examples to help the medical model better understand the current input, thereby making more accurate predictions, while maintaining consistency between the output format and the examples.
[0133] Furthermore, based on the characteristics of contextual learning, it can be found that examples have a significant impact on the medical model's understanding of the current input. Therefore, representative sample data can be selected when choosing examples, which is more conducive to reflecting the generative capabilities of the medical model. In view of this, in this embodiment of the invention, it is proposed to first use clustering to select example data from the dataset corresponding to each evaluation scenario, and then use this example data, along with the dataset corresponding to each evaluation scenario, to construct the input data for model performance evaluation in each evaluation scenario.
[0134] Specifically, in this embodiment of the invention, the datasets for each evaluation scenario are first determined, i.e., the evaluation datasets corresponding to each evaluation scenario. Each evaluation dataset contains a large amount of medical data, which can be used for performance evaluation of medical models. For knowledge-based question answering, medical data from multiple departments (e.g., 20 departments, including surgery, internal medicine, hematology, imaging, and laboratory testing) in actual medical processes can be organized to construct a medical knowledge question-and-answer base. This base includes medical knowledge on multiple aspects such as diseases, symptoms, drugs, testing, and surgery, and is further divided into multiple knowledge levels, including conceptual knowledge, hierarchical knowledge, and relational knowledge. A question-and-answer pair dataset is constructed for each knowledge level, including questions and their corresponding correct answers.
[0135] For assisted diagnosis, datasets can be constructed based on various conditions (e.g., 5000, 10000, etc.), diagnosis names, and diagnostic results. The data in this dataset takes the patient's condition as input and the correct diagnosis name as output. For medication recommendations, datasets can be constructed based on various conditions (e.g., 4000, 8000, etc.) and medication data. The data in this dataset takes the patient's condition as input and the correct medication name as output. For medical record generation, datasets can be constructed using a large amount of patient medical history, diagnoses, treatment plans, symptom descriptions, and observations and suggestions from medical professionals.
[0136] Then, the medical data in each evaluation dataset can be clustered, and medical data can be selected from the evaluation dataset as example data according to each cluster category. That is, the medical data in the dataset of each evaluation scenario can be clustered, similar medical data can be grouped into one category, and then representative sample data can be selected from each cluster category as example data. Specifically, this can be done by using a clustering algorithm to perform hierarchical clustering of the medical data in each evaluation scenario, and then selecting typical medical data from each cluster category as example data.
[0137] Here, hierarchical clustering is used to select representative example data, which not only helps to reduce the size of the dataset, but also retains the main information in the corresponding dataset, thereby greatly saving the computational resources and time required in subsequent evaluations.
[0138] Then, based on the example data for each evaluation scenario and the medical data in each evaluation dataset, output prompt statements corresponding to each evaluation scenario can be generated. That is, the example data for each evaluation scenario can be used to construct the input data for model performance evaluation in each evaluation scenario. This input data is the output prompt statement that prompts the medical model to output the corresponding output based on the input. Specifically, this can be done by combining the medical data in each evaluation scenario with the example data of the corresponding evaluation scenario, and concatenating the medical data with the example data to form a prompt statement in the form of a prompt. This prompt statement specifies that the output of the medical model must be consistent with the output corresponding to the example data.
[0139] Furthermore, after obtaining the output prompt statements, the output prompts can be used as input to the medical model to request the medical model to make corresponding outputs based on the input. That is, the output prompt statements corresponding to each evaluation scenario can be input into the medical model so that the medical model can make corresponding outputs based on the example data and medical data contained in the input output prompt statements, so as to output the processing results of medical data in the corresponding evaluation scenario. In other words, the medical model can understand the current task based on the example data contained in the output prompt statements corresponding to each evaluation scenario, and thus accurately output the processing results of medical data in each evaluation scenario.
[0140] In this embodiment of the invention, hierarchical clustering can more effectively extract representative sample data from a large dataset, better capture the complex data distribution and scene changes in the real world, and thus better reflect the characteristics and changes of the medical model under different evaluation scenarios, thereby improving the accuracy and reliability of model performance evaluation.
[0141] The method provided in this invention uses context learning to process each evaluation scenario and selects representative typical examples from medical data through clustering to perform performance evaluation, which can more comprehensively and objectively evaluate the performance of medical models.
[0142] Based on the above embodiments, when the evaluation indicators include breadth of knowledge, the medical data includes input questions, the processing results include question answers, and step 130 includes:
[0143] Match the answer to the question with the correct answer to the input question;
[0144] If the matching result indicates that the answer to the question is related to the correct answer, then the medical model is determined to have answered the input question correctly.
[0145] Otherwise, determine that the medical model is answering the input question incorrectly;
[0146] The evaluation results of the medical model in terms of knowledge breadth are determined based on the number of correctly answered input questions and the number of incorrectly answered input questions.
[0147] Specifically, when the evaluation indicators include knowledge breadth, the medical data may include input questions, and the processing results may include the answers to those questions. In this case, step 130, the process of determining the evaluation results of the medical model under each evaluation indicator based on the processing results, specifically includes:
[0148] To evaluate the performance of the medical model in terms of knowledge breadth, a knowledge-based question-and-answer scenario can be used. The medical data used consists of medical knowledge from multiple knowledge levels contained in a pre-constructed medical knowledge question-and-answer database. The specific process is as follows: After determining the input question, the medical model obtains the processing result for the input question, i.e., the answer to the input question. Then, the answer is matched with the correct answers to the input question in the medical knowledge question-and-answer database to determine if they are the same, i.e., whether the medical model's answer to the input question is correct. In this embodiment of the invention, medical knowledge from three knowledge levels in the medical knowledge question-and-answer database can be sampled separately, selecting a large amount of medical data (e.g., 2000 data points) for evaluation.
[0149] Furthermore, if the matching results indicate that the question answer is related to the correct answer, that is, if the content of the question answer and the correct answer are related, considering the openness and diversity of the medical model's output, this embodiment of the invention does not require the question answer output by the medical model to be exactly the same as the correct answer. It only requires that the two are related and have a high degree of correlation, that is, that they refer to the same content and have the same meaning. Here, the judgment on whether the question answer and the correct answer are related can be determined by semantic matching, feature similarity calculation, etc. At this time, it can be determined that the question answer output by the medical model is correct, that is, its answer to the input question is correct.
[0150] Conversely, if the matching results indicate that the answer to the question is unrelated to or has a low degree of correlation with the correct answer, that is, if the content of the answer to the question is not related to the content of the correct answer, then it can be determined that the answer to the question output by the medical model is incorrect, that is, the answer to the input question is wrong.
[0151] Following this, the performance of the medical model can be evaluated based on these results. Specifically, the evaluation results of the medical model in terms of knowledge breadth can be determined by the number of correctly answered input questions and the number of incorrectly answered input questions. The specific calculation formula is as follows:
[0152]
[0153] Based on the above embodiments, when the evaluation indicators include knowledge depth, and the medical data includes input questions, step 120 includes:
[0154] Based on the input question, determine the prompt statement to be generated;
[0155] The generated prompt statement is input into the medical model to obtain the target question corresponding to the input question output by the medical model;
[0156] The generated prompt statement is used to prompt the medical model to generate a target question based on the input question. The target question is more difficult than the input question.
[0157] Specifically, when the evaluation indicators include knowledge depth and the medical data includes input questions, then step 120, which involves processing the medical data according to the medical model to obtain the processed medical data results, may specifically include:
[0158] Knowledge depth is a further exploration based on knowledge breadth. It can test whether a medical model can handle complex medical problems and provide valuable and meaningful answers when faced with insufficient information.
[0159] Based on this, the embodiments of the present invention also use the knowledge question answering evaluation scenario and provide an automated evaluation process. First, instruction templates can be constructed for the three knowledge levels of knowledge breadth. These instruction templates guide the medical model to generate more difficult questions. That is, based on the medical questions in the three knowledge levels of the medical knowledge question answering library, a prompt statement can be constructed. Based on the input question, the medical model outputs a prompt statement for generating more difficult questions. For example, it could be "Can you design more difficult questions for input question 'XXXX'?".
[0160] Subsequently, the generated prompt statement can be input into the medical model to request the model to output a corresponding target question, which is the input question output by the medical model. In other words, the generated prompt statement is input into the medical model so that it can output a corresponding processing result based on the input question and prompt information contained in the generated prompt statement. This result is a target question that is more difficult than the input question and involves a broader and deeper range of knowledge. Here, based on the prompt statement, the difficulty of the target question output by the medical model must be higher than the difficulty of the input question.
[0161] Based on the above embodiments, step 130 includes:
[0162] Based on the target problem, determine the target output prompt statement;
[0163] Input the target output prompt into the medical model to obtain the answer to the target question output by the medical model;
[0164] Match the answers to the questions with the correct answers to the target questions;
[0165] If the matching result indicates that the answer to the question is related to the correct answer, then the medical model is determined to have answered the target question correctly.
[0166] Otherwise, determine that the medical model is answering the target question incorrectly;
[0167] The evaluation results of the medical model under the knowledge depth are determined based on the number of target questions answered correctly and the number of target questions answered incorrectly.
[0168] Specifically, based on the above, after the medical model generates a target question that is more difficult than the input question under the guidance of the generated prompt statement, the target question can be used as input to request the medical model to output the answer to the target question.
[0169] Understandably, firstly, output prompts can be generated based on the target question to prompt the medical model to understand and answer the input target question, and output the answer to the target question. To distinguish it from the previously mentioned output prompts, this can be referred to as the target output prompt. Next, the target output prompt can be used as input to the medical model to request the medical model to output the corresponding answer to the target question.
[0170] By repeating the above process multiple times, that is, by iterating from the input question to the construction of the instruction template, to the output target question and its answer, multiple target questions and their answers can be obtained from the medical model.
[0171] Subsequently, the answer to the target question is matched with the correct answer to the target question to determine if they are the same; that is, the answer matching determines whether the medical model's answer to the target question is correct. Here, the correct answer to the target question can be determined manually, searched from a medical knowledge question-and-answer database, or retrieved from other medical literature; this embodiment of the invention does not specifically limit this. In this embodiment of the invention, medical knowledge from three knowledge levels in the medical knowledge question-and-answer database can be sampled separately, and a large amount of medical data (e.g., 2000 data points) can be selected for evaluation.
[0172] Furthermore, if the matching results indicate that the question answer is related to the correct answer, that is, if the content of the question answer and the correct answer are related, considering the openness and diversity of the medical model's output, this embodiment of the invention does not require the question answer output by the medical model to be exactly the same as the correct answer. It only requires that the two are related and have a high degree of correlation, that is, that they refer to the same content and have the same meaning. Here, the judgment on whether the question answer and the correct answer are related can be determined by semantic matching, feature similarity calculation, etc. At this time, it can be determined that the question answer output by the medical model is correct, that is, its answer to the target question is correct.
[0173] Conversely, if the matching results indicate that the answer to the question is unrelated to or has a low degree of correlation with the correct answer, that is, if the content of the answer to the question is not related to the content of the correct answer, then it can be determined that the answer to the question output by the medical model is incorrect, that is, the answer to the target question is wrong.
[0174] Following this, the performance of the medical model can be evaluated based on these results. Specifically, the evaluation results of the medical model at the level of knowledge depth can be determined by the number of correctly answered target questions and the number of incorrectly answered target questions. The specific calculation formula is as follows:
[0175]
[0176] Based on the above embodiments, when the evaluation indicators include hazard, the medical data includes the patient's condition, the processing results include the diagnosis name and / or the drug name, and step 130 includes:
[0177] Match the diagnosis name and / or drug name with the correct diagnosis name and / or correct drug name corresponding to the patient's condition;
[0178] If the matching results indicate that the diagnosis name and / or drug name are related to the correct diagnosis name and / or correct drug name, then the medical model is determined to be correct in diagnosing and / or prescribing the correct medication for the patient's condition; otherwise, the medical model is determined to be incorrect in diagnosing and / or prescribing the wrong medication for the patient's condition.
[0179] The indicators for assessing the harmfulness of the medical model are determined based on the number of patients with correct diagnoses and / or correct medication, as well as the number of patients with incorrect diagnoses and / or incorrect medication.
[0180] Specifically, when the assessment indicator includes harmfulness, the medical data may include the patient's condition. Since the assessment scenario corresponding to the harmfulness assessment indicator includes auxiliary diagnosis and / or medication recommendation, the processing result may include the diagnosis name and / or medication name. In this case, step 130, the process of determining the indicator assessment results of the medical model under each assessment indicator based on the processing result, specifically includes:
[0181] To evaluate the performance of the medical model under adverse conditions, an assessment scenario involving assisted diagnosis and / or medication recommendation can be used. The specific assessment process is as follows: For assisted diagnosis, the input is the patient's condition, and the medical model provides the processing result for the patient's condition, i.e., the diagnosis name corresponding to the patient's condition. For medication recommendation, the input is the patient's condition, and the medical model provides the processing result for the patient's condition, i.e., the medication name corresponding to the patient's condition. Then, the diagnosis name output by the medical model can be matched with the correct diagnosis name corresponding to the patient's condition in the assisted diagnosis dataset, and / or, the medication name output by the medical model can be matched with the correct medication name corresponding to the patient's condition in the medication recommendation dataset to determine if they are the same, i.e., whether the medical model's diagnosis and / or medication for the input patient's condition is correct.
[0182] Furthermore, if the matching results indicate that the diagnostic name is related to the correct diagnostic name, that is, if the diagnosis is related to the content of the correct diagnosis, considering the openness and diversity of the medical model's output, this embodiment of the invention does not require the diagnostic name output by the medical model to be exactly the same as the correct diagnostic name. It only requires that the two are related and have a high degree of correlation, that is, that they refer to the same content and have the same meaning. Here, the judgment on whether the question answer and the correct answer are related can be determined by semantic matching, feature similarity calculation, etc. At this time, it can be determined that the diagnostic name output by the medical model is correct, that is, its diagnosis of the input patient's condition is correct.
[0183] Accordingly, if the matching results indicate that the medication name is related to the correct medication name, that is, if the medication is associated with the correct medication, then it can be determined that the medication name output by the medical model is correct, meaning that the medication is correct for the input patient's condition. The determination of the correlation between the medication name and the correct medication name, and the consideration of their fault tolerance, are essentially the same as those for auxiliary diagnosis, and will not be elaborated upon here.
[0184] Correspondingly, if the matching results show that the diagnosis name is unrelated to or has a low correlation with the correct diagnosis name, and / or the medication name is unrelated to or has a low correlation with the correct medication name, that is, if the diagnosis name and / or medication name are not related to the correct diagnosis name and / or medication name, then it can be determined that the diagnosis name and / or medication name output by the medical model is incorrect, that is, its diagnosis and / or medication for the input patient's condition is incorrect.
[0185] Following this, the performance of the medical model can be evaluated based on these results. Specifically, the evaluation results of the medical model under harmful conditions can be determined based on the number of correct patient conditions and the number of incorrect patient conditions. The number of correct patient conditions includes the number of patients with correct diagnoses and / or correct medication, while the number of incorrect patient conditions includes the number of patients with incorrect diagnoses and / or incorrect medication. The specific calculation formula is as follows:
[0186]
[0187] Based on the above embodiments, when the evaluation indicators include hallucination, step 130 includes:
[0188] Based on the medical model, triples are extracted from medical data and its processing results to obtain input knowledge triples and output knowledge triples. The knowledge triples include head entities, tail entities, and entity relationships between head entities and tail entities.
[0189] Determine whether the input knowledge triples and the output knowledge triples are consistent, and whether the output knowledge triples are consistent with the medical knowledge graph;
[0190] If the input knowledge triplet and the output knowledge triplet are inconsistent, and / or the output knowledge triplet is inconsistent with the medical knowledge graph, then the processing result output by the medical model is determined to be hallucination output; otherwise, the processing result output by the medical model is determined to be normal output.
[0191] Based on the number of processed results from hallucination outputs and the number of processed results from normal outputs, the evaluation results of the medical model under hallucination are determined.
[0192] Specifically, when hallucinations are included in the evaluation indicators, step 130, which involves determining the evaluation results of the medical model under each evaluation indicator based on the processing results, specifically includes:
[0193] Figure 3 This is a schematic diagram illustrating the evaluation of the medical model provided by this invention under hallucination, as shown below. Figure 3 As shown, to evaluate the performance of the medical model under hallucination, at least one evaluation scenario can be used, including knowledge-based question answering, assisted diagnosis, medication recommendation, and medical record generation. Hallucinations in the medical model can be divided into two types: internal hallucinations and external hallucinations. Internal hallucinations occur when the output and input of the medical model are inconsistent, while external hallucinations occur when the output of the medical model is inconsistent with real knowledge.
[0194] In this embodiment of the invention, a knowledge matching strategy can be set. First, a medical model is used to extract the knowledge contained in the input and output respectively, forming knowledge triples. That is, the medical model can be used to extract entities and their entity relationships from medical data and its processing results to obtain knowledge triples, namely, the input knowledge triples corresponding to the input medical knowledge and the output knowledge triples corresponding to the output processing results. Here, the knowledge triples contain head entities, tail entities, and entity relationships between head entities and tail entities.
[0195] It is worth noting here that there may be more than one knowledge triple extracted from both the input and the output, depending on the specific content of the input and the output.
[0196] Next, it is necessary to determine whether the input knowledge triples and output knowledge triples are consistent, and whether the output knowledge triples are consistent with the medical knowledge graph. This involves calculating the consistency between the two types of knowledge triples, and the consistency between the output knowledge triples and the pre-constructed medical knowledge graph. Here, the consistency judgment between knowledge triples can be determined through vector calculations. Correspondingly, the consistency between the output knowledge triples and the medical knowledge graph can also be calculated through vector comparisons. This is because the medical knowledge graph can be viewed as numerous knowledge triples, containing multiple entities and the relationships between them. The medical knowledge graph here is pre-constructed from a large amount of medical knowledge and can be used to evaluate the performance of the medical model under hallucination.
[0197] Furthermore, if the input knowledge triplet and the output knowledge triplet are inconsistent, and / or the output knowledge triplet is inconsistent with the medical knowledge graph, that is, if the input knowledge triplet and the output knowledge triplet are different, and / or the output knowledge triplet does not have a corresponding knowledge triplet in the medical knowledge graph, it can be determined that the medical model has produced a hallucination, that is, the processing result output by the medical model is incorrect, and is a hallucination output.
[0198] Correspondingly, if the input knowledge triplet and the output knowledge triplet are the same, and the output knowledge triplet is the same as the medical knowledge graph, that is, if the input knowledge triplet and the output knowledge triplet are the same, and the output knowledge triplet has a corresponding knowledge triplet in the medical knowledge graph, it can be determined that the medical model has not experienced hallucinations. In other words, the processing result output by the medical model is normal and is a normal output.
[0199] Following this, the performance of the medical model can be evaluated based on these results. Specifically, the evaluation results of the medical model under hallucination can be determined based on the number of processed outputs from hallucination and the number of processed outputs from normal hallucination. The specific calculation formula is as follows:
[0200]
[0201] Based on the above embodiments, when privacy is included as an evaluation metric, step 130 includes:
[0202] Sensitive information is identified in the processing results to obtain the sensitive information identification results;
[0203] If the sensitive information identification result indicates that the processing result contains sensitive information, then the privacy anomaly of the processing result output by the medical model is determined.
[0204] Otherwise, ensure the privacy of the processed results output by the medical model is normal;
[0205] Based on the number of privacy-abnormal processing results and the number of privacy-normal processing results, the evaluation results of the medical model under privacy conditions are determined.
[0206] Specifically, when privacy is included in the evaluation indicators, step 130, the process of determining the evaluation results of the medical model under each evaluation indicator based on the processing results, includes:
[0207] To evaluate the performance of the medical model under privacy requirements, at least one evaluation scenario among assisted diagnosis, medication review, and medical record generation can be used to examine whether the output of the medical model contains sensitive patient information. Considering that sensitive information is typically a general domain information element, after obtaining the processing results of the medical model, sensitive information identification can be performed to confirm whether it contains sensitive information, thus obtaining the sensitive information identification result.
[0208] Here, the sensitive information identification process can be implemented through a sensitive information identification model. That is, a sensitive information identification model can be pre-trained, and then the processing results output by the medical model can be input into the sensitive information identification model to identify sensitive information, thereby obtaining the sensitive information identification result output by the model. The training process of the sensitive information identification model includes: first, collecting a large-scale corpus containing text and related named entity tags, including text from general domains such as news articles, Wikipedia, and social media posts; next, identifying the sensitive information tags in the text of the corpus, including names of people, places, telephone numbers, hospital names, and ID card numbers; then, based on this, a large-scale model can be generated and its sensitive information tags can be used to train an initial identification model to obtain a trained sensitive information identification model; this initial identification model can be a transformer-based entity recognition model.
[0209] Furthermore, if the results of sensitive information identification indicate that the processing results output by the medical model contain sensitive information, that is, if the processing results are confirmed to contain at least one or one of the aforementioned sensitive information through sensitive information identification, it can be determined that the medical model has a privacy infringement problem, that is, the output of the medical model infringes on privacy. At this time, it can be concluded that the output of the medical model is an abnormal output, that is, the privacy of the processing results output by the medical model is abnormal.
[0210] Correspondingly, if the results of sensitive information identification indicate that the processing results output by the medical model do not contain sensitive information, that is, if the processing results are confirmed to not contain any of the above-mentioned sensitive information through sensitive information identification, it can be determined that the medical model has not violated privacy, that is, the output of the medical model has not violated privacy. At this time, it can be determined that the output of the medical model is normal output, that is, the privacy of the processing results output by the medical model is normal.
[0211] Following this, the performance of the medical model can be evaluated based on these results. Specifically, the evaluation results of the medical model under privacy constraints can be determined based on the number of privacy-sensitive outcomes and the number of privacy-compliant outcomes. The specific calculation formula is as follows:
[0212]
[0213] Based on the above embodiments, Figure 4 This is an overall framework diagram of the medical model evaluation method provided by the present invention, such as... Figure 4 As shown, to ensure the effectiveness and reliability of medical models in clinical practice, this embodiment of the invention proposes a multi-perspective, multi-scenario medical model evaluation method. Specifically, the method involves: firstly, designing an evaluation index system centered on knowledge scenarios and application scenarios, including knowledge depth, knowledge breadth, illusion, harmfulness, and privacy; then, designing multi-perspective evaluation scenarios for the evaluation index system, namely knowledge scenarios and application scenarios; where knowledge scenarios refer to knowledge question answering, and application scenarios include assisted diagnosis, medication recommendation, and medical record generation; and finally, evaluating the overall performance of the medical model by combining contextual learning and hierarchical clustering.
[0214] The method provided in this invention can comprehensively evaluate the ability of medical models in medical text understanding and generation. An experiment was designed to collect text data in the medical field and evaluate the medical model based on context learning. The experimental results show that the evaluation method can comprehensively, accurately and objectively evaluate the performance of medical models, providing strong support for the application of medical models.
[0215] The medical model evaluation device provided by the present invention is described below. The medical model evaluation device described below and the medical model evaluation method described above can be referred to in correspondence.
[0216] Figure 5 This is a schematic diagram of the structure of the medical model evaluation device provided by the present invention, as shown below. Figure 5 As shown, the device includes:
[0217] Data determination unit 510 is used to determine medical data for model evaluation;
[0218] Data processing unit 520 is used to process the medical data based on a medical model to obtain the processing result of the medical data;
[0219] The result determination unit 530 is used to determine the indicator evaluation results of the medical model under each evaluation indicator based on the processing results. The evaluation indicators include at least two of the following: knowledge depth, knowledge breadth, hallucination, harmfulness, and privacy.
[0220] The performance evaluation unit 540 is used to determine the performance of the medical model based on the evaluation results of the medical model under various evaluation indicators.
[0221] The medical model evaluation device provided by this invention processes medical data through a medical model to obtain the processing results. Based on the processing results, it determines the evaluation results of the medical model under various evaluation indicators, including at least two of the following: knowledge depth, knowledge breadth, illusion, harmfulness, and privacy. Based on the evaluation results of the medical model under each evaluation indicator, it determines the performance of the medical model. By considering the professional characteristics of the medical field that the medical model addresses, it designs evaluation indicators from multiple dimensions and evaluates the model performance based on the performance of the medical model under these multi-dimensional evaluation indicators. This not only enables a more comprehensive and accurate evaluation but also makes the evaluation process more professional and the evaluation effect better. It overcomes the shortcomings of current model performance evaluations that lack consideration of medical knowledge and the professionalism of the medical field, resulting in low accuracy and reliability of the results, and achieves effective and reliable performance evaluation.
[0222] Based on the above embodiments, the data processing unit 520 is used for:
[0223] Based on the medical model, the medical data in each evaluation scenario are processed to obtain the processing results of the medical data in each evaluation scenario;
[0224] The result determination unit 530 is used for:
[0225] Based on the processing results of medical data under each evaluation scenario, and the correspondence between each evaluation indicator and each evaluation scenario, the evaluation results of the medical model under each evaluation indicator are determined.
[0226] The performance evaluation unit 540 is used for:
[0227] Based on the evaluation results of the medical model under each evaluation indicator, and the correspondence between each evaluation indicator and each evaluation scenario, the scenario evaluation results of the medical model under each evaluation scenario are determined.
[0228] Based on the scenario evaluation results of the medical model in various evaluation scenarios, the performance of the medical model is determined; the evaluation scenarios include knowledge scenarios and application scenarios, the evaluation indicators corresponding to the knowledge scenarios include at least one of knowledge depth, knowledge breadth, and hallucination, and the evaluation indicators corresponding to the application scenarios include at least one of hallucination, harmfulness, and privacy.
[0229] Based on the above embodiments, the data processing unit 520 is used for:
[0230] Determine the evaluation dataset corresponding to each evaluation scenario;
[0231] The medical data in each evaluation dataset are clustered, and based on each cluster category, medical data are selected from the evaluation dataset as example data.
[0232] Based on the example data of each assessment scenario and the medical data in each assessment dataset, output prompt statements corresponding to each assessment scenario are generated;
[0233] The output prompt statements corresponding to each evaluation scenario are input into the medical model to obtain the processing results of the medical data under each evaluation scenario output by the medical model.
[0234] Based on the above embodiments, when the evaluation index includes knowledge breadth, the medical data includes input questions, the processing result includes question answers, and the result determination unit 530 is used for:
[0235] Match the answer to the question with the correct answer to the input question;
[0236] If the matching result indicates that the answer to the question is related to the correct answer, then the medical model is determined to have answered the input question correctly.
[0237] Otherwise, the medical model is determined to have answered the input question incorrectly;
[0238] The evaluation results of the medical model under the breadth of knowledge are determined based on the number of correctly answered input questions and the number of incorrectly answered input questions.
[0239] Based on the above embodiments, when the evaluation index includes knowledge depth, and the medical data includes input questions, the data processing unit 520 is used for:
[0240] Based on the input question, determine the prompt statement to be generated;
[0241] The generated prompt statement is input into the medical model to obtain the target question corresponding to the input question output by the medical model;
[0242] The generated prompt statement is used to prompt the medical model to generate the target question based on the input question, wherein the difficulty of the target question is higher than that of the input question.
[0243] Based on the above embodiments, the result determination unit 530 is used for:
[0244] Based on the aforementioned target problem, determine the target output prompt statement;
[0245] The target output prompt is input into the medical model to obtain the answer to the target question output by the medical model.
[0246] Match the answer to the question with the correct answer to the target question;
[0247] If the matching result indicates that the answer to the question is related to the correct answer, then the medical model is determined to have answered the target question correctly.
[0248] Otherwise, the medical model is determined to be incorrect in its answer to the target question;
[0249] The evaluation results of the medical model at the knowledge depth are determined based on the number of target questions answered correctly and the number of target questions answered incorrectly.
[0250] Based on the above embodiments, when the evaluation indicator includes hazard, the medical data includes the patient's condition, and the processing result includes the diagnosis name and / or drug name, the result determination unit 530 is used for:
[0251] Match the diagnostic name and / or drug name with the correct diagnostic name and / or correct drug name corresponding to the patient's condition;
[0252] If the matching result indicates that the diagnosis name and / or the drug name is related to the correct diagnosis name and / or the correct drug name, then the medical model is determined to be correct in diagnosing and / or prescribing the correct medication for the patient's condition; otherwise, the medical model is determined to be incorrect in diagnosing and / or prescribing the wrong medication for the patient's condition.
[0253] The medical model's performance indicators under the stated harmfulness are determined based on the number of patients with correctly diagnosed and / or correctly prescribed medication, and the number of patients with incorrectly diagnosed and / or incorrectly prescribed medication.
[0254] Based on the above embodiments, when the evaluation index includes hallucination, the result determination unit 530 is used to:
[0255] Based on the medical model, triples are extracted from the medical data and its processing results to obtain input knowledge triples and output knowledge triples. The knowledge triples include head entities, tail entities, and entity relationships between the head entities and the tail entities.
[0256] Determine whether the input knowledge triple and the output knowledge triple are consistent, and whether the output knowledge triple is consistent with the medical knowledge graph;
[0257] If the input knowledge triplet and the output knowledge triplet are inconsistent, and / or the output knowledge triplet is inconsistent with the medical knowledge graph, then the processing result output by the medical model is determined to be a hallucination output.
[0258] Otherwise, the processing result output by the medical model is determined to be a normal output;
[0259] The evaluation results of the medical model under the hallucination are determined based on the number of processed results of hallucination output and the number of processed results of normal output.
[0260] Based on the above embodiments, when the evaluation index includes privacy, the result determination unit 530 is used to:
[0261] Sensitive information is identified from the processing results to obtain sensitive information identification results;
[0262] If the sensitive information identification result indicates that the processing result contains sensitive information, then the privacy anomaly of the processing result output by the medical model is determined.
[0263] Otherwise, the privacy of the processing results output by the medical model is confirmed to be normal.
[0264] Based on the number of privacy-abnormal processing results and the number of privacy-normal processing results, the evaluation results of the medical model under the privacy condition are determined.
[0265] Figure 6 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 6As shown, the electronic device may include a processor 610, a communications interface 620, a memory 630, and a communication bus 640, wherein the processor 610, communications interface 620, and memory 630 communicate with each other via the communication bus 640. The processor 610 can call logical instructions in the memory 630 to execute a medical model evaluation method, which includes: determining medical data for model evaluation; processing the medical data based on a medical model to obtain a processing result; determining the evaluation results of the medical model under various evaluation indicators based on the processing result, wherein the evaluation indicators include at least two of knowledge depth, knowledge breadth, hallucination, harmfulness, and privacy; and determining the performance of the medical model based on the evaluation results of the medical model under each evaluation indicator.
[0266] Furthermore, the logical instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0267] On the other hand, the present invention also provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, wherein when the program instructions are executed by a computer, the computer is able to execute the medical model evaluation method provided by the above methods, the method comprising: determining medical data for model evaluation; processing the medical data based on a medical model to obtain a processing result of the medical data; determining the indicator evaluation result of the medical model under various evaluation indicators based on the processing result, the evaluation indicators including at least two of knowledge depth, knowledge breadth, illusion, harmfulness, and privacy; and determining the performance of the medical model based on the indicator evaluation result of the medical model under various evaluation indicators.
[0268] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, is implemented to perform the medical model evaluation method provided by the methods described above. The method includes: determining medical data for model evaluation; processing the medical data based on a medical model to obtain a processing result of the medical data; determining the indicator evaluation result of the medical model under various evaluation indicators based on the processing result, wherein the evaluation indicators include at least two of knowledge depth, knowledge breadth, illusion, harmfulness, and privacy; and determining the performance of the medical model based on the indicator evaluation result of the medical model under each evaluation indicator.
[0269] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0270] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0271] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for evaluating medical models, characterized in that, include: Identify the medical data to be used for model evaluation; The medical data is sourced from a medical knowledge question-and-answer database or a medical information source. The medical knowledge question and answer base is constructed based on medical data generated from actual medical processes; the medical information sources include at least one of medical literature, clinical research reports, and drug databases. The medical data is processed based on a medical model to obtain the processing results of the medical data. Based on the processing results, the evaluation results of the medical model under each evaluation indicator are determined. The evaluation indicators include at least two of the following: knowledge depth, knowledge breadth, hallucination, harmfulness, and privacy. The performance of the medical model is determined based on the evaluation results of the medical model under each evaluation index. The process of determining the performance of the medical model based on the evaluation results of the medical model under various evaluation indicators includes: Based on the evaluation results of the medical model under each evaluation indicator, and the correspondence between each evaluation indicator and each evaluation scenario, the scenario evaluation results of the medical model under each evaluation scenario are determined; based on the scenario evaluation results of the medical model under each evaluation scenario, the performance of the medical model is determined. The evaluation scenarios include knowledge scenarios and application scenarios, and the evaluation indicators corresponding to the knowledge scenarios include knowledge depth. When the evaluation metric includes knowledge depth, the medical data includes input questions, and the processing of the medical data based on the medical model to obtain the processing result of the medical data includes: Based on the input question, determine the prompt statement to be generated; The generated prompt statement is input into the medical model to obtain the target question corresponding to the input question output by the medical model; The generated prompt statement is used to prompt the medical model to generate the target question based on the input question, wherein the difficulty of the target question is higher than that of the input question; The process of determining the evaluation results of the medical model under each evaluation indicator based on the processing results includes: Based on the aforementioned target problem, determine the target output prompt statement; The target output prompt is input into the medical model to obtain the answer to the target question output by the medical model. Match the answer to the question with the correct answer to the target question; If the matching result indicates that the answer to the question is related to the correct answer, then the medical model is determined to have answered the target question correctly. Otherwise, the medical model is determined to be incorrect in its answer to the target question; The evaluation results of the medical model at the knowledge depth are determined based on the number of target questions answered correctly and the number of target questions answered incorrectly.
2. The medical model evaluation method according to claim 1, characterized in that, The medical data is processed based on a medical model to obtain the processing result of the medical data; Based on the processing results, the evaluation results of the medical model under each evaluation indicator are determined, including: Based on the medical model, the medical data in each evaluation scenario are processed to obtain the processing results of the medical data in each evaluation scenario; Based on the processing results of medical data under each evaluation scenario, and the correspondence between each evaluation indicator and each evaluation scenario, the evaluation results of the medical model under each evaluation indicator are determined. The evaluation indicators corresponding to the knowledge scenario also include knowledge breadth and / or hallucination, and the evaluation indicators corresponding to the application scenario include at least one of hallucination, harmfulness, and privacy.
3. The model evaluation method according to claim 2, characterized in that, The medical data under each evaluation scenario is processed based on the medical model to obtain the processing results of the medical data under each evaluation scenario, including: Determine the evaluation dataset corresponding to each evaluation scenario; The medical data in each evaluation dataset are clustered, and based on each cluster category, medical data are selected from the evaluation dataset as example data. Based on the example data of each assessment scenario and the medical data in each assessment dataset, output prompt statements corresponding to each assessment scenario are generated; The output prompt statements corresponding to each evaluation scenario are input into the medical model to obtain the processing results of the medical data under each evaluation scenario output by the medical model.
4. The model evaluation method according to any one of claims 1 to 3, characterized in that, When the evaluation metric includes breadth of knowledge, the medical data includes input questions, the processing results include question answers, and determining the evaluation results of the medical model under each evaluation metric based on the processing results includes: Match the answer to the question with the correct answer to the input question; If the matching result indicates that the answer to the question is related to the correct answer, then the medical model is determined to have answered the input question correctly. Otherwise, the medical model is determined to have answered the input question incorrectly; The evaluation results of the medical model under the breadth of knowledge are determined based on the number of correctly answered input questions and the number of incorrectly answered input questions.
5. The model evaluation method according to any one of claims 1 to 3, characterized in that, When the evaluation indicators include harmfulness, the medical data includes the patient's condition, and the processing results include the diagnosis name and / or drug name. Based on the processing results, determining the evaluation results of the medical model under each evaluation indicator includes: Match the diagnostic name and / or drug name with the correct diagnostic name and / or correct drug name corresponding to the patient's condition; If the matching result indicates that the diagnosis name and / or the drug name is related to the correct diagnosis name and / or the correct drug name, then the medical model is determined to be correct in diagnosing and / or prescribing the correct medication for the patient's condition; otherwise, the medical model is determined to be incorrect in diagnosing and / or prescribing the wrong medication for the patient's condition. The medical model's performance indicators under the stated harmfulness are determined based on the number of patients with correctly diagnosed and / or correctly prescribed medication, and the number of patients with incorrectly diagnosed and / or incorrectly prescribed medication.
6. The model evaluation method according to any one of claims 1 to 3, characterized in that, When hallucination is included in the evaluation indicators, determining the evaluation results of the medical model under each evaluation indicator based on the processing results includes: Based on the medical model, triples are extracted from the medical data and its processing results to obtain input knowledge triples and output knowledge triples. The knowledge triples include head entities, tail entities, and entity relationships between the head entities and the tail entities. Determine whether the input knowledge triple and the output knowledge triple are consistent, and whether the output knowledge triple is consistent with the medical knowledge graph; If the input knowledge triplet and the output knowledge triplet are inconsistent, and / or the output knowledge triplet is inconsistent with the medical knowledge graph, then the processing result output by the medical model is determined to be a hallucination output. Otherwise, the processing result output by the medical model is determined to be a normal output; The evaluation results of the medical model under the hallucination are determined based on the number of processed results of hallucination output and the number of processed results of normal output.
7. The model evaluation method according to any one of claims 1 to 3, characterized in that, When privacy is included in the evaluation indicators, determining the evaluation results of the medical model under each evaluation indicator based on the processing results includes: Sensitive information is identified from the processing results to obtain sensitive information identification results; If the sensitive information identification result indicates that the processing result contains sensitive information, then the privacy anomaly of the processing result output by the medical model is determined. Otherwise, the privacy of the processing results output by the medical model is confirmed to be normal. Based on the number of privacy-abnormal processing results and the number of privacy-normal processing results, the evaluation results of the medical model under the privacy condition are determined.
8. A medical model evaluation device, characterized in that, include: The data determination unit is used to determine the medical data used for model evaluation; The medical data is sourced from a medical knowledge question-and-answer database or a medical information source. The medical knowledge question and answer base is constructed based on medical data generated from actual medical processes; the medical information sources include at least one of medical literature, clinical research reports, and drug databases. The data processing unit is used to process the medical data based on the medical model to obtain the processing result of the medical data; The result determination unit is used to determine the indicator evaluation results of the medical model under each evaluation indicator based on the processing results. The evaluation indicators include at least two of the following: knowledge depth, knowledge breadth, illusion, harmfulness, and privacy. The performance evaluation unit is used to determine the performance of the medical model based on the evaluation results of the medical model under various evaluation indicators. The process of determining the performance of the medical model based on the evaluation results of the medical model under various evaluation indicators includes: Based on the evaluation results of the medical model under each evaluation indicator, and the correspondence between each evaluation indicator and each evaluation scenario, the scenario evaluation results of the medical model under each evaluation scenario are determined; based on the scenario evaluation results of the medical model under each evaluation scenario, the performance of the medical model is determined. The evaluation scenarios include knowledge scenarios and application scenarios, and the evaluation indicators corresponding to the knowledge scenarios include knowledge depth. When the evaluation metric includes knowledge depth, the medical data includes input questions, and the processing of the medical data based on the medical model to obtain the processing result of the medical data includes: Based on the input question, determine the prompt statement to be generated; The generated prompt statement is input into the medical model to obtain the target question corresponding to the input question output by the medical model; The generated prompt statement is used to prompt the medical model to generate the target question based on the input question, wherein the difficulty of the target question is higher than that of the input question; The process of determining the evaluation results of the medical model under each evaluation indicator based on the processing results includes: Based on the aforementioned target problem, determine the target output prompt statement; The target output prompt is input into the medical model to obtain the answer to the target question output by the medical model. Match the answer to the question with the correct answer to the target question; If the matching result indicates that the answer to the question is related to the correct answer, then the medical model is determined to have answered the target question correctly. Otherwise, the medical model is determined to be incorrect in its answer to the target question; The evaluation results of the medical model at the knowledge depth are determined based on the number of target questions answered correctly and the number of target questions answered incorrectly.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the medical model evaluation method as described in any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the medical model evaluation method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Knowledge graph ontology evaluation method, device and equipment and storage medium
CN113946692A
Target recognition model performance evaluation method and device based on information space measurement
CN115902814A