Disease reasoning model training method and device, computer device, and storage medium

By constructing a disease synthetic phenotypic set containing core and candidate phenotypic subsets, and using a large language model to generate case narrative texts and perform multi-stage optimization, the problem of low accuracy of disease reasoning models in medical diagnosis is solved, and the accuracy and reliability of disease type reasoning are improved.

CN122337649APending Publication Date: 2026-07-03TSINGHUA UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610417094.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-31
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Existing disease reasoning models suffer from low reasoning accuracy in medical diagnosis, mainly due to the misalignment between data distribution and real clinical processes, the lack of systematic modeling of noise and uncertainty, and the absence of scalable and reliable reward and evaluation criteria during the alignment phase.

Method used

By constructing a synthetic phenotype set of the target disease that includes a core phenotype subset and a candidate phenotype subset, a large language model is used to generate standardized and coherent case narrative texts to train an initial inference model. The model inference parameters are then calibrated through multi-stage optimization using preset case narrative texts to improve the accuracy of disease inference.

Benefits of technology

It improves the accuracy and reliability of disease type inference, providing efficient and scientific model support for rapid disease diagnosis and auxiliary identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122337649A_ABST
    Figure CN122337649A_ABST
Patent Text Reader

Abstract

This application relates to a training method, apparatus, computer device, and storage medium for a disease reasoning model, comprising: acquiring a synthetic phenotype set of a target disease; the synthetic phenotype set including a core phenotype subset and a candidate phenotype subset; the core phenotype subset including at least one phenotype whose qualitative frequency reaches a preset condition; the candidate phenotype subset being sampled from other phenotypes besides those in the core phenotype subset; inputting the synthetic phenotype set into a first large language model to synthesize case text, obtaining case description text, and training an initial reasoning model based on the case description text to obtain a trained reasoning model; inputting a preset case description text into the trained reasoning model for prediction, obtaining a prediction result, and retraining the trained reasoning model based on the prediction result to obtain a target reasoning model. This method can improve the reasoning accuracy of the reasoning model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a method, apparatus, computer device, and storage medium for training a disease reasoning model. Background Technology

[0002] With the widespread adoption of systems such as Hospital Information System (HIS), Electronic Health Record (EHR), Laboratory Information System (LIS), and Picture Archiving and Communication System (PACS), clinical data digitization has been promoted. Medical intelligent systems have evolved from traditional methods to using Large Language Models (LLMs) to complete clinically relevant tasks. After alignment with medical instructions, the models perform well, but still face challenges such as workflow adaptation and reliability.

[0003] To enhance the reasoning capabilities of disease reasoning models, existing technologies focus on data construction and model training: the data includes three categories: real diagnosis and treatment, medical literature, and synthetic data. Model training adopts conventional methods such as basic pre-training and domain adaptation to improve the medical reasoning capabilities of disease reasoning models.

[0004] However, existing inference models suffer from low accuracy in inferring diseases. Summary of the Invention

[0005] Therefore, it is necessary to provide a training method, apparatus, computer equipment, and storage medium for a disease reasoning model that can improve the accuracy of disease reasoning, in order to address the aforementioned technical problems.

[0006] Firstly, this application provides a method for training a disease inference model, including:

[0007] Obtain a synthetic phenotype set for the target disease; the synthetic phenotype set includes a core phenotype subset and a candidate phenotype subset; the core phenotype subset includes at least one phenotype whose qualitative frequency meets a preset condition; the candidate phenotype subset is obtained by sampling other phenotypes besides those in the core phenotype subset;

[0008] The synthetic phenotypic set is input into the first language model to synthesize case texts, resulting in case narrative texts. The initial inference model is then trained based on the case narrative texts to obtain the trained inference model.

[0009] The preset case description text is input into the trained inference model for prediction, and the prediction result is obtained. The trained inference model is then retrained based on the prediction result to obtain the target inference model. The target inference model is used to infer and determine the disease type based on the input disease description information.

[0010] In one embodiment, the aforementioned candidate phenotype subset is obtained by sampling phenotypes other than those in the core phenotype subset, including:

[0011] For phenotypes other than those in the core phenotype subset, the qualitative frequencies of each other phenotype are converted into inclusion probabilities.

[0012] Based on the inclusion probability of each other phenotype, Bernoulli sampling is performed on each other phenotype, and the sampled other phenotypes are used to construct a subset of candidate phenotypes.

[0013] In one embodiment, the method of constructing a subset of candidate phenotypes from other sampled phenotypes further includes at least one of the following:

[0014] The other phenotypes obtained from sampling are replaced with higher-level concepts in the medical ontology, and a subset of candidate phenotypes is constructed based on the other phenotypes after replacing the higher-level concepts.

[0015] A subset of candidate phenotypes is constructed by sampling confusing phenotypes from other diseases that share partial phenotypes with the target disease, and replacing some other phenotypes in the sampled other phenotypes with confusing phenotypes.

[0016] In one embodiment, the above-mentioned inputting the synthetic phenotype set into the first large language model to synthesize medical record text, resulting in case narrative text, includes:

[0017] The synthetic phenotypic set is input into the first large language model to synthesize medical record text, resulting in the initial case narrative text.

[0018] Based on the disease label information of the target disease, the initial case description text is revised to obtain the case description text.

[0019] In one embodiment, the above-mentioned training of the initial inference model based on the case narrative text to obtain the trained inference model includes:

[0020] The initial inference model was fine-tuned based on the case narrative text to obtain the fine-tuned inference model.

[0021] The case narrative text is input into the finely tuned inference model to generate multiple inference trajectories;

[0022] Based on the pre-set medical rationality, multiple reasoning trajectories are divided into preferred reasoning trajectories and undesirable reasoning trajectories;

[0023] A first preference probability is set for the target optimal reasoning trajectory in the preferred reasoning trajectory, and a second preference probability is set for the target inferior reasoning trajectory in the inferior reasoning trajectory; the first preference probability is greater than the second preference probability;

[0024] The fine-tuned inference model is trained using the target optimization inference trajectory based on the first preference probability and the target disadvantage inference trajectory based on the second preference probability, resulting in the trained inference model.

[0025] In one embodiment, the above-mentioned fine-tuning of the initial inference model based on the case narrative text yields a fine-tuned inference model, including:

[0026] The case narrative text is input into the second language model for inference, resulting in multiple inference trajectories corresponding to the case narrative text and the inference results corresponding to each inference trajectory.

[0027] Based on the case narrative text, each reasoning trajectory, and the reasoning results corresponding to each reasoning trajectory, the initial reasoning model is fine-tuned to obtain the fine-tuned reasoning model.

[0028] In one embodiment, the above-mentioned retraining of the trained inference model based on the prediction result to obtain the target inference model includes:

[0029] The prediction results are judged based on the third language model to obtain the judgment result;

[0030] The trained inference model is retrained based on the discrimination results to obtain the target inference model;

[0031] or,

[0032] If the predicted result is the actual result, or if the predicted result is the higher-level disease concept of the actual result and the lower-level disease concept of the predicted result does not exceed the preset value, then the predicted result is determined to be a correct prediction result.

[0033] If the predicted result is the higher-level disease concept of the actual result, and the lower-level disease concept of the predicted result exceeds the preset value, the predicted result is determined to be an incorrect prediction result.

[0034] Based on both correct and incorrect predictions, the trained inference model is retrained to obtain the target inference model.

[0035] Secondly, this application also provides a training device for a disease reasoning model, comprising:

[0036] The acquisition module is used to acquire a synthetic phenotype set of the target disease; the synthetic phenotype set includes a core phenotype subset and a candidate phenotype subset; the core phenotype subset includes at least one phenotype whose qualitative frequency exceeds a preset condition; the candidate phenotype subset is obtained by sampling other phenotypes besides those in the core phenotype subset;

[0037] The training module is used to input the synthetic phenotypic set into the first large language model to synthesize medical record text, obtain case description text, and train the initial inference model based on the case description text to obtain the trained inference model.

[0038] The retraining module is used to input the preset case description text into the trained inference model for prediction, obtain the prediction result, and retrain the trained inference model based on the prediction result to obtain the target inference model; the target inference model is used to infer and determine the disease type based on the input disease description information.

[0039] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0040] Obtain a synthetic phenotype set for the target disease; the synthetic phenotype set includes a core phenotype subset and a candidate phenotype subset; the core phenotype subset includes at least one phenotype whose qualitative frequency meets a preset condition; the candidate phenotype subset is obtained by sampling other phenotypes besides those in the core phenotype subset;

[0041] The synthetic phenotypic set is input into the first language model to synthesize case texts, resulting in case narrative texts. The initial inference model is then trained based on the case narrative texts to obtain the trained inference model.

[0042] The preset case description text is input into the trained inference model for prediction, and the prediction result is obtained. The trained inference model is then retrained based on the prediction result to obtain the target inference model. The target inference model is used to infer and determine the disease type based on the input disease description information.

[0043] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:

[0044] Obtain a synthetic phenotype set for the target disease; the synthetic phenotype set includes a core phenotype subset and a candidate phenotype subset; the core phenotype subset includes at least one phenotype whose qualitative frequency meets a preset condition; the candidate phenotype subset is obtained by sampling other phenotypes besides those in the core phenotype subset;

[0045] The synthetic phenotypic set is input into the first language model to synthesize case texts, resulting in case narrative texts. The initial inference model is then trained based on the case narrative texts to obtain the trained inference model.

[0046] The preset case description text is input into the trained inference model for prediction, and the prediction result is obtained. The trained inference model is then retrained based on the prediction result to obtain the target inference model. The target inference model is used to infer and determine the disease type based on the input disease description information.

[0047] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:

[0048] Obtain a synthetic phenotype set for the target disease; the synthetic phenotype set includes a core phenotype subset and a candidate phenotype subset; the core phenotype subset includes at least one phenotype whose qualitative frequency meets a preset condition; the candidate phenotype subset is obtained by sampling other phenotypes besides those in the core phenotype subset;

[0049] The synthetic phenotypic set is input into the first language model to synthesize case texts, resulting in case narrative texts. The initial inference model is then trained based on the case narrative texts to obtain the trained inference model.

[0050] The preset case description text is input into the trained inference model for prediction, and the prediction result is obtained. The trained inference model is then retrained based on the prediction result to obtain the target inference model. The target inference model is used to infer and determine the disease type based on the input disease description information.

[0051] The training method, apparatus, computer equipment, and storage medium of the aforementioned disease inference model construct a targeted synthetic phenotype set for the target disease, including a subset of core phenotypes and a subset of candidate phenotypes. This retains the core key phenotypes that meet the qualitative frequency criteria while incorporating other potentially relevant phenotypes through sampling, making the phenotype data more comprehensive and closely aligned with the actual characteristics of the disease. Then, using a primary language model, the synthetic phenotype set is transformed into standardized and coherent case narrative text. Based on this, the initial inference model is trained, enabling the model to deeply learn the correlation logic between disease phenotypes and clinical narratives, thus solidifying the model's foundation for disease inference. Subsequently, the trained model is further trained and optimized using pre-set case narrative texts to calibrate the model's inference parameters and improve inference accuracy. The final target inference model can accurately infer and determine the disease type based on the input disease description information. The overall process ensures the integrity, rationality, and clinical adaptability of the model training data, while continuously optimizing model performance through multi-stage training, effectively improving the accuracy and reliability of disease type inference. This provides efficient and scientific model support for rapid disease diagnosis and auxiliary discrimination. Attached Figure Description

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

[0053] Figure 1 This is a diagram illustrating the application environment of a training method for a disease inference model in one embodiment.

[0054] Figure 2 This is a flowchart illustrating the training method of a disease inference model in one embodiment;

[0055] Figure 3 This is a flowchart illustrating the training method for a disease inference model in another embodiment;

[0056] Figure 4 This is a flowchart illustrating the training method for a disease inference model in another embodiment;

[0057] Figure 5 This is a flowchart illustrating the training method for a disease inference model in another embodiment;

[0058] Figure 6 This is a flowchart illustrating the training method for a disease inference model in another embodiment;

[0059] Figure 7 This is a flowchart illustrating the training method for a disease inference model in another embodiment;

[0060] Figure 8 This is a flowchart illustrating the training method for a disease inference model in another embodiment;

[0061] Figure 9 This is a structural block diagram of a training device for a disease reasoning model in one embodiment;

[0062] Figure 10 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0063] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0064] With the widespread adoption of systems such as Hospital Information System (HIS), Electronic Health Record (EHR), Laboratory Information System (LIS), and Picture Archiving and Communication System (PACS), clinical data digitization has been promoted. Medical intelligent systems have evolved from traditional methods to using Large Language Models (LLMs) to complete clinically relevant tasks. After alignment with medical instructions, the models perform well, but still face challenges such as workflow adaptation and reliability.

[0065] To enhance the reasoning capabilities of disease reasoning models, existing technologies focus on data construction and model training: the data includes three categories: real diagnosis and treatment, medical literature, and synthetic data. Model training adopts conventional methods such as basic pre-training and domain adaptation to improve the medical reasoning capabilities of disease reasoning models.

[0066] However, at present, the two core technical lines for medical reasoning LLM are: (1) data construction and model training and alignment, which have formed relatively fixed mainstream paradigms; (2) in the real scenario of medical diagnosis, which is characterized by high noise, strong constraints and strong heterogeneity, some structural shortcomings are still exposed, making the model capabilities often appear to be able to speak but difficult to implement reliably.

[0067] On the data side, existing mainstream data sources each have their own bottlenecks and lack complementarity. First, while real-world data (RWD / EHR) is closest to clinical procedures, it has extremely high barriers to entry: obtaining data access and sharing across institutions is difficult, and the costs of de-identification, structured extraction, and quality control are enormous. More importantly, real-world data often inherently contains significant noise and bias; incomplete records, missing examinations, broken timelines, inconsistent coding, and differences in writing habits among different doctors are all common. Even with a gold standard label, it may not be truly reliable in many cases: clinicians' diagnoses are updated over time, and misjudgments can occur due to differences in experience and insufficient follow-up information; some cases even lack a single verifiable standard answer. This means that RWD is not necessarily better the more realistic it is, but rather requires a high-cost quality control system and learning framework; otherwise, the model is more likely to learn noise patterns and institutional biases.

[0068] Secondly, while data primarily derived from medical literature, case reports, guidelines, and consensus statements are more readily available and the texts are more standardized, their core problems lie in two points: First, training data leakage and evaluation contamination are almost unavoidable, especially with publicly available cases, classic treatment pathways, and question-based data, leading to high scores on the test set but limited generalization to new cases. Second, the descriptions in the literature often differ from real clinical workflows. Papers typically present cleaner information organization, highlighting key positive information, making more ideal examination choices, and providing more complete medical histories. However, the real world is full of confounding factors: comorbidities, drug effects, poor compliance, examination delays, missing data, and contradictory descriptions. This allows the model to reason smoothly on paper cases, but in real outpatient settings, it exhibits broken evidence chains, overconfidence, and incorrect attributions.

[0069] Furthermore, while generated data is highly anticipated, mature methodologies for its construction are currently lacking. Much generated data remains at the level of template filling or stylized case rewriting, resulting in a homogeneous data distribution, repetitive structure, and similar language patterns, making it easy for models to learn the format rather than reasoning. A more practical problem is that if generated data lacks systematic modeling of disease spectrum, differential diagnostic competition, examination selection logic, and noise and missing mechanism, it will naturally deviate from clinical distribution; it may also introduce fictitious but self-consistent false evidence chains, further misleading training and alignment.

[0070] On the training and alignment side, the current common paradigm of combining pre-training, supervised fine-tuning, and reinforcement alignment in various fields shows significant incompatibility in medical diagnostic tasks. Supervised fine-tuning has almost become an industry consensus. The challenges in the reinforcement alignment stage are even more prominent: reward signals are difficult to define, difficult to automate, and difficult to scale. Unlike the verifiable rewards commonly used in mathematics, such as DeepSeek R1, the correctness of mathematical problems can usually be strictly judged, and the reward function is relatively clear; however, medical diagnosis is often open-ended and has multiple solutions: the same case may have multiple reasonable differential diagnoses; medical terminology is highly diverse and lacks standardization, making result string matching rewards almost unusable. In other words, correctness in medical scenarios is not a simple 0 / 1 label, but more like a judgment with conditions, evidence, and uncertainty. This makes it easy for the reinforcement stage to push the model towards shortcuts that please the reward function if there is no carefully designed reward structure and evaluation protocol, such as outputting more conservative general suggestions, stacking examination items, or using lengthy descriptions to avoid errors, rather than truly improving the quality of clinically usable reasoning.

[0071] Therefore, the bottleneck of current large-scale medical inference models is not simply a matter of insufficient data or model size, but rather: a misalignment between data distribution and real-world clinical processes, a lack of systematic modeling of noise and uncertainty, and a lack of scalable and reliable rewards and evaluation criteria during the alignment phase. Further breakthroughs often require introducing a more clinically relevant process-level structure on the data side and more verifiable and hierarchical objectives on the training side; otherwise, even if the model performs well on static benchmarks, it will be difficult to stably transfer to real-world diagnostic and treatment environments. Consequently, existing inference models suffer from low accuracy in disease reasoning.

[0072] The training method for the disease reasoning model provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, the application environment includes a data storage system 102 and a server 104. The data storage system 102 stores the data that the server 104 needs to process. The data storage system 102 can be integrated onto the server 104, or it can be located in the cloud or on other network servers. The server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The data storage system 102 can communicate with the server 104. For example, the server 104 can send a data request to the data storage system 102 to retrieve data, and then process the retrieved data.

[0073] In other possible implementations, the training method for the disease inference model provided in this application embodiment can also be applied to a terminal. The terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can be smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. Portable wearable devices can be smartwatches, smart bracelets, head-mounted devices, etc.

[0074] In one exemplary embodiment, such as Figure 2 As shown, a training method for a disease inference model is provided, which can be applied to... Figure 1 Taking server 104 as an example, the explanation includes:

[0075] S201. Obtain a synthetic phenotype set for the target disease; the synthetic phenotype set includes a core phenotype subset and a candidate phenotype subset; the core phenotype subset includes at least one phenotype whose qualitative frequency exceeds a preset condition; the candidate phenotype subset is obtained by sampling other phenotypes besides those in the core phenotype subset.

[0076] The target disease refers to any rare disease, such as spinal muscular atrophy, amyotrophic lateral sclerosis (ALS) (e.g., ALS), Huntington's disease, Angelman syndrome, and Rett syndrome.

[0077] Phenotype refers to the clinical manifestations of a target disease, such as hemophilia, thalassemia, paroxysmal nocturnal hemoglobinuria, and Gaucher disease. The phenotypes of these rare diseases generally include symptoms such as bleeding, anemia, and organ damage.

[0078] In this embodiment, for any target disease y, a subset of core phenotypes associated with target disease y is obtained from the knowledge base. The qualitative frequency of the phenotypes in the core phenotype subset exceeds a preset condition. For example, the qualitative frequency can be certain to occur, extremely high frequency, high frequency, medium frequency, low frequency, extremely low frequency, or certain to be impossible. When the preset condition is exceeding the medium frequency (including medium frequency), the qualitative frequency exceeding the preset condition can be certain to occur, extremely high frequency, high frequency, or medium frequency.

[0079] Optionally, for any target disease y, phenotypes with qualitative frequencies associated with the target disease y exceeding preset conditions can be obtained from the knowledge base first. Then, a uniform sampling method without replacement can be used to select no more than a preset number of phenotypes from the phenotypes with qualitative frequencies associated with the target disease y exceeding preset conditions to form a core phenotype subset.

[0080] It should be noted that retrieving a subset of the core phenotypes of a target disease from a knowledge base can simulate the key symptoms and signs that clinicians prioritize recording during the initial diagnosis, thereby improving the clinical focus of cases.

[0081] Furthermore, after filtering the core phenotypic subset of the target disease from the knowledge base, other phenotypic subsets related to the target disease in the knowledge base can be sampled to obtain a candidate phenotypic subset.

[0082] The core phenotype subset and the candidate phenotype subset are merged to obtain a synthetic phenotype set for the target disease.

[0083] S202. Input the synthetic phenotype set into the first language model to synthesize medical record text, obtain case description text, and train the initial inference model based on the case description text to obtain the trained inference model.

[0084] Among them, the first major language model can be GPT-4, Wenxin Yiyan, Tongyi Qianwen, Doubao, Deepseek, etc.

[0085] In this embodiment, after obtaining the synthetic phenotypic set, it is imported into the first large language model that has been pre-trained and adapted to the medical text generation scenario, according to the preset standardized format and input rules. With the help of the model's ability to understand medical knowledge, construct text logic, and generate natural language, the model performs case-based text conversion and content synthesis on the input synthetic phenotypic information. The model will complete the conversion and integration of phenotypic information into clinical case language based on the correlation between phenotypic and clinical expression norms, and finally generate a case narrative text that conforms to the clinical case narrative paradigm, is complete in content, and is logically coherent.

[0086] Furthermore, after generating the case narrative text, the case narrative text can be structured and labeled according to the preset data format for model training to construct a dedicated dataset adapted for the initial inference model training. Subsequently, the processed case narrative text dataset is input into the initial inference model to be trained. Relying on the model's self-supervised or supervised learning mechanism, the model can deeply learn the core information in the case narrative text, such as the clinical feature associations, the correspondence between phenotypes and symptoms, and the reasoning rules related to diagnosis and treatment. During the training process, the network parameters and inference weights of the model are continuously iterated and optimized to continuously reduce the model's inference error until the model's inference accuracy, stability and other indicators reach the preset training objectives. Finally, a reasoning model that has been trained and has the ability to perform professional logical reasoning based on case narrative text is obtained.

[0087] S203. Input the preset case description text into the trained inference model for prediction, obtain the prediction result, and retrain the trained inference model based on the prediction result to obtain the target inference model; the target inference model is used to infer and determine the disease type based on the input disease description information.

[0088] The pre-defined case description text refers to the case description text obtained from clinical diagnosis and treatment, which is different from the case description text in S202 above. After the doctor prescribes the pre-defined case description text for the patient, the pre-defined case description text can be stored in the database so that it can be directly retrieved from the database when retraining the inference model.

[0089] The prediction results refer to the prediction results of disease types, which include disease types that are predicted accurately and disease types that are predicted inaccurately.

[0090] In this embodiment, after obtaining the trained inference model, a preset case description text prescribed by a doctor for a patient in clinical diagnosis and treatment can be obtained, and the preset case description text can be input into the trained inference model for prediction to obtain the accurately predicted disease type and the inaccurately predicted disease type. Furthermore, the trained inference model is retrained based on the accurately predicted disease type and the inaccurately predicted disease type to obtain the target inference model; wherein, the target inference model is used to infer and determine the disease type based on the input disease description information.

[0091] In this embodiment, a synthetic phenotype set for the target disease is constructed by specifically building a subset of core phenotypes and a subset of candidate phenotypes. This retains the core key phenotypes that meet the qualitative frequency criteria and incorporates other potentially related phenotypes through sampling, making the phenotype data more comprehensive and closely aligned with the actual characteristics of the disease. Then, the synthetic phenotype set is transformed into standardized and coherent case narrative text using a first-order language model. This serves as the basis for training the initial inference model, enabling the model to deeply learn the correlation logic between disease phenotypes and clinical narratives, thus solidifying the model's disease inference foundation. Subsequently, the trained model is further trained and optimized using preset case narrative texts to calibrate the model's inference parameters and improve inference accuracy. The resulting target inference model can accurately infer and determine the disease type based on the input disease description information. The overall process ensures the integrity, rationality, and clinical adaptability of the model training data, while continuously optimizing model performance through multi-stage training, effectively improving the accuracy and reliability of disease type inference. This provides efficient and scientific model support for rapid disease diagnosis and auxiliary identification.

[0092] In this embodiment, in the above Figure 2 Based on the illustrated embodiments, a detailed process for selecting candidate phenotypic subsets will be explained. In one exemplary embodiment, such as... Figure 3 As shown, the above method also includes:

[0093] S301. For phenotypes other than those in the core phenotype subset, convert the qualitative frequencies of each other phenotype into inclusion probabilities.

[0094] In this embodiment, after the core phenotype subset has been determined, for other phenotypes besides those in the core phenotype subset, the qualitative probabilities of each other phenotype can be converted into inclusion probabilities.

[0095] For example, a high-frequency qualitative probability can be converted into a higher inclusion probability, and a low-frequency qualitative probability can be converted into a lower inclusion probability. For instance, if the qualitative probability is extremely high, it can be converted into an inclusion probability of 95%-100%; if the qualitative probability is high, it can be converted into an inclusion probability of 80-95%; and if the qualitative probability is low, it can be converted into an inclusion probability of 5%-20%.

[0096] S302. Based on the inclusion probability of each other phenotype, perform Bernoulli sampling on each other phenotype, and construct a subset of candidate phenotypes from the sampled other phenotypes.

[0097] In this embodiment, after obtaining the inclusion probability of each other phenotype, the system independently performs a Bernoulli test for each other phenotype. The process includes: generating a random number that follows a standard uniform distribution U(0,1). If the random number is less than the inclusion probability corresponding to the phenotype, the phenotype is determined to have passed the sampling and is marked as selected. Otherwise, if the random number is not less than the inclusion probability corresponding to the phenotype, the phenotype is determined to have failed the sampling and is marked as unselected.

[0098] It should be noted that the Bernoulli sampling process described above strictly adheres to the assumption of independent and identically distributed phenotypes, ensuring the unbiasedness and repeatability of each sampling (under a fixed random seed). After sampling all other phenotypes, all sampled phenotypes are integrated into a subset of candidate phenotypes.

[0099] Optionally, the size of the candidate phenotypes themselves follows a binomial distribution with the total number of phenotypes equal to the number of trials and the average inclusion probability equal to the success probability, with an expected value of This candidate subset avoids the risk of missing high-value phenotypes due to hard threshold truncation, and achieves the biased retention of key phenotypes through probability weighting.

[0100] In this embodiment, by converting qualitative frequencies into quantified inclusion probabilities and performing randomized screening based on Bernoulli sampling, a balance between probabilistic and diverse phenotypic selection is achieved. On the one hand, the probability conversion preserves the original frequency information, ensuring that high-frequency phenotypes have a higher inclusion tendency and maintaining the biological relevance of the candidate subset. On the other hand, the introduction of Bernoulli sampling injects controllable randomness, effectively avoiding phenotypic redundancy or bias accumulation caused by deterministic screening, and dynamically exploring the combination space of other phenotypes while maintaining the stability of core phenotypes. This method not only improves the representativeness and generalization ability of the candidate subset, but also provides a richer and more exploratory data foundation for subsequent phenotypic optimization, feature engineering, or model training, and is particularly suitable for the collaborative optimization scenario of dimensionality reduction and information preservation in high-dimensional phenotypic data.

[0101] In this embodiment, in the above Figure 2 or Figure 3 Based on the illustrated embodiments, a detailed process for constructing a subset of candidate phenotypes from other sampled phenotypes is explained. In one exemplary embodiment, constructing a subset of candidate phenotypes from other sampled phenotypes includes at least one of the following:

[0102] First, the other phenotypes obtained from sampling are replaced with higher-level concepts in the medical ontology, and a subset of candidate phenotypes is constructed based on the other phenotypes after replacing the higher-level concepts.

[0103] In this embodiment, after obtaining other phenotypes through sampling, the other phenotypes obtained through sampling can be replaced with higher-level concepts in the medical ontology to obtain other phenotypes after replacing the higher-level concepts. Based on the other phenotypes after replacing the higher-level concepts, a subset of candidate phenotypes is constructed.

[0104] For example, other phenotypes obtained from sampling include atrial septal defect, and the superordinate concept in the medical ontology can be cardiac septal abnormality; other phenotypes obtained from sampling include mitral valve prolapse, and the superordinate concept in the medical ontology can be cardiac valve abnormality; other phenotypes obtained from sampling include terminal insomnia, and the superordinate concept in the medical ontology can be insomnia; other phenotypes obtained from sampling include carpal dysplasia, and the superordinate concept in the medical ontology can be dysplasia.

[0105] In this embodiment, other phenotypes obtained from sampling are replaced with higher-level concepts in the medical ontology, and a subset of candidate phenotypes is constructed based on the other phenotypes after replacing the higher-level concepts, so as to simulate the descriptive ambiguity and hierarchical inaccuracy commonly found in real clinical records.

[0106] Second, sample confused phenotypes from other diseases that share some phenotypes with the target disease, and replace some other phenotypes in the sampled other phenotypes based on the confused phenotypes to construct a subset of candidate phenotypes.

[0107] For a target disease, there are multiple phenotypes corresponding to the target disease. For other diseases besides the target disease, there are also multiple phenotypes corresponding to other diseases. Among the multiple phenotypes corresponding to the target disease, there may be phenotypes that overlap with the multiple phenotypes corresponding to other diseases. For the multiple phenotypes corresponding to other diseases, there are phenotypes that do not overlap with the multiple phenotypes corresponding to the target disease. These phenotypes are called confounding phenotypes. The confounding phenotypes are used to replace some of the other phenotypes in the large sample of other phenotypes to construct a subset of candidate phenotypes.

[0108] For example, the phenotypes of the target disease A include phenotype a, phenotype b, and phenotype c, and the phenotypes of other diseases B include phenotype a, phenotype b, and phenotype d. Phenotype d is the confusing phenotype. Therefore, phenotype a in the target disease can be replaced by the confusing phenotype d to obtain a subset of candidate phenotypes for the target disease. The subset of candidate phenotypes for the target disease includes phenotype d, phenotype b, and phenotype c.

[0109] In this embodiment, a subset of candidate phenotypes is constructed by sampling confusing phenotypes from other diseases that share some phenotypes with the target disease, and replacing some other phenotypes in the other phenotypes obtained from the sampling based on the confusing phenotypes, in order to simulate the differential diagnostic interference factors in real clinical practice.

[0110] In this embodiment, the synthesized phenotypic set is transformed into medical record text through a large language model, and then corrected using disease tag information. This achieves automated generation and quality optimization of phenotypic data into natural language medical records, which not only improves the efficiency and consistency of medical record synthesis, but also ensures the medical accuracy and disease relevance of the generated content through tag constraints.

[0111] In this embodiment, in the above Figure 2 Based on the illustrated embodiments, the detailed process of training an initial inference model based on case narrative text to obtain a trained inference model will be explained. In an exemplary embodiment, such as Figure 4 As shown, the above method also includes:

[0112] S401. Fine-tune the initial inference model based on the case narrative text to obtain the fine-tuned inference model.

[0113] In this embodiment, after obtaining the case narrative text, the initial inference model can be fine-tuned based on the case narrative text to obtain the fine-tuned inference model. For samples with incorrect inference in the first round, the inference model is guided to reflect and generate a second round of inference results, thereby further improving the quality of inference data.

[0114] Optionally, the following provides a detailed process for fine-tuning the initial inference model based on the case narrative text to obtain the fine-tuned inference model. See [link to relevant documentation]. Figure 5 The aforementioned S401 includes:

[0115] S4011. Input the case narrative text into the second language model for reasoning, and obtain multiple reasoning trajectories corresponding to the case narrative text and the reasoning results corresponding to each reasoning trajectory.

[0116] The second largest language model could be GPT-4, Wenxin Yiyan, Tongyi Qianwen, Doubao, Deepseek, etc.

[0117] In this embodiment, after obtaining the case narrative text, the case narrative text can be input into the second language model multiple times for reasoning, so as to obtain the reasoning trajectory corresponding to the case narrative text after multiple reasoning, and the reasoning result corresponding to each reasoning trajectory.

[0118] S4012. Based on the case narrative text, each reasoning trajectory, and the reasoning results corresponding to each reasoning trajectory, the initial reasoning model is fine-tuned to obtain the fine-tuned reasoning model.

[0119] In this embodiment, after obtaining the case narrative text, each reasoning trajectory, and the reasoning results corresponding to each reasoning trajectory, the case narrative text, each reasoning trajectory, and the reasoning results corresponding to each reasoning trajectory can be input into the initial reasoning model to fine-tune the initial reasoning model and obtain the fine-tuned reasoning model.

[0120] Optionally, for the case narrative text, its corresponding reasoning trajectory, and the reasoning result corresponding to the reasoning trajectory, the case narrative text is input into the initial reasoning model for reasoning to obtain the reasoning result corresponding to the case narrative text (i.e., the reasoning result corresponding to the reasoning trajectory). The reasoning result corresponding to the case narrative text is compared with the actual result of the case narrative text to obtain the comparison result. If the comparison result does not meet the preset conditions, it is determined that the reasoning trajectory corresponding to the case narrative text is incorrect, and the initial reasoning model needs to be further trained. If the comparison result does not meet the preset conditions, it is determined that the reasoning trajectory corresponding to the case narrative text is correct, the initial reasoning model training is completed, and the fine-tuned reasoning model is obtained.

[0121] S402. Input the case narrative text into the fine-tuned inference model to generate multiple inference trajectories.

[0122] In this embodiment, after obtaining the fine-tuned inference model, the case narrative text can be input into the fine-tuned inference model to generate multiple inference trajectories.

[0123] S403. Based on the preset medical rationality, the multiple reasoning trajectories are divided into preferred reasoning trajectories and undesirable reasoning trajectories.

[0124] In this embodiment, the same case narrative text is input into the fine-tuned inference model to generate multiple inference trajectories. Based on the correctness of the diagnosis and the medical rationality, the multiple inference trajectories are divided into preferred inference trajectories and undesirable inference trajectories. A target preferred inference trajectory is determined from the preferred inference trajectories, and a target undesirable inference trajectory is determined from the undesirable inference trajectories.

[0125] S404. Set a first preference probability for the target preferred inference trajectory in the preferred inference trajectory, and set a second preference probability for the target preferred inference trajectory in the undesired inference trajectory; the first preference probability is greater than the second preference probability.

[0126] In this embodiment, to make the model obtained from subsequent training more reasonable, a first preference probability can be set for the target preferred inference trajectory in the preferred inference trajectory, and a second preference probability can be set for the target preferred inference trajectory in the undesired inference trajectory; the first preference probability is greater than the second preference probability.

[0127] S405. Based on the target optimization inference trajectory with the first preference probability and the target inferiority inference trajectory with the second preference probability, the fine-tuned inference model is trained to obtain the trained inference model.

[0128] In this embodiment, during the training of the fine-tuned inference model, in order to ensure that the trained inference model can accurately obtain the inference trajectory, the preference probability of the target preferred inference trajectory can be set to be larger than that of the target unsuitable inference trajectory, so as to train the fine-tuned inference model and obtain the trained inference model.

[0129] In this embodiment, by fine-tuning the inference model with case texts, generating multiple inference trajectories and distinguishing between superior and inferior trajectories based on medical rationality, and then assigning higher preference probabilities to the preferred trajectories to further train the model, the rationality and accuracy of the medical inference conclusions output by the model can be effectively improved. This makes the inference trajectories generated by the model more consistent with clinical diagnosis and treatment logic, enhances the reliability and practicality of the inference results, and enables the model to gradually strengthen its high-quality medical inference capabilities without the need for an explicit reward function.

[0130] In this embodiment, in the above Figure 2 Based on the illustrated embodiment, the detailed process of retraining the trained inference model according to the prediction results to obtain the target inference model will be explained. In an exemplary embodiment, such as Figure 6 As shown, the above method also includes:

[0131] S501. Based on the third language model, the prediction results are judged to obtain the judgment results.

[0132] In this embodiment, after inputting the preset case description text into the trained inference model for prediction and obtaining the prediction result, the prediction result can be input into the third language model to judge the correctness of the prediction result and obtain the judgment result.

[0133] Optionally, given the complexity of open medical diagnostic scenarios and the existence of synonyms, aliases, and naming differences in diagnostic expressions, this invention does not use strict string matching as the sole criterion for judgment. Instead, it introduces a large language model (e.g., GPT-4) as an automatic evaluator to discriminate diagnostic results. Through prior prompt tuning and consistency calibration, the evaluation results of the automatic evaluator are ensured to have high consistency with the evaluation results of human experts (Kappa=0.90).

[0134] S502. Based on the discrimination results, the trained inference model is retrained to obtain the target inference model.

[0135] In this embodiment, after obtaining the discrimination result, the trained inference model can be retrained based on the discrimination result to obtain the target inference model.

[0136] Optionally, if the judgment result indicates that the prediction result is accurate, the trained inference model is directly determined as the target inference model. If the judgment result indicates that the prediction result is inaccurate, it means that the trained inference model needs to be further trained until the prediction result output by the trained inference model is accurate. At this time, the trained inference model is determined as the target inference model.

[0137] In this embodiment, by introducing a third language model to judge the prediction results of the reasoning model, and further optimizing and training the reasoning model based on the judgment results, the accuracy and reliability of the output results of the target reasoning model can be effectively improved, making its reasoning conclusions more standardized and credible.

[0138] Or such as Figure 7 As shown, the detailed process of retraining the trained inference model based on the prediction results to obtain the target inference model also includes:

[0139] S601. If the predicted result is the actual result, or if the predicted result is the superordinate disease concept of the actual result and the subordinate disease concept of the predicted result does not exceed the preset value, then the predicted result is determined to be a correct prediction result.

[0140] In this embodiment, if the preset case description text is input into the trained inference model for prediction, and the predicted result is directly the actual result, or the predicted result is the superordinate disease concept of the actual result, and the subordinate disease concept of the predicted result does not exceed a preset value, then the predicted result is determined to be a correct prediction result.

[0141] For example, the sub-diseases of rare mitochondrial diseases mainly include: mitochondrial myopathy (e.g., chronic progressive extraocular muscle paralysis, mitochondrial limb girdle myopathy), mitochondrial encephalopathy (e.g., Leigh syndrome, Alpers syndrome, and spinocerebellar ataxia with seizures), mitochondrial encephalomyopathy (e.g., MELAS syndrome, MERRF syndrome, Kearns-Sayre syndrome, mitochondrial neurogastrointestinal encephalomyopathy), and mitochondrial neuropathy (e.g., Leber hereditary optic neuropathy, NARP syndrome, and SANDO syndrome), etc. If the predicted result is Leber hereditary optic neuropathy or mitochondrial neuropathy, since there are three sub-diseases of mitochondrial neuropathy, with a preset value of 3, both the predicted result of Leber hereditary optic neuropathy and mitochondrial neuropathy are correct predictions. However, with a preset value of 2, only Leber hereditary optic neuropathy is a correct prediction, while mitochondrial neuropathy is an incorrect prediction.

[0142] S602. If the predicted result is the higher-level disease concept of the actual result, and the lower-level disease concept of the predicted result exceeds the preset value, the predicted result is determined to be an incorrect prediction result.

[0143] In this embodiment, if the predicted result is the higher-level disease concept of the actual result, and the lower-level disease concept of the predicted result exceeds a preset value, the predicted result is determined to be an incorrect prediction result.

[0144] S603. Based on the correct prediction results and the incorrect prediction results, the trained inference model is retrained to obtain the target inference model.

[0145] In this embodiment, if both correct and incorrect prediction results are obtained, the trained inference model can be retrained based on the correct and incorrect prediction results to obtain the target inference model.

[0146] For example, a higher probability can be assigned to correct predictions and a lower probability to incorrect predictions. The trained inference model can then be retrained based on the higher probability of correct predictions and the lower probability of incorrect predictions to obtain the target inference model.

[0147] In this embodiment, by using the hierarchical disease concept and the number of subordinate diseases as the criteria, the correctness and error of the model prediction results can be accurately distinguished. Based on this, the inference model can be retrained, which can effectively improve the model's accuracy in judging diseases, reduce misjudgments caused by the broad disease concept hierarchy, and make the disease prediction results output by the model more specific and accurate, which fits the actual diagnostic needs.

[0148] In one exemplary embodiment, see Figure 8 It also provides a training method for a disease inference model, including:

[0149] T1. Obtain a synthetic phenotype set for the target disease; the synthetic phenotype set includes a core phenotype subset and a candidate phenotype subset; the core phenotype subset includes at least one phenotype whose qualitative frequency meets a preset condition; the candidate phenotype subset is obtained by sampling other phenotypes besides those in the core phenotype subset;

[0150] T2. Input the synthetic phenotypic set into the first language model to synthesize medical record text and obtain the initial case description text;

[0151] T3. Based on the disease label information of the target disease, the initial case description text is corrected to obtain the case description text. The case description text is then input into the second language model for reasoning to obtain multiple reasoning trajectories corresponding to the case description text and the reasoning results corresponding to each reasoning trajectory.

[0152] T4. Based on the case narrative text, each reasoning trajectory, and the reasoning results corresponding to each reasoning trajectory, the initial reasoning model is fine-tuned to obtain the fine-tuned reasoning model.

[0153] T5. Input the case narrative text into the finely tuned inference model to generate multiple inference trajectories;

[0154] T6. Based on the preset medical rationality, the multiple reasoning trajectories are divided into preferred reasoning trajectories and undesirable reasoning trajectories;

[0155] T7. Set a first preference probability for the target preferred inference trajectory in the preferred inference trajectory, and set a second preference probability for the target inferior inference trajectory in the inferior inference trajectory; the first preference probability is greater than the second preference probability;

[0156] T8. Based on the first preference probability and the second preference probability, the target optimization reasoning trajectory and the target inferiority reasoning trajectory are used to train the fine-tuned reasoning model to obtain the trained reasoning model.

[0157] T9. Input the preset case description text into the trained inference model for prediction, obtain the prediction result, and retrain the trained inference model based on the prediction result to obtain the target inference model; the target inference model is used to infer and determine the disease type based on the input disease description information.

[0158] It should be noted that the descriptions of T1-T9 above can be found in the relevant descriptions in the above embodiments, and their effects are similar, so they will not be repeated here.

[0159] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0160] Based on the same inventive concept, this application also provides a training device for a disease reasoning model to implement the training method for the disease reasoning model described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations of one or more disease reasoning model training device embodiments provided below can be found in the limitations of the disease reasoning model training method described above, and will not be repeated here.

[0161] In one exemplary embodiment, such as Figure 9 As shown, a training device for a disease reasoning model is provided, comprising: an acquisition module 10, a first training module 11, and a second training module 12, wherein:

[0162] The acquisition module 10 is used to acquire a synthetic phenotype set of the target disease; the synthetic phenotype set includes a core phenotype subset and a candidate phenotype subset; the core phenotype subset includes at least one phenotype whose qualitative frequency reaches a preset condition; the candidate phenotype subset is obtained by sampling other phenotypes besides those in the core phenotype subset.

[0163] The first training module 11 is used to input the synthetic phenotypic set into the first large language model to synthesize case text, obtain case narrative text, and train the initial inference model based on the case narrative text to obtain the trained inference model.

[0164] The second training module 12 is used to input the preset case description text into the trained inference model for prediction, obtain the prediction result, and retrain the trained inference model based on the prediction result to obtain the target inference model; the target inference model is used to infer and determine the disease type based on the input disease description information.

[0165] In one exemplary embodiment, the above-described apparatus further includes:

[0166] The transformation module is used to convert the qualitative frequencies of other phenotypes, other than those in the core phenotype subset, into inclusion probabilities.

[0167] The sampling module is used to perform Bernoulli sampling on each other phenotype based on the inclusion probability of each other phenotype, and construct a subset of candidate phenotypes from the sampled other phenotypes.

[0168] In one exemplary embodiment, the method of constructing a subset of candidate phenotypes from other sampled phenotypes further includes at least one of the following:

[0169] The other phenotypes obtained from sampling are replaced with higher-level concepts in the medical ontology, and a subset of candidate phenotypes is constructed based on the other phenotypes after replacing the higher-level concepts.

[0170] A subset of candidate phenotypes is constructed by sampling confusing phenotypes from other diseases that share partial phenotypes with the target disease, and replacing some other phenotypes in the sampled other phenotypes with confusing phenotypes.

[0171] In an exemplary embodiment, the first training module 11 described above includes:

[0172] The synthesis unit is specifically used to input the set of synthetic phenotypes into the first large language model to synthesize medical record text and obtain the initial case description text.

[0173] The correction unit is specifically used to correct the initial case description text based on the disease label information of the target disease, so as to obtain the case description text.

[0174] In an exemplary embodiment, the first training module 11 further includes:

[0175] The fine-tuning unit is specifically used to fine-tune the initial inference model based on the case narrative text to obtain the fine-tuned inference model;

[0176] The generation unit is specifically used to input the case narrative text into the fine-tuned inference model and generate multiple inference trajectories.

[0177] The division unit is specifically used to divide multiple reasoning trajectories into preferred reasoning trajectories and undesirable reasoning trajectories according to the preset medical rationality.

[0178] The setting unit is specifically used to set a first preference probability for the target preferred inference trajectory in the preferred inference trajectory, and to set a second preference probability for the target inferior inference trajectory in the inferior inference trajectory; the first preference probability is greater than the second preference probability;

[0179] The training unit is specifically used to train the fine-tuned inference model based on the target optimization inference trajectory with the first preference probability and the target disadvantage inference trajectory with the second preference probability, so as to obtain the trained inference model.

[0180] In an exemplary embodiment, the fine-tuning unit is further configured to input the case narrative text into the second language model for reasoning, thereby obtaining multiple reasoning trajectories corresponding to the case narrative text and the reasoning results corresponding to each reasoning trajectory; and to fine-tune the initial reasoning model based on the case narrative text, each reasoning trajectory, and the reasoning results corresponding to each reasoning trajectory, thereby obtaining the fine-tuned reasoning model.

[0181] In an exemplary embodiment, the second training module 12 described above includes:

[0182] The discrimination unit is specifically used to discriminate the prediction results based on the third language model to obtain the discrimination result;

[0183] The training unit is specifically used to retrain the trained inference model based on the discrimination results to obtain the target inference model.

[0184] or,

[0185] The first determining unit is specifically used to determine the prediction result as a correct prediction result if the prediction result is the actual result, or if the prediction result is the superordinate disease concept of the actual result and the subordinate disease concept of the prediction result does not exceed a preset value.

[0186] The second determining unit is specifically used to determine that the prediction result is an incorrect prediction result when the predicted result is the upper-level disease concept of the actual result and the lower-level disease concept of the predicted result exceeds a preset value.

[0187] The training unit is specifically used to retrain the trained inference model based on correct and incorrect prediction results to obtain the target inference model.

[0188] The modules in the training device for the aforementioned disease reasoning model can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0189] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 10As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores phenotypic data of the target disease. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a training method for a disease inference model.

[0190] Those skilled in the art will understand that Figure 10 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0191] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0192] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

[0193] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0194] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0195] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0196] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A training method for a disease reasoning model, characterized in that, The method includes: Obtain a synthetic phenotype set for the target disease; the synthetic phenotype set includes a core phenotype subset and a candidate phenotype subset; the core phenotype subset includes at least one phenotype whose qualitative frequency reaches a preset condition; the candidate phenotype subset is obtained by sampling other phenotypes besides those in the core phenotype subset; The synthetic phenotypic set is input into the first large language model to synthesize case text, thereby obtaining case narrative text. The initial inference model is then trained based on the case narrative text to obtain the trained inference model. The preset case description text is input into the trained inference model for prediction, and the prediction result is obtained. The trained inference model is then retrained based on the prediction result to obtain the target inference model. The target inference model is used to infer and determine the disease type based on the input disease description information.

2. The method according to claim 1, characterized in that, The candidate phenotype subset is obtained by sampling phenotypes other than those in the core phenotype subset, including: For the phenotypes other than those in the core phenotype subset, the qualitative frequency of each of the other phenotypes is converted into an inclusion probability; Based on the inclusion probability of each of the other phenotypes, Bernoulli sampling is performed on each of the other phenotypes, and the sampled other phenotypes are used to construct a subset of candidate phenotypes.

3. The method according to claim 2, characterized in that, The method of constructing a subset of candidate phenotypes from other sampled phenotypes also includes at least one of the following: The other phenotypes obtained from the sampling are replaced with higher-level concepts in the medical ontology, and the candidate phenotype subset is constructed based on the other phenotypes after replacing the higher-level concepts. The candidate phenotype subset is constructed by sampling confusing phenotypes from other diseases that share partial phenotypes with the target disease, and replacing some other phenotypes in the sampled other phenotypes with the confusing phenotypes.

4. The method according to any one of claims 1-3, characterized in that, The process of inputting the synthetic phenotype set into the first large language model to synthesize medical record text, resulting in case narrative text, includes: The synthetic phenotype set is input into the first large language model to synthesize medical record text, resulting in the initial case narrative text. Based on the disease label information of the target disease, the initial case description text is corrected to obtain the case description text.

5. The method according to any one of claims 1-3, characterized in that, The process of training the initial inference model based on the case narrative text to obtain the trained inference model includes: The initial inference model was fine-tuned based on the case narrative text to obtain the fine-tuned inference model. The case narrative text is input into the finely tuned inference model to generate multiple inference trajectories; Based on the preset medical rationality, the multiple reasoning trajectories are divided into preferred reasoning trajectories and inferior reasoning trajectories; A first preference probability is set for the target preferred inference trajectory in the preferred inference trajectory, and a second preference probability is set for the target inferior inference trajectory in the inferior inference trajectory; the first preference probability is greater than the second preference probability; The fine-tuned inference model is trained using the target optimization inference trajectory based on the first preference probability and the target disadvantage inference trajectory based on the second preference probability, resulting in the trained inference model.

6. The method according to claim 5, characterized in that, The process of fine-tuning the initial inference model based on the case narrative text to obtain the fine-tuned inference model includes: The case narrative text is input into the second language model for reasoning, resulting in multiple reasoning trajectories corresponding to the case narrative text and the reasoning results corresponding to each reasoning trajectory. Based on the case narrative text, each of the inference trajectories, and the inference results corresponding to each of the inference trajectories, the initial inference model is fine-tuned to obtain the fine-tuned inference model.

7. The method according to any one of claims 1-3, characterized in that, The step of retraining the trained inference model based on the prediction results to obtain the target inference model includes: The prediction results are then analyzed using the third major language model to obtain the discrimination results. Based on the discrimination result, the trained inference model is retrained to obtain the target inference model; or, If the predicted result is the actual result, or if the predicted result is a higher-level disease concept than the actual result and the lower-level disease concept of the predicted result does not exceed a preset value, then the predicted result is determined to be a correct prediction result. If the predicted result is a higher-level disease concept than the actual result, and the lower-level disease concept of the predicted result exceeds the preset value, then the predicted result is determined to be an incorrect prediction result. Based on the correct prediction results and the incorrect prediction results, the trained inference model is retrained to obtain the target inference model.

8. A training device for a disease reasoning model, characterized in that, The device includes: An acquisition module is used to acquire a synthetic phenotype set of the target disease; the synthetic phenotype set includes a core phenotype subset and a candidate phenotype subset; the core phenotype subset includes at least one phenotype with a qualitative frequency exceeding a preset condition; the candidate phenotype subset is obtained by sampling other phenotypes besides those in the core phenotype subset; The training module is used to input the synthetic phenotypic set into the first large language model to synthesize medical record text, obtain case description text, and train the initial inference model based on the case description text to obtain the trained inference model. The retraining module is used to input a preset case description text into the trained inference model for prediction, obtain a prediction result, and retrain the trained inference model based on the prediction result to obtain a target inference model; the target inference model is used to infer and determine the disease type based on the input disease description information.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

10. A 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 steps of the method according to any one of claims 1 to 7.